From 6ca277a21d6e0dd4c9159ecfeaff159e53635b90 Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 23 Oct 2024 17:11:41 -0500 Subject: [PATCH] Update:Library settings tab settings in 2 columns and cleanup --- .../modals/libraries/LibrarySettings.vue | 130 +++++++++--------- client/components/ui/TextInput.vue | 4 +- client/components/ui/ToggleSwitch.vue | 17 ++- 3 files changed, 83 insertions(+), 68 deletions(-) diff --git a/client/components/modals/libraries/LibrarySettings.vue b/client/components/modals/libraries/LibrarySettings.vue index 508f3b81..896a6837 100644 --- a/client/components/modals/libraries/LibrarySettings.vue +++ b/client/components/modals/libraries/LibrarySettings.vue @@ -1,78 +1,80 @@ diff --git a/client/components/ui/TextInput.vue b/client/components/ui/TextInput.vue index 7329ec09..6935a1dd 100644 --- a/client/components/ui/TextInput.vue +++ b/client/components/ui/TextInput.vue @@ -57,7 +57,8 @@ export default { inputName: String, showCopy: Boolean, step: [String, Number], - min: [String, Number] + min: [String, Number], + customInputClass: String }, data() { return { @@ -82,6 +83,7 @@ export default { _list.push(`py-${this.paddingY}`) if (this.noSpinner) _list.push('no-spinner') if (this.textCenter) _list.push('text-center') + if (this.customInputClass) _list.push(this.customInputClass) return _list.join(' ') }, actualType() { diff --git a/client/components/ui/ToggleSwitch.vue b/client/components/ui/ToggleSwitch.vue index b5511d96..aabaa00f 100644 --- a/client/components/ui/ToggleSwitch.vue +++ b/client/components/ui/ToggleSwitch.vue @@ -1,7 +1,7 @@ @@ -19,7 +19,11 @@ export default { default: 'primary' }, disabled: Boolean, - labeledBy: String + labeledBy: String, + size: { + type: String, + default: 'md' + } }, computed: { toggleValue: { @@ -37,6 +41,13 @@ export default { switchClassName() { var bgColor = this.disabled ? 'bg-gray-300' : 'bg-white' return this.toggleValue ? 'translate-x-5 ' + bgColor : bgColor + }, + cursorHeightWidth() { + if (this.size === 'sm') return 16 + return 20 + }, + buttonWidth() { + return this.cursorHeightWidth * 2 } }, methods: {