Skip to content

Commit 1f295ad

Browse files
committed
improve categories section #228
1 parent b6d61f3 commit 1f295ad

File tree

14 files changed

+56
-40
lines changed

14 files changed

+56
-40
lines changed

locales/ar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ categories:
3030
parent: الفئة الأم
3131
title: إنشاء فئة جديدة
3232
createButton: إنشاء
33+
createdSucceed: تم إنشاؤها بنجاح
3334
stat: إحصائيات
3435
title: الفئات
3536
topCategories: الفئات العليا
@@ -68,6 +69,7 @@ common:
6869
day: یوم
6970
delete: يمسح
7071
deleteConfirm: هل أنت متأكد من حذف هذا العنصر؟
72+
deletedMessage: تم حذفه بنجاح
7173
goHome: العودة إلى الرئيسية
7274
month: شهر
7375
name: اسم

locales/cn.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ categories:
3030
parent: 父级
3131
title: 创建新分类
3232
createButton: 创建
33+
createdSucceed: 创建成功
3334
stat: 统计
3435
title: 分类
3536
topCategories: 顶级分类
@@ -66,6 +67,7 @@ common:
6667
day:
6768
delete: 删除
6869
deleteConfirm: 确认删除?
70+
deletedMessage: 删除成功
6971
goHome: 返回首页
7072
month:
7173
name: 姓名

locales/de.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ categories:
3030
parent: Übergeordnet
3131
title: Neue Kategorie erstellen
3232
createButton: Erstellen
33+
createdSucceed: Erfolgreich erstellt
3334
stat: Statistiken
3435
title: Kategorien
3536
topCategories: Top -Kategorien
@@ -68,6 +69,7 @@ common:
6869
day: Tag
6970
delete: Löschen
7071
deleteConfirm: Sind Sie sicher, diesen Artikel zu löschen?
72+
deletedMessage: Erfolgreich gelöscht
7173
goHome: Zurück zur Startseite
7274
month: Monat
7375
name: Name

locales/en.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ button:
2020
go: GO
2121
home: Home
2222
toggle_dark: Toggle dark mode
23-
toggle_langs: Change languages
2423
toggle_fullscreen: Toggle Full Screen
24+
toggle_langs: Change languages
2525
categories:
2626
count: Count
2727
create:
@@ -30,6 +30,7 @@ categories:
3030
parent: Parent
3131
title: Create New Category
3232
createButton: Create
33+
createdSucceed: Created Successfully
3334
stat: Statistics
3435
title: Categories
3536
topCategories: Top Categories
@@ -68,6 +69,7 @@ common:
6869
day: Day
6970
delete: Delete
7071
deleteConfirm: Are you sure to delete this item?
72+
deletedMessage: Deleted Successfully
7173
goHome: Back To Home
7274
month: Month
7375
name: Name
@@ -142,12 +144,6 @@ forgot:
142144
sendEmailSuccess: Email Sent Successfully, Please Check Your Email
143145
title: Forgot Password
144146
username: User Name
145-
support:
146-
github:
147-
tooltip: Support this project by giving a star ⭐️ on GitHub
148-
buyMeCoffee:
149-
tooltip: Support this project by buying me a coffee
150-
151147
home: Home
152148
languages:
153149
ar: Arabic
@@ -279,6 +275,11 @@ reviews:
279275
date: Date
280276
product: Product
281277
rate: Rate
278+
support:
279+
buyMeCoffee:
280+
tooltip: Support this project by buying me a coffee
281+
github:
282+
tooltip: Support this project by giving a star ⭐️ on GitHub
282283
title: Yummy Admin
283284
todoApp:
284285
completed: Completed

