From 91d0c588d906e6008ca0c6ff993f8fd2fd43ee90 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sat, 21 Jan 2023 21:15:23 -0900 Subject: [PATCH] refactor: refactor item page UI (#235) * fix generated types * fix tailwind auto-complete * force lowercase buttons * add title and change style for items page * add copy button support for item details * empty state for log * fix duplicate padding * add option for create without closing the current dialog. * hide purchase price is not set * invert toggle for edit mode * update styles on item cards * add edit support for maintenance logs --- .vscode/settings.json | 9 +++ frontend/assets/css/main.css | 4 + frontend/components/Item/Card.vue | 18 ++--- frontend/components/Item/CreateModal.vue | 51 ++++++++----- frontend/components/global/CopyText.vue | 24 +++++- .../global/DetailsSection/DetailsSection.vue | 14 +++- .../components/global/DetailsSection/types.ts | 1 + frontend/composables/use-preferences.ts | 6 +- frontend/lib/api/types/data-contracts.ts | 14 ++-- frontend/pages/item/[id]/index.vue | 27 +++++-- frontend/pages/item/[id]/index/edit.vue | 20 ++--- frontend/pages/item/[id]/index/log.vue | 73 ++++++++++++++++++- frontend/pages/profile.vue | 4 +- 13 files changed, 197 insertions(+), 68 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5080f25..d0ae55d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,4 +21,13 @@ "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, "eslint.format.enable": true, + "css.validate": false, + "tailwindCSS.includeLanguages": { + "vue": "html", + "vue-html": "html" + }, + "editor.quickSuggestions": { + "strings": true + }, + "tailwindCSS.experimental.configFile": "./frontend/tailwind.config.js" } diff --git a/frontend/assets/css/main.css b/frontend/assets/css/main.css index a3c199c..d83faf6 100644 --- a/frontend/assets/css/main.css +++ b/frontend/assets/css/main.css @@ -1,3 +1,7 @@ .text-no-transform { text-transform: none !important; +} + +.btn { + text-transform: none !important; } \ No newline at end of file diff --git a/frontend/components/Item/Card.vue b/frontend/components/Item/Card.vue index 6ca1704..c0b5b88 100644 --- a/frontend/components/Item/Card.vue +++ b/frontend/components/Item/Card.vue @@ -1,22 +1,18 @@