mfmのやつ

This commit is contained in:
mattyatea 2023-09-27 16:40:32 +09:00
parent 39b66a2638
commit 2b72034847
3 changed files with 10 additions and 4 deletions

3
locales/index.d.ts vendored
View file

@ -648,6 +648,7 @@ export interface Locale {
"metrics": string;
"overview": string;
"logs": string;
"mfm": string;
"delayed": string;
"database": string;
"channel": string;
@ -2267,9 +2268,9 @@ export interface Locale {
"_moderationLogTypes": {
"createRole": string;
"deleteRole": string;
"updateRole": string;
"assignRole": string;
"unassignRole": string;
"updateRole": string;
"suspend": string;
"unsuspend": string;
"addCustomEmoji": string;

View file

@ -645,6 +645,7 @@ copy: "コピー"
metrics: "メトリクス"
overview: "概要"
logs: "ログ"
mfm: 'mfm 装飾'
delayed: "遅延"
database: "データベース"
channel: "チャンネル"
@ -2180,9 +2181,9 @@ _webhookSettings:
_moderationLogTypes:
createRole: "ロールを作成"
deleteRole: "ロールを削除"
updateRole: "ロールを更新"
assignRole: "ロールへアサイン"
unassignRole: "ロールのアサイン解除"
updateRole: "ロール設定更新"
suspend: "凍結"
unsuspend: "凍結解除"
addCustomEmoji: "カスタム絵文字追加"

View file

@ -116,10 +116,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<button v-tooltip="i18n.ts.hashtags" class="_button"
:class="[$style.footerButton, { [$style.footerButtonActive]: withHashtags }]"
@click="withHashtags = !withHashtags"><i class="ti ti-hash"></i></button>
<button v-if="postFormActions.length > 0" v-tooltip="i18n.ts.plugin" class="_button"
<button v-if="postFormActions.length" v-tooltip="i18n.ts.plugin" class="_button"
:class="$style.footerButton" @click="showActions"><i class="ti ti-plug"></i></button>
<button v-tooltip="i18n.ts.emoji" :class="['_button', $style.footerButton]" @click="insertEmoji"><i
class="ti ti-mood-happy"></i></button>
<button v-tooltip="i18n.ts.mfm" :class="['_button', $style.footerButton]" @click="insertMfm"><i
class="ti ti-wand"></i></button>
</div>
<div :class="$style.footerRight">
<button v-tooltip="i18n.ts.previewNoteText" class="_button"
@ -879,7 +881,9 @@ function insertMention() {
async function insertEmoji(ev: MouseEvent) {
os.openEmojiPicker(ev.currentTarget ?? ev.target, {}, textareaEl);
}
async function insertMfm(){
insertTextAtCursor(textareaEl, '$');
}
function showActions(ev) {
os.popupMenu(postFormActions.map(action => ({
text: action.title,