From d8740ef547726f5b2a1a7e7bc2ad420ff6a71c07 Mon Sep 17 00:00:00 2001 From: Aleksey <74327665+alekseymeta@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:07:31 +0300 Subject: [PATCH] feat: added "<-back" button in header --- magner/lib/assets/icons/arrow-left.svg | 3 ++ magner/lib/controllers/i18n/en.ts | 1 + magner/lib/controllers/i18n/ru.ts | 1 + magner/lib/controllers/i18n/uz.ts | 1 + magner/lib/types/configs/development.ts | 5 ++++ .../views/components/main-layout/header.vue | 28 ++++++++++++++++++- 6 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 magner/lib/assets/icons/arrow-left.svg diff --git a/magner/lib/assets/icons/arrow-left.svg b/magner/lib/assets/icons/arrow-left.svg new file mode 100644 index 00000000..c3063d33 --- /dev/null +++ b/magner/lib/assets/icons/arrow-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/magner/lib/controllers/i18n/en.ts b/magner/lib/controllers/i18n/en.ts index 1e83a398..3e1919a2 100644 --- a/magner/lib/controllers/i18n/en.ts +++ b/magner/lib/controllers/i18n/en.ts @@ -2,6 +2,7 @@ export const enLocale = { core: { header: { logout: 'Log out', + back: 'Back', }, sidebar: { diff --git a/magner/lib/controllers/i18n/ru.ts b/magner/lib/controllers/i18n/ru.ts index 4dcef31c..f6df2499 100644 --- a/magner/lib/controllers/i18n/ru.ts +++ b/magner/lib/controllers/i18n/ru.ts @@ -12,6 +12,7 @@ export const ruLocale: TranslationSchema = { core: { header: { logout: 'Выйти', + back: 'Назад', }, sidebar: { diff --git a/magner/lib/controllers/i18n/uz.ts b/magner/lib/controllers/i18n/uz.ts index b0434daa..c085d031 100644 --- a/magner/lib/controllers/i18n/uz.ts +++ b/magner/lib/controllers/i18n/uz.ts @@ -4,6 +4,7 @@ export const uzLocale: TranslationSchema = { core: { header: { logout: 'Чиқиш', + back: 'Ортга', }, sidebar: { diff --git a/magner/lib/types/configs/development.ts b/magner/lib/types/configs/development.ts index 0a39a6c0..2b9452b0 100644 --- a/magner/lib/types/configs/development.ts +++ b/magner/lib/types/configs/development.ts @@ -76,6 +76,11 @@ export interface DevelopmentConfig { */ toggleBtnPositionTop?: boolean, + /** + * Back button in header. Only on card pages + * */ + backButtonOnTop: boolean; + /** Request to be used each time user enters the app to check for token validity and quickly authorize them */ profileRequest: RequestWrap, diff --git a/magner/lib/views/components/main-layout/header.vue b/magner/lib/views/components/main-layout/header.vue index 96c6c4d6..932a63a7 100644 --- a/magner/lib/views/components/main-layout/header.vue +++ b/magner/lib/views/components/main-layout/header.vue @@ -19,6 +19,15 @@ + + {{ t('core.header.back') }} + +