Use help menu in Kanban

This commit is contained in:
Freeplay 2023-06-14 18:33:13 -04:00
parent 69595a400b
commit 88f5cc416e
2 changed files with 14 additions and 21 deletions

View file

@ -4,6 +4,8 @@ import { host } from "@/config";
import * as os from "@/os";
import XTutorial from "../components/MkTutorialDialog.vue";
import { i18n } from "@/i18n";
import { $i } from "@/account";
export function openHelpMenu_(ev: MouseEvent) {
os.popupMenu(
@ -40,7 +42,13 @@ export function openHelpMenu_(ev: MouseEvent) {
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",
action: async () => {
defaultStore.set("tutorial", 0);
@ -48,19 +56,19 @@ export function openHelpMenu_(ev: MouseEvent) {
},
text: i18n.ts.replayTutorial,
icon: "ph-circle-wavy-question ph-bold ph-lg",
},
} : undefined,
null,
{
type: "parent",
text: i18n.ts.developer,
icon: "ph-code ph-bold ph-lg",
children: [
{
$i ? {
type: "link",
to: "/api-console",
text: "API Console",
icon: "ph-terminal-window ph-bold ph-lg",
},
} : undefined,
{
text: i18n.ts.document,
icon: "ph-file-doc ph-bold ph-lg",

View file

@ -177,6 +177,7 @@ import FormLink from "@/components/form/link.vue";
import XShowMoreButton from "@/components/MkShowMoreButton.vue";
import { i18n } from "@/i18n";
import { DetailedInstanceMetadata } from "calckey-js/built/entities";
import { openHelpMenu_ } from "@/scripts/helpMenu";
import XSigninDialog from "@/components/MkSigninDialog.vue";
import XSignupDialog from "@/components/MkSignupDialog.vue";
import MkKeyValue from "@/components/MkKeyValue.vue";
@ -231,23 +232,7 @@ function signup() {
);
};
function showMenu(ev) {
os.popupMenu(
[
{
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
);
openHelpMenu_(ev);
}
</script>