@nuxtify/core 0.4.1 → 0.4.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.d.mts
CHANGED
|
@@ -85,6 +85,7 @@ interface ModuleOptions {
|
|
|
85
85
|
message?: string;
|
|
86
86
|
buttonText?: string;
|
|
87
87
|
buttonUrl?: string;
|
|
88
|
+
exclude?: string[];
|
|
88
89
|
};
|
|
89
90
|
/**
|
|
90
91
|
* Navigation options
|
|
@@ -138,6 +139,7 @@ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, {
|
|
|
138
139
|
message: string;
|
|
139
140
|
buttonText: string;
|
|
140
141
|
buttonUrl: string;
|
|
142
|
+
exclude: never[];
|
|
141
143
|
};
|
|
142
144
|
navigation: {
|
|
143
145
|
primary: never[];
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, useLogger, addComponentsDir, addImpor
|
|
|
2
2
|
import { defu } from 'defu';
|
|
3
3
|
|
|
4
4
|
const name = "@nuxtify/core";
|
|
5
|
-
const version = "0.4.
|
|
5
|
+
const version = "0.4.3";
|
|
6
6
|
|
|
7
7
|
const module$1 = defineNuxtModule().with({
|
|
8
8
|
meta: {
|
|
@@ -27,11 +27,6 @@ const module$1 = defineNuxtModule().with({
|
|
|
27
27
|
background: "#fff"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
},
|
|
31
|
-
variations: {
|
|
32
|
-
colors: ["primary", "secondary"],
|
|
33
|
-
lighten: 5,
|
|
34
|
-
darken: 5
|
|
35
30
|
}
|
|
36
31
|
},
|
|
37
32
|
defaults: {
|
|
@@ -75,7 +70,8 @@ const module$1 = defineNuxtModule().with({
|
|
|
75
70
|
show: false,
|
|
76
71
|
message: "",
|
|
77
72
|
buttonText: "",
|
|
78
|
-
buttonUrl: ""
|
|
73
|
+
buttonUrl: "",
|
|
74
|
+
exclude: []
|
|
79
75
|
},
|
|
80
76
|
// Navigation
|
|
81
77
|
navigation: {
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, isExternalUrl, useDisplay, useNuxtifyConfig } from "#imports";
|
|
2
|
+
import { computed, isExternalUrl, useDisplay, useNuxtifyConfig, useRoute } from "#imports";
|
|
3
3
|
const nuxtifyConfig = useNuxtifyConfig();
|
|
4
4
|
const { xs } = useDisplay();
|
|
5
|
+
const route = useRoute();
|
|
5
6
|
const isExternalLink = computed(
|
|
6
7
|
() => isExternalUrl(nuxtifyConfig.announcement?.buttonUrl ?? "", nuxtifyConfig.brand?.domain ?? "")
|
|
7
8
|
);
|
|
9
|
+
const shouldShow = computed(() => {
|
|
10
|
+
if (!nuxtifyConfig.announcement?.show) return false;
|
|
11
|
+
const hasContent = nuxtifyConfig.announcement?.message || nuxtifyConfig.announcement?.buttonText && nuxtifyConfig.announcement?.buttonUrl;
|
|
12
|
+
if (!hasContent) return false;
|
|
13
|
+
const exclude = nuxtifyConfig.announcement?.exclude || [];
|
|
14
|
+
return !exclude.includes(route.path);
|
|
15
|
+
});
|
|
8
16
|
</script>
|
|
9
17
|
|
|
10
18
|
<template>
|
|
11
19
|
<v-system-bar
|
|
20
|
+
v-if="shouldShow"
|
|
12
21
|
:height="xs ? 60 : 40"
|
|
13
22
|
:order="-100"
|
|
14
|
-
|
|
15
|
-
class="justify-center text-start"
|
|
23
|
+
class="app-announcement justify-center text-start d-print-none"
|
|
16
24
|
>
|
|
17
25
|
<div
|
|
18
26
|
v-if="nuxtifyConfig.announcement?.message"
|
|
@@ -34,3 +42,7 @@ const isExternalLink = computed(
|
|
|
34
42
|
</v-btn>
|
|
35
43
|
</v-system-bar>
|
|
36
44
|
</template>
|
|
45
|
+
|
|
46
|
+
<style scoped>
|
|
47
|
+
.app-announcement{background-color:rgb(var(--v-theme-surface));background-image:linear-gradient(rgb(var(--v-theme-secondary),var(--v-activated-opacity)),rgb(var(--v-theme-secondary),var(--v-activated-opacity)))}
|
|
48
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxtify/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Nuxtify core module powered by Nuxt and Vuetify.",
|
|
5
5
|
"homepage": "https://nuxtify.dev",
|
|
6
6
|
"author": "Nuxtify.dev <hello@nuxtify.dev>",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"defu": "^6.1.4",
|
|
48
|
-
"vuetify-nuxt-module": "^0.19.
|
|
48
|
+
"vuetify-nuxt-module": "^0.19.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@nuxt/devtools": "^3.1.1",
|