ui: When folded, show services summary + button
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
58ab870afe
commit
d0b2de72fe
|
@ -38,6 +38,7 @@
|
||||||
import type { Domain, DomainInList } from '$lib/model/domain';
|
import type { Domain, DomainInList } from '$lib/model/domain';
|
||||||
import type { ServiceCombined } from '$lib/model/service';
|
import type { ServiceCombined } from '$lib/model/service';
|
||||||
import { ZoneViewGrid } from '$lib/model/usersettings';
|
import { ZoneViewGrid } from '$lib/model/usersettings';
|
||||||
|
import { servicesSpecs } from '$lib/stores/services';
|
||||||
import { userSession } from '$lib/stores/usersession';
|
import { userSession } from '$lib/stores/usersession';
|
||||||
import { t } from '$lib/translations';
|
import { t } from '$lib/translations';
|
||||||
|
|
||||||
|
@ -224,12 +225,31 @@
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
{#if !showResources}
|
||||||
|
<Badge
|
||||||
|
id={"popoversvc-" + dn.replace('.', '__')}
|
||||||
|
style="cursor: pointer;"
|
||||||
|
>
|
||||||
|
{$t('domains.n-services', {count: services.length})}
|
||||||
|
</Badge>
|
||||||
|
<Popover
|
||||||
|
dismissible
|
||||||
|
placement="bottom"
|
||||||
|
target={"popoversvc-" + dn.replace('.', '__')}
|
||||||
|
>
|
||||||
|
{#each services as service}
|
||||||
|
<strong>{$servicesSpecs[service._svctype].name}:</strong>
|
||||||
|
<span class="text-muted">{service._comment}</span>
|
||||||
|
<br>
|
||||||
|
{/each}
|
||||||
|
</Popover>
|
||||||
|
{/if}
|
||||||
{#if aliases.length != 0}
|
{#if aliases.length != 0}
|
||||||
<Badge
|
<Badge
|
||||||
id={"popoverbadge-" + dn.replace('.', '__')}
|
id={"popoverbadge-" + dn.replace('.', '__')}
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
>
|
>
|
||||||
+ {$t('domains.n-aliases', {n: aliases.length})}
|
+ {$t('domains.n-aliases', {count: aliases.length})}
|
||||||
</Badge>
|
</Badge>
|
||||||
<Popover
|
<Popover
|
||||||
dismissible
|
dismissible
|
||||||
|
@ -245,7 +265,7 @@
|
||||||
{/each}
|
{/each}
|
||||||
</Popover>
|
</Popover>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $userSession && $userSession.settings.zoneview !== ZoneViewGrid}
|
{#if !showResources || ($userSession && $userSession.settings.zoneview !== ZoneViewGrid)}
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@ -256,6 +276,7 @@
|
||||||
{$t('domains.add-a-service')}
|
{$t('domains.add-a-service')}
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if showResources}
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@ -266,6 +287,7 @@
|
||||||
<Icon name="link" />
|
<Icon name="link" />
|
||||||
{$t('domains.add-an-alias')}
|
{$t('domains.add-an-alias')}
|
||||||
</Button>
|
</Button>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if showResources}
|
{#if showResources}
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -108,7 +108,8 @@
|
||||||
"give-explicit-name": "Give an explicit name in order to easily find this service.",
|
"give-explicit-name": "Give an explicit name in order to easily find this service.",
|
||||||
"history": "History",
|
"history": "History",
|
||||||
"list": "List importable domains",
|
"list": "List importable domains",
|
||||||
"n-aliases": "{{n:lt; 2:{{n}} alias; default:{{n}} aliases}}",
|
"n-aliases": "{{count:lt; 2:{{count}} alias; default:{{count}} aliases}}",
|
||||||
|
"n-services": "{{count:lt; 2:{{count}} service; default:{{count}} services}}",
|
||||||
"please-fill-fields": "Please fill the following fields:",
|
"please-fill-fields": "Please fill the following fields:",
|
||||||
"removal": "Confirm Domain Removal",
|
"removal": "Confirm Domain Removal",
|
||||||
"save-modifications": "Save those modifications",
|
"save-modifications": "Save those modifications",
|
||||||
|
|
|
@ -108,7 +108,8 @@
|
||||||
"give-explicit-name": "Donnez un nom explicite afin de trouver facilement ce service.",
|
"give-explicit-name": "Donnez un nom explicite afin de trouver facilement ce service.",
|
||||||
"history": "Historique",
|
"history": "Historique",
|
||||||
"list": "Liste des domaines importables",
|
"list": "Liste des domaines importables",
|
||||||
"n-aliases": "{{n:lt; 2:{{n}} alias; default:{{n}} alias}}",
|
"n-aliases": "{{count:lt; 2:{{count}} alias; default:{{count}} alias}}",
|
||||||
|
"n-services": "{{count:lt; 2:{{count}} service; default:{{count}} services}}",
|
||||||
"please-fill-fields": "Veuillez remplir les champs suivants :",
|
"please-fill-fields": "Veuillez remplir les champs suivants :",
|
||||||
"removal": "Confirmer la suppression du domaine",
|
"removal": "Confirmer la suppression du domaine",
|
||||||
"save-modifications": "Enregistrer ces modifications",
|
"save-modifications": "Enregistrer ces modifications",
|
||||||
|
|
Loading…
Reference in New Issue