From 4bb60e589b5974e9a1c547ac54b88eaebd5178c2 Mon Sep 17 00:00:00 2001 From: RitvikSardana Date: Mon, 23 Dec 2024 13:51:19 +0530 Subject: [PATCH] fix: remove shitty list view --- desk/src/components/index.ts | 1 - desk/src/components/list-view/LV.vue | 108 ---------------- desk/src/components/list-view/LVEmpty.vue | 17 --- desk/src/components/list-view/LVHeader.vue | 40 ------ desk/src/components/list-view/LVLoading.vue | 31 ----- .../src/components/list-view/LVNavigation.vue | 36 ------ desk/src/components/list-view/LVRow.vue | 115 ------------------ .../components/list-view/LVSelectionBar.vue | 48 -------- desk/src/components/list-view/selection.ts | 16 --- desk/src/components/list-view/symbols.ts | 16 --- desk/src/components/list-view/types.ts | 6 - 11 files changed, 434 deletions(-) delete mode 100644 desk/src/components/list-view/LV.vue delete mode 100644 desk/src/components/list-view/LVEmpty.vue delete mode 100644 desk/src/components/list-view/LVHeader.vue delete mode 100644 desk/src/components/list-view/LVLoading.vue delete mode 100644 desk/src/components/list-view/LVNavigation.vue delete mode 100644 desk/src/components/list-view/LVRow.vue delete mode 100644 desk/src/components/list-view/LVSelectionBar.vue delete mode 100644 desk/src/components/list-view/selection.ts delete mode 100644 desk/src/components/list-view/symbols.ts delete mode 100644 desk/src/components/list-view/types.ts diff --git a/desk/src/components/index.ts b/desk/src/components/index.ts index edc4b21a5..339ab9153 100644 --- a/desk/src/components/index.ts +++ b/desk/src/components/index.ts @@ -1,7 +1,6 @@ export { default as AttachmentItem } from "./AttachmentItem.vue"; export { default as CommandPalette } from "./command-palette/CP.vue"; export { default as HCard } from "./HCard.vue"; -export { default as ListView } from "./list-view/LV.vue"; export { default as NestedPopover } from "./NestedPopover.vue"; export { default as Notifications } from "./notifications/Notifications.vue"; export { default as PageTitle } from "./PageTitle.vue"; diff --git a/desk/src/components/list-view/LV.vue b/desk/src/components/list-view/LV.vue deleted file mode 100644 index fba5e59b2..000000000 --- a/desk/src/components/list-view/LV.vue +++ /dev/null @@ -1,108 +0,0 @@ - - - diff --git a/desk/src/components/list-view/LVEmpty.vue b/desk/src/components/list-view/LVEmpty.vue deleted file mode 100644 index 82ec350ed..000000000 --- a/desk/src/components/list-view/LVEmpty.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/desk/src/components/list-view/LVHeader.vue b/desk/src/components/list-view/LVHeader.vue deleted file mode 100644 index 00ad57645..000000000 --- a/desk/src/components/list-view/LVHeader.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/desk/src/components/list-view/LVLoading.vue b/desk/src/components/list-view/LVLoading.vue deleted file mode 100644 index eb8c23fea..000000000 --- a/desk/src/components/list-view/LVLoading.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - diff --git a/desk/src/components/list-view/LVNavigation.vue b/desk/src/components/list-view/LVNavigation.vue deleted file mode 100644 index 9ef6ed398..000000000 --- a/desk/src/components/list-view/LVNavigation.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/desk/src/components/list-view/LVRow.vue b/desk/src/components/list-view/LVRow.vue deleted file mode 100644 index d0217c44c..000000000 --- a/desk/src/components/list-view/LVRow.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - diff --git a/desk/src/components/list-view/LVSelectionBar.vue b/desk/src/components/list-view/LVSelectionBar.vue deleted file mode 100644 index 6145c14c0..000000000 --- a/desk/src/components/list-view/LVSelectionBar.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/desk/src/components/list-view/selection.ts b/desk/src/components/list-view/selection.ts deleted file mode 100644 index fc77c7e5c..000000000 --- a/desk/src/components/list-view/selection.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { reactive } from "vue"; -import { Action, Key } from "./types"; - -export const selection = reactive({ - storage: new Set(), - actions: new Set(), - toggle: (key: Key) => { - if (!selection.storage.delete(key)) { - selection.storage.add(key); - } - }, - reset: () => { - selection.storage.clear(); - selection.actions.clear(); - }, -}); diff --git a/desk/src/components/list-view/symbols.ts b/desk/src/components/list-view/symbols.ts deleted file mode 100644 index b3f6d269e..000000000 --- a/desk/src/components/list-view/symbols.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { InjectionKey, Ref } from "vue"; -import { Resource, Column } from "@/types"; - -type I = { - name: string; - [key: string]: unknown; -}; -type R = Resource>; -export const CheckboxKey: InjectionKey = Symbol("Checkbox"); -export const ColumnsKey: InjectionKey> = Symbol("Columns"); -export const DocTypeKey: InjectionKey = Symbol("DocType"); -export const FilterKey: InjectionKey = Symbol("Filter"); -export const IdKey: InjectionKey = Symbol("Id"); -export const PluralKey: InjectionKey> = Symbol("Plural"); -export const ResourceKey: InjectionKey = Symbol("Resource"); -export const SingluarKey: InjectionKey> = Symbol("Singular"); diff --git a/desk/src/components/list-view/types.ts b/desk/src/components/list-view/types.ts deleted file mode 100644 index 4f67ee37f..000000000 --- a/desk/src/components/list-view/types.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type Selection = Set; -export type Key = string; -export type Action = { - label: string; - onClick: (key: Key[]) => void; -};