From 59af19cd109c703e2dee91b8a2ec680e43c6b376 Mon Sep 17 00:00:00 2001
From: anna7261 <248579710+anna7261@users.noreply.github.com>
Date: Fri, 19 Dec 2025 17:39:12 -0400
Subject: [PATCH] feat: enhance component structure and update styles
- Added new aliases for 'ui', 'lib', and 'hooks' in components.json for better organization.
- Introduced 'iconLibrary' property set to 'lucide'.
- Updated global CSS variables to use oklch color format for improved color management.
- Refactored styles in globals.css for consistency and added new sidebar color variables.
- Commented out unused code in SettingsTab component for clarity.
---
components.json | 9 +-
electron/lib/utils.ts | 6 +
package-lock.json | 1 +
.../components/sidebar/settings-tab/index.tsx | 17 +-
renderer/styles/globals.css | 168 ++++++++++++++----
5 files changed, 155 insertions(+), 46 deletions(-)
create mode 100644 electron/lib/utils.ts
diff --git a/components.json b/components.json
index f28dc5c..259ee89 100644
--- a/components.json
+++ b/components.json
@@ -10,8 +10,13 @@
"cssVariables": true,
"prefix": ""
},
+ "iconLibrary": "lucide",
"aliases": {
"components": "@/components",
- "utils": "@/lib/utils"
- }
+ "utils": "@/lib/utils",
+ "ui": "@/components/ui",
+ "lib": "@/lib",
+ "hooks": "@/hooks"
+ },
+ "registries": {}
}
diff --git a/electron/lib/utils.ts b/electron/lib/utils.ts
new file mode 100644
index 0000000..bd0c391
--- /dev/null
+++ b/electron/lib/utils.ts
@@ -0,0 +1,6 @@
+import { clsx, type ClassValue } from "clsx"
+import { twMerge } from "tailwind-merge"
+
+export function cn(...inputs: ClassValue[]) {
+ return twMerge(clsx(inputs))
+}
diff --git a/package-lock.json b/package-lock.json
index 76d2649..0ad3a39 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10909,6 +10909,7 @@
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz",
"integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==",
+ "license": "MIT",
"peerDependencies": {
"tailwindcss": ">=3.0.0 || insiders"
}
diff --git a/renderer/components/sidebar/settings-tab/index.tsx b/renderer/components/sidebar/settings-tab/index.tsx
index ba0fd20..2dd71cd 100644
--- a/renderer/components/sidebar/settings-tab/index.tsx
+++ b/renderer/components/sidebar/settings-tab/index.tsx
@@ -103,9 +103,9 @@ function SettingsTab({
}
};
- const upscaylVersion = navigator?.userAgent?.match(
- /Upscayl\/([\d\.]+\d+)/,
- )[1];
+ // const upscaylVersion = navigator?.userAgent?.match(
+ // /Upscayl\/([\d\.]+\d+)/,
+ // )[1];
function disableScrolling() {
if (timeoutId !== null) {
@@ -130,7 +130,7 @@ function SettingsTab({
return (
{
@@ -182,9 +182,12 @@ function SettingsTab({
saveImageAs={saveImageAs}
setExportType={setExportType}
/>
-
+
{/* COPY METADATA TOGGLE */}
-
+
{/* IMAGE SCALE */}
@@ -222,7 +225,7 @@ function SettingsTab({
{FEATURE_FLAGS.SHOW_UPSCAYL_CLOUD_INFO && (
<>