From 4b9e9cb4f694c1a04d018bf5542b51eff7bcea5f Mon Sep 17 00:00:00 2001 From: lexx Date: Tue, 17 Oct 2023 18:56:37 +0300 Subject: [PATCH] cleanup --- front/js/svelte/account/Avatar.svelte | 2 +- front/js/svelte/build/Report.svelte | 6 +- front/js/svelte/common/Accordion.svelte | 25 --- front/js/svelte/files/Preview.svelte | 2 +- front/js/svelte/files/imageserver.js | 22 +-- front/js/svelte/forms/Checkbox.svelte | 20 -- front/js/svelte/forms/Color.svelte | 23 --- front/js/svelte/forms/Date.svelte | 38 ---- .../svelte/libs/Tinymce_backup_manager.svelte | 179 ------------------ src/Channel/PreviewTarget.php | 27 --- src/Edge/QueryEdge.php | 16 -- src/Primitive/StringCollection.php | 38 ---- src/Support/Memoize.php | 38 ---- 13 files changed, 4 insertions(+), 432 deletions(-) delete mode 100644 front/js/svelte/common/Accordion.svelte delete mode 100644 front/js/svelte/forms/Checkbox.svelte delete mode 100644 front/js/svelte/forms/Color.svelte delete mode 100644 front/js/svelte/forms/Date.svelte delete mode 100644 front/js/svelte/libs/Tinymce_backup_manager.svelte delete mode 100644 src/Channel/PreviewTarget.php delete mode 100644 src/Edge/QueryEdge.php delete mode 100644 src/Primitive/StringCollection.php delete mode 100644 src/Support/Memoize.php diff --git a/front/js/svelte/account/Avatar.svelte b/front/js/svelte/account/Avatar.svelte index 24497f6..569713b 100644 --- a/front/js/svelte/account/Avatar.svelte +++ b/front/js/svelte/account/Avatar.svelte @@ -1,6 +1,6 @@ - - -{#if show} -
- -
-{/if} diff --git a/front/js/svelte/files/Preview.svelte b/front/js/svelte/files/Preview.svelte index ecaa9e1..e2ca4a2 100644 --- a/front/js/svelte/files/Preview.svelte +++ b/front/js/svelte/files/Preview.svelte @@ -40,7 +40,7 @@ > {record._file.path} diff --git a/front/js/svelte/files/imageserver.js b/front/js/svelte/files/imageserver.js index e5d41db..bd48e0b 100644 --- a/front/js/svelte/files/imageserver.js +++ b/front/js/svelte/files/imageserver.js @@ -1,31 +1,11 @@ import {getContext} from "svelte"; -export function imgurl(record, width = "", height = "", mode = "") { - // let argumentString = "-o"; - // if (mode) { - // argumentString += "-mode_fit"; - // } - // if (width) { - // argumentString += "-w_" + width; - // } - // if (height) { - // argumentString += "-h_" + height; - // } - // let pathAr = record._file.path.split("."); - // let ext = pathAr.pop(); - // let filename = record._file.path.replace("." + ext, ""); - // let cache = "cache/" - // if (!mode && !width && !height) { - // argumentString = ""; - // cache = ""; - // } - +export function imgurl(record) { const channel = getContext("channel") return channel.filesUrl + `/thumbs/${record._file.path}`; } export function fileurl(record) { - const channel = getContext("channel") return channel.filesUrl + `/${record._file.path}`; } diff --git a/front/js/svelte/forms/Checkbox.svelte b/front/js/svelte/forms/Checkbox.svelte deleted file mode 100644 index eea4c18..0000000 --- a/front/js/svelte/forms/Checkbox.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - -
- diff --git a/front/js/svelte/forms/Color.svelte b/front/js/svelte/forms/Color.svelte deleted file mode 100644 index 3bfb5ee..0000000 --- a/front/js/svelte/forms/Color.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - -{#if label} -
- -
-{/if} - -
-
- -
- -
diff --git a/front/js/svelte/forms/Date.svelte b/front/js/svelte/forms/Date.svelte deleted file mode 100644 index d0656e7..0000000 --- a/front/js/svelte/forms/Date.svelte +++ /dev/null @@ -1,38 +0,0 @@ - - -{#if label} -
- -
-{/if} - - diff --git a/front/js/svelte/libs/Tinymce_backup_manager.svelte b/front/js/svelte/libs/Tinymce_backup_manager.svelte deleted file mode 100644 index 3a323b5..0000000 --- a/front/js/svelte/libs/Tinymce_backup_manager.svelte +++ /dev/null @@ -1,179 +0,0 @@ - - -
-
- {@html value} -
-
- -{#if field && schema} - -{/if} - - diff --git a/src/Channel/PreviewTarget.php b/src/Channel/PreviewTarget.php deleted file mode 100644 index f578c17..0000000 --- a/src/Channel/PreviewTarget.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ -final class StringCollection extends Collection -{ - - public function __construct( - string ...$array - ) { - parent::__construct($array); - } - - /** - * @return string[] - **/ - public function toArray(): array - { - return collect($this)->values()->toArray(); - } - - public static function fromArray(array $data): StringCollection - { - return new StringCollection(...$data); - } - - public static function fromDB(string $data): StringCollection - { - return new StringCollection(...\json_decode($data,true)); - } - - -} diff --git a/src/Support/Memoize.php b/src/Support/Memoize.php deleted file mode 100644 index cf4e8b7..0000000 --- a/src/Support/Memoize.php +++ /dev/null @@ -1,38 +0,0 @@ -cache)) { - return $this->cache[$key]; - } - - $result = $compute(); - $this->cache[$key] = $result; - - return $result; - } -}