added some feature for plugin 2
This commit is contained in:
@@ -155,58 +155,61 @@ onMounted(load)
|
|||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<div v-if="filtered.length" class="version-list">
|
<div v-if="filtered.length" class="version-list">
|
||||||
<article v-for="item in filtered" :key="item.id" class="version-card">
|
<article v-for="item in filtered" :key="item.id" class="version-card">
|
||||||
<div class="version-card-head">
|
<div class="version-card-body">
|
||||||
<img
|
<div class="version-card-head">
|
||||||
v-if="item.avatarUrl"
|
<img
|
||||||
class="version-avatar"
|
v-if="item.avatarUrl"
|
||||||
:src="rewriteLegacyUploadUrl(item.avatarUrl)"
|
class="version-avatar"
|
||||||
:alt="item.nameFa"
|
:src="rewriteLegacyUploadUrl(item.avatarUrl)"
|
||||||
/>
|
:alt="item.nameFa"
|
||||||
<div
|
/>
|
||||||
v-else
|
<div
|
||||||
class="version-avatar fallback"
|
v-else
|
||||||
:style="{ background: item.primaryColor || '#1d4ed8' }"
|
class="version-avatar fallback"
|
||||||
>
|
:style="{ background: item.primaryColor || '#1d4ed8' }"
|
||||||
{{ item.nameFa.slice(0, 1) }}
|
>
|
||||||
</div>
|
{{ item.nameFa.slice(0, 1) }}
|
||||||
<div class="version-meta">
|
</div>
|
||||||
<div class="version-title-row">
|
<div class="version-meta">
|
||||||
<h3>{{ item.nameFa }}</h3>
|
<div class="version-title-row">
|
||||||
<span class="version-status" :class="item.isActive ? 'is-on' : 'is-off'">
|
<h3>{{ item.nameFa }}</h3>
|
||||||
{{ item.isActive ? 'فعال' : 'غیرفعال' }}
|
<span class="version-status" :class="item.isActive ? 'is-on' : 'is-off'">
|
||||||
</span>
|
{{ item.isActive ? 'فعال' : 'غیرفعال' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="domain">{{ item.domain }}</div>
|
||||||
|
<div class="created-at">{{ formatIranDateTime(item.createdAt) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="domain">{{ item.domain }}</div>
|
|
||||||
<div class="created-at">{{ formatIranDateTime(item.createdAt) }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div
|
||||||
<div class="version-tags">
|
v-if="item.notes?.includes('classifyConfidence:low') || product === 'khanegi'"
|
||||||
<a-tag>{{ item.slug }}</a-tag>
|
class="version-tags"
|
||||||
<a-tag v-if="item.nameEn" color="blue">{{ item.nameEn }}</a-tag>
|
>
|
||||||
<a-tag v-if="item.notes?.includes('classifyConfidence:low')" color="orange">
|
<a-tag v-if="item.notes?.includes('classifyConfidence:low')" color="orange">
|
||||||
بررسی محصول
|
بررسی محصول
|
||||||
</a-tag>
|
</a-tag>
|
||||||
<a-tag v-if="item.hasAppUiConfig" color="purple">ظاهر اپ</a-tag>
|
<a-tag
|
||||||
<a-tag v-if="item.hasProgramSettings" color="cyan">تنظیمات برنامه</a-tag>
|
v-if="product === 'khanegi'"
|
||||||
<a-tag v-if="product === 'khanegi'" :color="item.uiVariant === 'newTheme' ? 'geekblue' : 'cyan'">
|
:color="item.uiVariant === 'newTheme' ? 'geekblue' : 'cyan'"
|
||||||
{{ item.uiVariant === 'newTheme' ? 'New theme' : 'Modular' }}
|
>
|
||||||
</a-tag>
|
{{ item.uiVariant === 'newTheme' ? 'New theme' : 'Modular' }}
|
||||||
|
</a-tag>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="version-actions">
|
<div class="version-actions">
|
||||||
<a-button size="small" type="primary" ghost block @click="edit(item.id)">
|
<a-button size="small" type="primary" ghost @click="edit(item.id)">
|
||||||
<template #icon><SettingOutlined /></template>
|
<template #icon><SettingOutlined /></template>
|
||||||
مدیریت
|
مدیریت
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
v-if="product === 'khanegi'"
|
v-if="product === 'khanegi'"
|
||||||
size="small"
|
size="small"
|
||||||
block
|
|
||||||
@click="goProgramSettings(item.id)"
|
@click="goProgramSettings(item.id)"
|
||||||
>
|
>
|
||||||
<template #icon><SlidersOutlined /></template>
|
<template #icon><SlidersOutlined /></template>
|
||||||
تنظیمات
|
تنظیمات
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button size="small" block @click="goAppearance(item)">
|
<a-button size="small" @click="goAppearance(item)">
|
||||||
<template #icon><SkinOutlined /></template>
|
<template #icon><SkinOutlined /></template>
|
||||||
ظاهر
|
ظاهر
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -215,7 +218,6 @@ onMounted(load)
|
|||||||
size="small"
|
size="small"
|
||||||
danger
|
danger
|
||||||
ghost
|
ghost
|
||||||
block
|
|
||||||
@click="remove(item)"
|
@click="remove(item)"
|
||||||
>
|
>
|
||||||
<template #icon><DeleteOutlined /></template>
|
<template #icon><DeleteOutlined /></template>
|
||||||
|
|||||||
+41
-10
@@ -344,8 +344,11 @@ button, input, textarea, select,
|
|||||||
|
|
||||||
.version-list {
|
.version-list {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 10px;
|
gap: 12px;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
padding: 12px;
|
||||||
|
background: var(--bg);
|
||||||
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
@@ -364,18 +367,28 @@ button, input, textarea, select,
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
border: 1px solid var(--line);
|
border: 1px solid var(--line);
|
||||||
border-radius: 14px;
|
border-radius: 16px;
|
||||||
padding: 12px;
|
padding: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
box-shadow: 0 1px 2px rgba(45, 55, 72, 0.05);
|
||||||
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.version-card:hover {
|
.version-card:hover {
|
||||||
border-color: rgba(32, 201, 151, 0.35);
|
border-color: rgba(32, 201, 151, 0.28);
|
||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version-card-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 12px 12px 10px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.version-card-head {
|
.version-card-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
@@ -383,12 +396,13 @@ button, input, textarea, select,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.version-avatar {
|
.version-avatar {
|
||||||
width: 40px;
|
width: 44px;
|
||||||
height: 40px;
|
height: 44px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
background: #f1f5f9;
|
background: #f1f5f9;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
border: 1px solid var(--line);
|
||||||
}
|
}
|
||||||
|
|
||||||
.version-avatar.fallback {
|
.version-avatar.fallback {
|
||||||
@@ -456,7 +470,6 @@ button, input, textarea, select,
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
margin-top: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.version-tags .ant-tag {
|
.version-tags .ant-tag {
|
||||||
@@ -464,11 +477,29 @@ button, input, textarea, select,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.version-actions {
|
.version-actions {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
flex-wrap: nowrap;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
padding-top: 10px;
|
padding: 8px;
|
||||||
|
background: #f4f7fb;
|
||||||
|
border-top: 1px solid var(--line);
|
||||||
|
}
|
||||||
|
|
||||||
|
.version-actions .ant-btn {
|
||||||
|
flex: 1 1 0;
|
||||||
|
min-width: 0;
|
||||||
|
padding-inline: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 479px) {
|
||||||
|
.version-actions {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version-actions .ant-btn {
|
||||||
|
flex: 1 1 calc(50% - 3px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.audit-list { display: grid; gap: 10px; }
|
.audit-list { display: grid; gap: 10px; }
|
||||||
|
|||||||
Reference in New Issue
Block a user