diff --git a/src/router.ts b/src/router.ts index d21a8cd..68a4d98 100644 --- a/src/router.ts +++ b/src/router.ts @@ -228,12 +228,13 @@ router.post('/action/:action', async ctx => { try { switch (action) { case 'create-note': { - const { text, renoteId, replyId, useCw, cw } = ctx.request.body; + const { text, renoteId, replyId, useCw, cw, visibility } = ctx.request.body; const opts = { i } as Record; if (text) opts.text = text; if (renoteId) opts.renoteId = renoteId; if (replyId) opts.replyId = replyId; if (useCw) opts.cw = cw || ''; + if (visibility) opts.visibility = visibility; await api(host, 'notes/create', opts); break; } diff --git a/src/views/_components.pug b/src/views/_components.pug index 7be7aee..27f984a 100644 --- a/src/views/_components.pug +++ b/src/views/_components.pug @@ -14,7 +14,7 @@ mixin note-header(note) if note.user.isBot span.bot [BOT] if note.user.isCat - span.bot [CAT] + span.bot [CAT] mixin sub-note(note) .sub-note @@ -84,6 +84,13 @@ mixin post-form(url, placeholder, buttonText) span CW input(type="text", name="cw" placeholder="注釈(省略可能)" style="max-width: 100%; min-width: 100%;") textarea(name="text", placeholder=placeholder style="max-width: 100%; min-width: 100%; height: 6em; margin-bottom: 8px") + + div: label 公開範囲: + select(name="visibility") + option(value="public") パブリック + option(value="home") ホーム + option(value="followers") フォロワー + option(value="direct") ダイレクト button(type="submit")= buttonText block