From 249189f2ed62de46a1026b7d18787355ea7a3fd4 Mon Sep 17 00:00:00 2001 From: Diyar Akhgar Date: Mon, 7 Jul 2025 01:56:45 +0330 Subject: [PATCH] fix some styles in index --- xroom-dashboard/src/components/Header.vue | 36 ++++++++--- xroom-dashboard/src/pages/dashboard/index.vue | 63 ++++++++++++++----- 2 files changed, 77 insertions(+), 22 deletions(-) diff --git a/xroom-dashboard/src/components/Header.vue b/xroom-dashboard/src/components/Header.vue index 9c8bcce..30458b1 100644 --- a/xroom-dashboard/src/components/Header.vue +++ b/xroom-dashboard/src/components/Header.vue @@ -8,7 +8,7 @@
-
{{ fullName }}
+
{{ fullName }}
@@ -76,6 +76,10 @@ export default { return customer.profile_img ? `${customer.profile_img}` : 'https://c.animaapp.com/m9nvumalUMfQbN/img/frame.svg'; + }, + userNameDirection() { + const persianArabicRegex = /[\u0600-\u06FF\u0750-\u077F]/; + return persianArabicRegex.test(this.fullName) ? 'rtl' : 'ltr'; } }, methods: { @@ -180,7 +184,7 @@ export default { .user-name-container { display: flex; align-items: center; - gap: 8px; + gap: 4px; position: relative; cursor: pointer; } @@ -282,38 +286,56 @@ export default { /* Mobile (max-width: 520px) */ @media (max-width: 520px) { .header-container { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(1, 1fr); + gap: 30px; padding: 20px 0; } + .green-button { display: none; } .menu { text-align: right; - width: 30%; + width: 100%; } .welcome-container { text-align: left; - order: 3; - width: 30%; + order: 2; + width: 100%; } .welcome-message { font-size: 15px; width: 90px; + text-align: center; } .user-info-container { justify-content: center; - order: 2; - width: 40%; + order: 3; + width: fit-content; + max-width: 100%; + } + + .user-name { + text-overflow: ellipsis; + white-space: nowrap; + overflow-x: clip; + width: 4.5rem; } .avatar-wrapper { display: none; } + + .dropdown-menu { + right: -6.5rem; + } } /* Small tablet (min-width: 520px and max-width: 780px) */ diff --git a/xroom-dashboard/src/pages/dashboard/index.vue b/xroom-dashboard/src/pages/dashboard/index.vue index efc3bf4..06e7a76 100644 --- a/xroom-dashboard/src/pages/dashboard/index.vue +++ b/xroom-dashboard/src/pages/dashboard/index.vue @@ -4,7 +4,7 @@

راهنمای شروع

-
- + -->