diff --git a/src/pages/HomePage.vue b/src/pages/HomePage.vue index ee99fff..f783a68 100644 --- a/src/pages/HomePage.vue +++ b/src/pages/HomePage.vue @@ -8,6 +8,7 @@ import { CustomerServiceOutlined, TeamOutlined, HomeOutlined, + LoginOutlined, UserOutlined, } from '@ant-design/icons-vue' import { message } from 'ant-design-vue' @@ -263,11 +264,11 @@ onMounted(load) هنوز نسخه‌ای برای نمایش موجودی ثبت نشده است -
+
{{ lowestSmsTenants.length }} نسخه کم‌موجودی - ورود ← + ورود
@@ -302,11 +303,11 @@ onMounted(load) سرور نزدیک‌انقضا یا بدون تاریخ ثبت‌شده نیست -
+
{{ expiringServers.length }} مورد پیگیری - ورود ← + ورود
@@ -336,11 +337,11 @@ onMounted(load) افزونه نزدیک‌انقضا یا بدون تاریخ ثبت‌شده نیست -
+
{{ expiringPlugins.length }} مورد پیگیری - ورود ← + ورود
@@ -370,11 +371,11 @@ onMounted(load) پشتیبانی نزدیک‌انقضا یا بدون تاریخ ثبت‌شده نیست -
+
{{ expiringSupports.length }} مورد پیگیری - ورود ← + ورود
@@ -394,11 +395,11 @@ onMounted(load)

{{ item.title }}

{{ item.desc }}

