will fix?
This commit is contained in:
parent
7132ad2285
commit
3118825fa9
|
@ -6,7 +6,7 @@
|
||||||
<div v-if="newRelease" class="releaseNotes">
|
<div v-if="newRelease" class="releaseNotes">
|
||||||
<Mfm :text="data.notes"/>
|
<Mfm :text="data.notes"/>
|
||||||
<div v-if="data.screenshots.length > 0" style="max-width: 500">
|
<div v-if="data.screenshots.length > 0" style="max-width: 500">
|
||||||
<img v-for="i in data.screenshots" :key="i" :src="i"/>
|
<img v-for="i in data.screenshots" :key="i" :src="i" alt="screenshot"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkButton class="gotIt" primary full @click="modal.close()">{{ i18n.ts.gotIt }}</MkButton>
|
<MkButton class="gotIt" primary full @click="modal.close()">{{ i18n.ts.gotIt }}</MkButton>
|
||||||
|
|
|
@ -7,6 +7,8 @@ import * as Misskey from "calckey-js";
|
||||||
import { apiUrl, url } from "@/config";
|
import { apiUrl, url } from "@/config";
|
||||||
import MkPostFormDialog from "@/components/MkPostFormDialog.vue";
|
import MkPostFormDialog from "@/components/MkPostFormDialog.vue";
|
||||||
import MkWaitingDialog from "@/components/MkWaitingDialog.vue";
|
import MkWaitingDialog from "@/components/MkWaitingDialog.vue";
|
||||||
|
import MkToast from '@/components/MkToast.vue';
|
||||||
|
import MkDialog from '@/components/MkDialog.vue';
|
||||||
import { MenuItem } from "@/types/menu";
|
import { MenuItem } from "@/types/menu";
|
||||||
import { $i } from "@/account";
|
import { $i } from "@/account";
|
||||||
|
|
||||||
|
@ -246,54 +248,41 @@ export function modalPageWindow(path: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function toast(message: string) {
|
export function toast(message: string) {
|
||||||
popup(
|
popup(MkToast, {
|
||||||
defineAsyncComponent(() => import("@/components/MkToast.vue")),
|
|
||||||
{
|
|
||||||
message,
|
message,
|
||||||
},
|
}, {}, 'closed');
|
||||||
{},
|
|
||||||
"closed",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function alert(props: {
|
export function alert(props: {
|
||||||
type?: "error" | "info" | "success" | "warning" | "waiting" | "question";
|
type?: 'error' | 'info' | 'success' | 'warning' | 'waiting' | 'question';
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
text?: string | null;
|
text?: string | null;
|
||||||
}): Promise<void> {
|
}): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
popup(
|
popup(MkDialog, props, {
|
||||||
defineAsyncComponent(() => import("@/components/MkDialog.vue")),
|
done: result => {
|
||||||
props,
|
|
||||||
{
|
|
||||||
done: (result) => {
|
|
||||||
resolve();
|
resolve();
|
||||||
},
|
},
|
||||||
},
|
}, 'closed');
|
||||||
"closed",
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function confirm(props: {
|
export function confirm(props: {
|
||||||
type: "error" | "info" | "success" | "warning" | "waiting" | "question";
|
type: 'error' | 'info' | 'success' | 'warning' | 'waiting' | 'question';
|
||||||
title?: string | null;
|
title?: string | null;
|
||||||
text?: string | null;
|
text?: string | null;
|
||||||
|
okText?: string;
|
||||||
|
cancelText?: string;
|
||||||
}): Promise<{ canceled: boolean }> {
|
}): Promise<{ canceled: boolean }> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
popup(
|
popup(MkDialog, {
|
||||||
defineAsyncComponent(() => import("@/components/MkDialog.vue")),
|
|
||||||
{
|
|
||||||
...props,
|
...props,
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
},
|
}, {
|
||||||
{
|
done: result => {
|
||||||
done: (result) => {
|
|
||||||
resolve(result ? result : { canceled: true });
|
resolve(result ? result : { canceled: true });
|
||||||
},
|
},
|
||||||
},
|
}, 'closed');
|
||||||
"closed",
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue