Use help menu in Kanban
This commit is contained in:
parent
69595a400b
commit
88f5cc416e
2 changed files with 14 additions and 21 deletions
|
@ -4,6 +4,8 @@ import { host } from "@/config";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import XTutorial from "../components/MkTutorialDialog.vue";
|
import XTutorial from "../components/MkTutorialDialog.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
import { $i } from "@/account";
|
||||||
|
|
||||||
|
|
||||||
export function openHelpMenu_(ev: MouseEvent) {
|
export function openHelpMenu_(ev: MouseEvent) {
|
||||||
os.popupMenu(
|
os.popupMenu(
|
||||||
|
@ -40,7 +42,13 @@ export function openHelpMenu_(ev: MouseEvent) {
|
||||||
window.open("https://calckey.org/apps", "_blank");
|
window.open("https://calckey.org/apps", "_blank");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
$i ? null : {
|
||||||
|
type: "link",
|
||||||
|
text: i18n.ts._mfm.cheatSheet,
|
||||||
|
icon: "ph-question ph-bold ph-lg",
|
||||||
|
to: "/mfm-cheat-sheet",
|
||||||
|
},
|
||||||
|
$i ? {
|
||||||
type: "button",
|
type: "button",
|
||||||
action: async () => {
|
action: async () => {
|
||||||
defaultStore.set("tutorial", 0);
|
defaultStore.set("tutorial", 0);
|
||||||
|
@ -48,19 +56,19 @@ export function openHelpMenu_(ev: MouseEvent) {
|
||||||
},
|
},
|
||||||
text: i18n.ts.replayTutorial,
|
text: i18n.ts.replayTutorial,
|
||||||
icon: "ph-circle-wavy-question ph-bold ph-lg",
|
icon: "ph-circle-wavy-question ph-bold ph-lg",
|
||||||
},
|
} : undefined,
|
||||||
null,
|
null,
|
||||||
{
|
{
|
||||||
type: "parent",
|
type: "parent",
|
||||||
text: i18n.ts.developer,
|
text: i18n.ts.developer,
|
||||||
icon: "ph-code ph-bold ph-lg",
|
icon: "ph-code ph-bold ph-lg",
|
||||||
children: [
|
children: [
|
||||||
{
|
$i ? {
|
||||||
type: "link",
|
type: "link",
|
||||||
to: "/api-console",
|
to: "/api-console",
|
||||||
text: "API Console",
|
text: "API Console",
|
||||||
icon: "ph-terminal-window ph-bold ph-lg",
|
icon: "ph-terminal-window ph-bold ph-lg",
|
||||||
},
|
} : undefined,
|
||||||
{
|
{
|
||||||
text: i18n.ts.document,
|
text: i18n.ts.document,
|
||||||
icon: "ph-file-doc ph-bold ph-lg",
|
icon: "ph-file-doc ph-bold ph-lg",
|
||||||
|
|
|
@ -177,6 +177,7 @@ import FormLink from "@/components/form/link.vue";
|
||||||
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
|
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { DetailedInstanceMetadata } from "calckey-js/built/entities";
|
import { DetailedInstanceMetadata } from "calckey-js/built/entities";
|
||||||
|
import { openHelpMenu_ } from "@/scripts/helpMenu";
|
||||||
import XSigninDialog from "@/components/MkSigninDialog.vue";
|
import XSigninDialog from "@/components/MkSigninDialog.vue";
|
||||||
import XSignupDialog from "@/components/MkSignupDialog.vue";
|
import XSignupDialog from "@/components/MkSignupDialog.vue";
|
||||||
import MkKeyValue from "@/components/MkKeyValue.vue";
|
import MkKeyValue from "@/components/MkKeyValue.vue";
|
||||||
|
@ -231,23 +232,7 @@ function signup() {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
function showMenu(ev) {
|
function showMenu(ev) {
|
||||||
os.popupMenu(
|
openHelpMenu_(ev);
|
||||||
[
|
|
||||||
{
|
|
||||||
type: "link",
|
|
||||||
text: i18n.ts.instanceInfo,
|
|
||||||
icon: "ph-info ph-bold ph-lg",
|
|
||||||
to: "/about"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "link",
|
|
||||||
text: i18n.ts.aboutMisskey,
|
|
||||||
icon: "ph-info ph-bold ph-lg",
|
|
||||||
to: "/about-calckey"
|
|
||||||
},
|
|
||||||
],
|
|
||||||
ev.currentTarget ?? ev.target
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue