From 67d7b736588cd13b0c40c906fa497b9fc547d905 Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Thu, 14 Dec 2023 20:55:29 +0200 Subject: [PATCH] 23.12.114: reordered wt-app-navigator apps [WTEL-4073] --- package.json | 2 +- .../wt-app-header/wt-app-navigator.vue | 26 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 190efcee..8de111f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@webitel/ui-sdk", - "version": "23.12.113", + "version": "23.12.114", "private": false, "scripts": { "dev": "vite", diff --git a/src/components/wt-app-header/wt-app-navigator.vue b/src/components/wt-app-header/wt-app-navigator.vue index 140cedea..3a13336b 100644 --- a/src/components/wt-app-header/wt-app-navigator.vue +++ b/src/components/wt-app-header/wt-app-navigator.vue @@ -38,8 +38,8 @@ >

props.apps.reduce((apps, app) => ({ +const order = [ + WebitelApplications.AGENT, + WebitelApplications.SUPERVISOR, + WebitelApplications.HISTORY, + WebitelApplications.ADMIN, + WebitelApplications.ANALYTICS, + WebitelApplications.AUDIT, + WebitelApplications.CRM, +]; + +const formattedApps = computed(() => props.apps.reduce((apps, app) => ([ ...apps, - [app.name]: { + { ...app, img: props.darkMode ? pics[app.name].dark : pics[app.name].light, currentApp: props.currentApp === app.name, }, -}), {})); +]), []).sort((a, b) => order.indexOf(a.name) - order.indexOf(b.name))); function close() { isOpened.value = false; @@ -189,14 +199,14 @@ function close() { // a tag .wt-app-navigator__card__link { - box-sizing: border-box; display: inline-flex; flex-direction: column; justify-content: space-between; + box-sizing: border-box; width: 100%; height: 100%; - cursor: pointer; padding: var(--wt-app-navigator-item-padding); + cursor: pointer; } // img inside a