ui: beta flag
This commit is contained in:
parent
3c29eaa1b1
commit
b4501fe52d
1
apps/ui/src/lib/components/Beta.svelte
Normal file
1
apps/ui/src/lib/components/Beta.svelte
Normal file
@ -0,0 +1 @@
|
|||||||
|
<span class="badge bg-coollabs-gradient rounded text-white font-normal"> BETA </span>
|
@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import Beta from './Beta.svelte';
|
||||||
import Explaner from './Explainer.svelte';
|
import Explaner from './Explainer.svelte';
|
||||||
import Tooltip from './Tooltip.svelte';
|
import Tooltip from './Tooltip.svelte';
|
||||||
|
|
||||||
@ -6,6 +7,7 @@
|
|||||||
export let customClass: any = null;
|
export let customClass: any = null;
|
||||||
export let setting: any;
|
export let setting: any;
|
||||||
export let title: any;
|
export let title: any;
|
||||||
|
export let isBeta: any = false;
|
||||||
export let description: any;
|
export let description: any;
|
||||||
export let isCenter = true;
|
export let isCenter = true;
|
||||||
export let disabled = false;
|
export let disabled = false;
|
||||||
@ -19,6 +21,9 @@
|
|||||||
<!-- svelte-ignore a11y-label-has-associated-control -->
|
<!-- svelte-ignore a11y-label-has-associated-control -->
|
||||||
<label>
|
<label>
|
||||||
{title}
|
{title}
|
||||||
|
{#if isBeta}
|
||||||
|
<Beta />
|
||||||
|
{/if}
|
||||||
{#if description && description !== ''}
|
{#if description && description !== ''}
|
||||||
<Explaner explanation={description} />
|
<Explaner explanation={description} />
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
id="update"
|
id="update"
|
||||||
disabled={updateStatus.success === false}
|
disabled={updateStatus.success === false}
|
||||||
on:click={update}
|
on:click={update}
|
||||||
class="icons bg-coollabs-gradient text-white duration-75 hover:scale-105 w-full"
|
class="icons bg-coollabs-gradient text-white duration-75 hover:scale-105 w-full"
|
||||||
>
|
>
|
||||||
{#if updateStatus.loading}
|
{#if updateStatus.loading}
|
||||||
<svg
|
<svg
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import { get, post } from '$lib/api';
|
import { get, post } from '$lib/api';
|
||||||
import { errorNotification } from '$lib/common';
|
import { errorNotification } from '$lib/common';
|
||||||
|
import Beta from './Beta.svelte';
|
||||||
async function getStatus() {
|
async function getStatus() {
|
||||||
if (loading.usage) return;
|
if (loading.usage) return;
|
||||||
loading.usage = true;
|
loading.usage = true;
|
||||||
@ -78,7 +79,7 @@
|
|||||||
<h1 class="font-bold text-lg lg:text-xl truncate">
|
<h1 class="font-bold text-lg lg:text-xl truncate">
|
||||||
{server.name}
|
{server.name}
|
||||||
{#if server.remoteEngine}
|
{#if server.remoteEngine}
|
||||||
<span class="badge bg-coollabs-gradient rounded text-white"> BETA </span>
|
<Beta />
|
||||||
{/if}
|
{/if}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="text-xs">
|
<div class="text-xs">
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
export let certificates: any;
|
export let certificates: any;
|
||||||
import { del, post } from '$lib/api';
|
import { del, post } from '$lib/api';
|
||||||
import { errorNotification } from '$lib/common';
|
import { errorNotification } from '$lib/common';
|
||||||
|
import Beta from '$lib/components/Beta.svelte';
|
||||||
|
|
||||||
let loading = {
|
let loading = {
|
||||||
save: false
|
save: false
|
||||||
@ -55,40 +56,40 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="mx-auto w-full">
|
<div class="mx-auto w-full">
|
||||||
<div class="flex border-b border-coolgray-500 mb-6">
|
<div class="flex border-b border-coolgray-500 mb-6">
|
||||||
<div class="title font-bold pb-3 pr-4">SSL Certificates <span class="badge rounded bg-coollabs-gradient text-white">BETA</span></div>
|
<div class="title font-bold pb-3 pr-4">SSL Certificates <Beta /></div>
|
||||||
<label for="my-modal" class="btn btn-sm btn-primary" on:click={() => (isModalActive = true)}
|
<label for="my-modal" class="btn btn-sm btn-primary" on:click={() => (isModalActive = true)}
|
||||||
>Add SSL Certificate</label
|
>Add SSL Certificate</label
|
||||||
>
|
>
|
||||||
</div>
|
|
||||||
{#if certificates.length > 0}
|
|
||||||
<table class="table w-full">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Common Name</th>
|
|
||||||
<th>CreatedAt</th>
|
|
||||||
<th>Actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{#each certificates as cert}
|
|
||||||
<tr>
|
|
||||||
<td>{cert.commonName}</td>
|
|
||||||
<td>{cert.createdAt}</td>
|
|
||||||
<td
|
|
||||||
><button on:click={() => deleteCertificate(cert.id)} class="btn btn-sm btn-error"
|
|
||||||
>Delete</button
|
|
||||||
></td
|
|
||||||
>
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{:else}
|
|
||||||
<div class="text-sm">No SSL Certificate found</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
|
{#if certificates.length > 0}
|
||||||
|
<table class="table w-full">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Common Name</th>
|
||||||
|
<th>CreatedAt</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{#each certificates as cert}
|
||||||
|
<tr>
|
||||||
|
<td>{cert.commonName}</td>
|
||||||
|
<td>{cert.createdAt}</td>
|
||||||
|
<td
|
||||||
|
><button on:click={() => deleteCertificate(cert.id)} class="btn btn-sm btn-error"
|
||||||
|
>Delete</button
|
||||||
|
></td
|
||||||
|
>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{:else}
|
||||||
|
<div class="text-sm">No SSL Certificate found</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
{#if isModalActive}
|
{#if isModalActive}
|
||||||
<input type="checkbox" id="my-modal" class="modal-toggle" />
|
<input type="checkbox" id="my-modal" class="modal-toggle" />
|
||||||
|
@ -152,6 +152,7 @@
|
|||||||
/>
|
/>
|
||||||
<Setting
|
<Setting
|
||||||
customClass="pt-4"
|
customClass="pt-4"
|
||||||
|
isBeta={true}
|
||||||
id="autodeploy"
|
id="autodeploy"
|
||||||
isCenter={false}
|
isCenter={false}
|
||||||
bind:setting={source.isSystemWide}
|
bind:setting={source.isSystemWide}
|
||||||
@ -238,6 +239,7 @@
|
|||||||
/>
|
/>
|
||||||
<Setting
|
<Setting
|
||||||
customClass="pt-4"
|
customClass="pt-4"
|
||||||
|
isBeta={true}
|
||||||
id="autodeploy"
|
id="autodeploy"
|
||||||
isCenter={false}
|
isCenter={false}
|
||||||
disabled={$appSession.teamId !== '0'}
|
disabled={$appSession.teamId !== '0'}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user