fix: dont show cheat sheet when not needed
This commit is contained in:
parent
dcd6e48101
commit
2de535b0b8
15 changed files with 209 additions and 103 deletions
|
@ -24,12 +24,12 @@ export async function importMastoPost(
|
|||
reply = await resolveNote(post.object.inReplyTo);
|
||||
}
|
||||
if (post.directMessage) {
|
||||
done();
|
||||
done();
|
||||
return;
|
||||
}
|
||||
if (job.data.signatureCheck) {
|
||||
if (!post.signature) {
|
||||
done();
|
||||
done();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,6 +204,7 @@
|
|||
<i class="ph-plug ph-bold ph-lg"></i>
|
||||
</button>
|
||||
<button
|
||||
v-if="showMfmCheatsheet"
|
||||
v-tooltip="i18n.ts._mfm.cheatSheet"
|
||||
class="_button right"
|
||||
@click="openCheatSheet"
|
||||
|
@ -275,11 +276,13 @@ const props = withDefaults(
|
|||
instant?: boolean;
|
||||
fixed?: boolean;
|
||||
autofocus?: boolean;
|
||||
showMfmCheatSheet?: boolean;
|
||||
editId?: misskey.entities.Note["id"];
|
||||
}>(),
|
||||
{
|
||||
initialVisibleUsers: () => [],
|
||||
autofocus: true,
|
||||
showMfmCheatSheet: true,
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
</template>
|
||||
</I18n>
|
||||
<br />
|
||||
<XPostForm class="post-form _block" />
|
||||
<XPostForm class="post-form _block" :show-mfm-cheat-sheet="false"/>
|
||||
</section>
|
||||
<section
|
||||
v-else-if="tutorial === 4"
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
<label>
|
||||
<div class="label"><slot name="label"></slot></div>
|
||||
<div class="input" :class="{ inline, disabled, focused }">
|
||||
<div ref="prefixEl" class="prefix"><slot name="prefix"></slot></div>
|
||||
<div ref="prefixEl" class="prefix">
|
||||
<slot name="prefix"></slot>
|
||||
</div>
|
||||
<input
|
||||
ref="inputEl"
|
||||
v-model="v"
|
||||
|
@ -26,7 +28,9 @@
|
|||
<datalist v-if="datalist" :id="id">
|
||||
<option v-for="data in datalist" :value="data" />
|
||||
</datalist>
|
||||
<div ref="suffixEl" class="suffix"><slot name="suffix"></slot></div>
|
||||
<div ref="suffixEl" class="suffix">
|
||||
<slot name="suffix"></slot>
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption"><slot name="caption"></slot></div>
|
||||
</label>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<template>
|
||||
<label
|
||||
v-adaptive-border
|
||||
class="novjtctn"
|
||||
:class="{ disabled, checked }"
|
||||
>
|
||||
<label v-adaptive-border class="novjtctn" :class="{ disabled, checked }">
|
||||
<input
|
||||
type="radio"
|
||||
:disabled="disabled"
|
||||
|
|
|
@ -17,12 +17,9 @@
|
|||
@blur="tooltipHide"
|
||||
@mouseenter="tooltipShow"
|
||||
@mouseleave="tooltipHide"
|
||||
@input="(x) => inputVal = x.target.value"
|
||||
@input="(x) => (inputVal = x.target.value)"
|
||||
/>
|
||||
<datalist
|
||||
v-if="showTicks && steps"
|
||||
:id="id"
|
||||
>
|
||||
<datalist v-if="showTicks && steps" :id="id">
|
||||
<option
|
||||
v-for="i in steps + 1"
|
||||
:value="i"
|
||||
|
@ -97,7 +94,6 @@ function tooltipShow() {
|
|||
function tooltipHide() {
|
||||
tooltipShowing.value = false;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -163,19 +159,33 @@ function tooltipHide() {
|
|||
width: 100%;
|
||||
background: none;
|
||||
|
||||
&::-webkit-slider-runnable-track { @include track }
|
||||
&::-moz-range-track { @include track }
|
||||
&::-ms-track { @include track }
|
||||
&::-webkit-slider-runnable-track {
|
||||
@include track;
|
||||
}
|
||||
&::-moz-range-track {
|
||||
@include track;
|
||||
}
|
||||
&::-ms-track {
|
||||
@include track;
|
||||
}
|
||||
|
||||
&::-moz-range-progress { @include fill }
|
||||
&::-ms-fill-lower { @include fill }
|
||||
&::-moz-range-progress {
|
||||
@include fill;
|
||||
}
|
||||
&::-ms-fill-lower {
|
||||
@include fill;
|
||||
}
|
||||
|
||||
&::-webkit-slider-thumb {
|
||||
margin-top: -6.5px;
|
||||
@include thumb
|
||||
@include thumb;
|
||||
}
|
||||
&::-moz-range-thumb {
|
||||
@include thumb;
|
||||
}
|
||||
&::-ms-thumb {
|
||||
@include thumb;
|
||||
}
|
||||
&::-moz-range-thumb { @include thumb }
|
||||
&::-ms-thumb { @include thumb }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
@click.prevent="onClick"
|
||||
tabindex="-1"
|
||||
>
|
||||
<div ref="prefixEl" class="prefix"><slot name="prefix"></slot></div>
|
||||
<div ref="prefixEl" class="prefix">
|
||||
<slot name="prefix"></slot>
|
||||
</div>
|
||||
<select
|
||||
ref="inputEl"
|
||||
v-model="v"
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
:disabled="disabled"
|
||||
v-on:change="(x) => toggle(x)"
|
||||
/>
|
||||
<div
|
||||
class="button"
|
||||
>
|
||||
<div class="button">
|
||||
<div class="knob"></div>
|
||||
</div>
|
||||
<span class="label">
|
||||
|
|
|
@ -214,7 +214,7 @@ export default defineComponent({
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
> .input {
|
||||
> .input {
|
||||
position: relative;
|
||||
|
||||
> textarea {
|
||||
|
@ -273,7 +273,6 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
> .save {
|
||||
margin: 8px 0 0 0;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ const adjust = (rect: { width: number; height: number }) => {
|
|||
margin = props.marginMin;
|
||||
return;
|
||||
}
|
||||
if ( ui === "classic" ) {
|
||||
if (ui === "classic") {
|
||||
margin = 12;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ export function claimZIndex(
|
|||
|
||||
let uniqueId = 0;
|
||||
export function getUniqueId(): string {
|
||||
return uniqueId++ + '';
|
||||
return uniqueId++ + "";
|
||||
}
|
||||
|
||||
export async function popup(
|
||||
|
@ -232,7 +232,11 @@ export async function popup(
|
|||
|
||||
export function pageWindow(path: string) {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkPageWindow.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkPageWindow.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
initialPath: path,
|
||||
},
|
||||
|
@ -243,7 +247,11 @@ export function pageWindow(path: string) {
|
|||
|
||||
export function modalPageWindow(path: string) {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkModalPageWindow.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkModalPageWindow.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
initialPath: path,
|
||||
},
|
||||
|
@ -313,7 +321,11 @@ export function yesno(props: {
|
|||
}): Promise<{ canceled: boolean }> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
...props,
|
||||
showCancelButton: true,
|
||||
|
@ -344,7 +356,11 @@ export function inputText(props: {
|
|||
> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -378,7 +394,11 @@ export function inputParagraph(props: {
|
|||
> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -412,7 +432,11 @@ export function inputNumber(props: {
|
|||
> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -446,7 +470,11 @@ export function inputDate(props: {
|
|||
> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -501,7 +529,11 @@ export function select<C = any>(
|
|||
> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
|
@ -528,7 +560,11 @@ export function success() {
|
|||
showing.value = false;
|
||||
}, 1000);
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkWaitingDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkWaitingDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
success: true,
|
||||
showing: showing,
|
||||
|
@ -545,7 +581,11 @@ export function waiting() {
|
|||
return new Promise((resolve, reject) => {
|
||||
const showing = ref(true);
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkWaitingDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkWaitingDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
success: false,
|
||||
showing: showing,
|
||||
|
@ -561,7 +601,11 @@ export function waiting() {
|
|||
export function form(title, form) {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkFormDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkFormDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{ title, form },
|
||||
{
|
||||
done: (result) => {
|
||||
|
@ -576,7 +620,11 @@ export function form(title, form) {
|
|||
export async function selectUser() {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkUserSelectDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkUserSelectDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{},
|
||||
{
|
||||
ok: (user) => {
|
||||
|
@ -591,7 +639,11 @@ export async function selectUser() {
|
|||
export async function selectInstance(): Promise<Misskey.entities.Instance> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkInstanceSelectDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkInstanceSelectDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{},
|
||||
{
|
||||
ok: (instance) => {
|
||||
|
@ -606,7 +658,11 @@ export async function selectInstance(): Promise<Misskey.entities.Instance> {
|
|||
export async function selectDriveFile(multiple: boolean) {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDriveSelectDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDriveSelectDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
type: "file",
|
||||
multiple,
|
||||
|
@ -626,7 +682,11 @@ export async function selectDriveFile(multiple: boolean) {
|
|||
export async function selectDriveFolder(multiple: boolean) {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkDriveSelectDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkDriveSelectDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
type: "folder",
|
||||
multiple,
|
||||
|
@ -646,7 +706,11 @@ export async function selectDriveFolder(multiple: boolean) {
|
|||
export async function pickEmoji(src: HTMLElement | null, opts) {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkEmojiPickerDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkEmojiPickerDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
src,
|
||||
...opts,
|
||||
|
@ -669,7 +733,11 @@ export async function cropImage(
|
|||
): Promise<Misskey.entities.DriveFile> {
|
||||
return new Promise((resolve, reject) => {
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkCropperDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkCropperDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
file: image,
|
||||
aspectRatio: options.aspectRatio,
|
||||
|
@ -733,7 +801,11 @@ export async function openEmojiPicker(
|
|||
});
|
||||
|
||||
openingEmojiPicker = await popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkEmojiPickerDialog.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkEmojiPickerDialog.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
src,
|
||||
...opts,
|
||||
|
@ -766,7 +838,11 @@ export function popupMenu(
|
|||
return new Promise((resolve, reject) => {
|
||||
let dispose;
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkPopupMenu.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkPopupMenu.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
items,
|
||||
src,
|
||||
|
@ -794,7 +870,11 @@ export function contextMenu(
|
|||
return new Promise((resolve, reject) => {
|
||||
let dispose;
|
||||
popup(
|
||||
defineAsyncComponent({ loader: () => import("@/components/MkContextMenu.vue"), loadingComponent: MkWaitingDialog, delay: 1000 }),
|
||||
defineAsyncComponent({
|
||||
loader: () => import("@/components/MkContextMenu.vue"),
|
||||
loadingComponent: MkWaitingDialog,
|
||||
delay: 1000,
|
||||
}),
|
||||
{
|
||||
items,
|
||||
ev,
|
||||
|
|
|
@ -55,12 +55,12 @@
|
|||
i18n.ts.disablePagesScript
|
||||
}}</FormSwitch>
|
||||
<FormSwitch v-model="profile.showTimelineReplies" class="_formBlock"
|
||||
>{{ i18n.ts.flagShowTimelineReplies
|
||||
}}<template #caption
|
||||
>{{ i18n.ts.flagShowTimelineRepliesDescription }}
|
||||
{{ i18n.ts.reflectMayTakeTime }}</template
|
||||
></FormSwitch
|
||||
>
|
||||
>{{ i18n.ts.flagShowTimelineReplies
|
||||
}}<template #caption
|
||||
>{{ i18n.ts.flagShowTimelineRepliesDescription }}
|
||||
{{ i18n.ts.reflectMayTakeTime }}</template
|
||||
></FormSwitch
|
||||
>
|
||||
|
||||
<FormSelect v-model="serverDisconnectedBehavior" class="_formBlock">
|
||||
<template #label>{{ i18n.ts.whenServerDisconnected }}</template>
|
||||
|
@ -168,8 +168,12 @@
|
|||
<FormSelect v-model="instanceTicker" class="_formBlock">
|
||||
<template #label>{{ i18n.ts.instanceTicker }}</template>
|
||||
<option value="none">{{ i18n.ts._instanceTicker.none }}</option>
|
||||
<option value="remote">{{ i18n.ts._instanceTicker.remote }}</option>
|
||||
<option value="always">{{ i18n.ts._instanceTicker.always }}</option>
|
||||
<option value="remote">
|
||||
{{ i18n.ts._instanceTicker.remote }}
|
||||
</option>
|
||||
<option value="always">
|
||||
{{ i18n.ts._instanceTicker.always }}
|
||||
</option>
|
||||
</FormSelect>
|
||||
|
||||
<FormSelect v-model="nsfw" class="_formBlock">
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
><i class="ph-airplane-takeoff ph-bold ph-lg"></i
|
||||
></template>
|
||||
<template #label>{{ i18n.ts.moveToLabel }}</template>
|
||||
<template #caption>{{ i18n.ts.moveAccountDescription }}</template>
|
||||
<template #caption>{{
|
||||
i18n.ts.moveAccountDescription
|
||||
}}</template>
|
||||
</FormInput>
|
||||
<FormButton primary danger @click="move(moveToAccount)">
|
||||
{{ i18n.ts.moveAccount }}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<div class="dkgtipfy" :class="{ wallpaper, isMobile, centered: ui === 'classic' }">
|
||||
<div
|
||||
class="dkgtipfy"
|
||||
:class="{ wallpaper, isMobile, centered: ui === 'classic' }"
|
||||
>
|
||||
<XSidebar v-if="!isMobile" class="sidebar" />
|
||||
|
||||
<MkStickyContainer class="contents">
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<template>
|
||||
<XPostForm class="_panel mkw-postForm" :fixed="true" :autofocus="false" />
|
||||
<XPostForm
|
||||
class="_panel mkw-postForm"
|
||||
:fixed="true"
|
||||
:autofocus="false"
|
||||
:show-mfm-cheat-sheet="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
Loading…
Reference in a new issue