workbench-ChoTmZMf.mjs
5.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import { _ as _sfc_main$1 } from './Card-DYSPsF5s.mjs';
import { _ as _sfc_main$2 } from './Badge-DxP8LLFm.mjs';
import { u as useAppI18n, a as useToast, b as useAuth, _ as _sfc_main$9, n as navigateTo } from './server.mjs';
import { defineComponent, mergeProps, withCtx, unref, createVNode, createTextVNode, toDisplayString, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate } from 'vue/server-renderer';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '@iconify/utils';
import 'consola';
import 'perfect-debounce';
import 'tailwindcss/colors';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/plugins';
import 'unhead/utils';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "workbench",
__ssrInlineRender: true,
setup(__props) {
const { t } = useAppI18n();
const toast = useToast();
const { logout } = useAuth();
const handleLogout = async () => {
logout();
await navigateTo("/login");
toast.add({
title: t("userMenu.logoutSuccessTitle"),
description: t("userMenu.logoutSuccessDescription"),
color: "success"
});
};
return (_ctx, _push, _parent, _attrs) => {
const _component_UCard = _sfc_main$1;
const _component_UBadge = _sfc_main$2;
const _component_UButton = _sfc_main$9;
_push(`<main${ssrRenderAttrs(mergeProps({ class: "min-h-screen bg-gradient-to-br from-default via-elevated/20 to-primary/10 px-4 py-8" }, _attrs))}><div class="mx-auto max-w-md space-y-6">`);
_push(ssrRenderComponent(_component_UCard, { class: "shadow-sm ring-1 ring-default" }, {
header: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`<div class="space-y-3"${_scopeId}><div class="flex items-start justify-between gap-3"${_scopeId}>`);
_push2(ssrRenderComponent(_component_UBadge, {
color: "primary",
variant: "soft",
class: "rounded-full"
}, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(`${ssrInterpolate(unref(t)("mobileWorkbench.badge"))}`);
} else {
return [
createTextVNode(toDisplayString(unref(t)("mobileWorkbench.badge")), 1)
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_UButton, {
size: "sm",
color: "neutral",
variant: "soft",
icon: "i-lucide-log-out",
label: unref(t)("userMenu.logout"),
onClick: handleLogout
}, null, _parent2, _scopeId));
_push2(`</div><h1 class="text-2xl font-semibold text-highlighted"${_scopeId}>${ssrInterpolate(unref(t)("mobileWorkbench.title"))}</h1><p class="text-sm leading-6 text-toned"${_scopeId}>${ssrInterpolate(unref(t)("mobileWorkbench.description"))}</p></div>`);
} else {
return [
createVNode("div", { class: "space-y-3" }, [
createVNode("div", { class: "flex items-start justify-between gap-3" }, [
createVNode(_component_UBadge, {
color: "primary",
variant: "soft",
class: "rounded-full"
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(unref(t)("mobileWorkbench.badge")), 1)
]),
_: 1
}),
createVNode(_component_UButton, {
size: "sm",
color: "neutral",
variant: "soft",
icon: "i-lucide-log-out",
label: unref(t)("userMenu.logout"),
onClick: handleLogout
}, null, 8, ["label"])
]),
createVNode("h1", { class: "text-2xl font-semibold text-highlighted" }, toDisplayString(unref(t)("mobileWorkbench.title")), 1),
createVNode("p", { class: "text-sm leading-6 text-toned" }, toDisplayString(unref(t)("mobileWorkbench.description")), 1)
])
];
}
}),
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(ssrRenderComponent(_component_UButton, {
block: "",
size: "xl",
color: "primary",
icon: "i-lucide-factory",
label: unref(t)("mobileWorkbench.actions.production"),
to: "/m/production/sn-query"
}, null, _parent2, _scopeId));
} else {
return [
createVNode(_component_UButton, {
block: "",
size: "xl",
color: "primary",
icon: "i-lucide-factory",
label: unref(t)("mobileWorkbench.actions.production"),
to: "/m/production/sn-query"
}, null, 8, ["label"])
];
}
}),
_: 1
}, _parent));
_push(`</div></main>`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/m/workbench.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export { _sfc_main as default };
//# sourceMappingURL=workbench-ChoTmZMf.mjs.map