upd: add MFM Cheatsheet

Closes transfem-org/Sharkey#21
This commit is contained in:
Mar0xy 2023-10-04 03:36:26 +02:00
parent 78abc725f6
commit a8d2103980
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 555 additions and 1 deletions

View file

@ -88,6 +88,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div :class="$style.footerRight">
<button v-tooltip="i18n.ts.previewNoteText" class="_button" :class="[$style.footerButton, { [$style.previewButtonActive]: showPreview }]" @click="showPreview = !showPreview"><i class="ph-eye ph-bold ph-lg"></i></button>
<button v-tooltip="'MFM Cheatsheet'" class="_button" :class="$style.footerButton" @click="MFMWindow"><i class="ph-notebook ph-bold ph-lg"></i></button>
<!--<button v-tooltip="i18n.ts.more" class="_button" :class="$style.footerButton" @click="showingOptions = !showingOptions"><i class="ph-dots-three ph-bold ph-lg"></i></button>-->
</div>
</footer>
@ -346,6 +347,10 @@ function watchForDraft() {
watch($$(localOnly), () => saveDraft());
}
function MFMWindow() {
os.popup(defineAsyncComponent(() => import('@/components/MkMfmWindow.vue')), {}, {}, 'closed');
}
function checkMissingMention() {
if (visibility === 'specified') {
const ast = mfm.parse(text);
@ -1159,7 +1164,7 @@ defineExpose({
}
.footerRight {
flex: 0;
flex: 0.3;
margin-left: auto;
display: grid;
grid-auto-flow: row;