2023-01-12 21:40:33 -07:00
|
|
|
import { defineAsyncComponent, Ref, inject } from "vue";
|
|
|
|
import * as misskey from "calckey-js";
|
|
|
|
import { pleaseLogin } from "./please-login";
|
|
|
|
import { $i } from "@/account";
|
|
|
|
import { i18n } from "@/i18n";
|
|
|
|
import { instance } from "@/instance";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import copyToClipboard from "@/scripts/copy-to-clipboard";
|
|
|
|
import { url } from "@/config";
|
|
|
|
import { noteActions } from "@/store";
|
|
|
|
import { shareAvailable } from "@/scripts/share-available";
|
2022-01-13 18:25:51 -07:00
|
|
|
|
|
|
|
export function getNoteMenu(props: {
|
|
|
|
note: misskey.entities.Note;
|
|
|
|
menuButton: Ref<HTMLElement>;
|
|
|
|
translation: Ref<any>;
|
|
|
|
translating: Ref<boolean>;
|
2022-06-18 03:27:09 -06:00
|
|
|
isDeleted: Ref<boolean>;
|
2022-06-18 03:27:47 -06:00
|
|
|
currentClipPage?: Ref<misskey.entities.Clip>;
|
2022-01-13 18:25:51 -07:00
|
|
|
}) {
|
2023-01-12 21:40:33 -07:00
|
|
|
const isRenote =
|
2022-01-13 18:25:51 -07:00
|
|
|
props.note.renote != null &&
|
|
|
|
props.note.text == null &&
|
|
|
|
props.note.fileIds.length === 0 &&
|
2023-01-12 21:40:33 -07:00
|
|
|
props.note.poll == null;
|
2022-01-13 18:25:51 -07:00
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
const appearNote = isRenote
|
|
|
|
? (props.note.renote as misskey.entities.Note)
|
|
|
|
: props.note;
|
2022-01-13 18:25:51 -07:00
|
|
|
|
|
|
|
function del(): void {
|
|
|
|
os.confirm({
|
2023-01-12 21:40:33 -07:00
|
|
|
type: "warning",
|
2022-01-27 19:39:49 -07:00
|
|
|
text: i18n.ts.noteDeleteConfirm,
|
2022-01-13 18:25:51 -07:00
|
|
|
}).then(({ canceled }) => {
|
|
|
|
if (canceled) return;
|
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
os.api("notes/delete", {
|
2022-06-29 19:53:40 -06:00
|
|
|
noteId: appearNote.id,
|
2022-01-13 18:25:51 -07:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function delEdit(): void {
|
|
|
|
os.confirm({
|
2023-01-12 21:40:33 -07:00
|
|
|
type: "warning",
|
2022-01-27 19:39:49 -07:00
|
|
|
text: i18n.ts.deleteAndEditConfirm,
|
2022-01-13 18:25:51 -07:00
|
|
|
}).then(({ canceled }) => {
|
|
|
|
if (canceled) return;
|
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
os.api("notes/delete", {
|
2022-06-29 19:53:40 -06:00
|
|
|
noteId: appearNote.id,
|
2022-01-13 18:25:51 -07:00
|
|
|
});
|
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
os.post({
|
|
|
|
initialNote: appearNote,
|
|
|
|
renote: appearNote.renote,
|
|
|
|
reply: appearNote.reply,
|
|
|
|
channel: appearNote.channel,
|
|
|
|
});
|
2022-01-13 18:25:51 -07:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function toggleFavorite(favorite: boolean): void {
|
2023-01-12 21:40:33 -07:00
|
|
|
os.apiWithDialog(
|
|
|
|
favorite ? "notes/favorites/create" : "notes/favorites/delete",
|
|
|
|
{
|
|
|
|
noteId: appearNote.id,
|
|
|
|
},
|
|
|
|
);
|
2022-01-13 18:25:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function toggleWatch(watch: boolean): void {
|
2023-01-12 21:40:33 -07:00
|
|
|
os.apiWithDialog(
|
|
|
|
watch ? "notes/watching/create" : "notes/watching/delete",
|
|
|
|
{
|
|
|
|
noteId: appearNote.id,
|
|
|
|
},
|
|
|
|
);
|
2022-01-13 18:25:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function toggleThreadMute(mute: boolean): void {
|
2023-01-12 21:40:33 -07:00
|
|
|
os.apiWithDialog(
|
|
|
|
mute ? "notes/thread-muting/create" : "notes/thread-muting/delete",
|
|
|
|
{
|
|
|
|
noteId: appearNote.id,
|
|
|
|
},
|
|
|
|
);
|
2022-01-13 18:25:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function copyContent(): void {
|
|
|
|
copyToClipboard(appearNote.text);
|
|
|
|
os.success();
|
|
|
|
}
|
|
|
|
|
|
|
|
function copyLink(): void {
|
|
|
|
copyToClipboard(`${url}/notes/${appearNote.id}`);
|
|
|
|
os.success();
|
|
|
|
}
|
|
|
|
|
|
|
|
function togglePin(pin: boolean): void {
|
2023-01-12 21:40:33 -07:00
|
|
|
os.apiWithDialog(
|
|
|
|
pin ? "i/pin" : "i/unpin",
|
|
|
|
{
|
|
|
|
noteId: appearNote.id,
|
|
|
|
},
|
|
|
|
undefined,
|
|
|
|
null,
|
|
|
|
(res) => {
|
|
|
|
if (res.id === "72dab508-c64d-498f-8740-a8eec1ba385a") {
|
|
|
|
os.alert({
|
|
|
|
type: "error",
|
|
|
|
text: i18n.ts.pinLimitExceeded,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
);
|
2022-01-13 18:25:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
async function clip(): Promise<void> {
|
2023-01-12 21:40:33 -07:00
|
|
|
const clips = await os.api("clips/list");
|
|
|
|
os.popupMenu(
|
|
|
|
[
|
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-plus ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.createNew,
|
|
|
|
action: async () => {
|
|
|
|
const { canceled, result } = await os.form(i18n.ts.createNewClip, {
|
|
|
|
name: {
|
|
|
|
type: "string",
|
|
|
|
label: i18n.ts.name,
|
|
|
|
},
|
|
|
|
description: {
|
|
|
|
type: "string",
|
|
|
|
required: false,
|
|
|
|
multiline: true,
|
|
|
|
label: i18n.ts.description,
|
|
|
|
},
|
|
|
|
isPublic: {
|
|
|
|
type: "boolean",
|
|
|
|
label: i18n.ts.public,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
if (canceled) return;
|
2022-01-13 18:25:51 -07:00
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
const clip = await os.apiWithDialog("clips/create", result);
|
2022-01-13 18:25:51 -07:00
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
os.apiWithDialog("clips/add-note", {
|
|
|
|
clipId: clip.id,
|
|
|
|
noteId: appearNote.id,
|
|
|
|
});
|
2022-06-29 19:53:40 -06:00
|
|
|
},
|
2023-01-12 21:40:33 -07:00
|
|
|
},
|
|
|
|
null,
|
|
|
|
...clips.map((clip) => ({
|
|
|
|
text: clip.name,
|
|
|
|
action: () => {
|
|
|
|
os.promiseDialog(
|
|
|
|
os.api("clips/add-note", {
|
|
|
|
clipId: clip.id,
|
|
|
|
noteId: appearNote.id,
|
|
|
|
}),
|
|
|
|
null,
|
|
|
|
async (err) => {
|
|
|
|
if (err.id === "734806c4-542c-463a-9311-15c512803965") {
|
|
|
|
const confirm = await os.confirm({
|
|
|
|
type: "warning",
|
|
|
|
text: i18n.t("confirmToUnclipAlreadyClippedNote", {
|
|
|
|
name: clip.name,
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
if (!confirm.canceled) {
|
|
|
|
os.apiWithDialog("clips/remove-note", {
|
|
|
|
clipId: clip.id,
|
|
|
|
noteId: appearNote.id,
|
|
|
|
});
|
|
|
|
if (props.currentClipPage?.value.id === clip.id)
|
|
|
|
props.isDeleted.value = true;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
os.alert({
|
|
|
|
type: "error",
|
|
|
|
text: err.message + "\n" + err.id,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
props.menuButton.value,
|
|
|
|
{},
|
|
|
|
).then(focus);
|
2022-01-13 18:25:51 -07:00
|
|
|
}
|
|
|
|
|
2022-06-18 03:27:09 -06:00
|
|
|
async function unclip(): Promise<void> {
|
2023-01-12 21:40:33 -07:00
|
|
|
os.apiWithDialog("clips/remove-note", {
|
|
|
|
clipId: props.currentClipPage.value.id,
|
|
|
|
noteId: appearNote.id,
|
|
|
|
});
|
2022-06-18 03:27:09 -06:00
|
|
|
props.isDeleted.value = true;
|
|
|
|
}
|
|
|
|
|
2022-01-13 18:25:51 -07:00
|
|
|
async function promote(): Promise<void> {
|
|
|
|
const { canceled, result: days } = await os.inputNumber({
|
2022-01-27 19:39:49 -07:00
|
|
|
title: i18n.ts.numberOfDays,
|
2022-01-13 18:25:51 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
if (canceled) return;
|
|
|
|
|
2023-01-12 21:40:33 -07:00
|
|
|
os.apiWithDialog("admin/promo/create", {
|
2022-01-13 18:25:51 -07:00
|
|
|
noteId: appearNote.id,
|
2023-01-12 21:40:33 -07:00
|
|
|
expiresAt: Date.now() + 86400000 * days,
|
2022-01-13 18:25:51 -07:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function share(): void {
|
|
|
|
navigator.share({
|
2023-01-12 21:40:33 -07:00
|
|
|
title: i18n.t("noteOf", { user: appearNote.user.name }),
|
2022-01-13 18:25:51 -07:00
|
|
|
text: appearNote.text,
|
|
|
|
url: `${url}/notes/${appearNote.id}`,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-02-12 21:14:05 -07:00
|
|
|
function showReactions(): void {
|
2023-02-12 21:25:23 -07:00
|
|
|
os.popup(
|
|
|
|
defineAsyncComponent(
|
|
|
|
() => import("@/components/MkReactedUsersDialog.vue"),
|
|
|
|
),
|
|
|
|
{
|
|
|
|
noteId: appearNote.id,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
"closed",
|
|
|
|
);
|
2023-02-12 21:14:05 -07:00
|
|
|
}
|
|
|
|
|
2022-01-13 18:25:51 -07:00
|
|
|
async function translate(): Promise<void> {
|
|
|
|
if (props.translation.value != null) return;
|
|
|
|
props.translating.value = true;
|
2023-01-12 21:40:33 -07:00
|
|
|
const res = await os.api("notes/translate", {
|
2022-01-13 18:25:51 -07:00
|
|
|
noteId: appearNote.id,
|
2023-01-12 21:40:33 -07:00
|
|
|
targetLang: localStorage.getItem("lang") || navigator.language,
|
2022-01-13 18:25:51 -07:00
|
|
|
});
|
|
|
|
props.translating.value = false;
|
|
|
|
props.translation.value = res;
|
|
|
|
}
|
|
|
|
|
|
|
|
let menu;
|
|
|
|
if ($i) {
|
2023-01-12 21:40:33 -07:00
|
|
|
const statePromise = os.api("notes/state", {
|
2022-06-29 19:53:40 -06:00
|
|
|
noteId: appearNote.id,
|
2022-01-13 18:25:51 -07:00
|
|
|
});
|
|
|
|
|
2022-06-18 03:27:09 -06:00
|
|
|
menu = [
|
2023-01-12 21:40:33 -07:00
|
|
|
...(props.currentClipPage?.value.userId === $i.id
|
|
|
|
? [
|
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-minus-circle ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.unclip,
|
|
|
|
danger: true,
|
|
|
|
action: unclip,
|
|
|
|
},
|
|
|
|
null,
|
|
|
|
]
|
|
|
|
: []),
|
2023-02-12 21:14:05 -07:00
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-smiley ph-bold ph-lg",
|
2023-02-12 21:14:05 -07:00
|
|
|
text: i18n.ts.reaction,
|
|
|
|
action: showReactions,
|
|
|
|
},
|
2022-06-29 19:53:40 -06:00
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-clipboard-text ph-bold ph-lg",
|
2022-06-29 19:53:40 -06:00
|
|
|
text: i18n.ts.copyContent,
|
|
|
|
action: copyContent,
|
2023-01-12 21:40:33 -07:00
|
|
|
},
|
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-link-simple ph-bold ph-lg",
|
2022-06-29 19:53:40 -06:00
|
|
|
text: i18n.ts.copyLink,
|
|
|
|
action: copyLink,
|
2023-01-12 21:40:33 -07:00
|
|
|
},
|
|
|
|
appearNote.url || appearNote.uri
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-arrow-square-out ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.showOnRemote,
|
|
|
|
action: () => {
|
|
|
|
window.open(appearNote.url || appearNote.uri, "_blank");
|
|
|
|
},
|
|
|
|
}
|
|
|
|
: undefined,
|
|
|
|
shareAvailable()
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-share-network ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.share,
|
|
|
|
action: share,
|
|
|
|
}
|
|
|
|
: undefined,
|
|
|
|
instance.translatorAvailable
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-translate ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.translate,
|
|
|
|
action: translate,
|
|
|
|
}
|
|
|
|
: undefined,
|
2022-06-29 19:53:40 -06:00
|
|
|
null,
|
2023-01-12 21:40:33 -07:00
|
|
|
statePromise.then((state) =>
|
|
|
|
state?.isFavorited
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-bookmark-simple ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.unfavorite,
|
|
|
|
action: () => toggleFavorite(false),
|
|
|
|
}
|
|
|
|
: {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-bookmark-simple ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.favorite,
|
|
|
|
action: () => toggleFavorite(true),
|
|
|
|
},
|
|
|
|
),
|
2022-06-29 19:53:40 -06:00
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-paperclip ph-bold ph-lg",
|
2022-06-29 19:53:40 -06:00
|
|
|
text: i18n.ts.clip,
|
|
|
|
action: () => clip(),
|
|
|
|
},
|
2023-01-12 21:40:33 -07:00
|
|
|
appearNote.userId !== $i.id
|
|
|
|
? statePromise.then((state) =>
|
|
|
|
state.isWatching
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-eye-slash ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.unwatch,
|
|
|
|
action: () => toggleWatch(false),
|
|
|
|
}
|
|
|
|
: {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-eye ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.watch,
|
|
|
|
action: () => toggleWatch(true),
|
|
|
|
},
|
|
|
|
)
|
|
|
|
: undefined,
|
|
|
|
statePromise.then((state) =>
|
|
|
|
state.isMutedThread
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-speaker-x ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.unmuteThread,
|
|
|
|
action: () => toggleThreadMute(false),
|
|
|
|
}
|
|
|
|
: {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-speaker-x ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.muteThread,
|
|
|
|
action: () => toggleThreadMute(true),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
appearNote.userId === $i.id
|
|
|
|
? ($i.pinnedNoteIds || []).includes(appearNote.id)
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-push-pin ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.unpin,
|
|
|
|
action: () => togglePin(false),
|
|
|
|
}
|
|
|
|
: {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-push-pin ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.pin,
|
|
|
|
action: () => togglePin(true),
|
|
|
|
}
|
|
|
|
: undefined,
|
2022-06-29 19:53:40 -06:00
|
|
|
/*
|
2022-01-13 18:25:51 -07:00
|
|
|
...($i.isModerator || $i.isAdmin ? [
|
|
|
|
null,
|
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: 'ph-megaphone-simple ph-bold ph-lg',
|
2022-01-27 19:39:49 -07:00
|
|
|
text: i18n.ts.promote,
|
2022-01-13 18:25:51 -07:00
|
|
|
action: promote
|
|
|
|
}]
|
|
|
|
: []
|
|
|
|
),*/
|
2023-01-12 21:40:33 -07:00
|
|
|
...(appearNote.userId !== $i.id
|
|
|
|
? [
|
|
|
|
null,
|
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-warning-circle ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.reportAbuse,
|
|
|
|
action: () => {
|
|
|
|
const u =
|
|
|
|
appearNote.url ||
|
|
|
|
appearNote.uri ||
|
|
|
|
`${url}/notes/${appearNote.id}`;
|
|
|
|
os.popup(
|
|
|
|
defineAsyncComponent(
|
|
|
|
() => import("@/components/MkAbuseReportWindow.vue"),
|
|
|
|
),
|
|
|
|
{
|
|
|
|
user: appearNote.user,
|
|
|
|
initialComment: `Note: ${u}\n-----\n`,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
"closed",
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
: []),
|
|
|
|
...(appearNote.userId === $i.id || $i.isModerator || $i.isAdmin
|
|
|
|
? [
|
|
|
|
null,
|
|
|
|
appearNote.userId === $i.id
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-eraser ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.deleteAndEdit,
|
|
|
|
action: delEdit,
|
|
|
|
}
|
|
|
|
: undefined,
|
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-trash ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.delete,
|
|
|
|
danger: true,
|
|
|
|
action: del,
|
|
|
|
},
|
|
|
|
]
|
|
|
|
: []),
|
|
|
|
].filter((x) => x !== undefined);
|
2022-01-13 18:25:51 -07:00
|
|
|
} else {
|
2023-01-12 21:40:33 -07:00
|
|
|
menu = [
|
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-clipboard-text ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.copyContent,
|
|
|
|
action: copyContent,
|
2022-06-29 19:53:40 -06:00
|
|
|
},
|
2023-01-12 21:40:33 -07:00
|
|
|
{
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-link-simple ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.copyLink,
|
|
|
|
action: copyLink,
|
|
|
|
},
|
|
|
|
appearNote.url || appearNote.uri
|
|
|
|
? {
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-arrow-square-out ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: i18n.ts.showOnRemote,
|
|
|
|
action: () => {
|
|
|
|
window.open(appearNote.url || appearNote.uri, "_blank");
|
|
|
|
},
|
|
|
|
}
|
|
|
|
: undefined,
|
|
|
|
].filter((x) => x !== undefined);
|
2022-01-13 18:25:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (noteActions.length > 0) {
|
2023-01-12 21:40:33 -07:00
|
|
|
menu = menu.concat([
|
|
|
|
null,
|
|
|
|
...noteActions.map((action) => ({
|
2023-03-11 14:01:04 -07:00
|
|
|
icon: "ph-plug ph-bold ph-lg",
|
2023-01-12 21:40:33 -07:00
|
|
|
text: action.title,
|
|
|
|
action: () => {
|
|
|
|
action.handler(appearNote);
|
|
|
|
},
|
|
|
|
})),
|
|
|
|
]);
|
2022-01-13 18:25:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
return menu;
|
|
|
|
}
|