Add destinations i18n
This commit is contained in:
parent
7a0d151467
commit
a53bda1436
@ -31,7 +31,7 @@
|
|||||||
"password_again": "Password again",
|
"password_again": "Password again",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"saving": "Saving...",
|
"saving": "Saving...",
|
||||||
"name": "Name",
|
"name": "name",
|
||||||
"value": "Value",
|
"value": "Value",
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"is_required": "is required.",
|
"is_required": "is required.",
|
||||||
@ -52,7 +52,11 @@
|
|||||||
"user": "User",
|
"user": "User",
|
||||||
"loading": "Loading...",
|
"loading": "Loading...",
|
||||||
"version": "Version",
|
"version": "Version",
|
||||||
"host": "Host"
|
"host": "Host",
|
||||||
|
"already_used_for": "<span class=\"text-red-500\">{type}</span> already used for",
|
||||||
|
"configuration": "Configuration",
|
||||||
|
"engine": "Engine",
|
||||||
|
"network": "Network"
|
||||||
},
|
},
|
||||||
"register": {
|
"register": {
|
||||||
"register": "Register",
|
"register": "Register",
|
||||||
@ -182,5 +186,18 @@
|
|||||||
"delete_database": "Delete Database",
|
"delete_database": "Delete Database",
|
||||||
"permission_denied_delete_database": "You do not have permission to delete a Database",
|
"permission_denied_delete_database": "You do not have permission to delete a Database",
|
||||||
"no_databases_found": "No databases found"
|
"no_databases_found": "No databases found"
|
||||||
|
},
|
||||||
|
"destination": {
|
||||||
|
"delete_destination": "Delete Destination",
|
||||||
|
"permission_denied_delete_destination": "You do not have permission to delete this destination",
|
||||||
|
"add_to_coolify": "Add to Coolify",
|
||||||
|
"coolify_proxy_stopped": "Coolify Proxy stopped!",
|
||||||
|
"coolify_proxy_started": "Coolify Proxy started!",
|
||||||
|
"confirm_restart_proxy": "Are you sure you want to restart the proxy? Everything will be reconfigured in ~10 secs.",
|
||||||
|
"coolify_proxy_restarting": "Coolify Proxy restarting...",
|
||||||
|
"restarting_please_wait": "Restarting... please wait...",
|
||||||
|
"force_restart_proxy": "Force restart proxy",
|
||||||
|
"use_coolify_proxy": "Use Coolify Proxy?",
|
||||||
|
"no_destination_found": "No destination found"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
export let app;
|
export let app;
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
import { t } from '$lib/translations';
|
||||||
const { id } = $page.params;
|
const { id } = $page.params;
|
||||||
let loading = true;
|
let loading = true;
|
||||||
async function checkApp() {
|
async function checkApp() {
|
||||||
@ -58,20 +59,20 @@
|
|||||||
<div class="box-selection hover:border-transparent hover:bg-coolgray-200">
|
<div class="box-selection hover:border-transparent hover:bg-coolgray-200">
|
||||||
<div class="truncate pb-2 text-center text-xl font-bold">{app.domain}</div>
|
<div class="truncate pb-2 text-center text-xl font-bold">{app.domain}</div>
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<div class="w-full text-center font-bold">Loading...</div>
|
<div class="w-full text-center font-bold">{$t('forms.loading')}</div>
|
||||||
{:else if app.foundByDomain}
|
{:else if app.foundByDomain}
|
||||||
<div class="w-full bg-coolgray-200 text-xs">
|
<div class="w-full bg-coolgray-200 text-xs">
|
||||||
<span class="text-red-500">Domain</span> already used for
|
{@html $t('forms.already_used_for', { type: 'Domains' })}
|
||||||
<span class="text-red-500">{app.foundName}</span>
|
<span class="text-red-500">{app.foundName}</span>
|
||||||
</div>
|
</div>
|
||||||
{:else if app.foundByRepository}
|
{:else if app.foundByRepository}
|
||||||
<div class="w-full bg-coolgray-200 text-xs">
|
<div class="w-full bg-coolgray-200 text-xs">
|
||||||
<span class="text-red-500">Repository</span> already used for
|
{@html $t('forms.already_used_for', { type: 'Repository' })}
|
||||||
<span class="text-red-500">{app.foundName}</span>
|
<span class="text-red-500">{app.foundName}</span>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<button class="bg-green-600 hover:bg-green-500 w-full" on:click={addToCoolify}
|
<button class="bg-green-600 hover:bg-green-500 w-full" on:click={addToCoolify}
|
||||||
>Add to Coolify</button
|
>{$t('destination.add_to_coolify')}</button
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
import { post } from '$lib/api';
|
import { post } from '$lib/api';
|
||||||
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
|
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
|
import { t } from '$lib/translations';
|
||||||
const { id } = $page.params;
|
const { id } = $page.params;
|
||||||
let cannotDisable = settings.fqdn && destination.engine === '/var/run/docker.sock';
|
let cannotDisable = settings.fqdn && destination.engine === '/var/run/docker.sock';
|
||||||
// let scannedApps = [];
|
// let scannedApps = [];
|
||||||
@ -88,7 +89,7 @@
|
|||||||
async function stopProxy() {
|
async function stopProxy() {
|
||||||
try {
|
try {
|
||||||
await post(`/destinations/${id}/stop.json`, { engine: destination.engine });
|
await post(`/destinations/${id}/stop.json`, { engine: destination.engine });
|
||||||
return toast.push('Coolify Proxy stopped!');
|
return toast.push($t('destination.coolify_proxy_stopped'));
|
||||||
} catch ({ error }) {
|
} catch ({ error }) {
|
||||||
return errorNotification(error);
|
return errorNotification(error);
|
||||||
}
|
}
|
||||||
@ -96,19 +97,17 @@
|
|||||||
async function startProxy() {
|
async function startProxy() {
|
||||||
try {
|
try {
|
||||||
await post(`/destinations/${id}/start.json`, { engine: destination.engine });
|
await post(`/destinations/${id}/start.json`, { engine: destination.engine });
|
||||||
return toast.push('Coolify Proxy started!');
|
return toast.push($t('destination.coolify_proxy_started'));
|
||||||
} catch ({ error }) {
|
} catch ({ error }) {
|
||||||
return errorNotification(error);
|
return errorNotification(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function forceRestartProxy() {
|
async function forceRestartProxy() {
|
||||||
const sure = confirm(
|
const sure = confirm($t('destination.confirm_restart_proxy'));
|
||||||
'Are you sure you want to restart the proxy? Everything will be reconfigured in ~10 secs.'
|
|
||||||
);
|
|
||||||
if (sure) {
|
if (sure) {
|
||||||
try {
|
try {
|
||||||
restarting = true;
|
restarting = true;
|
||||||
toast.push('Coolify Proxy restarting...');
|
toast.push($t('destination.coolify_proxy_restarting'));
|
||||||
await post(`/destinations/${id}/restart.json`, {
|
await post(`/destinations/${id}/restart.json`, {
|
||||||
engine: destination.engine,
|
engine: destination.engine,
|
||||||
fqdn: settings.fqdn
|
fqdn: settings.fqdn
|
||||||
@ -126,7 +125,7 @@
|
|||||||
|
|
||||||
<form on:submit|preventDefault={handleSubmit} class="grid grid-flow-row gap-2 py-4">
|
<form on:submit|preventDefault={handleSubmit} class="grid grid-flow-row gap-2 py-4">
|
||||||
<div class="flex space-x-1 pb-5">
|
<div class="flex space-x-1 pb-5">
|
||||||
<div class="title font-bold">Configuration</div>
|
<div class="title font-bold">{$t('forms.configuration')}</div>
|
||||||
{#if $session.isAdmin}
|
{#if $session.isAdmin}
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
@ -134,13 +133,15 @@
|
|||||||
class:bg-sky-600={!loading}
|
class:bg-sky-600={!loading}
|
||||||
class:hover:bg-sky-500={!loading}
|
class:hover:bg-sky-500={!loading}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
>{loading ? 'Saving...' : 'Save'}
|
>{loading ? $t('forms.saving') : $t('forms.save')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class={restarting ? '' : 'bg-red-600 hover:bg-red-500'}
|
class={restarting ? '' : 'bg-red-600 hover:bg-red-500'}
|
||||||
disabled={restarting}
|
disabled={restarting}
|
||||||
on:click|preventDefault={forceRestartProxy}
|
on:click|preventDefault={forceRestartProxy}
|
||||||
>{restarting ? 'Restarting... please wait...' : 'Force restart proxy'}</button
|
>{restarting
|
||||||
|
? $t('destination.restarting_please_wait')
|
||||||
|
: $t('destination.force_restart_proxy')}</button
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- <button type="button" class="bg-coollabs hover:bg-coollabs-100" on:click={scanApps}
|
<!-- <button type="button" class="bg-coollabs hover:bg-coollabs-100" on:click={scanApps}
|
||||||
@ -148,10 +149,10 @@
|
|||||||
> -->
|
> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center px-10 ">
|
<div class="grid grid-cols-2 items-center px-10 ">
|
||||||
<label for="name" class="text-base font-bold text-stone-100">Name</label>
|
<label for="name" class="text-base font-bold text-stone-100">{$t('forms.name')}</label>
|
||||||
<input
|
<input
|
||||||
name="name"
|
name="name"
|
||||||
placeholder="name"
|
placeholder={$t('forms.name')}
|
||||||
disabled={!$session.isAdmin}
|
disabled={!$session.isAdmin}
|
||||||
readonly={!$session.isAdmin}
|
readonly={!$session.isAdmin}
|
||||||
bind:value={destination.name}
|
bind:value={destination.name}
|
||||||
@ -159,13 +160,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 items-center px-10">
|
<div class="grid grid-cols-2 items-center px-10">
|
||||||
<label for="engine" class="text-base font-bold text-stone-100">Engine</label>
|
<label for="engine" class="text-base font-bold text-stone-100">{$t('forms.engine')}</label>
|
||||||
<CopyPasswordField
|
<CopyPasswordField
|
||||||
id="engine"
|
id="engine"
|
||||||
readonly
|
readonly
|
||||||
disabled
|
disabled
|
||||||
name="engine"
|
name="engine"
|
||||||
placeholder="eg: /var/run/docker.sock"
|
placeholder="{$t('forms.eg')}: /var/run/docker.sock"
|
||||||
value={destination.engine}
|
value={destination.engine}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -174,13 +175,13 @@
|
|||||||
<input name="remoteEngine" type="checkbox" bind:checked={payload.remoteEngine} />
|
<input name="remoteEngine" type="checkbox" bind:checked={payload.remoteEngine} />
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="grid grid-cols-2 items-center px-10">
|
<div class="grid grid-cols-2 items-center px-10">
|
||||||
<label for="network" class="text-base font-bold text-stone-100">Network</label>
|
<label for="network" class="text-base font-bold text-stone-100">{$t('forms.network')}</label>
|
||||||
<CopyPasswordField
|
<CopyPasswordField
|
||||||
id="network"
|
id="network"
|
||||||
readonly
|
readonly
|
||||||
disabled
|
disabled
|
||||||
name="network"
|
name="network"
|
||||||
placeholder="default: coolify"
|
placeholder="{$t('forms.default')}: coolify"
|
||||||
value={destination.network}
|
value={destination.network}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -189,7 +190,7 @@
|
|||||||
disabled={cannotDisable}
|
disabled={cannotDisable}
|
||||||
bind:setting={destination.isCoolifyProxyUsed}
|
bind:setting={destination.isCoolifyProxyUsed}
|
||||||
on:click={changeProxySetting}
|
on:click={changeProxySetting}
|
||||||
title="Use Coolify Proxy?"
|
title={$t('destination.use_coolify_proxy')}
|
||||||
description={`This will install a proxy on the destination to allow you to access your applications and services without any manual configuration. Databases will have their own proxy. <br><br>${
|
description={`This will install a proxy on the destination to allow you to access your applications and services without any manual configuration. Databases will have their own proxy. <br><br>${
|
||||||
cannotDisable
|
cannotDisable
|
||||||
? '<span class="font-bold text-white">You cannot disable this proxy as FQDN is configured for Coolify.</span>'
|
? '<span class="font-bold text-white">You cannot disable this proxy as FQDN is configured for Coolify.</span>'
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
|
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { generateRemoteEngine } from '$lib/components/common';
|
import { generateRemoteEngine } from '$lib/components/common';
|
||||||
|
import { t } from '$lib/translations';
|
||||||
const { id } = $page.params;
|
const { id } = $page.params;
|
||||||
let cannotDisable = settings.fqdn && destination.engine === '/var/run/docker.sock';
|
let cannotDisable = settings.fqdn && destination.engine === '/var/run/docker.sock';
|
||||||
// let scannedApps = [];
|
// let scannedApps = [];
|
||||||
@ -90,7 +91,7 @@
|
|||||||
try {
|
try {
|
||||||
const engine = generateRemoteEngine(destination);
|
const engine = generateRemoteEngine(destination);
|
||||||
await post(`/destinations/${id}/stop.json`, { engine });
|
await post(`/destinations/${id}/stop.json`, { engine });
|
||||||
return toast.push('Coolify Proxy stopped!');
|
return toast.push($t('destination.coolify_proxy_stopped'));
|
||||||
} catch ({ error }) {
|
} catch ({ error }) {
|
||||||
return errorNotification(error);
|
return errorNotification(error);
|
||||||
}
|
}
|
||||||
@ -99,19 +100,17 @@
|
|||||||
try {
|
try {
|
||||||
const engine = generateRemoteEngine(destination);
|
const engine = generateRemoteEngine(destination);
|
||||||
await post(`/destinations/${id}/start.json`, { engine });
|
await post(`/destinations/${id}/start.json`, { engine });
|
||||||
return toast.push('Coolify Proxy started!');
|
return toast.push($t('destination.coolify_proxy_started'));
|
||||||
} catch ({ error }) {
|
} catch ({ error }) {
|
||||||
return errorNotification(error);
|
return errorNotification(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function forceRestartProxy() {
|
async function forceRestartProxy() {
|
||||||
const sure = confirm(
|
const sure = confirm($t('destination.confirm_restart_proxy'));
|
||||||
'Are you sure you want to restart the proxy? Everything will be reconfigured in ~10 secs.'
|
|
||||||
);
|
|
||||||
if (sure) {
|
if (sure) {
|
||||||
try {
|
try {
|
||||||
restarting = true;
|
restarting = true;
|
||||||
toast.push('Coolify Proxy restarting...');
|
toast.push($t('destination.coolify_proxy_restarting'));
|
||||||
await post(`/destinations/${id}/restart.json`, {
|
await post(`/destinations/${id}/restart.json`, {
|
||||||
engine: destination.engine,
|
engine: destination.engine,
|
||||||
fqdn: settings.fqdn
|
fqdn: settings.fqdn
|
||||||
@ -127,7 +126,7 @@
|
|||||||
|
|
||||||
<form on:submit|preventDefault={handleSubmit} class="grid grid-flow-row gap-2 py-4">
|
<form on:submit|preventDefault={handleSubmit} class="grid grid-flow-row gap-2 py-4">
|
||||||
<div class="flex space-x-1 pb-5">
|
<div class="flex space-x-1 pb-5">
|
||||||
<div class="title font-bold">Configuration</div>
|
<div class="title font-bold">{$t('forms.configuration')}</div>
|
||||||
{#if $session.isAdmin}
|
{#if $session.isAdmin}
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
@ -135,13 +134,15 @@
|
|||||||
class:bg-sky-600={!loading}
|
class:bg-sky-600={!loading}
|
||||||
class:hover:bg-sky-500={!loading}
|
class:hover:bg-sky-500={!loading}
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
>{loading ? 'Saving...' : 'Save'}
|
>{loading ? $t('forms.saving') : $t('forms.save')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class={restarting ? '' : 'bg-red-600 hover:bg-red-500'}
|
class={restarting ? '' : 'bg-red-600 hover:bg-red-500'}
|
||||||
disabled={restarting}
|
disabled={restarting}
|
||||||
on:click|preventDefault={forceRestartProxy}
|
on:click|preventDefault={forceRestartProxy}
|
||||||
>{restarting ? 'Restarting... please wait...' : 'Force restart proxy'}</button
|
>{restarting
|
||||||
|
? $t('destination.restarting_please_wait')
|
||||||
|
: $t('destination.force_restart_proxy')}</button
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- <button type="button" class="bg-coollabs hover:bg-coollabs-100" on:click={scanApps}
|
<!-- <button type="button" class="bg-coollabs hover:bg-coollabs-100" on:click={scanApps}
|
||||||
@ -149,10 +150,10 @@
|
|||||||
> -->
|
> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center px-10 ">
|
<div class="grid grid-cols-2 items-center px-10 ">
|
||||||
<label for="name" class="text-base font-bold text-stone-100">Name</label>
|
<label for="name" class="text-base font-bold text-stone-100">{$t('forms.name')}</label>
|
||||||
<input
|
<input
|
||||||
name="name"
|
name="name"
|
||||||
placeholder="name"
|
placeholder={$t('forms.name')}
|
||||||
disabled={!$session.isAdmin}
|
disabled={!$session.isAdmin}
|
||||||
readonly={!$session.isAdmin}
|
readonly={!$session.isAdmin}
|
||||||
bind:value={destination.name}
|
bind:value={destination.name}
|
||||||
@ -160,13 +161,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 items-center px-10">
|
<div class="grid grid-cols-2 items-center px-10">
|
||||||
<label for="engine" class="text-base font-bold text-stone-100">Engine</label>
|
<label for="engine" class="text-base font-bold text-stone-100">{$t('forms.engine')}</label>
|
||||||
<CopyPasswordField
|
<CopyPasswordField
|
||||||
id="engine"
|
id="engine"
|
||||||
readonly
|
readonly
|
||||||
disabled
|
disabled
|
||||||
name="engine"
|
name="engine"
|
||||||
placeholder="eg: /var/run/docker.sock"
|
placeholder="{$t('forms.eg')}: /var/run/docker.sock"
|
||||||
value={destination.engine}
|
value={destination.engine}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -175,13 +176,13 @@
|
|||||||
<input name="remoteEngine" type="checkbox" bind:checked={payload.remoteEngine} />
|
<input name="remoteEngine" type="checkbox" bind:checked={payload.remoteEngine} />
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="grid grid-cols-2 items-center px-10">
|
<div class="grid grid-cols-2 items-center px-10">
|
||||||
<label for="network" class="text-base font-bold text-stone-100">Network</label>
|
<label for="network" class="text-base font-bold text-stone-100">{$t('forms.network')}</label>
|
||||||
<CopyPasswordField
|
<CopyPasswordField
|
||||||
id="network"
|
id="network"
|
||||||
readonly
|
readonly
|
||||||
disabled
|
disabled
|
||||||
name="network"
|
name="network"
|
||||||
placeholder="default: coolify"
|
placeholder="{$t('forms.default')}: coolify"
|
||||||
value={destination.network}
|
value={destination.network}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -190,7 +191,7 @@
|
|||||||
disabled={cannotDisable}
|
disabled={cannotDisable}
|
||||||
bind:setting={destination.isCoolifyProxyUsed}
|
bind:setting={destination.isCoolifyProxyUsed}
|
||||||
on:click={changeProxySetting}
|
on:click={changeProxySetting}
|
||||||
title="Use Coolify Proxy?"
|
title={$t('destination.use_coolify_proxy')}
|
||||||
description={`This will install a proxy on the destination to allow you to access your applications and services without any manual configuration. Databases will have their own proxy. <br><br>${
|
description={`This will install a proxy on the destination to allow you to access your applications and services without any manual configuration. Databases will have their own proxy. <br><br>${
|
||||||
cannotDisable
|
cannotDisable
|
||||||
? '<span class="font-bold text-white">You cannot disable this proxy as FQDN is configured for Coolify.</span>'
|
? '<span class="font-bold text-white">You cannot disable this proxy as FQDN is configured for Coolify.</span>'
|
||||||
|
@ -37,10 +37,11 @@
|
|||||||
import DeleteIcon from '$lib/components/DeleteIcon.svelte';
|
import DeleteIcon from '$lib/components/DeleteIcon.svelte';
|
||||||
import { del } from '$lib/api';
|
import { del } from '$lib/api';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
import { t } from '$lib/translations';
|
||||||
|
|
||||||
export let destination;
|
export let destination;
|
||||||
async function deleteDestination(destination) {
|
async function deleteDestination(destination) {
|
||||||
const sure = confirm(`Are you sure you would like to delete '${destination.name}'?`);
|
const sure = confirm($t('application.confirm_to_delete', { name: destination.name }));
|
||||||
if (sure) {
|
if (sure) {
|
||||||
try {
|
try {
|
||||||
await del(`/destinations/${destination.id}.json`, { id: destination.id });
|
await del(`/destinations/${destination.id}.json`, { id: destination.id });
|
||||||
@ -55,14 +56,14 @@
|
|||||||
<nav class="nav-side">
|
<nav class="nav-side">
|
||||||
<button
|
<button
|
||||||
on:click={() => deleteDestination(destination)}
|
on:click={() => deleteDestination(destination)}
|
||||||
title="Delete Destination"
|
title={$t('destination.delete_destination')}
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={!$session.isAdmin}
|
disabled={!$session.isAdmin}
|
||||||
class:hover:text-red-500={$session.isAdmin}
|
class:hover:text-red-500={$session.isAdmin}
|
||||||
class="icons tooltip-bottom bg-transparent text-sm"
|
class="icons tooltip-bottom bg-transparent text-sm"
|
||||||
data-tooltip={$session.isAdmin
|
data-tooltip={$session.isAdmin
|
||||||
? 'Delete Destination'
|
? $t('destination.delete_destination')
|
||||||
: 'You do not have permission to delete this destination'}><DeleteIcon /></button
|
: $t('destination.permission_denied_delete_destination')}><DeleteIcon /></button
|
||||||
>
|
>
|
||||||
</nav>
|
</nav>
|
||||||
<slot />
|
<slot />
|
||||||
|
@ -36,10 +36,11 @@
|
|||||||
import type Prisma from '@prisma/client';
|
import type Prisma from '@prisma/client';
|
||||||
import LocalDocker from './_LocalDocker.svelte';
|
import LocalDocker from './_LocalDocker.svelte';
|
||||||
import RemoteDocker from './_RemoteDocker.svelte';
|
import RemoteDocker from './_RemoteDocker.svelte';
|
||||||
|
import { t } from '$lib/translations';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex space-x-1 p-6 text-2xl font-bold">
|
<div class="flex space-x-1 p-6 text-2xl font-bold">
|
||||||
<div class="tracking-tight">Destination</div>
|
<div class="tracking-tight">{$t('application.destination')}</div>
|
||||||
<span class="arrow-right-applications px-1">></span>
|
<span class="arrow-right-applications px-1">></span>
|
||||||
<span class="pr-2">{destination.name}</span>
|
<span class="pr-2">{destination.name}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,11 +23,13 @@
|
|||||||
import type Prisma from '@prisma/client';
|
import type Prisma from '@prisma/client';
|
||||||
|
|
||||||
import { session } from '$app/stores';
|
import { session } from '$app/stores';
|
||||||
|
import { t } from '$lib/translations';
|
||||||
|
|
||||||
export let destinations: Prisma.DestinationDocker[];
|
export let destinations: Prisma.DestinationDocker[];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex space-x-1 p-6 font-bold">
|
<div class="flex space-x-1 p-6 font-bold">
|
||||||
<div class="mr-4 text-2xl tracking-tight">Destinations</div>
|
<div class="mr-4 text-2xl tracking-tight">{$t('index.destinations')}</div>
|
||||||
{#if $session.isAdmin}
|
{#if $session.isAdmin}
|
||||||
<a href="/new/destination" class="add-icon bg-sky-600 hover:bg-sky-500">
|
<a href="/new/destination" class="add-icon bg-sky-600 hover:bg-sky-500">
|
||||||
<svg
|
<svg
|
||||||
@ -49,7 +51,7 @@
|
|||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
{#if !destinations || destinations.length === 0}
|
{#if !destinations || destinations.length === 0}
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
<div class="text-center text-xl font-bold">No destination found</div>
|
<div class="text-center text-xl font-bold">{$t('destination.no_destination_found')}</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex flex-wrap justify-center">
|
<div class="flex flex-wrap justify-center">
|
||||||
|
Loading…
Reference in New Issue
Block a user