Skip to content

Commit b6d61f3

Browse files
authored
Fix UI issues (#233)
* add fullscreen toggle * improve delete action in data tables modified: src/auto-imports.d.ts modified: src/components.d.ts modified: src/components/Brand/BrandManagement.vue modified: src/components/Orders/OrderManagement.vue modified: src/store/order.store.ts * set toast notifications place in rtl layout to right-bottom * use number animation in all chart components * improve product create section's ui
1 parent 25e2f00 commit b6d61f3

21 files changed

+166
-146
lines changed

locales/ar.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ button:
2020
go: انتقال
2121
home: الرئيسية
2222
toggle_dark: تبديل الوضع المظلم
23+
toggle_fullscreen: تبديل ملء الشاشة
2324
toggle_langs: تغيير اللغات
2425
categories:
2526
count: عدد
@@ -143,11 +144,6 @@ forgot:
143144
sendEmailSuccess: تم إرسال البريد الإلكتروني بنجاح، يرجى التحقق من بريدك الإلكتروني
144145
title: نسيت كلمة المرور
145146
username: اسم المستخدم
146-
support:
147-
github:
148-
tooltip: ادعم هذا المشروع من خلال إعطاء نجمة ⭐️ على GitHub
149-
buyMeCoffee:
150-
tooltip: ادعم هذا المشروع بشراء كوب من القهوة.
151147
home: الرئيسية
152148
languages:
153149
ar: Arabic
@@ -279,6 +275,13 @@ reviews:
279275
date: التاريخ
280276
product: المنتج
281277
rate: التقييم
278+
support:
279+
buyMeCoffee:
280+
tooltip: ادعم هذا المشروع بشراء كوب من القهوة.
281+
github:
282+
buyMeCoffee:
283+
tooltip: ''
284+
tooltip: ادعم هذا المشروع من خلال إعطاء نجمة ⭐️ على GitHub
282285
title: لوحة تحكم يامي
283286
todoApp:
284287
completed: مكتمل

locales/cn.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ button:
2020
go: 前往
2121
home: 首页
2222
toggle_dark: 切换深色模式
23+
toggle_fullscreen: Toggle Full Screen
2324
toggle_langs: 切换语言
2425
categories:
2526
count: 数数
@@ -138,12 +139,6 @@ forgot:
138139
sendEmailSuccess: 电子邮件发送成功,请检查您的电子邮件
139140
title: 忘记密码
140141
username: 用户名
141-
support:
142-
github:
143-
tooltip: 请在Github上给这个项目一个⭐️支持
144-
buyMeCoffee:
145-
tooltip: 购买一杯咖啡来支持这个项目。
146-
147142
home: 首页
148143
languages:
149144
ar: Arabic
@@ -273,6 +268,11 @@ reviews:
273268
date: 日期
274269
product: 产品
275270
rate: 评分
271+
support:
272+
buyMeCoffee:
273+
tooltip: 购买一杯咖啡来支持这个项目。
274+
github:
275+
tooltip: 请在Github上给这个项目一个⭐️支持
276276
title: 美味管理系统
277277
todoApp:
278278
completed: 完全的

locales/de.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ button:
2020
go: LOS
2121
home: Startseite
2222
toggle_dark: Dunkelmodus umschalten
23+
toggle_fullscreen: Vollbildschirmen
2324
toggle_langs: Sprache ändern
2425
categories:
2526
count: Zählen
@@ -143,13 +144,6 @@ forgot:
143144
sendEmailSuccess: E-Mail erfolgreich gesendet, bitte überprüfen Sie Ihre E-Mail
144145
title: Passwort vergessen
145146
username: Benutzername
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.
153147
home: Startseite
154148
languages:
155149
ar: Arabic
@@ -282,6 +276,15 @@ reviews:
282276
date: Datum
283277
product: Produkt
284278
rate: Bewertung
279+
support:
280+
buyMeCoffee:
281+
tooltip: Unterstützen Sie dieses Projekt, indem Sie mir einen Kaffee kaufen
282+
github:
283+
buyMeCoffee:
284+
tooltip: Unterstützen Sie dieses Projekt mit dem Kauf einer Tasse Kaffee.
285+
tooltip: >-
286+
Unterstützen Sie dieses Projekt, indem Sie ihm einen Stern ⭐️ auf Github
287+
geben
285288
title: Yummy Admin
286289
todoApp:
287290
completed: Vollendet

locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ button:
2121
home: Home
2222
toggle_dark: Toggle dark mode
2323
toggle_langs: Change languages
24+
toggle_fullscreen: Toggle Full Screen
2425
categories:
2526
count: Count
2627
create:

locales/fa.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ button:
2121
home: خانه
2222
toggle_dark: حالت تیره
2323
toggle_langs: تغییر زبان
24+
toggle_fullscreen: تمام صفحه
2425
categories:
2526
count: تعداد
2627
create:
@@ -226,7 +227,7 @@ products:
226227
create:
227228
barcode: بارکد
228229
brand: برند
229-
category: گروه محصو
230+
category: گروه محصول
230231
description: توضیحات
231232
discountedPrice: قیمت بعد از تخفیف
232233
imageName: تصویر محصول

locales/tr.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ button:
2020
go: GİT
2121
home: Ana Sayfa
2222
toggle_dark: Karanlık modu değiştir
23+
toggle_fullscreen: Tam ekranı geçiş
2324
toggle_langs: Dil değiştir
2425
categories:
2526
count: Saymak
@@ -144,11 +145,6 @@ forgot:
144145
sendEmailSuccess: Email Başarıyla Gönderildi, Lütfen E-postanızı Kontrol Edin
145146
title: Şifremi Unuttum
146147
username: Kullanıcı Adı
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.
152148
home: Ana Sayfa
153149
languages:
154150
ar: Arabic
@@ -279,6 +275,11 @@ reviews:
279275
date: Tarih
280276
product: Ürün
281277
rate: Oran
278+
support:
279+
buyMeCoffee:
280+
tooltip: Bir fincan kahve satın alarak bu projeye destek olun.
281+
github:
282+
tooltip: Bu projeye ⭐️ Github'da destek verin
282283
title: Yummy Admin
283284
todoApp:
284285
completed: Tamamlanmış

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function getToggleElementPosition() {
146146
<template>
147147
<n-config-provider inline-theme-disabled :theme="activeTheme" :theme-overrides="activeThemeOverrides"
148148
:rtl="layout.isRtl ? rtlStyles : []" :preflight-style-disabled="false">
149-
<n-notification-provider placement="bottom-right">
149+
<n-notification-provider :placement="layout.isRtl ? 'bottom-left':'bottom-right'">
150150
<n-message-provider placement="bottom-right">
151151
<n-dialog-provider>
152152
<div class="dark-mode-container"

src/components.d.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @ts-nocheck
44
// Generated by unplugin-vue-components
55
// Read more: https://github.com/vuejs/core/pull/3399
6-
export type {}
6+
export {}
77

88
declare module 'vue' {
99
export interface GlobalComponents {
@@ -35,6 +35,7 @@ declare module 'vue' {
3535
EcommerceDashboard: typeof import('./components/Dashboard/Ecommerce/EcommerceDashboard.vue')['default']
3636
Editor: typeof import('./components/Editor.vue')['default']
3737
EnglandIcon: typeof import('./components/CustomIcons/EnglandIcon.vue')['default']
38+
FullScreenButton: typeof import('./components/Navbar/FullScreenButton.vue')['default']
3839
GermanyIcon: typeof import('./components/CustomIcons/GermanyIcon.vue')['default']
3940
GithubIcon: typeof import('./components/CustomIcons/GithubIcon.vue')['default']
4041
GoogleIcon: typeof import('./components/CustomIcons/GoogleIcon.vue')['default']
@@ -44,21 +45,19 @@ declare module 'vue' {
4445
MessageItem: typeof import('./components/Apps/Chat/MessageItem.vue')['default']
4546
MicrosoftIcon: typeof import('./components/CustomIcons/MicrosoftIcon.vue')['default']
4647
NAutoComplete: typeof import('naive-ui')['NAutoComplete']
47-
NAvatar: typeof import('naive-ui')['NAvatar']
4848
Navbar: typeof import('./components/Navbar/Navbar.vue')['default']
4949
NBadge: typeof import('naive-ui')['NBadge']
5050
NBreadcrumb: typeof import('naive-ui')['NBreadcrumb']
5151
NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem']
5252
NButton: typeof import('naive-ui')['NButton']
53-
NCollapse: typeof import('naive-ui')['NCollapse']
54-
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
53+
NCard: typeof import('naive-ui')['NCard']
5554
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
5655
NDataTable: typeof import('naive-ui')['NDataTable']
5756
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
58-
NDrawer: typeof import('naive-ui')['NDrawer']
59-
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
6057
NDropdown: typeof import('naive-ui')['NDropdown']
58+
NDynamicTags: typeof import('naive-ui')['NDynamicTags']
6159
NEmpty: typeof import('naive-ui')['NEmpty']
60+
NFlex: typeof import('naive-ui')['NFlex']
6261
NForm: typeof import('naive-ui')['NForm']
6362
NFormItem: typeof import('naive-ui')['NFormItem']
6463
NIcon: typeof import('naive-ui')['NIcon']
@@ -72,20 +71,23 @@ declare module 'vue' {
7271
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
7372
NModal: typeof import('naive-ui')['NModal']
7473
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
74+
NNumberAnimation: typeof import('naive-ui')['NNumberAnimation']
7575
Notifications: typeof import('./components/Navbar/Notifications.vue')['default']
7676
NPageHeader: typeof import('naive-ui')['NPageHeader']
7777
NPopover: typeof import('naive-ui')['NPopover']
7878
NPopselect: typeof import('naive-ui')['NPopselect']
7979
NRadioButton: typeof import('naive-ui')['NRadioButton']
8080
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
8181
NScrollbar: typeof import('naive-ui')['NScrollbar']
82+
NSelect: typeof import('naive-ui')['NSelect']
8283
NSpace: typeof import('naive-ui')['NSpace']
8384
NSwitch: typeof import('naive-ui')['NSwitch']
8485
NTag: typeof import('naive-ui')['NTag']
8586
NText: typeof import('naive-ui')['NText']
8687
NThing: typeof import('naive-ui')['NThing']
8788
NTooltip: typeof import('naive-ui')['NTooltip']
8889
NTreeSelect: typeof import('naive-ui')['NTreeSelect']
90+
NUpload: typeof import('naive-ui')['NUpload']
8991
OrderManagement: typeof import('./components/Orders/OrderManagement.vue')['default']
9092
PersianIcon: typeof import('./components/CustomIcons/PersianIcon.vue')['default']
9193
ProductsManagement: typeof import('./components/Products/ProductsManagement.vue')['default']

src/components/Brand/BrandManagement.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
Edit32Regular as EditIcon,
44
Add20Regular as PlusIcon,
55
} from '@vicons/fluent'
6-
import { useMessage } from 'naive-ui'
76
import { type DataTableColumns, NButton, NIcon } from 'naive-ui/es/components'
87
import type { RowData } from 'naive-ui/es/data-table/src/interface'
98
import { storeToRefs } from 'pinia'
@@ -13,7 +12,6 @@ const layout = useLayoutStore()
1312
const { dialogPlacement } = storeToRefs(layout)
1413
const { t } = useI18n()
1514
const store = useBrandStore()
16-
const message = useMessage()
1715
1816
onMounted(getItems)
1917
const { renderActionButton, renderDeleteActionButton } = useRender()
@@ -45,7 +43,8 @@ const showAddDialog = ref(false)
4543
4644
function handleDeleteItem(row: RowData) {
4745
store.deleteBrand(row.id)
48-
message.success('Brand was deleted!')
46+
getItems()
47+
useNotifyStore().success(`Brand ${row.name} was deleted!`)
4948
}
5049
5150
function rowKey(row: RowData) {

src/components/Dashboard/Ecommerce/EcommerceDashboard.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<script setup lang="ts">
2-
import { storeToRefs } from 'pinia'
3-
42
const { t } = useI18n()
5-
const notify = useNotifyStore()
63
const store = useDashboardStore()
7-
const { isLoading, summaryStat } = storeToRefs(store)
84
const layout = useLayoutStore()
95
106
onMounted(() => {

0 commit comments

Comments
 (0)