From 7e54a012374913beb2ac7fbc26a36d6038742ba3 Mon Sep 17 00:00:00 2001 From: Gigi Date: Wed, 8 Oct 2025 09:25:37 +0100 Subject: [PATCH] feat: add zap split preset buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added 4 preset buttons: Default, Generous, Selfless, and Boris 🧡 - Default: 50/2.1/50 (You: 49%, Author: 49%, Boris: 2%) - Generous: 5/10/75 (You: 6%, Author: 83%, Boris: 11%) - Selfless: 1/19/80 (You: 1%, Author: 80%, Boris: 19%) - Boris 🧡: 10/80/10 (You: 10%, Author: 10%, Boris: 80%) - One-click setup for common zap split configurations - Hover tooltips show actual percentage splits --- src/components/Settings/ZapSettings.tsx | 42 +++++++++++++++++++++++++ src/index.css | 30 ++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/src/components/Settings/ZapSettings.tsx b/src/components/Settings/ZapSettings.tsx index 4f6da63d..23df158d 100644 --- a/src/components/Settings/ZapSettings.tsx +++ b/src/components/Settings/ZapSettings.tsx @@ -17,10 +17,52 @@ const ZapSettings: React.FC = ({ settings, onUpdate }) => { const borisPercentage = totalWeight > 0 ? (borisWeight / totalWeight) * 100 : 0 const authorPercentage = totalWeight > 0 ? (authorWeight / totalWeight) * 100 : 0 + const applyPreset = (preset: { highlighter: number; boris: number; author: number }) => { + onUpdate({ + zapSplitHighlighterWeight: preset.highlighter, + zapSplitBorisWeight: preset.boris, + zapSplitAuthorWeight: preset.author, + }) + } + return (

Zap Splits

+
+ +
+ + + + +
+
+
diff --git a/src/index.css b/src/index.css index 6094a8b6..58199fad 100644 --- a/src/index.css +++ b/src/index.css @@ -2088,6 +2088,36 @@ body { text-align: left; } +.zap-preset-buttons { + display: flex; + gap: 0.5rem; + flex-wrap: wrap; +} + +.zap-preset-btn { + padding: 0.5rem 1rem; + background: #2a2a2a; + border: 1px solid #444; + border-radius: 6px; + color: #ccc; + font-size: 0.9rem; + cursor: pointer; + transition: all 0.2s; + flex: 1; + min-width: 80px; +} + +.zap-preset-btn:hover { + background: #333; + border-color: #646cff; + color: white; + transform: translateY(-1px); +} + +.zap-preset-btn:active { + transform: translateY(0); +} + .settings-footer { display: flex; justify-content: flex-start;