fix: domain screens

This commit is contained in:
Arman
2025-05-29 11:27:35 +02:00
parent faff800d33
commit 8485e38c33
4 changed files with 22 additions and 11 deletions
@@ -20,17 +20,23 @@
async function fetchPreset() {
switch (selectedPreset.toLowerCase()) {
case 'zoho':
return await sdk.forConsole.domains.getPresetZoho(page.params.domain);
records = await sdk.forConsole.domains.getPresetZoho(page.params.domain);
return records;
case 'mailgun':
return await sdk.forConsole.domains.getPresetMailgun(page.params.domain);
records = await sdk.forConsole.domains.getPresetMailgun(page.params.domain);
return records;
case 'outlook':
return await sdk.forConsole.domains.getPresetOutlook(page.params.domain);
records = await sdk.forConsole.domains.getPresetOutlook(page.params.domain);
return records;
case 'proton mail':
return await sdk.forConsole.domains.getPresetProtonMail(page.params.domain);
records = await sdk.forConsole.domains.getPresetProtonMail(page.params.domain);
return records;
case 'icloud':
return await sdk.forConsole.domains.getPresetICloud(page.params.domain);
records = await sdk.forConsole.domains.getPresetICloud(page.params.domain);
return records;
case 'google workspace':
return await sdk.forConsole.domains.getPresetGoogleWorkspace(page.params.domain);
records = await sdk.forConsole.domains.getPresetGoogleWorkspace(page.params.domain);
return records;
}
}
@@ -27,7 +27,12 @@
description: 'Expiry date'
},
{
value: domain?.autoRenewal ? 'On' : 'Off',
value:
domain?.registrar?.toLocaleLowerCase() === 'appwrite'
? domain?.autoRenewal
? 'On'
: 'Off'
: '-',
description: 'Auto renewal'
},
{
@@ -5,13 +5,13 @@ import { derived, writable } from 'svelte/store';
export const domain = derived(page, ($page) => $page.data.domain as Domain);
export const columns = writable<Column[]>([
{ id: 'name', title: 'Name', type: 'string', width: 150 },
{ id: 'name', title: 'Name', type: 'string', width: { min: 150 } },
{ id: 'type', title: 'Type', type: 'string', width: 125 },
{ id: 'value', title: 'Value', type: 'string', width: 250 },
{ id: 'ttl', title: 'TTL', type: 'integer', width: 100 },
{ id: 'priority', title: 'Priority', type: 'integer', width: 80, hide: true },
{ id: 'comment', title: 'Comment', type: 'string', width: 200, hide: true },
{ id: '$createdAt', title: 'Created', type: 'datetime' }
{ id: 'comment', title: 'Comment', type: 'string', width: { min: 180 } },
{ id: '$createdAt', title: 'Created', type: 'datetime', width: { min: 120 } }
]);
export const recordTypes = [
@@ -73,7 +73,7 @@
{record?.priority ?? '-'}
</Typography.Text>
{:else if column.id === 'comment'}
<Typography.Text>
<Typography.Text truncate>
{record?.comment ?? '-'}
</Typography.Text>
{:else if column.id === '$createdAt'}