nuxt-glorious 2.0.0-develop-2 → 2.0.0-develop-3
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/dist/module.json +1 -1
- package/dist/module.mjs +1 -0
- package/dist/runtime/components/G/Modal.vue +0 -8
- package/dist/runtime/plugins/modalClose.d.ts +2 -0
- package/dist/runtime/plugins/modalClose.mjs +17 -0
- package/dist/runtime/stores/GloriousStore.mjs +1 -0
- package/package.json +1 -1
- package/dist/runtime/plugins/module.d.ts +0 -4
- package/dist/runtime/plugins/module.mjs +0 -94
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
@@ -57,6 +57,7 @@ const module = defineNuxtModule({
|
|
57
57
|
dir: resolver.resolve("./runtime/assets")
|
58
58
|
});
|
59
59
|
});
|
60
|
+
addPlugin(resolver.resolve("./runtime/plugins/modalClose"));
|
60
61
|
addPlugin(resolver.resolve("./runtime/plugins/InputComponent"));
|
61
62
|
addRouteMiddleware({
|
62
63
|
name: "g-auth-strategy",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { defineNuxtPlugin } from "#imports";
|
2
|
+
import { GloriousStore } from "../stores/GloriousStore.mjs";
|
3
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
4
|
+
const gs = GloriousStore();
|
5
|
+
nuxtApp.hook("app:beforeMount", () => {
|
6
|
+
document.onkeydown = (e) => {
|
7
|
+
if (e.code === "Escape") {
|
8
|
+
Object.entries(gs.modals).map((item, index) => {
|
9
|
+
const [key, value] = item;
|
10
|
+
if (value) {
|
11
|
+
gs.modals[key] = false;
|
12
|
+
}
|
13
|
+
});
|
14
|
+
}
|
15
|
+
};
|
16
|
+
});
|
17
|
+
});
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "2.0.0-develop-
|
2
|
+
"version": "2.0.0-develop-3",
|
3
3
|
"name": "nuxt-glorious",
|
4
4
|
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
5
|
"repository": "sajadhzj/nuxt-glorious",
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
defineNuxtModule,
|
3
|
-
addPlugin,
|
4
|
-
addComponentsDir,
|
5
|
-
createResolver,
|
6
|
-
addImportsDir,
|
7
|
-
installModule,
|
8
|
-
addRouteMiddleware
|
9
|
-
} from "@nuxt/kit";
|
10
|
-
import defu from "defu";
|
11
|
-
export default defineNuxtModule({
|
12
|
-
meta: {
|
13
|
-
name: "glorious",
|
14
|
-
configKey: "glorious"
|
15
|
-
},
|
16
|
-
// Default configuration options of the Nuxt module
|
17
|
-
defaults: {},
|
18
|
-
async setup(options, nuxt) {
|
19
|
-
const resolver = createResolver(import.meta.url);
|
20
|
-
nuxt.options.runtimeConfig.public.glorious = defu(nuxt.options.glorious, {
|
21
|
-
fetch: {
|
22
|
-
baseURL: "/",
|
23
|
-
credentials: "same-origin"
|
24
|
-
},
|
25
|
-
seo: {
|
26
|
-
suffix: "",
|
27
|
-
title: "",
|
28
|
-
description: ""
|
29
|
-
},
|
30
|
-
auth: {
|
31
|
-
cookie: {
|
32
|
-
name: "ga-token",
|
33
|
-
httpOnly: false
|
34
|
-
},
|
35
|
-
redirect: {
|
36
|
-
logout: "/login",
|
37
|
-
login: "/login"
|
38
|
-
},
|
39
|
-
strategy: {
|
40
|
-
provider: "",
|
41
|
-
//[laravel-passport]
|
42
|
-
endpoints: {
|
43
|
-
userInfo: {
|
44
|
-
url: "/",
|
45
|
-
method: "GET",
|
46
|
-
pick: ""
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
51
|
-
});
|
52
|
-
await installModule("@nuxtjs/tailwindcss", {
|
53
|
-
// module configuration
|
54
|
-
exposeConfig: true,
|
55
|
-
config: {
|
56
|
-
darkMode: "class",
|
57
|
-
content: {
|
58
|
-
files: [
|
59
|
-
resolver.resolve("./runtime/components/G/**/*.{vue,mjs,ts}"),
|
60
|
-
resolver.resolve("./runtime/*.{mjs,js,ts}")
|
61
|
-
]
|
62
|
-
}
|
63
|
-
}
|
64
|
-
});
|
65
|
-
await installModule("@pinia/nuxt");
|
66
|
-
addImportsDir(resolver.resolve("runtime/composables"));
|
67
|
-
addImportsDir(resolver.resolve("runtime/stores"));
|
68
|
-
addImportsDir(resolver.resolve("runtime/middlewares"));
|
69
|
-
addComponentsDir({
|
70
|
-
path: resolver.resolve("runtime/components"),
|
71
|
-
global: true,
|
72
|
-
watch: false
|
73
|
-
});
|
74
|
-
nuxt.hook("nitro:config", async (nitro) => {
|
75
|
-
nitro.publicAssets.push({
|
76
|
-
dir: resolver.resolve("./runtime/assets")
|
77
|
-
});
|
78
|
-
});
|
79
|
-
addPlugin(resolver.resolve("./runtime/plugins/glorious-app-setting"));
|
80
|
-
addPlugin({
|
81
|
-
src: resolver.resolve("./runtime/plugins/InputComponent"),
|
82
|
-
mode: "client"
|
83
|
-
});
|
84
|
-
addRouteMiddleware({
|
85
|
-
name: "g-auth-strategy",
|
86
|
-
path: resolver.resolve("./runtime/middlewares/AuthStrategy"),
|
87
|
-
global: true
|
88
|
-
});
|
89
|
-
addRouteMiddleware({
|
90
|
-
name: "g-auth",
|
91
|
-
path: resolver.resolve("./runtime/middlewares/Auth")
|
92
|
-
});
|
93
|
-
}
|
94
|
-
});
|