mirror of
https://github.com/andrigamerita/simpkey
synced 2025-02-16 11:50:55 +01:00
CW
This commit is contained in:
parent
a4c54edb54
commit
9cc01202e4
@ -228,11 +228,12 @@ router.post('/action/:action', async ctx => {
|
||||
try {
|
||||
switch (action) {
|
||||
case 'create-note': {
|
||||
const { text, renoteId, replyId } = ctx.request.body;
|
||||
const { text, renoteId, replyId, useCw, cw } = ctx.request.body;
|
||||
const opts = { i } as Record<string, string>;
|
||||
if (text) opts.text = text;
|
||||
if (renoteId) opts.renoteId = renoteId;
|
||||
if (replyId) opts.replyId = replyId;
|
||||
if (useCw) opts.cw = cw || '';
|
||||
await api(host, 'notes/create', opts);
|
||||
break;
|
||||
}
|
||||
|
@ -79,6 +79,10 @@ mixin note(note)
|
||||
|
||||
mixin post-form(url, placeholder, buttonText)
|
||||
form(action=url, method="post")
|
||||
div: label
|
||||
input(type="checkbox", name="useCw")
|
||||
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")
|
||||
button(type="submit")= buttonText
|
||||
block
|
||||
|
Loading…
x
Reference in New Issue
Block a user