mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-01 00:08:10 +09:00
Show MFM Cheatsheet on note dialogue.
This commit is contained in:
parent
f31db29694
commit
ad4af9a946
@ -54,6 +54,7 @@
|
||||
<button v-tooltip="i18n.ts.hashtags" class="_button" :class="{ active: withHashtags }" @click="withHashtags = !withHashtags"><i class="ph-hash-bold ph-lg"></i></button>
|
||||
<button v-tooltip="i18n.ts.emoji" class="_button" @click="insertEmoji"><i class="ph-smiley-bold ph-lg"></i></button>
|
||||
<button v-if="postFormActions.length > 0" v-tooltip="i18n.ts.plugin" class="_button" @click="showActions"><i class="ph-plug-bold ph-lg"></i></button>
|
||||
<button v-tooltip="i18n.ts._mfm.cheatSheet" class="_button right" @click="openCheatSheet"><i class="ph-question-bold ph-lg"></i></button>
|
||||
</footer>
|
||||
<datalist id="hashtags">
|
||||
<option v-for="hashtag in recentHashtags" :key="hashtag" :value="hashtag"/>
|
||||
@ -90,6 +91,7 @@ import { instance } from '@/instance';
|
||||
import { $i, getAccounts, openAccountMenu as openAccountMenu_ } from '@/account';
|
||||
import { uploadFile } from '@/scripts/upload';
|
||||
import { deepClone } from '@/scripts/clone';
|
||||
import MfmCheatSheet from '@/pages/mfm-cheat-sheet.vue';
|
||||
|
||||
const modal = inject('modal');
|
||||
|
||||
@ -624,6 +626,10 @@ async function insertEmoji(ev: MouseEvent) {
|
||||
os.openEmojiPicker(ev.currentTarget ?? ev.target, {}, textareaEl);
|
||||
}
|
||||
|
||||
async function openCheatSheet(ev: MouseEvent) {
|
||||
window.open(url + '/mfm-cheat-sheet', '_blank');
|
||||
}
|
||||
|
||||
function showActions(ev) {
|
||||
os.popupMenu(postFormActions.map(action => ({
|
||||
text: action.title,
|
||||
@ -711,6 +717,9 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.right {
|
||||
float:right
|
||||
}
|
||||
.gafaadew {
|
||||
position: relative;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user