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

View File

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

View File

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