mango-cms 0.1.23 → 0.1.24
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.
|
@@ -7,12 +7,29 @@
|
|
|
7
7
|
<div>{{ online ? 'Online' : 'Offline' }}</div>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
+
<!-- Dark Mode Toggle -->
|
|
11
|
+
<div class="absolute top-4 right-4 z-20">
|
|
12
|
+
<button @click="darkMode.enabled = !darkMode.enabled"
|
|
13
|
+
class="p-2 rounded-full bg-white dark:bg-indigo-950/80 shadow-md hover:shadow-lg transition-all">
|
|
14
|
+
<svg v-if="darkMode.enabled" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-yellow-400"
|
|
15
|
+
fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
16
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
17
|
+
d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
|
|
18
|
+
</svg>
|
|
19
|
+
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-slate-700" fill="none"
|
|
20
|
+
viewBox="0 0 24 24" stroke="currentColor">
|
|
21
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
22
|
+
d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
|
|
23
|
+
</svg>
|
|
24
|
+
</button>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
10
27
|
<div class="pt-16 lg:pt-32 flex items-center justify-center w-full">
|
|
11
28
|
|
|
12
29
|
<div class="w-full max-2xl py-16 md:py-32 text-center flex flex-col items-center px-8 md:px-16">
|
|
13
30
|
<div class="text-9xl pb-8">🥭</div>
|
|
14
31
|
<h1 class="font-bold text-5xl pb-4 bg-clip-text bg-gradient-to-r from-orange-500 to-green-500 text-transparent">Welcome to Mango</h1>
|
|
15
|
-
<h1 class="font-bold text-lg bg-clip-text bg-gradient-to-r from-orange-500 to-green-500 text-transparent italic opacity-50">Here to make your life
|
|
32
|
+
<h1 class="font-bold text-lg bg-clip-text bg-gradient-to-r from-orange-500 to-green-500 text-transparent italic opacity-50">Here to make your life easier.</h1>
|
|
16
33
|
</div>
|
|
17
34
|
|
|
18
35
|
</div>
|
|
@@ -22,7 +39,20 @@
|
|
|
22
39
|
<div v-else class="space-y-8">
|
|
23
40
|
<div class="text-lg">Looks like the local Mango server isn't up and running yet. Please start it by running:</div>
|
|
24
41
|
<div class="w-full">
|
|
25
|
-
<
|
|
42
|
+
<div class="flex items-center space-x-2 relative">
|
|
43
|
+
<code class="bg-gray-200 dark:bg-black p-3 border border-gray-700 rounded-lg flex-grow dark:selection:bg-sky-700">cd mango; yarn; yarn watch;</code>
|
|
44
|
+
<button @click="copyToClipboard('cd mango; yarn; yarn watch;')" class="p-2 rounded-lg bg-gray-200 dark:bg-black border border-gray-700 hover:bg-gray-300 dark:hover:bg-gray-800 transition-colors relative group">
|
|
45
|
+
<svg v-if="!copied" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
46
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
|
|
47
|
+
</svg>
|
|
48
|
+
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
49
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
|
|
50
|
+
</svg>
|
|
51
|
+
<div class="absolute -top-8 left-1/2 transform -translate-x-1/2 bg-gray-800 text-white px-2 py-1 rounded text-sm whitespace-nowrap opacity-0 transition-opacity duration-300" :class="{ 'opacity-100': copied }">
|
|
52
|
+
Copied!
|
|
53
|
+
</div>
|
|
54
|
+
</button>
|
|
55
|
+
</div>
|
|
26
56
|
</div>
|
|
27
57
|
</div>
|
|
28
58
|
</div>
|
|
@@ -33,7 +63,7 @@
|
|
|
33
63
|
<div class="text mb-4">Great! Now you're logged in as:</div>
|
|
34
64
|
<div class="text-2xl mb-8">{{ store.user.title }}</div>
|
|
35
65
|
<div class="rounded-lg bg-gray-100 dark:bg-gray-800 p-4 ">
|
|
36
|
-
<
|
|
66
|
+
<pre class="tracking-widest opacity-75 font-mono mt-2 truncate text-xs" v-html="JSON.stringify(store.user, undefined, 4).replaceAll('\n', '<br>').replaceAll(' ', ' ')" />
|
|
37
67
|
</div>
|
|
38
68
|
</div>
|
|
39
69
|
|
|
@@ -54,11 +84,25 @@ import Login from '../layout/login.vue'
|
|
|
54
84
|
|
|
55
85
|
export default {
|
|
56
86
|
components: { Login },
|
|
57
|
-
inject: ['store'],
|
|
87
|
+
inject: ['store','darkMode'],
|
|
88
|
+
methods: {
|
|
89
|
+
async copyToClipboard(text) {
|
|
90
|
+
try {
|
|
91
|
+
await navigator.clipboard.writeText(text);
|
|
92
|
+
this.copied = true;
|
|
93
|
+
setTimeout(() => {
|
|
94
|
+
this.copied = false;
|
|
95
|
+
}, 2000);
|
|
96
|
+
} catch (err) {
|
|
97
|
+
console.error('Failed to copy text:', err);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
},
|
|
58
101
|
data() {
|
|
59
102
|
return {
|
|
60
103
|
online: false,
|
|
61
104
|
checker: null,
|
|
105
|
+
copied: false,
|
|
62
106
|
}
|
|
63
107
|
},
|
|
64
108
|
async created() {
|