@vuepress/plugin-redirect 2.0.0-rc.46 → 2.0.0-rc.51
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.
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { usePreferredLanguages, useScrollLock, useSessionStorage, } from '@vueuse/core';
|
|
1
|
+
import { useLocalStorage, usePreferredLanguages, useScrollLock, useSessionStorage, } from '@vueuse/core';
|
|
2
2
|
import { TransitionGroup, computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, ref, watch, } from 'vue';
|
|
3
3
|
import { useRouteLocale, useRoutePath, useRouter } from 'vuepress/client';
|
|
4
4
|
import { redirectLocaleConfig, redirectLocaleEntries } from '../define.js';
|
|
5
5
|
import '../styles/redirect-modal.css';
|
|
6
6
|
const redirectLocales = __REDIRECT_LOCALES__;
|
|
7
7
|
const { switchLocale } = redirectLocaleConfig;
|
|
8
|
-
const
|
|
8
|
+
const REDIRECT_STORAGE_KEY = 'VUEPRESS_REDIRECT_STATUS';
|
|
9
|
+
const redirectStatusSessionStorage = useSessionStorage(REDIRECT_STORAGE_KEY, {});
|
|
10
|
+
const redirectStatusLocalStorage = useLocalStorage(REDIRECT_STORAGE_KEY, {});
|
|
9
11
|
export default defineComponent({
|
|
10
12
|
name: 'RedirectModal',
|
|
11
13
|
setup() {
|
|
@@ -16,6 +18,7 @@ export default defineComponent({
|
|
|
16
18
|
const body = ref();
|
|
17
19
|
// lock body scroll when modal is displayed
|
|
18
20
|
const showModal = useScrollLock(body);
|
|
21
|
+
const shouldRemember = ref(false);
|
|
19
22
|
const info = computed(() => {
|
|
20
23
|
if (redirectLocaleEntries.some(([key]) => routeLocale.value === key))
|
|
21
24
|
for (const language of languages.value)
|
|
@@ -34,8 +37,8 @@ export default defineComponent({
|
|
|
34
37
|
if (info.value) {
|
|
35
38
|
const { lang, localePath } = info.value;
|
|
36
39
|
const locales = [
|
|
37
|
-
redirectLocales[routeLocale.value],
|
|
38
40
|
redirectLocales[localePath],
|
|
41
|
+
redirectLocales[routeLocale.value],
|
|
39
42
|
];
|
|
40
43
|
return {
|
|
41
44
|
hint: locales.map(({ hint }) => hint.replace('$1', lang)),
|
|
@@ -43,6 +46,7 @@ export default defineComponent({
|
|
|
43
46
|
.map(({ switch: switchText }) => switchText.replace('$1', lang))
|
|
44
47
|
.join(' / '),
|
|
45
48
|
cancel: locales.map(({ cancel }) => cancel).join(' / '),
|
|
49
|
+
remember: locales.map(({ remember }) => remember).join(' / '),
|
|
46
50
|
};
|
|
47
51
|
}
|
|
48
52
|
return null;
|
|
@@ -56,10 +60,12 @@ export default defineComponent({
|
|
|
56
60
|
onMounted(async () => {
|
|
57
61
|
body.value = document.body;
|
|
58
62
|
await nextTick();
|
|
59
|
-
if (!
|
|
63
|
+
if (!redirectStatusSessionStorage.value[routeLocale.value] &&
|
|
64
|
+
info.value) {
|
|
60
65
|
if (switchLocale === 'direct')
|
|
61
66
|
redirect();
|
|
62
|
-
else if (switchLocale === 'modal'
|
|
67
|
+
else if (switchLocale === 'modal' &&
|
|
68
|
+
!redirectStatusLocalStorage.value[routeLocale.value])
|
|
63
69
|
showModal.value = true;
|
|
64
70
|
}
|
|
65
71
|
});
|
|
@@ -72,11 +78,27 @@ export default defineComponent({
|
|
|
72
78
|
class: 'redirect-modal-wrapper',
|
|
73
79
|
}, [
|
|
74
80
|
h('div', { class: 'redirect-modal-content' }, locale.value?.hint.map((text) => h('p', text))),
|
|
81
|
+
h('div', { class: 'redirect-modal-hint' }, [
|
|
82
|
+
h('input', {
|
|
83
|
+
id: 'remember-redirect',
|
|
84
|
+
type: 'checkbox',
|
|
85
|
+
value: shouldRemember.value,
|
|
86
|
+
onChange: () => {
|
|
87
|
+
shouldRemember.value = !shouldRemember.value;
|
|
88
|
+
},
|
|
89
|
+
}),
|
|
90
|
+
h('label', { for: 'remember-redirect' }, locale.value?.remember),
|
|
91
|
+
]),
|
|
75
92
|
h('button', {
|
|
76
93
|
type: 'button',
|
|
77
94
|
class: 'redirect-modal-action primary',
|
|
78
95
|
onClick: () => {
|
|
79
|
-
|
|
96
|
+
redirectStatusSessionStorage.value[routeLocale.value] =
|
|
97
|
+
true;
|
|
98
|
+
if (shouldRemember.value) {
|
|
99
|
+
redirectStatusLocalStorage.value[routeLocale.value] =
|
|
100
|
+
true;
|
|
101
|
+
}
|
|
80
102
|
showModal.value = false;
|
|
81
103
|
redirect();
|
|
82
104
|
},
|
|
@@ -85,7 +107,12 @@ export default defineComponent({
|
|
|
85
107
|
type: 'button',
|
|
86
108
|
class: 'redirect-modal-action',
|
|
87
109
|
onClick: () => {
|
|
88
|
-
|
|
110
|
+
redirectStatusSessionStorage.value[routeLocale.value] =
|
|
111
|
+
true;
|
|
112
|
+
if (shouldRemember.value) {
|
|
113
|
+
redirectStatusLocalStorage.value[routeLocale.value] =
|
|
114
|
+
true;
|
|
115
|
+
}
|
|
89
116
|
showModal.value = false;
|
|
90
117
|
},
|
|
91
118
|
}, locale.value?.cancel),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.redirect-modal-fade-enter-active,.redirect-modal-fade-leave-active{transition:opacity .5s}.redirect-modal-fade-enter,.redirect-modal-fade-leave-to{opacity:0}.redirect-modal-mask{position:fixed;inset:0;z-index:var(--redirect-z-index);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(10px)}@media print{.redirect-modal-mask{display:none}}.redirect-modal-wrapper{position:relative;z-index:1500;overflow:hidden;max-width:80vw;padding:1rem 2rem;border-radius:8px;background:var(--redirect-c-bg);box-shadow:0 2px 6px 0 var(--redirect-c-shadow)}.redirect-modal-action{display:block;width:100%;margin:1rem 0;padding:.5rem .75rem;border:none;border-radius:8px;background-color:var(--redirect-c-control);color:inherit;cursor:pointer}.redirect-modal-action:hover{background-color:var(--redirect-c-control-hover)}.redirect-modal-action.primary{background-color:var(--redirect-c-accent-bg);color:var(--redirect-c-accent-text)}.redirect-modal-action.primary:hover{background-color:var(--redirect-c-accent-hover)}/*# sourceMappingURL=redirect-modal.css.map */
|
|
1
|
+
.redirect-modal-fade-enter-active,.redirect-modal-fade-leave-active{transition:opacity .5s}.redirect-modal-fade-enter,.redirect-modal-fade-leave-to{opacity:0}.redirect-modal-mask{position:fixed;inset:0;z-index:var(--redirect-z-index);display:flex;align-items:center;justify-content:center;backdrop-filter:blur(10px)}@media print{.redirect-modal-mask{display:none}}.redirect-modal-wrapper{position:relative;z-index:1500;overflow:hidden;max-width:80vw;padding:1rem 2rem;border-radius:8px;background:var(--redirect-c-bg);box-shadow:0 2px 6px 0 var(--redirect-c-shadow)}.redirect-modal-hint{margin-top:.5rem;color:var(--vp-c-text-mute);font-size:14px;text-align:start}.redirect-modal-hint input[type=checkbox]{position:relative;vertical-align:text-bottom;height:1em;margin-inline-end:18px;cursor:pointer;appearance:none}.redirect-modal-hint input[type=checkbox]::after{content:" ";position:absolute;top:0;display:inline-block;box-sizing:border-box;width:14px;height:14px;padding-inline-start:0;border:1px solid var(--vp-c-border);border-radius:50%;background:var(--vp-c-control);text-align:center;visibility:visible}.redirect-modal-hint input[type=checkbox]:checked::after{content:"";border-color:var(--vp-c-accent-bg);background:var(--vp-c-accent-bg)}.redirect-modal-hint input[type=checkbox]:checked::before{content:"";position:absolute;inset-inline-start:5px;top:2px;z-index:1;width:2px;height:6px;border:solid var(--vp-c-white);border-width:0 2px 2px 0;transform:rotate(45deg)}.redirect-modal-hint label{display:inline-block}.redirect-modal-action{display:block;width:100%;margin:1rem 0;padding:.5rem .75rem;border:none;border-radius:8px;background-color:var(--redirect-c-control);color:inherit;cursor:pointer}.redirect-modal-action:hover{background-color:var(--redirect-c-control-hover)}.redirect-modal-action.primary{background-color:var(--redirect-c-accent-bg);color:var(--redirect-c-accent-text)}.redirect-modal-action.primary:hover{background-color:var(--redirect-c-accent-hover)}/*# sourceMappingURL=redirect-modal.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../src/client/styles/redirect-modal.scss"],"names":[],"mappings":"AAAA,oEAEE,uBAGF,yDAEE,UAGF,qBACE,eACA,QACA,gCAEA,aACA,mBACA,uBAEA,2BAEA,aAXF,qBAYI,cAIJ,wBACE,kBACA,aAEA,gBAEA,eACA,kBACA,kBAEA,gCACA,gDAGF,uBACE,cAEA,WACA,cACA,qBACA,YACA,kBAEA,2CACA,cAEA,eAEA,6BACE,iDAGF,+BACE,6CACA,oCAEA,qCACE","file":"redirect-modal.css","sourcesContent":[".redirect-modal-fade-enter-active,\n.redirect-modal-fade-leave-active {\n transition: opacity 0.5s;\n}\n\n.redirect-modal-fade-enter,\n.redirect-modal-fade-leave-to {\n opacity: 0;\n}\n\n.redirect-modal-mask {\n position: fixed;\n inset: 0;\n z-index: var(--redirect-z-index);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n backdrop-filter: blur(10px);\n\n @media print {\n display: none;\n }\n}\n\n.redirect-modal-wrapper {\n position: relative;\n z-index: 1500;\n\n overflow: hidden;\n\n max-width: 80vw;\n padding: 1rem 2rem;\n border-radius: 8px;\n\n background: var(--redirect-c-bg);\n box-shadow: 0 2px 6px 0 var(--redirect-c-shadow);\n}\n\n.redirect-modal-action {\n display: block;\n\n width: 100%;\n margin: 1rem 0;\n padding: 0.5rem 0.75rem;\n border: none;\n border-radius: 8px;\n\n background-color: var(--redirect-c-control);\n color: inherit;\n\n cursor: pointer;\n\n &:hover {\n background-color: var(--redirect-c-control-hover);\n }\n\n &.primary {\n background-color: var(--redirect-c-accent-bg);\n color: var(--redirect-c-accent-text);\n\n &:hover {\n background-color: var(--redirect-c-accent-hover);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../src/client/styles/redirect-modal.scss"],"names":[],"mappings":"AAAA,oEAEE,uBAGF,yDAEE,UAGF,qBACE,eACA,QACA,gCAEA,aACA,mBACA,uBAEA,2BAEA,aAXF,qBAYI,cAIJ,wBACE,kBACA,aAEA,gBAEA,eACA,kBACA,kBAEA,gCACA,gDAGF,qBACE,iBACA,4BACA,eACA,iBAEA,0CACE,kBAEA,2BAEA,WACA,uBAEA,eAEA,gBAEA,iDACE,YAEA,kBACA,MAEA,qBAEA,sBACA,WACA,YACA,uBACA,oCACA,kBAEA,+BAEA,kBAEA,mBAIA,yDACE,WACA,mCACA,iCAGF,0DACE,WAEA,kBACA,uBACA,QACA,UAEA,UACA,WACA,+BACA,yBAEA,wBAKN,2BACE,qBAIJ,uBACE,cAEA,WACA,cACA,qBACA,YACA,kBAEA,2CACA,cAEA,eAEA,6BACE,iDAGF,+BACE,6CACA,oCAEA,qCACE","file":"redirect-modal.css","sourcesContent":[".redirect-modal-fade-enter-active,\n.redirect-modal-fade-leave-active {\n transition: opacity 0.5s;\n}\n\n.redirect-modal-fade-enter,\n.redirect-modal-fade-leave-to {\n opacity: 0;\n}\n\n.redirect-modal-mask {\n position: fixed;\n inset: 0;\n z-index: var(--redirect-z-index);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n backdrop-filter: blur(10px);\n\n @media print {\n display: none;\n }\n}\n\n.redirect-modal-wrapper {\n position: relative;\n z-index: 1500;\n\n overflow: hidden;\n\n max-width: 80vw;\n padding: 1rem 2rem;\n border-radius: 8px;\n\n background: var(--redirect-c-bg);\n box-shadow: 0 2px 6px 0 var(--redirect-c-shadow);\n}\n\n.redirect-modal-hint {\n margin-top: 0.5rem;\n color: var(--vp-c-text-mute);\n font-size: 14px;\n text-align: start;\n\n input[type='checkbox'] {\n position: relative;\n\n vertical-align: text-bottom;\n\n height: 1em;\n margin-inline-end: 18px;\n\n cursor: pointer;\n\n appearance: none;\n\n &::after {\n content: ' ';\n\n position: absolute;\n top: 0;\n\n display: inline-block;\n\n box-sizing: border-box;\n width: 14px;\n height: 14px;\n padding-inline-start: 0;\n border: 1px solid var(--vp-c-border);\n border-radius: 50%;\n\n background: var(--vp-c-control);\n\n text-align: center;\n\n visibility: visible;\n }\n\n &:checked {\n &::after {\n content: '';\n border-color: var(--vp-c-accent-bg);\n background: var(--vp-c-accent-bg);\n }\n\n &::before {\n content: '';\n\n position: absolute;\n inset-inline-start: 5px;\n top: 2px;\n z-index: 1;\n\n width: 2px;\n height: 6px;\n border: solid var(--vp-c-white);\n border-width: 0 2px 2px 0;\n\n transform: rotate(45deg);\n }\n }\n }\n\n label {\n display: inline-block;\n }\n}\n\n.redirect-modal-action {\n display: block;\n\n width: 100%;\n margin: 1rem 0;\n padding: 0.5rem 0.75rem;\n border: none;\n border-radius: 8px;\n\n background-color: var(--redirect-c-control);\n color: inherit;\n\n cursor: pointer;\n\n &:hover {\n background-color: var(--redirect-c-control-hover);\n }\n\n &.primary {\n background-color: var(--redirect-c-accent-bg);\n color: var(--redirect-c-accent-text);\n\n &:hover {\n background-color: var(--redirect-c-accent-hover);\n }\n }\n}\n"]}
|
package/lib/node/locales.js
CHANGED
|
@@ -5,125 +5,146 @@ export const redirectLocales = {
|
|
|
5
5
|
hint: 'Your primary language is $1, do you want to switch to it?',
|
|
6
6
|
switch: 'Switch to $1',
|
|
7
7
|
cancel: 'Cancel',
|
|
8
|
+
remember: 'Remember my choice',
|
|
8
9
|
},
|
|
9
10
|
'/zh/': {
|
|
10
11
|
name: '简体中文',
|
|
11
12
|
hint: '您的首选语言是 $1,是否切换到该语言?',
|
|
12
13
|
switch: '切换到 $1',
|
|
13
14
|
cancel: '取消',
|
|
15
|
+
remember: '记住我的选择',
|
|
14
16
|
},
|
|
15
17
|
'/zh-tw/': {
|
|
16
18
|
name: '繁體中文',
|
|
17
19
|
hint: '您的首選語言是 $1,是否切換到該語言?',
|
|
18
20
|
switch: '切換到 $1',
|
|
19
21
|
cancel: '取消',
|
|
22
|
+
remember: '記住我的選擇',
|
|
20
23
|
},
|
|
21
24
|
'/de/': {
|
|
22
25
|
name: 'Deutsch',
|
|
23
26
|
hint: 'Ihre bevorzugte Sprache ist $1, möchten Sie zu dieser wechseln?',
|
|
24
27
|
switch: 'Zu $1 wechseln',
|
|
25
28
|
cancel: 'Abbrechen',
|
|
29
|
+
remember: 'Meine Wahl merken',
|
|
26
30
|
},
|
|
27
31
|
'/de-at/': {
|
|
28
32
|
name: 'Deutsch (Österreich)',
|
|
29
33
|
hint: 'Ihre bevorzugte Sprache ist $1, möchten Sie zu dieser wechseln?',
|
|
30
34
|
switch: 'Zu $1 wechseln',
|
|
31
35
|
cancel: 'Abbrechen',
|
|
36
|
+
remember: 'Meine Wahl merken',
|
|
32
37
|
},
|
|
33
38
|
'/vi/': {
|
|
34
39
|
name: 'Tiếng Việt',
|
|
35
40
|
hint: 'Ngôn ngữ chính của bạn là $1, bạn có muốn chuyển sang nó?',
|
|
36
41
|
switch: 'Chuyển sang $1',
|
|
37
42
|
cancel: 'Hủy',
|
|
43
|
+
remember: 'Nhớ lựa chọn của tôi',
|
|
38
44
|
},
|
|
39
45
|
'/uk/': {
|
|
40
46
|
name: 'Українська',
|
|
41
47
|
hint: 'Вашою основною мовою є $1, чи бажаєте ви переключитися на неї?',
|
|
42
48
|
switch: 'Переключитися на $1',
|
|
43
49
|
cancel: 'Скасувати',
|
|
50
|
+
remember: 'Запам’ятати мій вибір',
|
|
44
51
|
},
|
|
45
52
|
'/ru/': {
|
|
46
53
|
name: 'Русский',
|
|
47
54
|
hint: 'Ваш основной язык - $1, вы хотите переключиться на него?',
|
|
48
55
|
switch: 'Переключиться на $1',
|
|
49
56
|
cancel: 'Отмена',
|
|
57
|
+
remember: 'Запомнить мой выбор',
|
|
50
58
|
},
|
|
51
59
|
'/br/': {
|
|
52
60
|
name: 'Português (Brasil)',
|
|
53
61
|
hint: 'A língua principal é $1, deseja mudar para ela?',
|
|
54
62
|
switch: 'Mudar para $1',
|
|
55
63
|
cancel: 'Cancelar',
|
|
64
|
+
remember: 'Lembrar minha escolha',
|
|
56
65
|
},
|
|
57
66
|
'/pl/': {
|
|
58
67
|
name: 'Polski',
|
|
59
68
|
hint: 'Twoim głównym językiem jest $1, czy chcesz przełączyć się na niego?',
|
|
60
69
|
switch: 'Przełącz na $1',
|
|
61
70
|
cancel: 'Anuluj',
|
|
71
|
+
remember: 'Zapamiętaj moje wybory',
|
|
62
72
|
},
|
|
63
73
|
'/sk/': {
|
|
64
74
|
name: 'Slovenčina',
|
|
65
75
|
hint: 'Vašou hlavnou jazykom je $1, chcete prepnúť naň?',
|
|
66
76
|
switch: 'Prepnúť na $1',
|
|
67
77
|
cancel: 'Zrušiť',
|
|
78
|
+
remember: 'Zapamätať si moju voľbu',
|
|
68
79
|
},
|
|
69
80
|
'/fr/': {
|
|
70
81
|
name: 'Français',
|
|
71
82
|
hint: 'Votre langue principale est $1, voulez-vous la changer ?',
|
|
72
83
|
switch: 'Changer pour $1',
|
|
73
84
|
cancel: 'Annuler',
|
|
85
|
+
remember: 'Se souvenir de mon choix',
|
|
74
86
|
},
|
|
75
87
|
'/tr/': {
|
|
76
88
|
name: 'Türkçe',
|
|
77
89
|
hint: 'Ana diliniz $1, ona geçmek ister misiniz?',
|
|
78
90
|
switch: "$1'e geç",
|
|
79
91
|
cancel: 'İptal',
|
|
92
|
+
remember: 'Seçimimi hatırla',
|
|
80
93
|
},
|
|
81
94
|
'/fi/': {
|
|
82
95
|
name: 'Suomi',
|
|
83
96
|
hint: 'Pääkielenäsi on $1, haluatko vaihtaa siihen?',
|
|
84
97
|
switch: 'Vaihda $1:een',
|
|
85
98
|
cancel: 'Peruuta',
|
|
99
|
+
remember: 'Muista valintani',
|
|
86
100
|
},
|
|
87
101
|
'/hu/': {
|
|
88
102
|
name: 'Magyar',
|
|
89
103
|
hint: 'A fő nyelvét $1, szeretné váltani?',
|
|
90
104
|
switch: 'Váltás $1',
|
|
91
105
|
cancel: 'Mégse',
|
|
106
|
+
remember: 'Emlékezzen a választásomra',
|
|
92
107
|
},
|
|
93
108
|
'/id/': {
|
|
94
109
|
name: 'Bahasa Indonesia',
|
|
95
110
|
hint: 'Bahasa utama Anda adalah $1, apakah Anda ingin beralih ke sana?',
|
|
96
111
|
switch: 'Beralih ke $1',
|
|
97
112
|
cancel: 'Batal',
|
|
113
|
+
remember: 'Ingat pilihan saya',
|
|
98
114
|
},
|
|
99
115
|
'/nl/': {
|
|
100
116
|
name: 'Nederlands',
|
|
101
117
|
hint: 'Uw primaire taal is $1, wilt u overschakelen?',
|
|
102
118
|
switch: 'Overschakelen naar $1',
|
|
103
119
|
cancel: 'Annuleren',
|
|
120
|
+
remember: 'Onthoud mijn keuze',
|
|
104
121
|
},
|
|
105
122
|
'/ja/': {
|
|
106
123
|
name: '日本語',
|
|
107
124
|
hint: 'あなたの主要な言語は $1 です。それに切り替えますか?',
|
|
108
125
|
switch: '$1 に切り替える',
|
|
109
126
|
cancel: 'キャンセル',
|
|
127
|
+
remember: '選択を記憶する',
|
|
110
128
|
},
|
|
111
129
|
'/ko/': {
|
|
112
130
|
name: '한국어',
|
|
113
131
|
hint: '당신의 기본 언어는 $1입니다. 그것으로 전환 하시겠습니까?',
|
|
114
132
|
switch: '$1로 전환',
|
|
115
133
|
cancel: '취소',
|
|
134
|
+
remember: '내 선택 기억하기',
|
|
116
135
|
},
|
|
117
136
|
'/es/': {
|
|
118
137
|
name: 'Español',
|
|
119
138
|
hint: 'Su idioma principal es $1, ¿desea cambiarlo?',
|
|
120
139
|
switch: 'Cambiar a $1',
|
|
121
140
|
cancel: 'Cancelar',
|
|
141
|
+
remember: 'Recordar mi elección',
|
|
122
142
|
},
|
|
123
143
|
'/pt/': {
|
|
124
144
|
name: 'Português',
|
|
125
145
|
hint: 'Sua língua principal é $1, deseja mudar para ela?',
|
|
126
146
|
switch: 'Mudar para $1',
|
|
127
147
|
cancel: 'Cancelar',
|
|
148
|
+
remember: 'Lembrar minha escolha',
|
|
128
149
|
},
|
|
129
150
|
};
|
package/lib/shared/locales.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { ExactLocaleConfig } from '@vuepress/helper/shared';
|
|
|
2
2
|
export interface RedirectPluginLocaleData {
|
|
3
3
|
/**
|
|
4
4
|
* Language name
|
|
5
|
+
*
|
|
6
|
+
* 语言名称
|
|
5
7
|
*/
|
|
6
8
|
name: string;
|
|
7
9
|
/**
|
|
@@ -12,6 +14,8 @@ export interface RedirectPluginLocaleData {
|
|
|
12
14
|
hint: string;
|
|
13
15
|
/**
|
|
14
16
|
* Switch button text
|
|
17
|
+
*
|
|
18
|
+
* 切换按钮文字
|
|
15
19
|
*/
|
|
16
20
|
switch: string;
|
|
17
21
|
/**
|
|
@@ -20,5 +24,11 @@ export interface RedirectPluginLocaleData {
|
|
|
20
24
|
* 取消按钮文字
|
|
21
25
|
*/
|
|
22
26
|
cancel: string;
|
|
27
|
+
/**
|
|
28
|
+
* remember hint text
|
|
29
|
+
*
|
|
30
|
+
* 记住提示文本
|
|
31
|
+
*/
|
|
32
|
+
remember: string;
|
|
23
33
|
}
|
|
24
34
|
export type RedirectPluginLocaleConfig = ExactLocaleConfig<RedirectPluginLocaleData>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/plugin-redirect",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.51",
|
|
4
4
|
"description": "VuePress plugin - redirect",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-plugin",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"lib"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@vuepress/helper": "2.0.0-rc.
|
|
40
|
+
"@vuepress/helper": "2.0.0-rc.47",
|
|
41
41
|
"@vueuse/core": "^11.1.0",
|
|
42
42
|
"cac": "^6.7.14",
|
|
43
|
-
"vue": "^3.5.
|
|
43
|
+
"vue": "^3.5.8"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"vuepress": "2.0.0-rc.15"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "0553f1bb1ab8c7505665e46537aa9118ec3414ec"
|
|
52
52
|
}
|