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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user