feat: add 'Other sites' module for tracking server/plugin/support/SMS of miscellaneous sites

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-07 16:52:32 +03:30
co-authored by Cursor
parent bef5da6239
commit c5e989811a
15 changed files with 268 additions and 63 deletions
+27 -1
View File
@@ -9,7 +9,7 @@ type ExpiryLevel = 'dedicated' | 'healthy' | 'warning' | 'critical' | 'unknown'
type TenantRow = {
id: string
product: 'hamkar' | 'khanegi'
product: 'hamkar' | 'khanegi' | 'other'
slug: string
nameFa: string
domain: string
@@ -53,6 +53,7 @@ const filteredTenants = computed(() => {
const groupedTenants = computed(() => ({
hamkar: filteredTenants.value.filter((t) => t.product === 'hamkar'),
khanegi: filteredTenants.value.filter((t) => t.product === 'khanegi'),
other: filteredTenants.value.filter((t) => t.product === 'other'),
}))
function toneClass(level?: ExpiryLevel) {
@@ -213,6 +214,31 @@ onMounted(loadTenants)
<div v-if="!groupedTenants.khanegi.length" class="empty-hint">نسخه‌ای نیست</div>
</div>
</section>
<section v-if="groupedTenants.other.length" class="tenant-group">
<div class="tenant-group-head">
<h3>سایت‌های دیگر</h3>
<span>{{ groupedTenants.other.length }} سایت</span>
</div>
<div class="tenant-grid">
<button
v-for="t in groupedTenants.other"
:key="t.id"
type="button"
class="tenant-card"
:class="toneClass(t.server?.expiryLevel)"
@click="openTenant(t.id)"
>
<strong>{{ t.nameFa }}</strong>
<span>{{ t.server?.expiryLabel }}</span>
<small v-if="(t.serversCount || 0) > 1">
{{ t.serversCount }} سرور
</small>
<small v-else-if="t.server?.serverName">{{ t.server.serverName }}</small>
<small v-else>{{ t.domain }}</small>
</button>
</div>
</section>
</div>
</a-spin>
</section>