Skip to content

Commit 893a438

Browse files
committed
Prevent refresh page on language change
add support buttons fix welcome message issue Fixes #226
1 parent d163065 commit 893a438

File tree

13 files changed

+205
-102
lines changed

13 files changed

+205
-102
lines changed

locales/ar.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ forgot:
143143
sendEmailSuccess: تم إرسال البريد الإلكتروني بنجاح، يرجى التحقق من بريدك الإلكتروني
144144
title: نسيت كلمة المرور
145145
username: اسم المستخدم
146-
github:
147-
button: GitHub
148-
tooltip: ادعم هذا المشروع من خلال إعطاء نجمة ⭐️ على GitHub
146+
support:
147+
github:
148+
tooltip: ادعم هذا المشروع من خلال إعطاء نجمة ⭐️ على GitHub
149+
buyMeCoffee:
150+
tooltip: ادعم هذا المشروع بشراء كوب من القهوة.
149151
home: الرئيسية
150152
languages:
151153
ar: Arabic

locales/cn.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,12 @@ forgot:
138138
sendEmailSuccess: 电子邮件发送成功,请检查您的电子邮件
139139
title: 忘记密码
140140
username: 用户名
141-
github:
142-
button: Github
143-
tooltip: 请在Github上给这个项目一个⭐️支持
141+
support:
142+
github:
143+
tooltip: 请在Github上给这个项目一个⭐️支持
144+
buyMeCoffee:
145+
tooltip: 购买一杯咖啡来支持这个项目。
146+
144147
home: 首页
145148
languages:
146149
ar: Arabic

locales/de.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ enums:
131131
Active: Aktiv
132132
Draft: Entwurf
133133
NotActive: Nicht aktiv
134-
fa: ''
135134
forgot:
136135
button: Wiederherstellen
137136
email: E-Mail
@@ -144,11 +143,13 @@ forgot:
144143
sendEmailSuccess: E-Mail erfolgreich gesendet, bitte überprüfen Sie Ihre E-Mail
145144
title: Passwort vergessen
146145
username: Benutzername
147-
github:
148-
button: Github
149-
tooltip: >-
150-
Unterstützen Sie dieses Projekt, indem Sie ihm einen Stern ⭐️ auf Github
151-
geben
146+
support:
147+
github:
148+
tooltip: >-
149+
Unterstützen Sie dieses Projekt, indem Sie ihm einen Stern ⭐️ auf Github
150+
geben
151+
buyMeCoffee:
152+
tooltip: Unterstützen Sie dieses Projekt mit dem Kauf einer Tasse Kaffee.
152153
home: Startseite
153154
languages:
154155
ar: Arabic

locales/en.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,12 @@ forgot:
141141
sendEmailSuccess: Email Sent Successfully, Please Check Your Email
142142
title: Forgot Password
143143
username: User Name
144-
github:
145-
button: Github
146-
tooltip: Support this project by giving a star ⭐️ on GitHub
144+
support:
145+
github:
146+
tooltip: Support this project by giving a star ⭐️ on GitHub
147+
buyMeCoffee:
148+
tooltip: Support this project by buying me a coffee
149+
147150
home: Home
148151
languages:
149152
ar: Arabic

locales/fa.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,13 @@ forgot:
139139
sendEmailSuccess: ایمیل با موفقیت ارسال شد، لطفا ایمیل خود را بررسی کنید
140140
title: فراموشی رمز عبور
141141
username: نام کاربری
142-
github:
143-
button: گیت هاب
144-
tooltip: این پروژه را با دادن یک ستاره ⭐️ در گیت هاب پشتیبانی کنید
142+
143+
support:
144+
github:
145+
tooltip: این پروژه را با دادن یک ستاره ⭐️ در گیت هاب پشتیبانی کنید
146+
buyMeCoffee:
147+
tooltip: با خرید یک فنجان قهوه حامی این پروژه باشید
148+
145149
home: خانه
146150
languages:
147151
ar: Arabic