-
+
{{ item.meta }} - ورود ← + ورود
@@ -408,31 +409,32 @@ onMounted(load) diff --git a/src/pages/ProductVersionsPage.vue b/src/pages/ProductVersionsPage.vue index 01e28ae..a81ac58 100644 --- a/src/pages/ProductVersionsPage.vue +++ b/src/pages/ProductVersionsPage.vue @@ -2,7 +2,15 @@ import { computed, onMounted, ref, watch } from 'vue' import { useRoute, useRouter } from 'vue-router' import { message, Modal } from 'ant-design-vue' -import { ArrowRightOutlined, PlusOutlined, SearchOutlined } from '@ant-design/icons-vue' +import { + ArrowRightOutlined, + DeleteOutlined, + PlusOutlined, + SearchOutlined, + SettingOutlined, + SkinOutlined, + SlidersOutlined, +} from '@ant-design/icons-vue' import api from '@/api/http' import { useAuthStore } from '@/stores/auth' import { formatIranDateTime } from '@/utils/datetime' @@ -82,6 +90,22 @@ function edit(id: string) { router.push({ name: 'version-edit', params: { id } }) } +function goProgramSettings(id: string) { + router.push({ name: 'version-program-settings', params: { id } }) +} + +function goAppearance(item: Tenant) { + router.push({ + name: + product.value === 'hamkar' + ? 'version-ui-hamkar' + : item.uiVariant === 'newTheme' + ? 'version-ui' + : 'version-ui-modular', + params: { id: item.id }, + }) +} + function remove(record: Tenant) { Modal.confirm({ title: `حذف نسخه «${record.nameFa}»؟`, @@ -146,69 +170,55 @@ onMounted(load) {{ item.nameFa.slice(0, 1) }}
-

{{ item.nameFa }}

-
{{ item.domain }}
-
ایجاد: {{ formatIranDateTime(item.createdAt) }}
-
- {{ item.slug }} - {{ item.nameEn }} - +
+

{{ item.nameFa }}

+ {{ item.isActive ? 'فعال' : 'غیرفعال' }} - - - بررسی محصول - - ظاهر اپ - تنظیمات برنامه - - {{ item.uiVariant === 'newTheme' ? 'New theme' : 'Modular' }} - +
+
{{ item.domain }}
+
{{ formatIranDateTime(item.createdAt) }}
+
+ {{ item.slug }} + {{ item.nameEn }} + + بررسی محصول + + ظاهر اپ + تنظیمات برنامه + + {{ item.uiVariant === 'newTheme' ? 'New theme' : 'Modular' }} + +
- + + مدیریت - تنظیمات برنامه + + تنظیمات - - ظاهر اپ + + + ظاهر + حذف
diff --git a/src/styles.css b/src/styles.css index 095c79b..d3599c1 100644 --- a/src/styles.css +++ b/src/styles.css @@ -195,20 +195,21 @@ button, input, textarea, select, .dash-modules { display: grid; - gap: 14px; + grid-template-columns: 1fr; + gap: 12px; margin-top: 22px; + align-items: stretch; } -@media (min-width: 640px) { +@media (min-width: 768px) { .dash-modules { - grid-template-columns: 1fr 1fr; - gap: 16px; + grid-template-columns: repeat(2, minmax(0, 1fr)); } } -@media (min-width: 1100px) { +@media (min-width: 1600px) { .dash-modules { - grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); + grid-template-columns: repeat(3, minmax(0, 1fr)); } } @@ -219,16 +220,22 @@ button, input, textarea, select, cursor: pointer; font-family: inherit; background: #fff; - border-radius: 22px; - padding: 18px; + border-radius: 16px; + padding: 14px; box-shadow: var(--shadow); transition: transform 0.18s ease, box-shadow 0.18s ease; - min-height: 168px; display: flex; flex-direction: column; - justify-content: space-between; + gap: 8px; position: relative; overflow: hidden; + min-width: 0; + height: 100%; +} + +.module-card .module-foot { + margin-top: auto; + padding-top: 4px; } .module-card:hover { @@ -237,14 +244,14 @@ button, input, textarea, select, } .module-card .icon-wrap { - width: 48px; - height: 48px; - border-radius: 16px; + width: 40px; + height: 40px; + border-radius: 12px; display: grid; place-items: center; color: #fff; - font-size: 22px; - margin-bottom: 14px; + font-size: 18px; + margin-bottom: 8px; } .module-card.sms .icon-wrap { background: linear-gradient(145deg, #9b7cff, #7c5cfc); } @@ -270,7 +277,7 @@ button, input, textarea, select, } .module-card .module-meta { - margin-top: 16px; + margin-top: 8px; display: flex; justify-content: space-between; align-items: center; @@ -280,6 +287,12 @@ button, input, textarea, select, font-weight: 600; } +.module-enter { + display: inline-flex; + align-items: center; + gap: 4px; +} + .module-card .progress { height: 6px; border-radius: 999px; @@ -329,12 +342,31 @@ button, input, textarea, select, } } -.version-list { display: grid; gap: 12px; } +.version-list { + display: grid; + gap: 10px; + grid-template-columns: 1fr; +} + +@media (min-width: 768px) { + .version-list { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 1600px) { + .version-list { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} .version-card { + display: flex; + flex-direction: column; + min-width: 0; border: 1px solid var(--line); - border-radius: 18px; - padding: 14px; + border-radius: 14px; + padding: 12px; background: #fff; transition: border-color 0.15s ease, box-shadow 0.15s ease; } @@ -346,14 +378,14 @@ button, input, textarea, select, .version-card-head { display: flex; - gap: 12px; + gap: 10px; align-items: flex-start; } .version-avatar { - width: 52px; - height: 52px; - border-radius: 16px; + width: 40px; + height: 40px; + border-radius: 12px; object-fit: cover; background: #f1f5f9; flex-shrink: 0; @@ -364,36 +396,79 @@ button, input, textarea, select, place-items: center; color: #fff; font-weight: 800; - font-size: 1.1rem; + font-size: 0.95rem; } .version-meta { flex: 1; min-width: 0; } +.version-title-row { + display: flex; + align-items: center; + gap: 8px; + min-width: 0; +} + .version-meta h3 { margin: 0; - font-size: 1.05rem; + min-width: 0; + flex: 1; + font-size: 0.95rem; color: var(--ink); font-weight: 800; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.version-status { + flex-shrink: 0; + font-size: 0.72rem; + font-weight: 700; + line-height: 1; + padding: 4px 7px; + border-radius: 999px; +} + +.version-status.is-on { + color: #047857; + background: #ecfdf5; +} + +.version-status.is-off { + color: #64748b; + background: #f1f5f9; } .version-meta .domain { - margin-top: 4px; + margin-top: 3px; color: var(--ink-soft); - font-size: 0.85rem; + font-size: 0.78rem; word-break: break-all; } .version-meta .created-at { - margin-top: 4px; + margin-top: 2px; color: #94a3b8; - font-size: 0.8rem; + font-size: 0.75rem; +} + +.version-tags { + display: flex; + flex-wrap: wrap; + gap: 4px; + margin-top: 8px; +} + +.version-tags .ant-tag { + margin: 0; } .version-actions { - display: flex; - flex-wrap: wrap; - gap: 8px; - margin-top: 12px; + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 6px; + margin-top: auto; + padding-top: 10px; } .audit-list { display: grid; gap: 10px; }