inicontent 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/pull_request.yml +18 -0
- package/CONTRIBUTING.md +67 -0
- package/LICENSE +21 -0
- package/README.md +142 -0
- package/app/app.vue +106 -0
- package/app/assets/main.css +974 -0
- package/app/components/Api/EndpointCard.vue +169 -0
- package/app/components/Api/SchemaDocsTable.vue +208 -0
- package/app/components/Asset/Card.vue +1363 -0
- package/app/components/Asset/Grid.vue +295 -0
- package/app/components/Asset/Icon.vue +38 -0
- package/app/components/Asset/Preview.vue +486 -0
- package/app/components/Asset/Scanner.vue +700 -0
- package/app/components/Asset/Thumb.vue +708 -0
- package/app/components/Auth/Reset.vue +99 -0
- package/app/components/Auth/index.vue +346 -0
- package/app/components/ChatInterface.vue +2326 -0
- package/app/components/ChatPagePreview.vue +34 -0
- package/app/components/Column/Array.vue +29 -0
- package/app/components/Column/Asset.vue +21 -0
- package/app/components/Column/Boolean.vue +12 -0
- package/app/components/Column/Color.vue +9 -0
- package/app/components/Column/Date.vue +57 -0
- package/app/components/Column/Edit.vue +215 -0
- package/app/components/Column/Email.vue +9 -0
- package/app/components/Column/Html.vue +27 -0
- package/app/components/Column/Id.vue +20 -0
- package/app/components/Column/Locale.vue +32 -0
- package/app/components/Column/Object.vue +18 -0
- package/app/components/Column/Password.vue +7 -0
- package/app/components/Column/Role.vue +15 -0
- package/app/components/Column/S.vue +14 -0
- package/app/components/Column/Table/Single.vue +49 -0
- package/app/components/Column/Table/index.vue +42 -0
- package/app/components/Column/Tags.vue +31 -0
- package/app/components/Column/Text.vue +9 -0
- package/app/components/Column/Url.vue +9 -0
- package/app/components/Column/index.vue +41 -0
- package/app/components/Dashboard/Editor.vue +221 -0
- package/app/components/Dashboard/Grid.vue +270 -0
- package/app/components/Dashboard/View.vue +131 -0
- package/app/components/Dashboard/Widget/BarChart.vue +73 -0
- package/app/components/Dashboard/Widget/Counter.vue +51 -0
- package/app/components/Dashboard/Widget/LineChart.vue +76 -0
- package/app/components/Dashboard/Widget/PieChart.vue +75 -0
- package/app/components/Dashboard/Widget/Table.vue +94 -0
- package/app/components/Dashboard/WidgetEditor.vue +274 -0
- package/app/components/Data/Array.vue +102 -0
- package/app/components/Data/Html.vue +9 -0
- package/app/components/Data/Icon.vue +9 -0
- package/app/components/Data/Object.vue +10 -0
- package/app/components/Data/S.vue +16 -0
- package/app/components/Data/Table.vue +53 -0
- package/app/components/Data/Value.vue +34 -0
- package/app/components/Data/index.vue +14 -0
- package/app/components/Field/Array.vue +324 -0
- package/app/components/Field/Asset/Actions.vue +97 -0
- package/app/components/Field/Asset/index.vue +639 -0
- package/app/components/Field/Boolean.vue +26 -0
- package/app/components/Field/Checkbox.vue +48 -0
- package/app/components/Field/Color.vue +27 -0
- package/app/components/Field/Date.vue +30 -0
- package/app/components/Field/Email.vue +51 -0
- package/app/components/Field/EmailTemplate.vue +420 -0
- package/app/components/Field/Html/ColorPicker.vue +127 -0
- package/app/components/Field/Html/Editor.vue +544 -0
- package/app/components/Field/Html/index.vue +25 -0
- package/app/components/Field/Icon.vue +114 -0
- package/app/components/Field/JSON.vue +113 -0
- package/app/components/Field/Mention.vue +36 -0
- package/app/components/Field/Number.vue +27 -0
- package/app/components/Field/Object.vue +92 -0
- package/app/components/Field/Password.vue +55 -0
- package/app/components/Field/Radio.vue +47 -0
- package/app/components/Field/S.vue +44 -0
- package/app/components/Field/Select.vue +49 -0
- package/app/components/Field/Table.vue +348 -0
- package/app/components/Field/Tags.vue +113 -0
- package/app/components/Field/Text.vue +31 -0
- package/app/components/Field/Textarea.vue +33 -0
- package/app/components/Field/Url.vue +40 -0
- package/app/components/Field/Wrapper.vue +128 -0
- package/app/components/Field/index.vue +68 -0
- package/app/components/FloatingChatbot.vue +73 -0
- package/app/components/Form/Card.vue +151 -0
- package/app/components/Form/Drawer.vue +195 -0
- package/app/components/Form/index.vue +621 -0
- package/app/components/Header.vue +328 -0
- package/app/components/Offline/ConflictModal.vue +200 -0
- package/app/components/Offline/SyncStatus.vue +249 -0
- package/app/components/PlatformFeatureLanding.vue +65 -0
- package/app/components/Table/Backups.vue +638 -0
- package/app/components/Table/Flows.vue +814 -0
- package/app/components/Table/Grid.vue +296 -0
- package/app/components/Table/Icon.vue +36 -0
- package/app/components/Table/Logs.vue +181 -0
- package/app/components/Table/Schedules.vue +722 -0
- package/app/components/Table/Search/Button.vue +256 -0
- package/app/components/Table/Search/Items.vue +286 -0
- package/app/components/Table/Search/index.vue +87 -0
- package/app/components/Table/Settings/Schema.vue +801 -0
- package/app/components/Table/Settings/index.vue +631 -0
- package/app/components/Table/TranslateDrawer.vue +526 -0
- package/app/components/Table/Views/Kanban.vue +289 -0
- package/app/components/Table/Views/Table.vue +1273 -0
- package/app/components/Table/index.vue +890 -0
- package/app/composables/Translation/define.ts +41 -0
- package/app/composables/Translation/fetch.ts +107 -0
- package/app/composables/Translation/languages.ts +1 -0
- package/app/composables/Translation/loadCoreTranslations.ts +38 -0
- package/app/composables/Translation/translate.ts +250 -0
- package/app/composables/databaseCookies.ts +79 -0
- package/app/composables/fieldValidator.ts +72 -0
- package/app/composables/fieldsList.ts +301 -0
- package/app/composables/formatDatabase.ts +101 -0
- package/app/composables/index.ts +444 -0
- package/app/composables/openDrawer.ts +118 -0
- package/app/composables/optimizeFile.ts +287 -0
- package/app/composables/renderLabel.ts +88 -0
- package/app/composables/schemaClipboard.ts +95 -0
- package/app/composables/search.ts +353 -0
- package/app/composables/setThemeConfig.ts +48 -0
- package/app/composables/translationValue.ts +169 -0
- package/app/composables/useAssetPreview.ts +84 -0
- package/app/composables/useAssetUploader.ts +56 -0
- package/app/composables/useDashboardData.ts +310 -0
- package/app/composables/useDocumentThumbnail.ts +351 -0
- package/app/composables/useEcharts.ts +33 -0
- package/app/composables/useLocalDatabaseConfig.ts +51 -0
- package/app/composables/useOcr.ts +300 -0
- package/app/composables/useOfflineFetch.ts +194 -0
- package/app/composables/useOfflineItem.ts +107 -0
- package/app/composables/useOfflineQueue.ts +302 -0
- package/app/composables/useOfflineSync.ts +235 -0
- package/app/composables/usePasskeyAuth.ts +156 -0
- package/app/composables/usePdfCompressor.ts +180 -0
- package/app/composables/usePlatformRedirect.ts +72 -0
- package/app/composables/useRealtimeSync.ts +233 -0
- package/app/composables/useReferencedItems.ts +180 -0
- package/app/composables/useScanner.ts +664 -0
- package/app/composables/useSubscription.ts +650 -0
- package/app/composables/useThumbnailCache.ts +136 -0
- package/app/composables/useVideoCompressor.ts +194 -0
- package/app/error.vue +112 -0
- package/app/layouts/api.vue +188 -0
- package/app/layouts/dashboard.vue +91 -0
- package/app/layouts/default.vue +228 -0
- package/app/layouts/table.vue +471 -0
- package/app/locales/ar.ts +996 -0
- package/app/locales/en.ts +655 -0
- package/app/locales/es.ts +996 -0
- package/app/locales/fr.ts +997 -0
- package/app/middleware/dashboard.ts +33 -0
- package/app/middleware/database.ts +83 -0
- package/app/middleware/global.ts +1 -0
- package/app/middleware/sid-ingest.global.ts +29 -0
- package/app/middleware/table.ts +54 -0
- package/app/middleware/user.ts +26 -0
- package/app/pages/[[database]]/admin/api/auth/index.vue +306 -0
- package/app/pages/[[database]]/admin/api/index.vue +18 -0
- package/app/pages/[[database]]/admin/api/tables/[table]/index.vue +497 -0
- package/app/pages/[[database]]/admin/api/tables/index.vue +87 -0
- package/app/pages/[[database]]/admin/billing/index.vue +16 -0
- package/app/pages/[[database]]/admin/dashboards/[id]/edit.vue +66 -0
- package/app/pages/[[database]]/admin/dashboards/[id]/index.vue +117 -0
- package/app/pages/[[database]]/admin/dashboards/index.vue +20 -0
- package/app/pages/[[database]]/admin/index.vue +28 -0
- package/app/pages/[[database]]/admin/settings.vue +526 -0
- package/app/pages/[[database]]/admin/tables/[table]/[id]/edit.vue +143 -0
- package/app/pages/[[database]]/admin/tables/[table]/[id]/index.vue +146 -0
- package/app/pages/[[database]]/admin/tables/[table]/flows.vue +10 -0
- package/app/pages/[[database]]/admin/tables/[table]/index.vue +10 -0
- package/app/pages/[[database]]/admin/tables/[table]/new.vue +12 -0
- package/app/pages/[[database]]/admin/tables/[table]/schedules.vue +10 -0
- package/app/pages/[[database]]/admin/tables/[table]/settings.vue +30 -0
- package/app/pages/[[database]]/admin/tables/assets/[...path].vue +24 -0
- package/app/pages/[[database]]/admin/tables/assets/flows.vue +10 -0
- package/app/pages/[[database]]/admin/tables/backups/index.vue +10 -0
- package/app/pages/[[database]]/admin/tables/blocks/index.vue +16 -0
- package/app/pages/[[database]]/admin/tables/index.vue +20 -0
- package/app/pages/[[database]]/admin/tables/pages/index.vue +16 -0
- package/app/pages/[[database]]/admin/tables/templates/index.vue +16 -0
- package/app/pages/[[database]]/api/index.vue +120 -0
- package/app/pages/[[database]]/auth/index.vue +12 -0
- package/app/pages/[[database]]/auth/reset.vue +10 -0
- package/app/pages/[[database]]/index.vue +10 -0
- package/app/plugins/offline-warmup.client.ts +53 -0
- package/app/plugins/template-globals.ts +9 -0
- package/app/spa-loading-template.html +93 -0
- package/biome.json +53 -0
- package/index.d.ts +380 -0
- package/modules/naiveui.ts +41 -0
- package/nuxt.config.ts +269 -0
- package/package.json +56 -0
- package/pnpm-workspace.yaml +5 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/pwa-192x192.png +0 -0
- package/public/pwa-512x512.png +0 -0
- package/public/pwa-maskable-192x192.png +0 -0
- package/public/pwa-maskable-512x512.png +0 -0
- package/public/vendor/opencv.js +48 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NPopover
|
|
3
|
+
v-if="buttonVisible"
|
|
4
|
+
v-model:show="show"
|
|
5
|
+
trigger="click"
|
|
6
|
+
:placement="'bottom'"
|
|
7
|
+
:style="{ maxWidth: '280px' }"
|
|
8
|
+
>
|
|
9
|
+
<template #trigger>
|
|
10
|
+
<NBadge
|
|
11
|
+
v-if="badgeCount > 0"
|
|
12
|
+
:value="badgeCount"
|
|
13
|
+
:max="9"
|
|
14
|
+
:type="conflictCount > 0 ? 'error' : 'warning'"
|
|
15
|
+
:offset="[3, 3]"
|
|
16
|
+
>
|
|
17
|
+
<NButton secondary round size="small" :type="buttonType">
|
|
18
|
+
<template #icon>
|
|
19
|
+
<NIcon>
|
|
20
|
+
<Icon :name="buttonIcon" />
|
|
21
|
+
</NIcon>
|
|
22
|
+
</template>
|
|
23
|
+
</NButton>
|
|
24
|
+
</NBadge>
|
|
25
|
+
<NButton secondary v-else round size="small" :type="buttonType">
|
|
26
|
+
<template #icon>
|
|
27
|
+
<NIcon>
|
|
28
|
+
<Icon :name="buttonIcon" />
|
|
29
|
+
</NIcon>
|
|
30
|
+
</template>
|
|
31
|
+
</NButton>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<NFlex vertical justify="center" :size="6" style="min-width: 200px">
|
|
35
|
+
<!-- Connection + sync status -->
|
|
36
|
+
<NFlex align="center" justify="center" :reverse="Language === 'ar'" :size="6">
|
|
37
|
+
<NIcon :class="{ spin: isSyncing }">
|
|
38
|
+
<Icon
|
|
39
|
+
:name="
|
|
40
|
+
isSyncing
|
|
41
|
+
? 'tabler:refresh'
|
|
42
|
+
: isOnline
|
|
43
|
+
? 'tabler:cloud-check'
|
|
44
|
+
: 'tabler:cloud-off'
|
|
45
|
+
"
|
|
46
|
+
/>
|
|
47
|
+
</NIcon>
|
|
48
|
+
<NText depth="2" style="font-size: 12px">
|
|
49
|
+
{{
|
|
50
|
+
isSyncing
|
|
51
|
+
? t("syncingPending")
|
|
52
|
+
: isOnline
|
|
53
|
+
? t("online")
|
|
54
|
+
: t("offline")
|
|
55
|
+
}}
|
|
56
|
+
</NText>
|
|
57
|
+
</NFlex>
|
|
58
|
+
|
|
59
|
+
<NText
|
|
60
|
+
v-if="!isOnline && !isSyncing"
|
|
61
|
+
depth="3"
|
|
62
|
+
style="font-size: 12px; line-height: 1.4; white-space: normal"
|
|
63
|
+
>
|
|
64
|
+
{{ t("offlineTooltip") }}
|
|
65
|
+
</NText>
|
|
66
|
+
|
|
67
|
+
<!-- Pending changes + sync now -->
|
|
68
|
+
<template v-if="pendingCount > 0 && !isSyncing">
|
|
69
|
+
<NFlex align="center" justify="center" :size="12">
|
|
70
|
+
<NText depth="2" style="font-size: 12px">
|
|
71
|
+
{{ t("pendingChanges", { count: pendingCount }) }}
|
|
72
|
+
</NText>
|
|
73
|
+
<NButton size="tiny" type="primary" tertiary @click="onOpenSync">
|
|
74
|
+
{{ t("syncNow") }}
|
|
75
|
+
</NButton>
|
|
76
|
+
</NFlex>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<!-- Conflicts -->
|
|
80
|
+
<template v-if="conflictCount > 0">
|
|
81
|
+
<NFlex align="center" justify="center" :size="12">
|
|
82
|
+
<NText depth="2" style="font-size: 12px">
|
|
83
|
+
{{ t("conflictsPending", { count: conflictCount }) }}
|
|
84
|
+
</NText>
|
|
85
|
+
<NButton size="tiny" type="error" tertiary @click="onOpenConflicts">
|
|
86
|
+
{{ t("resolveConflicts") }}
|
|
87
|
+
</NButton>
|
|
88
|
+
</NFlex>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<!-- PWA actions -->
|
|
92
|
+
<template v-if="showPwa && (pwa?.needRefresh || pwa?.showInstallPrompt)">
|
|
93
|
+
<NDivider style="margin: 6px 0" />
|
|
94
|
+
<NButton
|
|
95
|
+
v-if="pwa?.showInstallPrompt"
|
|
96
|
+
size="tiny"
|
|
97
|
+
block
|
|
98
|
+
secondary
|
|
99
|
+
@click="onInstall"
|
|
100
|
+
>
|
|
101
|
+
<template #icon>
|
|
102
|
+
<NIcon>
|
|
103
|
+
<Icon name="tabler:download" />
|
|
104
|
+
</NIcon>
|
|
105
|
+
</template>
|
|
106
|
+
{{ t("installApp") }}
|
|
107
|
+
</NButton>
|
|
108
|
+
<NButton
|
|
109
|
+
v-if="pwa?.needRefresh"
|
|
110
|
+
size="tiny"
|
|
111
|
+
block
|
|
112
|
+
type="primary"
|
|
113
|
+
secondary
|
|
114
|
+
@click="onUpdate"
|
|
115
|
+
>
|
|
116
|
+
<template #icon>
|
|
117
|
+
<NIcon>
|
|
118
|
+
<Icon name="tabler:refresh-alert" />
|
|
119
|
+
</NIcon>
|
|
120
|
+
</template>
|
|
121
|
+
{{ t("updateAvailable") }}
|
|
122
|
+
</NButton>
|
|
123
|
+
</template>
|
|
124
|
+
</NFlex>
|
|
125
|
+
</NPopover>
|
|
126
|
+
</template>
|
|
127
|
+
|
|
128
|
+
<script setup lang="ts">
|
|
129
|
+
import {
|
|
130
|
+
Icon,
|
|
131
|
+
NBadge,
|
|
132
|
+
NButton,
|
|
133
|
+
NDivider,
|
|
134
|
+
NFlex,
|
|
135
|
+
NIcon,
|
|
136
|
+
NText,
|
|
137
|
+
} from "#components";
|
|
138
|
+
import { useOfflineSync } from "~/composables/useOfflineSync";
|
|
139
|
+
|
|
140
|
+
const props = defineProps<{
|
|
141
|
+
showPwa?: boolean;
|
|
142
|
+
}>();
|
|
143
|
+
|
|
144
|
+
const database = useState<Database>("database");
|
|
145
|
+
const Language = useScopedCookie<LanguagesType>(
|
|
146
|
+
"language",
|
|
147
|
+
database.value?.slug,
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
// Destructured at top level so the template compiler auto-unwraps these refs
|
|
151
|
+
// (a plain-object property like `sync.isSyncing` would NOT unwrap, silently
|
|
152
|
+
// breaking the popover content: `!sync.isSyncing` is always false because a
|
|
153
|
+
// Ref object is always truthy).
|
|
154
|
+
const {
|
|
155
|
+
isOnline,
|
|
156
|
+
isSyncing,
|
|
157
|
+
conflicts,
|
|
158
|
+
pendingCount,
|
|
159
|
+
syncPendingMutations,
|
|
160
|
+
initSync,
|
|
161
|
+
} = useOfflineSync();
|
|
162
|
+
const show = ref(false);
|
|
163
|
+
|
|
164
|
+
// Reactive $pwa instance injected by the vite-pwa Nuxt client plugin.
|
|
165
|
+
const { $pwa } = useNuxtApp() as any;
|
|
166
|
+
const pwa = ref($pwa);
|
|
167
|
+
|
|
168
|
+
const conflictCount = computed(() => conflicts.value.length);
|
|
169
|
+
const badgeCount = computed(() => pendingCount.value + conflictCount.value);
|
|
170
|
+
|
|
171
|
+
// Hide the network status button entirely when everything is fine: online,
|
|
172
|
+
// nothing pending, no conflicts, no PWA update/install prompt. It only appears
|
|
173
|
+
// when there is something the user should be aware of (offline, syncing, queued
|
|
174
|
+
// changes, conflicts) or can act on (PWA prompt).
|
|
175
|
+
const buttonVisible = computed(
|
|
176
|
+
() =>
|
|
177
|
+
!isOnline.value ||
|
|
178
|
+
isSyncing.value ||
|
|
179
|
+
badgeCount.value > 0 ||
|
|
180
|
+
!!(pwa.value?.needRefresh || pwa.value?.showInstallPrompt),
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
const buttonIcon = computed(() =>
|
|
184
|
+
isSyncing.value
|
|
185
|
+
? "tabler:refresh"
|
|
186
|
+
: isOnline.value
|
|
187
|
+
? "tabler:cloud-check"
|
|
188
|
+
: "tabler:cloud-off",
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
const buttonType = computed(() => {
|
|
192
|
+
if (conflictCount.value > 0) return "error";
|
|
193
|
+
if (pendingCount.value > 0) return "warning";
|
|
194
|
+
if (!isOnline.value) return "error";
|
|
195
|
+
return "default";
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
async function onUpdate() {
|
|
199
|
+
show.value = false;
|
|
200
|
+
await $pwa.updateServiceWorker();
|
|
201
|
+
$pwa.cancelPrompt();
|
|
202
|
+
window.location.reload();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function onInstall() {
|
|
206
|
+
show.value = false;
|
|
207
|
+
$pwa.install();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function onOpenSync() {
|
|
211
|
+
syncPendingMutations();
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// The conflict resolution UI lives as a global modal (mounted in the layout);
|
|
215
|
+
// opening it here just flips the shared useState bus so it appears.
|
|
216
|
+
const conflictModalOpen = useState<boolean>(
|
|
217
|
+
"offline_conflictModalOpen",
|
|
218
|
+
() => false,
|
|
219
|
+
);
|
|
220
|
+
function onOpenConflicts() {
|
|
221
|
+
show.value = false;
|
|
222
|
+
conflictModalOpen.value = true;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
onMounted(() => {
|
|
226
|
+
// Deferred so opening IndexedDB never competes with initial render/fetch.
|
|
227
|
+
const runInit = () => initSync();
|
|
228
|
+
if ("requestIdleCallback" in window) {
|
|
229
|
+
// @ts-expect-error requestIdleCallback types not present
|
|
230
|
+
window.requestIdleCallback(runInit, { timeout: 3000 });
|
|
231
|
+
} else {
|
|
232
|
+
setTimeout(runInit, 500);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
</script>
|
|
236
|
+
|
|
237
|
+
<style scoped>
|
|
238
|
+
.spin {
|
|
239
|
+
animation: spin 1s linear infinite;
|
|
240
|
+
}
|
|
241
|
+
@keyframes spin {
|
|
242
|
+
from {
|
|
243
|
+
transform: rotate(0deg);
|
|
244
|
+
}
|
|
245
|
+
to {
|
|
246
|
+
transform: rotate(360deg);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
</style>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="centerCard">
|
|
3
|
+
<NCard style="max-width: 300px;margin: auto;" >
|
|
4
|
+
<NResult :description="t('platformFeatureIntro', { feature: t(feature) })">
|
|
5
|
+
<template #icon>
|
|
6
|
+
<NIcon :size="72" :color="ThemeConfig.primaryColor">
|
|
7
|
+
<Icon :name="featureIcon" />
|
|
8
|
+
</NIcon>
|
|
9
|
+
</template>
|
|
10
|
+
<template #default>
|
|
11
|
+
<NFlex vertical :size="10" align="center" style="text-align: center;">
|
|
12
|
+
<NText depth="3">{{ t("platformFeatureAt") }}</NText>
|
|
13
|
+
<code class="platform-url">{{ platformHost }}</code>
|
|
14
|
+
<NText depth="3">{{ t("platformFeatureHint") }}</NText>
|
|
15
|
+
</NFlex>
|
|
16
|
+
</template>
|
|
17
|
+
<template #footer>
|
|
18
|
+
<NButton type="primary" secondary round size="large" tag="a"
|
|
19
|
+
:href="redirectUrl" target="_blank" rel="noopener">
|
|
20
|
+
<template #icon>
|
|
21
|
+
<NIcon>
|
|
22
|
+
<Icon name="tabler:external-link" />
|
|
23
|
+
</NIcon>
|
|
24
|
+
</template>
|
|
25
|
+
{{ t("openInPlatform") }}
|
|
26
|
+
</NButton>
|
|
27
|
+
</template>
|
|
28
|
+
</NResult>
|
|
29
|
+
</NCard>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import type { PlatformFeature } from "~/composables/usePlatformRedirect";
|
|
35
|
+
|
|
36
|
+
const props = defineProps<{ feature: PlatformFeature }>();
|
|
37
|
+
|
|
38
|
+
const ThemeConfig = useState<ThemeConfig>("ThemeConfig", () => ({
|
|
39
|
+
primaryColor: "#FF9800",
|
|
40
|
+
primaryColorHover: "#F7A42A",
|
|
41
|
+
primaryColorPressed: "#E19421",
|
|
42
|
+
primaryColorSuppl: "#CB7900",
|
|
43
|
+
}));
|
|
44
|
+
|
|
45
|
+
const { platformHost, platformUrl } = usePlatformRedirect();
|
|
46
|
+
|
|
47
|
+
const featureIcons: Record<PlatformFeature, string> = {
|
|
48
|
+
pages: "tabler:app-window",
|
|
49
|
+
blocks: "tabler:tournament",
|
|
50
|
+
templates: "tabler:template",
|
|
51
|
+
billing: "tabler:credit-card",
|
|
52
|
+
};
|
|
53
|
+
const featureIcon = computed(() => featureIcons[props.feature]);
|
|
54
|
+
const redirectUrl = computed(() => platformUrl(props.feature));
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<style scoped>
|
|
58
|
+
.platform-url {
|
|
59
|
+
background-color: rgba(128, 128, 128, 0.12);
|
|
60
|
+
border-radius: 6px;
|
|
61
|
+
padding: 6px 12px;
|
|
62
|
+
font-family: inherit;
|
|
63
|
+
opacity: 0.9;
|
|
64
|
+
}
|
|
65
|
+
</style>
|