mirror of https://github.com/andrigamerita/simpkey
公開範囲設定
This commit is contained in:
parent
92e8472b26
commit
f02516b372
|
@ -228,12 +228,13 @@ router.post('/action/:action', async ctx => {
|
||||||
try {
|
try {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'create-note': {
|
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<string, string>;
|
const opts = { i } as Record<string, string>;
|
||||||
if (text) opts.text = text;
|
if (text) opts.text = text;
|
||||||
if (renoteId) opts.renoteId = renoteId;
|
if (renoteId) opts.renoteId = renoteId;
|
||||||
if (replyId) opts.replyId = replyId;
|
if (replyId) opts.replyId = replyId;
|
||||||
if (useCw) opts.cw = cw || '';
|
if (useCw) opts.cw = cw || '';
|
||||||
|
if (visibility) opts.visibility = visibility;
|
||||||
await api(host, 'notes/create', opts);
|
await api(host, 'notes/create', opts);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ mixin note-header(note)
|
||||||
if note.user.isBot
|
if note.user.isBot
|
||||||
span.bot [BOT]
|
span.bot [BOT]
|
||||||
if note.user.isCat
|
if note.user.isCat
|
||||||
span.bot [CAT]
|
span.bot [CAT]
|
||||||
|
|
||||||
mixin sub-note(note)
|
mixin sub-note(note)
|
||||||
.sub-note
|
.sub-note
|
||||||
|
@ -84,6 +84,13 @@ mixin post-form(url, placeholder, buttonText)
|
||||||
span CW
|
span CW
|
||||||
input(type="text", name="cw" placeholder="注釈(省略可能)" style="max-width: 100%; min-width: 100%;")
|
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")
|
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
|
button(type="submit")= buttonText
|
||||||
block
|
block
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue