remaining scopes

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2025-10-15 22:17:08 +02:00
parent f588e7bdc2
commit 4b3676b61f
5 changed files with 37 additions and 12 deletions
+7 -2
View File
@@ -33,6 +33,7 @@
import TableDropDownEllipsis from '$lib/components/table/TableDropDownEllipsis.svelte';
import DeleteAlert from '$lib/components/modal/DeleteAlert.svelte';
import SelectSquare from '$lib/components/SelectSquare.svelte';
import TableCellScope from '$lib/components/table/TableCellScope.svelte';
// services
const appStateService = AppStateService.instance;
@@ -324,9 +325,10 @@
<Table
columns={[
{ column: 'Name', size: 'large' },
{ column: 'Allowed', size: 'small', alignText: 'center' }
{ column: 'Allowed', size: 'small', alignText: 'center' },
...(contextCompanyID ? [{ column: 'Scope', size: 'small' }] : [])
]}
sortable={['Name', 'Allowed']}
sortable={['Name', 'Allowed', ...(contextCompanyID ? ['scope'] : [])]}
hasData={!!allowDenyList.length}
plural="Allow deny entries"
pagination={tableURLParams}
@@ -346,6 +348,9 @@
</button>
</TableCell>
<TableCellCheck value={entry.allowed} />
{#if contextCompanyID}
<TableCellScope companyID={entry.companyID} />
{/if}
<TableCellEmpty />
<TableCellAction>
<TableDropDownEllipsis>
+7 -3
View File
@@ -31,6 +31,7 @@
import DeleteAlert from '$lib/components/modal/DeleteAlert.svelte';
import SimpleCodeEditor from '$lib/components/editor/SimpleCodeEditor.svelte';
import AutoRefresh from '$lib/components/AutoRefresh.svelte';
import TableCellScope from '$lib/components/table/TableCellScope.svelte';
// services
const appStateService = AppStateService.instance;
@@ -332,9 +333,10 @@ portal.example.com:
<Table
columns={[
{ column: 'Name', size: 'large' },
{ column: 'Start URL', size: 'medium' }
{ column: 'Start URL', size: 'medium' },
...(contextCompanyID ? [{ column: 'Scope', size: 'small' }] : [])
]}
sortable={['Name', 'Start URL']}
sortable={['Name', 'Start URL', ...(contextCompanyID ? ['scope'] : [])]}
hasData={!!proxies.length}
plural="Proxies"
pagination={tableURLParams}
@@ -356,7 +358,9 @@ portal.example.com:
</TableCell>
<TableCell>{proxy.startURL}</TableCell>
{#if contextCompanyID}
<TableCellScope companyID={proxy.companyID} />
{/if}
<TableCellEmpty />
<TableCellAction>
<TableDropDownEllipsis>
@@ -28,6 +28,7 @@
import TableDropDownEllipsis from '$lib/components/table/TableDropDownEllipsis.svelte';
import DeleteAlert from '$lib/components/modal/DeleteAlert.svelte';
import TableDropDownButton from '$lib/components/table/TableDropDownButton.svelte';
import TableCellScope from '$lib/components/table/TableCellScope.svelte';
// services
const appStateService = AppStateService.instance;
@@ -226,9 +227,10 @@
<Table
columns={[
{ column: 'Name', size: 'large' },
{ column: 'Count', size: 'small' }
{ column: 'Count', size: 'small' },
...(contextCompanyID ? [{ column: 'Scope', size: 'small' }] : [])
]}
sortable={['Name']}
sortable={['Name', ...(contextCompanyID ? ['scope'] : [])]}
hasData={!!groups.length}
plural="groups"
pagination={tableURLParams}
@@ -243,6 +245,9 @@
<TableCellLink href={`/recipient/group/${group.id}`} title={group.recipientCount}>
{group.recipientCount}
</TableCellLink>
{#if contextCompanyID}
<TableCellScope companyID={group.companyID} />
{/if}
<TableCellEmpty />
<TableCellAction>
<TableDropDownEllipsis>
@@ -32,6 +32,7 @@
import TableDropDownEllipsis from '$lib/components/table/TableDropDownEllipsis.svelte';
import DeleteAlert from '$lib/components/modal/DeleteAlert.svelte';
import SelectSquare from '$lib/components/SelectSquare.svelte';
import TableCellScope from '$lib/components/table/TableCellScope.svelte';
// services
const appStateService = AppStateService.instance;
@@ -424,9 +425,10 @@
{ column: 'Name', size: 'large' },
{ column: 'Host', size: 'small' },
{ column: 'Port', size: 'small' },
{ column: 'Username', size: 'small' }
{ column: 'Username', size: 'small' },
...(contextCompanyID ? [{ column: 'Scope', size: 'small' }] : [])
]}
sortable={['Name', 'Host', 'Port', 'Username']}
sortable={['Name', 'Host', 'Port', 'Username', ...(contextCompanyID ? ['scope'] : [])]}
hasData={!!configurations.length}
plural="SMTP configurations"
pagination={tableURLParams}
@@ -449,6 +451,9 @@
<TableCell value={conf.host} />
<TableCell value={conf.port} />
<TableCell value={conf.username} />
{#if contextCompanyID}
<TableCellScope companyID={conf.companyID} />
{/if}
<TableCellEmpty />
<TableCellAction>
<TableDropDownEllipsis>
+9 -3
View File
@@ -28,6 +28,7 @@
import TableCopyButton from '$lib/components/table/TableCopyButton.svelte';
import TableDropDownEllipsis from '$lib/components/table/TableDropDownEllipsis.svelte';
import DeleteAlert from '$lib/components/modal/DeleteAlert.svelte';
import TableCellScope from '$lib/components/table/TableCellScope.svelte';
// services
const appStateService = AppStateService.instance;
@@ -275,8 +276,11 @@
<Headline>Webhooks</Headline>
<BigButton on:click={openCreateModal}>New webhook</BigButton>
<Table
columns={[{ column: 'Name', size: 'large' }]}
sortable={['name']}
columns={[
{ column: 'Name', size: 'large' },
...(contextCompanyID ? [{ column: 'Scope', size: 'small' }] : [])
]}
sortable={['name', ...(contextCompanyID ? ['scope'] : [])]}
hasData={!!webhooks.length}
plural="Webhooks"
pagination={tableURLParams}
@@ -295,7 +299,9 @@
{webhook.name}
</button>
</TableCell>
{#if contextCompanyID}
<TableCellScope companyID={webhook.companyID} />
{/if}
<TableCellEmpty />
<TableCellAction>
<TableDropDownEllipsis>