locales/tr.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ forgot:
144144
sendEmailSuccess: Email Başarıyla Gönderildi, Lütfen E-postanızı Kontrol Edin
145145
title: Şifremi Unuttum
146146
username: Kullanıcı Adı
147-
github:
148-
button: GitHub
149-
tooltip: Bu projeye ⭐️ Github'da destek verin
147+
support:
148+
github:
149+
tooltip: Bu projeye ⭐️ Github'da destek verin
150+
buyMeCoffee:
151+
tooltip: Bir fincan kahve satın alarak bu projeye destek olun.
150152
home: Ana Sayfa
151153
languages:
152154
ar: Arabic

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function getToggleElementPosition() {
155155
<div class="dark-mode" :class="{ 'active': layout.isDark }"></div>
156156
</div>
157157
<RouterView />
158-
<GithubButton />
158+
<SupportProject />
159159
</n-dialog-provider>
160160
</n-message-provider>
161161
</n-notification-provider>

src/components.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ declare module 'vue' {
3636
Editor: typeof import('./components/Editor.vue')['default']
3737
EnglandIcon: typeof import('./components/CustomIcons/EnglandIcon.vue')['default']
3838
GermanyIcon: typeof import('./components/CustomIcons/GermanyIcon.vue')['default']
39-
GithubButton: typeof import('./components/shared/GithubButton.vue')['default']
4039
GithubIcon: typeof import('./components/CustomIcons/GithubIcon.vue')['default']
4140
GoogleIcon: typeof import('./components/CustomIcons/GoogleIcon.vue')['default']
4241
GroupTitle: typeof import('./components/Apps/Todo/GroupTitle.vue')['default']
@@ -50,23 +49,21 @@ declare module 'vue' {
5049
NBreadcrumb: typeof import('naive-ui')['NBreadcrumb']
5150
NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem']
5251
NButton: typeof import('naive-ui')['NButton']
53-
NCollapse: typeof import('naive-ui')['NCollapse']
54-
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
5552
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
5653
NDataTable: typeof import('naive-ui')['NDataTable']
5754
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
5855
NDropdown: typeof import('naive-ui')['NDropdown']
5956
NEmpty: typeof import('naive-ui')['NEmpty']
57+
NForm: typeof import('naive-ui')['NForm']
58+
NFormItem: typeof import('naive-ui')['NFormItem']
6059
NIcon: typeof import('naive-ui')['NIcon']
6160
NInput: typeof import('naive-ui')['NInput']
6261
NLayout: typeof import('naive-ui')['NLayout']
63-
NLayoutContent: typeof import('naive-ui')['NLayoutContent']
6462
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
6563
NList: typeof import('naive-ui')['NList']
6664
NListItem: typeof import('naive-ui')['NListItem']
6765
NMenu: typeof import('naive-ui')['NMenu']
6866
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
69-
NModal: typeof import('naive-ui')['NModal']
7067
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
7168
Notifications: typeof import('./components/Navbar/Notifications.vue')['default']
7269
NPageHeader: typeof import('naive-ui')['NPageHeader']
@@ -101,6 +98,7 @@ declare module 'vue' {
10198
SkeletonTable: typeof import('./components/shared/SkeletonTable.vue')['default']
10299
Sparkline: typeof import('./components/Charts/Sparkline.vue')['default']
103100
SummaryStatCard: typeof import('./components/shared/SummaryStatCard.vue')['default']
101+
SupportProject: typeof import('./components/shared/SupportProject.vue')['default']
104102
SwitchSelect: typeof import('./components/shared/SwitchSelect.vue')['default']
105103
TaskItem: typeof import('./components/Apps/Todo/TaskItem.vue')['default']
106104
TasksList: typeof import('./components/Apps/Todo/TasksList.vue')['default']

src/components/Dashboard/Ecommerce/EcommerceDashboard.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,7 @@ const layout = useLayoutStore()
1010
onMounted(() => {
1111
store.getSummaryStat()
1212
if (!layout.isWelcomeShown) {
13-
setTimeout(() => {
14-
notify.notify({
15-
body: t('notify.welcome'),
16-
type: 'success',
17-
duration: 10000,
18-
})
19-
layout.showWelcome()
20-
}, 2000)
13+
layout.showWelcome()
2114
}
2215
})
2316
</script>

src/components/Navbar/LanguageSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const languages = availableLocales.sort(sortLangs).map((x) => {
2828
function changeLanguage(lang: string) {
2929
layoutStore.changeLanguage(lang)
3030
layoutStore.resetWelcomeState()
31-
setTimeout(() => window.location.reload(), 1500)
31+
// setTimeout(() => window.location.reload(), 1500)
3232
}
3333
3434
function renderLabel(label: string, language: string) {

0 commit comments

Comments
 (0)