From a9072370ca1eb9a5cce928b1d487db0f307edea6 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Tue, 20 Sep 2022 15:24:27 +0800
Subject: feat: Move old apps into it's own directory

---
 .../app/pages/views/settings-labels-tile.svelte    | 111 ---------------------
 1 file changed, 111 deletions(-)
 delete mode 100644 apps/projects/src/app/pages/views/settings-labels-tile.svelte

(limited to 'apps/projects/src/app/pages/views/settings-labels-tile.svelte')

diff --git a/apps/projects/src/app/pages/views/settings-labels-tile.svelte b/apps/projects/src/app/pages/views/settings-labels-tile.svelte
deleted file mode 100644
index 3d5a567..0000000
--- a/apps/projects/src/app/pages/views/settings-labels-tile.svelte
+++ /dev/null
@@ -1,111 +0,0 @@
-<script>
-	import {IconNames} from "$shared/lib/configuration";
-	import {onMount} from "svelte";
-	import labels, {reload_labels, delete_label_async} from "$app/lib/stores/labels";
-	import Button from "$shared/components/button.svelte";
-	import Tile from "$shared/components/tile.svelte";
-	import {Table, THead, TBody, TCell, TRow} from "$shared/components/table";
-	import LL from "$app/lib/i18n/i18n-svelte";
-
-	let isLoadingLabels = true;
-
-	$: active_labels = $labels.filter(c => !c.archived);
-	$: archived_labels = $labels.filter(c => c.archived);
-
-	async function load_labels() {
-		isLoadingLabels = true;
-		await reload_labels();
-		isLoadingLabels = false;
-	}
-
-	async function handle_edit_label_click(event) {
-	}
-
-	async function handle_delete_label_click(event) {
-		const row = event.target.closest("tr");
-		if (
-			row &&
-			row.dataset.id &&
-			confirm($LL.views.settingsLabelsTile.deleteAllConfirm())
-		) {
-			await delete_label_async({id: row.dataset.id});
-			row.classList.add("d-none");
-		}
-	}
-
-	onMount(() => {
-		load_labels();
-	});
-</script>
-
-<Tile class="col-6@md col-12 {isLoadingLabels ? 'c-disabled loading' : ''}">
-    <h2 class="margin-bottom-xxs">{$LL.views.settingsLabelsTile.labels()}</h2>
-    {#if active_labels.length > 0 && archived_labels.length > 0}
-        <nav class="s-tabs text-sm">
-            <ul class="s-tabs__list">
-                <li><a class="s-tabs__link s-tabs__link--current"
-                       href="#0">{$LL.views.settingsLabelsTile.active()} ({active_labels.length})</a></li>
-                <li><a class="s-tabs__link"
-                       href="#0">{$LL.views.settingsLabelsTile.archived()} ({archived_labels.length})</a></li>
-            </ul>
-        </nav>
-    {/if}
-    <div class="max-width-100% overflow-auto">
-        <Table class="text-sm width-100%">
-            <THead class="text-left">
-            <TCell type="th"
-                   thScope="row">
-                {$LL.views.settingsLabelsTile.name()}
-            </TCell>
-            <TCell type="th"
-                   thScope="row">
-                {$LL.views.settingsLabelsTile.color()}
-            </TCell>
-            <TCell type="th"
-                   thScope="row"
-                   style="width: 50px;">
-            </TCell>
-            </THead>
-            <TBody class="text-left">
-            {#if $labels.length > 0}
-                {#each $labels as label}
-                    <TRow class="text-nowrap"
-                          dataId={label.id}>
-                        <TCell>
-                            {label.name}
-                        </TCell>
-                        <TCell>
-                        <span style="border-left: 3px solid {label.color}; background-color:{label.color}25;">
-                            {label.color}
-                        </span>
-                        </TCell>
-                        <TCell>
-                            <Button icon="{IconNames.pencilSquare}"
-                                    variant="reset"
-                                    icon_width="1.2rem"
-                                    class="hide"
-                                    icon_height="1.2rem"
-                                    on:click={handle_edit_label_click}
-                                    title="{$LL.views.settingsLabelsTile.editEntry()}"/>
-                            <Button icon="{IconNames.trash}"
-                                    variant="reset"
-                                    icon_width="1.2rem"
-                                    icon_height="1.2rem"
-                                    on:click={handle_delete_label_click}
-                                    title="{$LL.views.settingsLabelsTile.deleteEntry()}"/>
-                        </TCell>
-                    </TRow>
-                {/each}
-            {:else}
-                <TRow>
-                    <TCell type="th"
-                           thScope="row"
-                           colspan="3">
-                        {$LL.views.settingsLabelsTile.noLabels()}
-                    </TCell>
-                </TRow>
-            {/if}
-            </TBody>
-        </Table>
-    </div>
-</Tile>
-- 
cgit v1.3

