1319 lines
57 KiB
Vue
1319 lines
57 KiB
Vue
<script>
|
|
import "~/assets/styles/ConsoleLegalFooter.DAYWmXIB.css";
|
|
import "~/assets/styles/BackendNavigation.CEj4LnzI.css";
|
|
import "~/assets/styles/BackendNavEntry.Bx6IPica.css";
|
|
import "~/assets/styles/default.DFUVVR1i.css";
|
|
import { nextTick } from "vue";
|
|
import { toDisplayString } from "vue";
|
|
import { renderList } from "vue";
|
|
import { onMounted } from "vue";
|
|
import { normalizeClass } from "vue";
|
|
import { onBeforeUnmount } from "vue";
|
|
import { renderSlot } from "vue";
|
|
import { watch } from "vue";
|
|
import { createBlock } from "vue";
|
|
import { ref } from "vue";
|
|
import { withCtx } from "vue";
|
|
import { createCommentVNode } from "vue";
|
|
import { computed } from "vue";
|
|
import { isRef } from "vue";
|
|
import { createElementBlock } from "vue";
|
|
import { Fragment } from "vue";
|
|
import { createElementVNode } from "vue";
|
|
import { createTextVNode } from "vue";
|
|
import { unref } from "vue";
|
|
import { defineComponent } from "vue";
|
|
import { createVNode } from "vue";
|
|
import { openBlock } from "vue";
|
|
import { useRoute } from "#app";
|
|
import { useRouter } from "#app";
|
|
import { useHead } from "#app";
|
|
import { NuxtLink } from "#components";
|
|
import { useApi } from "~/lib/auth.js";
|
|
import { useAuth } from "~/lib/auth.js";
|
|
import { Icon } from "#components";
|
|
import { t as useSiteConfig_t } from "~/lib/useSiteConfig.js";
|
|
import { a as backend_menu_a } from "~/lib/backend-menu.js";
|
|
import { c as backend_menu_c } from "~/lib/backend-menu.js";
|
|
import { l as backend_menu_l } from "~/lib/backend-menu.js";
|
|
import { r as backend_menu_r } from "~/lib/backend-menu.js";
|
|
import { s as backend_menu_s } from "~/lib/backend-menu.js";
|
|
import { t as backend_menu_t } from "~/lib/backend-menu.js";
|
|
import { t as navigation_state_t } from "~/lib/navigation-state.js";
|
|
import dialog from "primevue/dialog";
|
|
import badge from "primevue/badge";
|
|
import { t as _plugin_vue_export_helper_t } from "~/lib/_plugin-vue_export-helper.js";
|
|
import { t as useTheme_t } from "~/lib/useTheme.js";
|
|
import BackendNavEntry from "~/components/BackendNavEntry.vue";
|
|
import BackendNavigation from "~/components/BackendNavigation.vue";
|
|
import { r as dict_r } from "~/lib/dict.js";
|
|
import ConsoleLegalFooter from "~/components/ConsoleLegalFooter.vue";
|
|
import menu from "primevue/menu";
|
|
import { logoUrl } from "~/utils/brand.js";
|
|
import { t as useMailbox_t } from "~/lib/useMailbox.js";
|
|
var Ce = {
|
|
key: 1,
|
|
class: `maintenance-banner`,
|
|
},
|
|
we = [`inert`, `role`, `aria-modal`],
|
|
Te = {
|
|
class: `nav`,
|
|
"aria-label": `会员中心导航`,
|
|
},
|
|
Ee = {
|
|
key: 0,
|
|
class: `nav-section`,
|
|
},
|
|
De = {
|
|
key: 1,
|
|
class: `nav-group`,
|
|
},
|
|
T = [`aria-expanded`, `aria-controls`, `onClick`],
|
|
E = {
|
|
class: `nav-label`,
|
|
},
|
|
Oe = [`id`, `inert`, `aria-hidden`],
|
|
ke = {
|
|
class: `sub-nav-clip`,
|
|
},
|
|
Ae = {
|
|
class: `sub-nav-items`,
|
|
},
|
|
je = {
|
|
class: `nav-label`,
|
|
},
|
|
Me = [`inert`],
|
|
Ne = {
|
|
class: `topbar`,
|
|
},
|
|
Pe = {
|
|
class: `brand-group`,
|
|
},
|
|
Fe = [`aria-expanded`],
|
|
Ie = {
|
|
class: `crumbs`,
|
|
"aria-label": `面包屑`,
|
|
},
|
|
Le = {
|
|
class: `topbar-right`,
|
|
},
|
|
Re = [`title`, `aria-label`],
|
|
ze = {
|
|
class: `mail-pop`,
|
|
},
|
|
Be = {
|
|
key: 0,
|
|
class: `mail-pop-list`,
|
|
},
|
|
Ve = [`onClick`],
|
|
He = {
|
|
class: `mail-pop-title`,
|
|
},
|
|
Ue = {
|
|
key: 0,
|
|
class: `mail-pop-dot`,
|
|
},
|
|
We = {
|
|
class: `mail-pop-time`,
|
|
},
|
|
Ge = {
|
|
key: 1,
|
|
class: `mail-pop-empty`,
|
|
},
|
|
Ke = {
|
|
id: `main-content`,
|
|
class: `content`,
|
|
tabindex: `-1`,
|
|
},
|
|
D = _plugin_vue_export_helper_t(
|
|
defineComponent({
|
|
__name: `default`,
|
|
setup(v) {
|
|
let w = useAuth(),
|
|
D = useRouter(),
|
|
O = useRoute(),
|
|
k = useTheme_t(),
|
|
A = useSiteConfig_t();
|
|
onMounted(() => {
|
|
(A.load().catch(() => {}),
|
|
w.isLoggedIn && !w.overview && w.fetchOverview().catch(() => {}),
|
|
U());
|
|
});
|
|
let j = [
|
|
{
|
|
label: ``,
|
|
items: [
|
|
{
|
|
label: `首页`,
|
|
icon: `lucide:house`,
|
|
to: `/`,
|
|
},
|
|
{
|
|
label: `订购`,
|
|
icon: `lucide:shopping-cart`,
|
|
to: `/products`,
|
|
},
|
|
{
|
|
label: `购物车`,
|
|
icon: `lucide:shopping-basket`,
|
|
to: `/cart`,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: `资源管理`,
|
|
items: [
|
|
{
|
|
label: `服务器`,
|
|
icon: `lucide:server`,
|
|
children: [
|
|
{
|
|
label: `云服务器`,
|
|
to: `/cloud-servers`,
|
|
},
|
|
{
|
|
label: `物理服务器`,
|
|
to: `/dedicated-servers`,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: `安全`,
|
|
icon: `lucide:shield`,
|
|
children: [
|
|
{
|
|
label: `安全组`,
|
|
to: `/security/groups`,
|
|
},
|
|
{
|
|
label: `SSH 密钥`,
|
|
to: `/security/ssh-keys`,
|
|
},
|
|
{
|
|
label: `域名白名单`,
|
|
to: `/security/domains`,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: `实例转移`,
|
|
icon: `lucide:truck`,
|
|
to: `/transfer`,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: `费用与优惠`,
|
|
items: [
|
|
{
|
|
label: `财务`,
|
|
icon: `lucide:wallet`,
|
|
to: `/finance`,
|
|
},
|
|
{
|
|
label: `订单`,
|
|
icon: `lucide:clipboard-list`,
|
|
to: `/orders`,
|
|
},
|
|
{
|
|
label: `发票`,
|
|
icon: `lucide:receipt`,
|
|
to: `/invoices`,
|
|
},
|
|
{
|
|
label: `推介`,
|
|
icon: `lucide:gift`,
|
|
to: `/recommend`,
|
|
},
|
|
{
|
|
label: `代金券`,
|
|
icon: `lucide:ticket`,
|
|
to: `/vouchers`,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: `账户`,
|
|
items: [
|
|
{
|
|
label: `账户`,
|
|
icon: `lucide:user`,
|
|
to: `/account`,
|
|
},
|
|
{
|
|
label: `消息`,
|
|
icon: `lucide:mail`,
|
|
to: `/messages`,
|
|
},
|
|
{
|
|
label: `操作日志`,
|
|
icon: `lucide:scroll-text`,
|
|
to: `/logbook`,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: `服务与支持`,
|
|
items: [
|
|
{
|
|
label: `工单`,
|
|
icon: `lucide:headphones`,
|
|
to: `/tickets`,
|
|
},
|
|
{
|
|
label: `帮助`,
|
|
icon: `lucide:circle-help`,
|
|
to: `/help`,
|
|
},
|
|
{
|
|
label: `公告`,
|
|
icon: `lucide:megaphone`,
|
|
to: `/notices`,
|
|
},
|
|
{
|
|
label: `新闻`,
|
|
icon: `lucide:newspaper`,
|
|
to: `/news`,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
M = navigation_state_t(w, useApi()),
|
|
N = ref([]),
|
|
P = M.entries,
|
|
F = M.authoritative,
|
|
qe = computed(() =>
|
|
F.value
|
|
? backend_menu_s(j, P.value)
|
|
: j
|
|
.map((e) => ({
|
|
...e,
|
|
items: e.items.flatMap((e) => {
|
|
if (e.children) {
|
|
let t = e.children.filter(
|
|
(e) => !N.value.includes(e.to),
|
|
);
|
|
return t.length
|
|
? [
|
|
{
|
|
...e,
|
|
children: t,
|
|
},
|
|
]
|
|
: [];
|
|
}
|
|
return e.to && N.value.includes(e.to) ? [] : [e];
|
|
}),
|
|
}))
|
|
.filter((e) => e.items.length),
|
|
),
|
|
Je = computed(() => backend_menu_a(j, qe.value, P.value));
|
|
function Ye(e, t) {
|
|
((e = backend_menu_l(e)), (P.value = e), (F.value = t));
|
|
let n = [],
|
|
r = (e) =>
|
|
e.forEach((e) => {
|
|
(e.to && n.push(e.to), e.children && r(e.children));
|
|
});
|
|
(r(e), (N.value = n));
|
|
}
|
|
watch(
|
|
() => [P.value, O.path, O.query],
|
|
() => {
|
|
let e = backend_menu_r(P.value, O);
|
|
e &&
|
|
D.replace({
|
|
path: e.path,
|
|
query: {
|
|
...O.query,
|
|
m: e.query.m,
|
|
},
|
|
});
|
|
},
|
|
);
|
|
let I = ref({});
|
|
function L(e) {
|
|
return O.path === `/servers/server` && e.label === `服务器`
|
|
? !0
|
|
: (e.children?.some((t) => R(t.to, e.children)) ?? !1);
|
|
}
|
|
function R(e, t = []) {
|
|
return backend_menu_c(e, O, t);
|
|
}
|
|
function Xe(e) {
|
|
I.value[e.label] = !z(e);
|
|
}
|
|
function z(e) {
|
|
return I.value[e.label] ?? L(e);
|
|
}
|
|
let B = ref(),
|
|
Ze = computed(() => [
|
|
{
|
|
label: `${w.overview?.username || `会员`} #${w.overview?.id || ``}`,
|
|
disabled: !0,
|
|
},
|
|
{
|
|
separator: !0,
|
|
},
|
|
{
|
|
label: `账户管理`,
|
|
icon: `pi pi-user`,
|
|
command: () => D.push(`/account`),
|
|
},
|
|
{
|
|
label: `钱包`,
|
|
icon: `pi pi-wallet`,
|
|
command: () => D.push(`/finance`),
|
|
},
|
|
{
|
|
label: `购物车`,
|
|
icon: `pi pi-shopping-cart`,
|
|
command: () => D.push(`/cart`),
|
|
},
|
|
{
|
|
label: `消息`,
|
|
icon: `pi pi-bell`,
|
|
command: () => D.push(`/messages`),
|
|
},
|
|
{
|
|
separator: !0,
|
|
},
|
|
{
|
|
label: `退出登录`,
|
|
icon: `pi pi-sign-out`,
|
|
command: async () => {
|
|
(await w.logout(), D.push(`/login`));
|
|
},
|
|
},
|
|
]),
|
|
{ count: V, recent: H, refresh: U } = useMailbox_t(),
|
|
W = ref(!1);
|
|
async function Qe(e) {
|
|
((W.value = !0), await U());
|
|
}
|
|
function $e(e) {
|
|
((W.value = !1),
|
|
D.push({
|
|
path: `/messages`,
|
|
query: {
|
|
id: String(e),
|
|
},
|
|
}));
|
|
}
|
|
function et() {
|
|
((W.value = !1), D.push(`/messages`));
|
|
}
|
|
let G = ref(!1),
|
|
K = ref(null),
|
|
q = ref(null),
|
|
J = ref(typeof window < `u` && window.innerWidth < 1536),
|
|
Y = null,
|
|
X = ``,
|
|
Z = () => {
|
|
((J.value = Y?.matches ?? !1), J.value || (G.value = !1));
|
|
};
|
|
(onMounted(() => {
|
|
((Y = window.matchMedia(`(max-width: 1535px)`)),
|
|
Z(),
|
|
Y.addEventListener(`change`, Z));
|
|
}),
|
|
onBeforeUnmount(() => {
|
|
(Y?.removeEventListener(`change`, Z),
|
|
G.value && (document.body.style.overflow = X));
|
|
}),
|
|
watch(
|
|
() => O.fullPath,
|
|
() => (G.value = !1),
|
|
),
|
|
watch(G, async (t) => {
|
|
t
|
|
? ((X = document.body.style.overflow),
|
|
(document.body.style.overflow = `hidden`),
|
|
await nextTick(),
|
|
K.value?.querySelector(`.nav-close`)?.focus())
|
|
: ((document.body.style.overflow = X),
|
|
await nextTick(),
|
|
J.value && q.value?.focus());
|
|
}));
|
|
function tt(e) {
|
|
if (!J.value || !G.value) return;
|
|
if (e.key === `Escape`) {
|
|
(e.preventDefault(), (G.value = !1));
|
|
return;
|
|
}
|
|
if (e.key !== `Tab`) return;
|
|
let t = Array.from(
|
|
K.value?.querySelectorAll(
|
|
`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])`,
|
|
) ?? [],
|
|
).filter((e) => e.getClientRects().length > 0),
|
|
n = t[0],
|
|
r = t[t.length - 1];
|
|
e.shiftKey && document.activeElement === n
|
|
? (e.preventDefault(), r?.focus())
|
|
: !e.shiftKey &&
|
|
document.activeElement === r &&
|
|
(e.preventDefault(), n?.focus());
|
|
}
|
|
let Q = {
|
|
"/products": `商品详情`,
|
|
"/products/cloud-server": `云服务器`,
|
|
"/products/dedicated-server": `物理服务器`,
|
|
"/products/dedicated-server/customize": `配置物理服务器`,
|
|
"/orders/order/pay": `订单支付`,
|
|
"/orders/order/paid": `支付结果`,
|
|
"/invoices/request": `申请发票`,
|
|
"/invoices/invoice": `发票详情`,
|
|
"/account/realname/personal": `个人实名认证`,
|
|
"/account/realname/company": `组织机构认证`,
|
|
"/wallet": `钱包`,
|
|
"/security/domain-whitelist": `域名白名单`,
|
|
"/servers/server": `实例详情`,
|
|
"/tickets/create": `创建工单`,
|
|
"/tickets": `工单详情`,
|
|
"/orders": `订单详情`,
|
|
"/bills": `账单详情`,
|
|
"/invoices/settings": `发票设置`,
|
|
"/account/realname": `实名认证`,
|
|
"/security/groups": `安全组规则`,
|
|
"/notices": `公告详情`,
|
|
"/account/api-keys": `API 密钥`,
|
|
"/account/connections": `关联账号`,
|
|
"/resources": `资源中心`,
|
|
},
|
|
$ = computed(() => {
|
|
let e = O.path,
|
|
t = Q[e];
|
|
if (e === `/servers/server`) return [`服务器`, `实例详情`];
|
|
let n = backend_menu_t(P.value, O);
|
|
if (n.length) {
|
|
let r = (t) =>
|
|
t.some(
|
|
(t) =>
|
|
t.to?.split(`?`)[0] === e ||
|
|
(!!t.children && r(t.children)),
|
|
);
|
|
if (!r(P.value)) {
|
|
let r =
|
|
t ||
|
|
Object.entries(Q)
|
|
.filter(([t]) => e.startsWith(`${t}/`))
|
|
.sort(([e], [t]) => t.length - e.length)[0]?.[1] ||
|
|
`详情`;
|
|
return [...n, r];
|
|
}
|
|
return n;
|
|
}
|
|
let r = j
|
|
.flatMap((e) =>
|
|
e.items.flatMap((t) =>
|
|
t.children
|
|
? t.children.map((e) => ({
|
|
...e,
|
|
group: t.label,
|
|
siblings: t.children,
|
|
}))
|
|
: [
|
|
{
|
|
to: t.to || `/`,
|
|
label: t.label,
|
|
group: e.label,
|
|
siblings: void 0,
|
|
},
|
|
],
|
|
),
|
|
)
|
|
.filter((e) => R(e.to, e.siblings))
|
|
.sort(
|
|
(e, t) => t.to.split(`?`)[0].length - e.to.split(`?`)[0].length,
|
|
)[0];
|
|
if (!r) return t ? [t] : [`首页`];
|
|
let i =
|
|
r.group && r.group !== r.label ? [r.group, r.label] : [r.label],
|
|
a = r.to.split(`?`)[0];
|
|
return (e !== a && i.push(t || Q[a] || `详情`), i);
|
|
});
|
|
return (
|
|
useHead(() => ({
|
|
title: `${$.value.at(-1) || `会员中心`} - ${A.siteName.value}`,
|
|
})),
|
|
(e, r) => {
|
|
let a = BackendNavEntry,
|
|
s = Icon,
|
|
l = NuxtLink,
|
|
f = BackendNavigation,
|
|
v = badge,
|
|
x = menu,
|
|
S = dialog,
|
|
C = ConsoleLegalFooter;
|
|
return (
|
|
openBlock(),
|
|
createElementBlock(
|
|
`div`,
|
|
{
|
|
class: normalizeClass([
|
|
`console-layout`,
|
|
{
|
|
"has-banner": unref(A).maintenance.value,
|
|
},
|
|
]),
|
|
},
|
|
[
|
|
(r[15] ||= createElementVNode(
|
|
`a`,
|
|
{
|
|
href: `#main-content`,
|
|
class: `skip-link`,
|
|
},
|
|
`跳转到主要内容`,
|
|
-1,
|
|
)),
|
|
unref(G)
|
|
? (openBlock(),
|
|
createElementBlock(`div`, {
|
|
key: 0,
|
|
class: `nav-backdrop`,
|
|
onClick: (r[0] ||= (e) => (G.value = !1)),
|
|
}))
|
|
: createCommentVNode(``, !0),
|
|
unref(A).maintenance.value
|
|
? (openBlock(),
|
|
createElementBlock(`div`, Ce, [
|
|
(r[6] ||= createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-exclamation-triangle`,
|
|
},
|
|
null,
|
|
-1,
|
|
)),
|
|
createElementVNode(
|
|
`span`,
|
|
null,
|
|
toDisplayString(
|
|
unref(A).config.value?.maintenance_mode_message ||
|
|
`站点维护中,部分功能可能不可用。`,
|
|
),
|
|
1,
|
|
),
|
|
]))
|
|
: createCommentVNode(``, !0),
|
|
createElementVNode(
|
|
`aside`,
|
|
{
|
|
id: `console-navigation`,
|
|
ref_key: `sidebarEl`,
|
|
ref: K,
|
|
class: normalizeClass([
|
|
`sidebar`,
|
|
{
|
|
open: unref(G),
|
|
},
|
|
]),
|
|
inert: unref(J) && !unref(G),
|
|
role: unref(J) && unref(G) ? `dialog` : void 0,
|
|
"aria-modal": unref(J) && unref(G) ? !0 : void 0,
|
|
"aria-label": `主导航`,
|
|
onKeydown: tt,
|
|
},
|
|
[
|
|
createElementVNode(
|
|
`button`,
|
|
{
|
|
class: `nav-close`,
|
|
type: `button`,
|
|
"aria-label": `关闭菜单`,
|
|
onClick: (r[1] ||= (e) => (G.value = !1)),
|
|
},
|
|
[
|
|
...(r[7] ||= [
|
|
createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-times`,
|
|
},
|
|
null,
|
|
-1,
|
|
),
|
|
]),
|
|
],
|
|
),
|
|
createElementVNode(`nav`, Te, [
|
|
createVNode(
|
|
f,
|
|
{
|
|
onLoaded: Ye,
|
|
},
|
|
{
|
|
default: withCtx(() => [
|
|
(openBlock(!0),
|
|
createElementBlock(
|
|
Fragment,
|
|
null,
|
|
renderList(
|
|
unref(Je),
|
|
(e, r) => (
|
|
openBlock(),
|
|
createElementBlock(
|
|
Fragment,
|
|
{
|
|
key: r,
|
|
},
|
|
[
|
|
e.label
|
|
? (openBlock(),
|
|
createElementBlock(
|
|
`div`,
|
|
Ee,
|
|
toDisplayString(e.label),
|
|
1,
|
|
))
|
|
: createCommentVNode(``, !0),
|
|
(openBlock(!0),
|
|
createElementBlock(
|
|
Fragment,
|
|
null,
|
|
renderList(
|
|
e.items,
|
|
(r) => (
|
|
openBlock(),
|
|
createElementBlock(
|
|
Fragment,
|
|
{
|
|
key: r.label,
|
|
},
|
|
[
|
|
r.backend
|
|
? (openBlock(),
|
|
createBlock(
|
|
a,
|
|
{
|
|
key: 0,
|
|
entry: r.backend,
|
|
siblings:
|
|
e.items.flatMap(
|
|
(e) =>
|
|
e.backend
|
|
? [e.backend]
|
|
: [],
|
|
),
|
|
},
|
|
null,
|
|
8,
|
|
[`entry`, `siblings`],
|
|
))
|
|
: r.children
|
|
? (openBlock(),
|
|
createElementBlock(
|
|
`div`,
|
|
De,
|
|
[
|
|
createElementVNode(
|
|
`button`,
|
|
{
|
|
type: `button`,
|
|
class:
|
|
normalizeClass(
|
|
[
|
|
`nav-item`,
|
|
{
|
|
active:
|
|
L(r),
|
|
},
|
|
],
|
|
),
|
|
"aria-expanded":
|
|
z(r),
|
|
"aria-controls": `nav-group-${r.label}`,
|
|
onClick: (e) =>
|
|
Xe(r),
|
|
},
|
|
[
|
|
createVNode(
|
|
s,
|
|
{
|
|
name: r.icon,
|
|
class: `nav-icon`,
|
|
},
|
|
null,
|
|
8,
|
|
[`name`],
|
|
),
|
|
createElementVNode(
|
|
`span`,
|
|
E,
|
|
toDisplayString(
|
|
r.label,
|
|
),
|
|
1,
|
|
),
|
|
createElementVNode(
|
|
`i`,
|
|
{
|
|
class:
|
|
normalizeClass(
|
|
[
|
|
`pi pi-angle-down nav-arrow`,
|
|
{
|
|
open: z(
|
|
r,
|
|
),
|
|
},
|
|
],
|
|
),
|
|
"aria-hidden": `true`,
|
|
},
|
|
null,
|
|
2,
|
|
),
|
|
],
|
|
10,
|
|
T,
|
|
),
|
|
createElementVNode(
|
|
`div`,
|
|
{
|
|
id: `nav-group-${r.label}`,
|
|
class:
|
|
normalizeClass(
|
|
[
|
|
`sub-nav`,
|
|
{
|
|
open: z(
|
|
r,
|
|
),
|
|
},
|
|
],
|
|
),
|
|
inert: !z(r),
|
|
"aria-hidden":
|
|
!z(r),
|
|
},
|
|
[
|
|
createElementVNode(
|
|
`div`,
|
|
ke,
|
|
[
|
|
createElementVNode(
|
|
`div`,
|
|
Ae,
|
|
[
|
|
(openBlock(
|
|
!0,
|
|
),
|
|
createElementBlock(
|
|
Fragment,
|
|
null,
|
|
renderList(
|
|
r.children,
|
|
(
|
|
e,
|
|
) => (
|
|
openBlock(),
|
|
createBlock(
|
|
l,
|
|
{
|
|
key: e.to,
|
|
to: e.to,
|
|
class:
|
|
normalizeClass(
|
|
[
|
|
`sub-item`,
|
|
{
|
|
active:
|
|
R(
|
|
e.to,
|
|
r.children,
|
|
),
|
|
},
|
|
],
|
|
),
|
|
"aria-current":
|
|
R(
|
|
e.to,
|
|
r.children,
|
|
)
|
|
? `page`
|
|
: void 0,
|
|
},
|
|
{
|
|
default:
|
|
withCtx(
|
|
() => [
|
|
createTextVNode(
|
|
toDisplayString(
|
|
e.label,
|
|
),
|
|
1,
|
|
),
|
|
],
|
|
),
|
|
_: 2,
|
|
},
|
|
1032,
|
|
[
|
|
`to`,
|
|
`class`,
|
|
`aria-current`,
|
|
],
|
|
)
|
|
),
|
|
),
|
|
128,
|
|
)),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
],
|
|
10,
|
|
Oe,
|
|
),
|
|
],
|
|
))
|
|
: r.to
|
|
? (openBlock(),
|
|
createBlock(
|
|
l,
|
|
{
|
|
key: 2,
|
|
to: r.to,
|
|
class:
|
|
normalizeClass([
|
|
`nav-item`,
|
|
{
|
|
active: R(
|
|
r.to,
|
|
),
|
|
},
|
|
]),
|
|
"aria-current": R(
|
|
r.to,
|
|
)
|
|
? `page`
|
|
: void 0,
|
|
},
|
|
{
|
|
default: withCtx(
|
|
() => [
|
|
createVNode(
|
|
s,
|
|
{
|
|
name: r.icon,
|
|
class: `nav-icon`,
|
|
},
|
|
null,
|
|
8,
|
|
[`name`],
|
|
),
|
|
createElementVNode(
|
|
`span`,
|
|
je,
|
|
toDisplayString(
|
|
r.label,
|
|
),
|
|
1,
|
|
),
|
|
],
|
|
),
|
|
_: 2,
|
|
},
|
|
1032,
|
|
[
|
|
`to`,
|
|
`class`,
|
|
`aria-current`,
|
|
],
|
|
))
|
|
: createCommentVNode(
|
|
``,
|
|
!0,
|
|
),
|
|
],
|
|
64,
|
|
)
|
|
),
|
|
),
|
|
128,
|
|
)),
|
|
],
|
|
64,
|
|
)
|
|
),
|
|
),
|
|
128,
|
|
)),
|
|
]),
|
|
_: 1,
|
|
},
|
|
),
|
|
]),
|
|
],
|
|
42,
|
|
we,
|
|
),
|
|
createElementVNode(
|
|
`div`,
|
|
{
|
|
class: `main`,
|
|
inert: unref(J) && unref(G),
|
|
},
|
|
[
|
|
createElementVNode(`header`, Ne, [
|
|
createElementVNode(`div`, Pe, [
|
|
createVNode(
|
|
l,
|
|
{
|
|
to: `/`,
|
|
class: `brand`,
|
|
"aria-label": `破碎工坊首页`,
|
|
},
|
|
{
|
|
default: withCtx(() => [
|
|
...(r[8] ||= [
|
|
createElementVNode(
|
|
`img`,
|
|
{
|
|
src: logoUrl,
|
|
class: `brand-logo`,
|
|
alt: `破碎工坊云`,
|
|
},
|
|
null,
|
|
-1,
|
|
),
|
|
]),
|
|
]),
|
|
_: 1,
|
|
},
|
|
),
|
|
createElementVNode(
|
|
`button`,
|
|
{
|
|
ref_key: `navTrigger`,
|
|
ref: q,
|
|
class: `nav-toggle`,
|
|
type: `button`,
|
|
"aria-label": `打开菜单`,
|
|
"aria-expanded": unref(G),
|
|
"aria-controls": `console-navigation`,
|
|
onClick: (r[2] ||= (e) => (G.value = !0)),
|
|
},
|
|
[
|
|
...(r[9] ||= [
|
|
createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-bars`,
|
|
},
|
|
null,
|
|
-1,
|
|
),
|
|
]),
|
|
],
|
|
8,
|
|
Fe,
|
|
),
|
|
]),
|
|
createElementVNode(`nav`, Ie, [
|
|
createVNode(
|
|
l,
|
|
{
|
|
to: `/`,
|
|
class: `crumb-home`,
|
|
"aria-label": `首页`,
|
|
},
|
|
{
|
|
default: withCtx(() => [
|
|
...(r[10] ||= [
|
|
createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-home`,
|
|
},
|
|
null,
|
|
-1,
|
|
),
|
|
]),
|
|
]),
|
|
_: 1,
|
|
},
|
|
),
|
|
(openBlock(!0),
|
|
createElementBlock(
|
|
Fragment,
|
|
null,
|
|
renderList(
|
|
unref($),
|
|
(e, n) => (
|
|
openBlock(),
|
|
createElementBlock(
|
|
Fragment,
|
|
{
|
|
key: n,
|
|
},
|
|
[
|
|
(r[11] ||= createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-angle-right crumb-sep`,
|
|
},
|
|
null,
|
|
-1,
|
|
)),
|
|
createElementVNode(
|
|
`span`,
|
|
{
|
|
class: normalizeClass([
|
|
`crumb`,
|
|
{
|
|
current: n === unref($).length - 1,
|
|
},
|
|
]),
|
|
},
|
|
toDisplayString(e),
|
|
3,
|
|
),
|
|
],
|
|
64,
|
|
)
|
|
),
|
|
),
|
|
128,
|
|
)),
|
|
]),
|
|
createElementVNode(`div`, Le, [
|
|
createElementVNode(
|
|
`button`,
|
|
{
|
|
class: `theme-btn mail-btn`,
|
|
type: `button`,
|
|
title: `消息`,
|
|
"aria-label": `查看消息`,
|
|
onClick: Qe,
|
|
},
|
|
[
|
|
(r[12] ||= createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-bell`,
|
|
},
|
|
null,
|
|
-1,
|
|
)),
|
|
unref(V) > 0
|
|
? (openBlock(),
|
|
createBlock(
|
|
v,
|
|
{
|
|
key: 0,
|
|
value:
|
|
unref(V) > 99
|
|
? `99+`
|
|
: String(unref(V)),
|
|
severity: `danger`,
|
|
class: `mail-badge`,
|
|
},
|
|
null,
|
|
8,
|
|
[`value`],
|
|
))
|
|
: createCommentVNode(``, !0),
|
|
],
|
|
),
|
|
createElementVNode(
|
|
`button`,
|
|
{
|
|
class: `theme-btn`,
|
|
type: `button`,
|
|
title: `主题:${unref(k).label.value}(点击切换)`,
|
|
"aria-label": `切换主题,当前${unref(k).label.value}`,
|
|
onClick: (r[3] ||= (e) => unref(k).cycle()),
|
|
},
|
|
[
|
|
createElementVNode(
|
|
`i`,
|
|
{
|
|
class: normalizeClass(unref(k).icon.value),
|
|
},
|
|
null,
|
|
2,
|
|
),
|
|
],
|
|
8,
|
|
Re,
|
|
),
|
|
createElementVNode(
|
|
`button`,
|
|
{
|
|
class: `user-chip`,
|
|
type: `button`,
|
|
"aria-label": `用户菜单`,
|
|
"aria-haspopup": `menu`,
|
|
onClick: (r[4] ||= (e) => unref(B).toggle(e)),
|
|
},
|
|
[
|
|
...(r[13] ||= [
|
|
createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-user`,
|
|
},
|
|
null,
|
|
-1,
|
|
),
|
|
]),
|
|
],
|
|
),
|
|
]),
|
|
createVNode(
|
|
x,
|
|
{
|
|
ref_key: `userMenu`,
|
|
ref: B,
|
|
model: unref(Ze),
|
|
popup: ``,
|
|
},
|
|
null,
|
|
8,
|
|
[`model`],
|
|
),
|
|
]),
|
|
createVNode(
|
|
S,
|
|
{
|
|
visible: unref(W),
|
|
"onUpdate:visible": (r[5] ||= (e) =>
|
|
isRef(W) ? (W.value = e) : null),
|
|
header: `事件通知`,
|
|
modal: ``,
|
|
style: {
|
|
width: `672px`,
|
|
},
|
|
draggable: !1,
|
|
},
|
|
{
|
|
default: withCtx(() => [
|
|
createElementVNode(`div`, ze, [
|
|
unref(H).length
|
|
? (openBlock(),
|
|
createElementBlock(`div`, Be, [
|
|
(openBlock(!0),
|
|
createElementBlock(
|
|
Fragment,
|
|
null,
|
|
renderList(
|
|
unref(H),
|
|
(n) => (
|
|
openBlock(),
|
|
createElementBlock(
|
|
`button`,
|
|
{
|
|
key: n.id,
|
|
type: `button`,
|
|
class: normalizeClass([
|
|
`mail-pop-item`,
|
|
{
|
|
unread: n.read === 0,
|
|
},
|
|
]),
|
|
onClick: (e) => $e(n.id),
|
|
},
|
|
[
|
|
createElementVNode(`span`, He, [
|
|
n.read === 0
|
|
? (openBlock(),
|
|
createElementBlock(
|
|
`span`,
|
|
Ue,
|
|
))
|
|
: createCommentVNode(``, !0),
|
|
createTextVNode(
|
|
` ` +
|
|
toDisplayString(n.title),
|
|
1,
|
|
),
|
|
]),
|
|
createElementVNode(
|
|
`span`,
|
|
We,
|
|
toDisplayString(
|
|
(`formatTime` in e
|
|
? e.formatTime
|
|
: unref(dict_r))(
|
|
n.create_time,
|
|
),
|
|
),
|
|
1,
|
|
),
|
|
],
|
|
10,
|
|
Ve,
|
|
)
|
|
),
|
|
),
|
|
128,
|
|
)),
|
|
]))
|
|
: (openBlock(),
|
|
createElementBlock(`div`, Ge, [
|
|
...(r[14] ||= [
|
|
createElementVNode(
|
|
`i`,
|
|
{
|
|
class: `pi pi-bell`,
|
|
},
|
|
null,
|
|
-1,
|
|
),
|
|
createElementVNode(
|
|
`strong`,
|
|
null,
|
|
`暂无事件通知`,
|
|
-1,
|
|
),
|
|
createElementVNode(
|
|
`span`,
|
|
null,
|
|
`目前没有待处理的消息通知`,
|
|
-1,
|
|
),
|
|
]),
|
|
])),
|
|
createElementVNode(
|
|
`button`,
|
|
{
|
|
type: `button`,
|
|
class: `mail-pop-foot`,
|
|
onClick: et,
|
|
},
|
|
`查看全部`,
|
|
),
|
|
]),
|
|
]),
|
|
_: 1,
|
|
},
|
|
8,
|
|
[`visible`],
|
|
),
|
|
createElementVNode(`main`, Ke, [
|
|
renderSlot(e.$slots, `default`, {}, void 0, !0),
|
|
]),
|
|
createVNode(C),
|
|
],
|
|
8,
|
|
Me,
|
|
),
|
|
],
|
|
2,
|
|
)
|
|
);
|
|
}
|
|
);
|
|
},
|
|
}),
|
|
[[`__scopeId`, `data-v-1a9c3b51`]],
|
|
);
|
|
export {};
|
|
export default D;
|
|
</script>
|