locales/fa.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ button:
2020
go: برو
2121
home: خانه
2222
toggle_dark: حالت تیره
23-
toggle_langs: تغییر زبان
2423
toggle_fullscreen: تمام صفحه
24+
toggle_langs: تغییر زبان
2525
categories:
2626
count: تعداد
2727
create:
@@ -30,6 +30,7 @@ categories:
3030
parent: دسته والد
3131
title: ایجاد دسته بندی جدید
3232
createButton: ذخیره
33+
createdSucceed: با موفقیت ایجاد شد
3334
stat: آمار
3435
title: دسته بندی ها
3536
topCategories: دسته های برتر
@@ -66,6 +67,7 @@ common:
6667
day: روز
6768
delete: حذف کردن
6869
deleteConfirm: آیا از حذف این مورد مطمئن هستید؟
70+
deletedMessage: با موفقیت حذف شد
6971
goHome: بازگشت به خانه
7072
month: ماه
7173
name: نام
@@ -140,13 +142,6 @@ forgot:
140142
sendEmailSuccess: ایمیل با موفقیت ارسال شد، لطفا ایمیل خود را بررسی کنید
141143
title: فراموشی رمز عبور
142144
username: نام کاربری
143-
144-
support:
145-
github:
146-
tooltip: این پروژه را با دادن یک ستاره ⭐️ در گیت هاب پشتیبانی کنید
147-
buyMeCoffee:
148-
tooltip: با خرید یک فنجان قهوه حامی این پروژه باشید
149-
150145
home: خانه
151146
languages:
152147
ar: Arabic
@@ -278,6 +273,11 @@ reviews:
278273
date: تاریخ
279274
product: محصول
280275
rate: امتیاز
276+
support:
277+
buyMeCoffee:
278+
tooltip: با خرید یک فنجان قهوه حامی این پروژه باشید
279+
github:
280+
tooltip: این پروژه را با دادن یک ستاره ⭐️ در گیت هاب پشتیبانی کنید
281281
title: پنل مدیریت Yummy
282282
todoApp:
283283
completed: کامل

locales/tr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ categories:
3030
parent: Üst Kategori
3131
title: Yeni Kategori Oluştur
3232
createButton: Oluştur
33+
createdSucceed: Başarıyla yaratıldı
3334
stat: İstatistik
3435
title: Kategoriler
3536
topCategories: En iyi kategoriler
@@ -68,6 +69,7 @@ common:
6869
day: Gün
6970
delete: Silmek
7071
deleteConfirm: Bu öğeyi sileceğinizden emin misiniz?
72+
deletedMessage: Başarıyla silindi
7173
goHome: Ana Sayfaya Dön
7274
month: Ay
7375
name: İsim

src/common/api/api-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class ApiService {
2121
return response.data
2222
}
2323

24-
async getList<T>(url, params: any): Promise<ListResult<T>> {
24+
async getList<T>(url: string, params: any): Promise<ListResult<T>> {
2525
const response = await this.httpClient.get<ListResult<T>>(
2626
`${this.apiBase}/${url}`,
2727
{ params },

src/components.d.ts

Lines changed: 3 additions & 5 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 {}
6+
export type {}
77

88
declare module 'vue' {
99
export interface GlobalComponents {
@@ -50,14 +50,13 @@ declare module 'vue' {
5050
NBreadcrumb: typeof import('naive-ui')['NBreadcrumb']
5151
NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem']
5252
NButton: typeof import('naive-ui')['NButton']
53-
NCard: typeof import('naive-ui')['NCard']
5453
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
5554
NDataTable: typeof import('naive-ui')['NDataTable']
5655
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
56+
NDrawer: typeof import('naive-ui')['NDrawer']
57+
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
5758
NDropdown: typeof import('naive-ui')['NDropdown']
58-
NDynamicTags: typeof import('naive-ui')['NDynamicTags']
5959
NEmpty: typeof import('naive-ui')['NEmpty']
60-
NFlex: typeof import('naive-ui')['NFlex']
6160
NForm: typeof import('naive-ui')['NForm']
6261
NFormItem: typeof import('naive-ui')['NFormItem']
6362
NIcon: typeof import('naive-ui')['NIcon']
@@ -79,7 +78,6 @@ declare module 'vue' {
7978
NRadioButton: typeof import('naive-ui')['NRadioButton']
8079
NRadioGroup: typeof import('naive-ui')['NRadioGroup']
8180
NScrollbar: typeof import('naive-ui')['NScrollbar']
82-
NSelect: typeof import('naive-ui')['NSelect']
8381
NSpace: typeof import('naive-ui')['NSpace']
8482
NSwitch: typeof import('naive-ui')['NSwitch']
8583
NTag: typeof import('naive-ui')['NTag']

src/components/Category/CategoryManagement.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const showAddDialog = ref(false)
4545
4646
function handleDeleteItem(row: RowData) {
4747
store.deleteCategory(row.id)
48-
message.success('Category was deleted!')
48+
useNotifyStore().success(t('common.deletedMessage'))
4949
}
5050
5151
function rowKey(row: RowData) {

src/components/Category/CreateCategory.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ async function create() {
5050
formRef.value?.validate(async (errors: any) => {
5151
if (!errors) {
5252
await categoryStore.createCategory(categoryItem.value)
53+
useNotifyStore().success(t('categories.createdSucceed'))
5354
emits('close')
5455
}
5556
})

0 commit comments

Comments
 (0)