From 77ccbc34b15e9e54dbf0e7b38dd9a2a521c597be Mon Sep 17 00:00:00 2001 From: Eugene Volynko Date: Sun, 29 Dec 2024 05:46:24 +0200 Subject: [PATCH] v1.0.4 --- README.md | 64 +++++++++------------ package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/src/lib.rs | 2 +- src-tauri/tauri.conf.json | 7 ++- src/components/ColorCard/index.scss | 8 +++ src/components/ColorCard/index.tsx | 4 +- src/components/Stack/index.scss | 4 ++ src/components/Stack/index.tsx | 2 + src/components/Stack/props.ts | 1 + src/layouts/AppLayout/index.tsx | 22 +++++++- src/layouts/PickerLayout/index.scss | 18 +++--- src/layouts/PickerLayout/index.tsx | 50 ++++++++++++++--- src/pages/SettingsPage/index.tsx | 8 +-- src/types/settings.types.ts | 19 ++++--- src/utils/color.util.ts | 87 +++++++++++++++++++++++++++++ src/utils/copyVariants.util.ts | 56 +++++++++++++++---- 18 files changed, 267 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index c587191..8d76dea 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ ## Download -- macOS: dmg +- macOS: dmg - Windows: Coming soon... - Linux: Coming soon... @@ -35,49 +35,14 @@ ## Todo -### v1.0.4 - -- Fix: “PlainColor.app” is damaged and can’t be opened -- macOS permissions: Better user experience -- More quick copy options - - Common: - - ✅ #HEX/HEXA `#5C2D91` - - ✅ HEX/HEXA `5C2D91` - - ✅ RGB/RGBA `92, 45, 145` - - RGB/RGBA from 0 to 1 `0,36; 0,18; 0,57` - - CMYK % `37, 69, 0, 43` - - HSL/HSLA `268, 53, 37` - - HSB/HSV `268, 69, 57` - - WEB: - - ✅ 🌐 CSS RGB/RGBA - - 🌐 CSS HSL/HSLA - - 🌐 CSS Display P3 - - Native: - - 🖥️ NSColor RGB - - 🖥️ NSColor HSB - - 📱 UIColor RGB - - 📱 UIColor HSB - - 🐦‍⬛ SwiftUI Color HSB - - 🐦‍⬛ Swift Color Literal - - 🖥️ Obj-C NSColor Calibrated RGB - - 📱 Obj-C UIColor RGB - - 🌊 .NET RGB/ARGB - - ☕ Java RGB/RGBA - - 📱 Android RGB/ARGB -- Lense: Control zoom level with `+` and `-` keys -- Lense: Move picker with arrows (step = 1px) (make sure it cannot be out of screen bounds) - -### v1.0.5 - -- Lense: Press `C` to copy color instantly (what to copy? - need a setting for this) -- ColorCard: Checkboard background for alpha colors - ### Critical +- macOS permissions: Better user experience - Lense cannot be dragged on top of fullscreen windows - Lense is lagging when picking on another screen and virtual desktop - Optimize picker loop: Move `setInterval` to rust, FE invokes only event loop start and end - PlainColor process is active after app closed (?) +- ColorCard: Checkboard background for alpha colors ### Palette @@ -85,6 +50,11 @@ - Save color to palette - Manage palettes +### Lense + +- Move picker with arrows (step = 1px) (make sure it cannot be out of screen bounds) +- Press `C` to copy color instantly (what to copy? - need a setting for this) + ### Shortcuts (?) - Tray icon @@ -97,3 +67,21 @@ - Prepend one color (Use different color on every new release) - Prepend default palette (Apple colors) - Add updater +- More quick copy options + - Common: + - RGB/RGBA from 0 to 1 `0,36; 0,18; 0,57` + - HSB/HSV `268, 69, 57` + - WEB: + - 🌐 CSS Display P3 + - Native: + - 🖥️ NSColor RGB + - 🖥️ NSColor HSB + - 📱 UIColor RGB + - 📱 UIColor HSB + - 🐦‍⬛ SwiftUI Color HSB + - 🐦‍⬛ Swift Color Literal + - 🖥️ Obj-C NSColor Calibrated RGB + - 📱 Obj-C UIColor RGB + - 🌊 .NET RGB/ARGB + - ☕ Java RGB/RGBA + - 📱 Android RGB/ARGB diff --git a/package.json b/package.json index 5f85dbd..485c61b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "plain-color", "private": false, - "version": "1.0.3", + "version": "1.0.4", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 557d3ce..b6ca06a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "PlainColor" -version = "1.0.3" +version = "1.0.4" dependencies = [ "appkit-nsworkspace-bindings", "base64 0.22.1", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index c0cd807..e6f291f 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "PlainColor" -version = "1.0.3" +version = "1.0.4" description = "A Tauri App" authors = ["Eugene Volynko "] edition = "2021" diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index e00c2f1..6007456 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -159,7 +159,7 @@ fn fetch_preview(app: AppHandle, size: u32) { app.emit_to( EventTarget::labeled("picker"), "preview_fetched", - (img_base64, color), + (img_base64, color, size), ) .unwrap(); } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 465b2fe..4c6596d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "PlainColor", - "version": "1.0.3", + "version": "1.0.4", "identifier": "com.moduleart.plaincolor", "build": { "beforeDevCommand": "yarn dev", @@ -65,6 +65,9 @@ "bundle": { "active": true, "targets": "all", - "icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"] + "icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"], + "macOS": { + "signingIdentity": "-" + } } } diff --git a/src/components/ColorCard/index.scss b/src/components/ColorCard/index.scss index c4a6e97..b71b202 100644 --- a/src/components/ColorCard/index.scss +++ b/src/components/ColorCard/index.scss @@ -41,4 +41,12 @@ z-index: 1; margin: 0; } + + &__copy-variants { + margin: -0.25rem; + + & > * { + padding: 0.25rem; + } + } } diff --git a/src/components/ColorCard/index.tsx b/src/components/ColorCard/index.tsx index a52766a..7944585 100644 --- a/src/components/ColorCard/index.tsx +++ b/src/components/ColorCard/index.tsx @@ -94,11 +94,11 @@ export const ColorCard: FC = ({ - + {quickCopyVariants.map((copyVariant) => (