Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

feat(settings): grouped, minimal settings for both docks; quieter edge bar intro

Deepender25c33ff70771c7
diff --git a/src/components/Panel.tsx b/src/components/Panel.tsx
index 4e49e95..3074861 100644
--- a/src/components/Panel.tsx
+++ b/src/components/Panel.tsx
@@ -8,7 +8,7 @@
* the reverse: the content dims first and the shape draws back into the bar.
*/
import { motion, AnimatePresence } from 'framer-motion'
-import { useEffect, useRef, useState, useMemo } from 'react'
+import { useEffect, useLayoutEffect, useRef, useState, useMemo } from 'react'
import { useStore } from '../store/appStore'
import { PANEL_LEAVE_EVENT, PANEL_ENTER_EVENT } from '../hooks/useEdgeHover'
import { Header } from './Header'
@@ -38,6 +38,18 @@ import { useTranslation } from '../i18n'
// a pixel of travel is left. Dismissal is quicker than presentation.
const SHELF_OPEN_MOTION =
'clip-path 285ms linear(0, 0.055 3.5%, 0.149 8.5%, 0.414 21.8%, 0.524 27.8%, 0.614 33.3%, 0.693 38.8%, 0.759 44.3%, 0.817 50%, 0.866 56%, 0.907 62.5%, 0.941 69.8%, 0.969 78.3%, 0.989 88.5%, 1)'
+/** Launch intro of the edge bar: appears a little wider and longer as a dark
+ * pill, then settles into the slim black bar (see the beacon in Panel). */
+const EDGE_INTRO_MS = 1300
+/** The edge bar's ends taper over 24px of its length (the blade's corner
+ * size) across its full thickness, so it reads as a soft pill, not a box.
+ * The closed clip-path in Panel uses the same shape, so the intro lands on it
+ * exactly. */
+const EDGE_BAR_RADIUS = {
+ left: '0 100% 100% 0 / 0 24px 24px 0',
+ right: '100% 0 0 100% / 24px 0 0 24px',
+ top: '0 0 24px 24px / 0 0 100% 100%'
+}
const SHELF_CLOSE_MOTION =
'clip-path 289ms linear(0, 0.021 1.8%, 0.058 3.8%, 0.116 6.3%, 0.23 10.5%, 0.402 16.8%, 0.503 20.8%, 0.586 24.5%, 0.659 28.2%, 0.725 32.3%, 0.782 36.5%, 0.832 41%, 0.874 46%, 0.911 51.7%, 0.941 58.5%, 0.965 66.8%, 0.982 77.5%, 0.994 93.8%, 1)'
@@ -68,13 +80,35 @@ export function Panel() {
useEffect(() => {
setMounted(true)
- // Graceful startup fade-in intro for the trigger bar on launch
+ // Launch intro: the edge bar settles into place (EDGE_INTRO_MS), then the
+ // intro hands over to the real bar underneath.
const timer = window.setTimeout(() => {
setStartupBeacon(false)
- }, 2200)
+ }, EDGE_INTRO_MS + 250)
return () => window.clearTimeout(timer)
}, [])
+ // The edge bar is the closed panel clipped to a thin strip, so an intro that
+ // is briefly wider than that strip is drawn outside the panel, over the
+ // panel's own box (measured here), with the same strip insets.
+ const containerRef = useRef<HTMLDivElement>(null)
+ const showEdgeHint = !!edgeHintActive && (settings.showEdgeLocationHint ?? false)
+ const showEdgeBeacon = !open && (startupBeacon || showEdgeHint)
+ const [beaconFrame, setBeaconFrame] = useState<{ left: number; top: number; width: number; height: number } | null>(null)
+ useLayoutEffect(() => {
+ if (!showEdgeBeacon || !containerRef.current) return
+ const r = containerRef.current.getBoundingClientRect()
+ setBeaconFrame({ left: r.left, top: r.top, width: r.width, height: r.height })
+ }, [
+ showEdgeBeacon,
+ settings.stickPosition,
+ settings.panelHeight,
+ settings.verticalOffset,
+ settings.horizontalOffset,
+ settings.hotZoneHeight,
+ settings.triggerAlignment
+ ])
+
useEffect(() => {
if (!open) {
// Delay resetting view state until after the retraction spring finishes (~350ms),
@@ -349,22 +383,95 @@ export function Panel() {
if (isRight) {
clipPath = isVisuallyOpen
? 'inset(-30px 0px -30px 0px round 24px 0px 0px 24px)'
- : `inset(${insetTop} 0px ${insetBottom} calc(100% - ${hotWidth}px) round 24px 0px 0px 24px)`
+ : `inset(${insetTop} 0px ${insetBottom} calc(100% - ${hotWidth}px) round ${hotWidth}px 0px 0px ${hotWidth}px / 24px 0px 0px 24px)`
} else if (isTop) {
clipPath = isVisuallyOpen
? 'inset(0px -30px 0px -30px round 0px 0px 24px 24px)'
- : `inset(0px ${insetRight} calc(100% - ${hotWidth}px) ${insetLeft} round 0px 0px 24px 24px)`
+ : `inset(0px ${insetRight} calc(100% - ${hotWidth}px) ${insetLeft} round 0px 0px 24px 24px / 0px 0px ${hotWidth}px ${hotWidth}px)`
} else {
clipPath = isVisuallyOpen
? 'inset(-30px 0px -30px 0px round 0px 24px 24px 0px)'
- : `inset(${insetTop} calc(100% - ${hotWidth}px) ${insetBottom} 0px round 0px 24px 24px 0px)`
+ : `inset(${insetTop} calc(100% - ${hotWidth}px) ${insetBottom} 0px round 0px ${hotWidth}px ${hotWidth}px 0px / 0px 24px 24px 0px)`
}
containerStyle.clipPath = clipPath
+ // Edge bar intro (launch) and location hint. Not a light: the bar itself,
+ // drawn as a dark pill with the cards' faint edge highlight, a little wider
+ // and longer than the bar, settling into the slim black bar it lands on
+ // exactly (same insets, same black), so the hand-over is invisible. The
+ // hint is the same shape as a short swell.
+ const beaconThick = isHorizontal ? 'height' : 'width'
+ const beaconLong = isHorizontal ? 'width' : 'height'
+ const beaconWide = hotWidth + 6
+ const edgeLight = (a: number) => `inset 0 0 0 1px rgba(255, 255, 255, ${a})`
+ // Launch: the bar swells out of itself (solid all along, so the bar under
+ // it never shows through), holds a beat, then glides back to slim.
+ const beaconMotion = startupBeacon
+ ? {
+ animate: {
+ [beaconThick]: reduceMotion ? hotWidth : [hotWidth, beaconWide, beaconWide, hotWidth],
+ [beaconLong]: reduceMotion ? '100%' : ['100%', '114%', '114%', '100%'],
+ opacity: 1,
+ backgroundColor: ['#000000', '#2c2c2c', '#2c2c2c', '#000000'],
+ boxShadow: [edgeLight(0), edgeLight(0.18), edgeLight(0.18), edgeLight(0)]
+ },
+ transition: {
+ duration: EDGE_INTRO_MS / 1000,
+ times: [0, 0.22, 0.38, 1],
+ ease: [[0.22, 1, 0.36, 1], 'linear', [0.22, 1, 0.36, 1]]
+ }
+ }
+ : {
+ animate: {
+ [beaconThick]: reduceMotion ? hotWidth : [hotWidth, hotWidth + 4, hotWidth],
+ [beaconLong]: reduceMotion ? '100%' : ['100%', '106%', '100%'],
+ opacity: 1,
+ backgroundColor: ['#000000', '#2c2c2c', '#000000'],
+ boxShadow: [edgeLight(0), edgeLight(0.16), edgeLight(0)]
+ },
+ transition: { duration: 0.45, ease: 'easeInOut' }
+ }
+
return (
<div className="root">
<CopyIndicatorCurve />
+ <AnimatePresence>
+ {showEdgeBeacon && beaconFrame && (
+ <motion.div
+ key="edge-beacon"
+ initial={{ opacity: 1 }}
+ exit={{ opacity: 0, transition: { duration: 0.12 } }}
+ style={{ position: 'absolute', ...beaconFrame, pointerEvents: 'none', zIndex: 11 }}
+ >
+ <div
+ style={
+ isHorizontal
+ ? { position: 'absolute', left: insetLeft, right: insetRight, top: 0, height: hotWidth }
+ : { position: 'absolute', top: insetTop, bottom: insetBottom, [isRight ? 'right' : 'left']: 0, width: hotWidth }
+ }
+ >
+ <motion.div
+ key={startupBeacon ? 'intro' : 'hint'}
+ data-edge-beacon=""
+ {...beaconMotion}
+ style={
+ isHorizontal
+ ? { position: 'absolute', top: 0, left: '50%', x: '-50%', borderRadius: EDGE_BAR_RADIUS.top }
+ : {
+ position: 'absolute',
+ top: '50%',
+ [isRight ? 'right' : 'left']: 0,
+ y: '-50%',
+ borderRadius: isRight ? EDGE_BAR_RADIUS.right : EDGE_BAR_RADIUS.left
+ }
+ }
+ />
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
<div
+ ref={containerRef}
className={containerClass}
onDragEnter={onDragEnter}
onDragOver={onDragOver}
@@ -373,50 +480,6 @@ export function Panel() {
style={containerStyle}
>
- {/* Edge Trigger Bar & Location Hint Beacon (Startup fade-in intro + pulse on wrong-position touch) */}
- <AnimatePresence>
- {!open && (startupBeacon || (edgeHintActive && (settings.showEdgeLocationHint ?? false))) && (
- <motion.div
- key="edge-location-beacon"
- initial={{ opacity: 0 }}
- animate={{ opacity: startupBeacon ? 0.8 : 0.5 }}
- exit={{ opacity: 0 }}
- transition={{
- duration: reduceMotion ? 0.01 : startupBeacon ? 0.5 : 0.18,
- ease: [0.16, 1, 0.3, 1]
- }}
- style={
- isHorizontal
- ? {
- position: 'absolute',
- left: insetLeft,
- right: insetRight,
- top: 0,
- height: 2,
- boxSizing: 'border-box',
- background: 'linear-gradient(to right, transparent, rgba(255, 255, 255, 0.75) 20%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.75) 80%, transparent)',
- boxShadow: '0 0 8px rgba(255, 255, 255, 0.4)',
- borderRadius: '999px',
- pointerEvents: 'none',
- zIndex: 99
- }
- : {
- position: 'absolute',
- top: insetTop,
- bottom: insetBottom,
- [isRight ? 'right' : 'left']: 0,
- width: 2,
- boxSizing: 'border-box',
- background: 'linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.75) 20%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.75) 80%, transparent)',
- boxShadow: '0 0 8px rgba(255, 255, 255, 0.4)',
- borderRadius: isRight ? '999px 0 0 999px' : '0 999px 999px 0',
- pointerEvents: 'none',
- zIndex: 99
- }
- }
- />
- )}
- </AnimatePresence>
{isTop && (
<>
<div className="flare-horizontal flare-top-left" style={{ opacity: isVisuallyOpen ? 1 : 0 }}>
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index f8cb8ef..a4ca3c4 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useState, useRef, useLayoutEffect } from 'react'
+import { useEffect, useState, useRef, useLayoutEffect, type ReactNode } from 'react'
import { motion, AnimatePresence } from 'framer-motion'
import { useStore } from '../store/appStore'
import type { DisplayInfo, UpdateMode } from '../../shared/types'
@@ -15,7 +15,18 @@ import {
CopyIndicatorIcon,
SparkleIndicatorIcon
} from './CopyIndicatorCurve'
-import { ChevronRightIcon, CloseIcon, LogOutIcon, StarIcon, InfoIcon, GithubOctocatLogo, MicrosoftStoreLogo } from './icons'
+import {
+ ArrowsClockwiseIcon,
+ ChevronDownIcon,
+ ChevronRightIcon,
+ CloseIcon,
+ GithubOctocatLogo,
+ GlobeIcon,
+ HeartIcon,
+ InfoIcon,
+ LogOutIcon,
+ MicrosoftStoreLogo
+} from './icons'
import { HotkeyRecorder } from './HotkeyRecorder'
import { SlideCommit } from './SlideCommit'
import { WakeSlider } from './WakeSlider'
@@ -157,86 +168,58 @@ export function Settings({
patch({ hoverOpenDelay: normalizeHoverOpenDelay(rawVal) })
}
- const renderHoverDelayCard = (layout: 'shelf' | 'stack') => {
- const isShelf = layout === 'shelf'
- return (
- <div
- className={isShelf ? 'settings-shelf-card hover-delay-card behaviour-col' : 'setting-card'}
- style={{ opacity: hoverOn ? 1 : 0.45, transition: 'opacity 0.2s ease' }}
- >
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.hoverDelay') || 'HOVER DELAY'}</div>
- <div className="setting-slider-header" style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }}>
- <div>
- <div className="setting-title">{t('behaviour.hoverDelayTitle') || 'Open Delay'}</div>
- <div className="setting-desc">
- {hoverOn ? (t('behaviour.hoverDelayDesc') || 'Wait this long at the edge before the shelf slides open') : t('behaviour.disabledHoverOff')}
- </div>
- </div>
- <div
- className="setting-slider-val"
- style={isShelf ? { flexShrink: 0, padding: '2px 8px', fontSize: 11, fontWeight: 600, borderRadius: 6 } : { flexShrink: 0 }}
- >
- {formatHoverDelay(hoverDelay)}
- </div>
- </div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-slider-wrap" style={isShelf ? { gap: 4, padding: '2px 0' } : undefined}>
- <WakeSlider
- ariaLabel={t('behaviour.hoverDelayTitle') || 'Open Delay'}
- min={HOVER_OPEN_DELAY_MIN}
- max={HOVER_OPEN_DELAY_MAX}
- step={HOVER_OPEN_DELAY_STEP}
- bars={28}
- height={28}
- restHeight={8}
- gap={3}
- value={hoverDelay}
+ /** Open delay: the wave slider plus Instant / 500 ms / 1000 ms presets. */
+ const renderHoverDelayControl = () => (
+ <div className="setting-slider-wrap">
+ <WakeSlider
+ ariaLabel={t('behaviour.hoverDelayTitle') || 'Open Delay'}
+ min={HOVER_OPEN_DELAY_MIN}
+ max={HOVER_OPEN_DELAY_MAX}
+ step={HOVER_OPEN_DELAY_STEP}
+ bars={28}
+ height={isHorizontal ? 22 : 28}
+ restHeight={isHorizontal ? 6 : 8}
+ gap={3}
+ value={hoverDelay}
+ disabled={!hoverOn}
+ onStart={() => {
+ void window.edge.setInteractive(true)
+ setSliderActive(true)
+ }}
+ onRelease={(val) => {
+ handleHoverDelayRelease(val)
+ }}
+ onChange={(val) => {
+ handleHoverDelayInput(val)
+ }}
+ />
+ <div className="setting-slider-labels">
+ {[HOVER_OPEN_DELAY_MIN, 500, HOVER_OPEN_DELAY_MAX].map((ms) => {
+ const active = hoverDelay === ms
+ return (
+ <button
+ key={ms}
+ type="button"
disabled={!hoverOn}
- onStart={() => {
- void window.edge.setInteractive(true)
- setSliderActive(true)
- }}
- onRelease={(val) => {
- handleHoverDelayRelease(val)
- }}
- onChange={(val) => {
- handleHoverDelayInput(val)
+ className={`slider-label-btn${active ? ' active' : ''}`}
+ onClick={() => {
+ if (hoverOn && !active) {
+ playDialTickSound()
+ patch({ hoverOpenDelay: ms })
+ }
}}
- />
- <div className="setting-slider-labels" style={isShelf ? { marginTop: 2 } : undefined}>
- {[HOVER_OPEN_DELAY_MIN, 500, HOVER_OPEN_DELAY_MAX].map((ms) => {
- const active = hoverDelay === ms
- return (
- <button
- key={ms}
- type="button"
- disabled={!hoverOn}
- className={`slider-label-btn${active ? ' active' : ''}`}
- style={isShelf ? { fontSize: 10, padding: '2px 8px' } : undefined}
- onClick={() => {
- if (hoverOn && !active) {
- playDialTickSound()
- patch({ hoverOpenDelay: ms })
- }
- }}
- >
- {formatHoverDelay(ms)}
- </button>
- )
- })}
- </div>
- </div>
- </div>
+ >
+ {formatHoverDelay(ms)}
+ </button>
+ )
+ })}
</div>
- )
- }
+ </div>
+ )
const [localInlineOpen, setLocalInlineOpen] = useState(false)
const isTutorial = inlineIndicatorStyle || (typeof window !== 'undefined' && window.location.hash.includes('onboarding'))
const isFlyoutActive = isTutorial ? localInlineOpen : styleFlyoutOpen
- const indicatorBtnRef = useRef<HTMLButtonElement | null>(null)
const handleToggleFlyout = (anchorEl?: HTMLElement | null) => {
if (isTutorial) {
@@ -355,119 +338,85 @@ export function Settings({
isDownloading ||
hasBackgroundUpdate
)
- const updateBannerRef = useRef<HTMLDivElement | null>(null)
- // ── Persistent footer shared across all tabs ───────────────────────────
- const PersistentFooter = (
+ // ── After the settings: two cards, each with one job ──────────────────────
+ // Community & Support (why, then Ko-fi / GitHub) and About Edge-Drop
+ // (version, feedback, quit). They end every tab: in the top dock they scroll
+ // in after the last group instead of staying pinned.
+ // (What's New lives on the header's (i) button.)
+ const renderClosingCards = () => (
<>
- {/* Community & Support */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('footer.communityAndSupport') || 'COMMUNITY & SUPPORT'}</span>
- </div>
-
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.feedback') || 'FEEDBACK'}</div>
- <div className="setting-title">{t('footer.feedbackTitle')}</div>
- <div className="setting-desc">{t('footer.feedbackDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
+ <section className={`settings-support${isHorizontal ? ' is-h' : ''}`} data-card="support">
+ <h3 className="set-group-label">{t('footer.communityAndSupport') || 'COMMUNITY & SUPPORT'}</h3>
+ <div className="settings-support-tagline">{t('footer.supportTagline') || '100% free & open-source clipboard'}</div>
+ <div className="settings-support-actions">
<button
- className="pill display-pill"
- style={{ width: '100%', justifyContent: 'center', padding: '7px 14px', cursor: 'pointer', whiteSpace: 'nowrap', fontSize: '12.5px' }}
+ type="button"
+ className="settings-support-btn is-primary kofi-support-btn"
onClick={() => {
playButtonClickSound()
- window.open('https://github.com/Deepender25/Edge-Drop/issues/new/choose', '_blank')
+ window.open('https://www.edgedrop.app/supportedgedrop', '_blank')
}}
>
- {t('footer.submitFeedback')}
+ <HeartIcon width={13} height={13} />
+ <span>{t('footer.supportOnKofi')}</span>
</button>
- </div>
- </div>
-
- {/* Support & GitHub Promo Card */}
- <div className="setting-card" style={{ padding: '14px' }}>
- <div className="support-promo" style={{ margin: 0, padding: 0, background: 'transparent', border: 'none' }}>
- <div className="support-promo-title">
- {t('footer.supportPromo')}
- </div>
- <div className="support-buttons-group">
- {/* Primary Action: Support via Ko-fi / UPI */}
+ {isStoreBuild ? (
<button
- className="kofi-support-btn"
+ type="button"
+ className="settings-support-btn store-review-promo-btn"
onClick={() => {
playButtonClickSound()
- window.open('https://www.edgedrop.app/supportedgedrop', '_blank')
+ window.open('ms-windows-store://review/?ProductId=9P3JMHN9M4NR', '_blank')
}}
>
- <svg width="14" height="14" viewBox="0 0 24 24" fill="#ff4757" stroke="none" style={{ flexShrink: 0 }}>
- <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
- </svg>
- <span>{t('footer.supportOnKofi')}</span>
+ <MicrosoftStoreLogo width={13} height={13} className="store-logo-icon" />
+ <span>{t('footer.reviewOnStore')}</span>
</button>
-
- {/* Secondary Action: GitHub Star on GitHub builds / Review on Microsoft Store for Store builds */}
- {isStoreBuild ? (
- <button
- type="button"
- className="store-review-promo-btn"
- onClick={() => {
- playButtonClickSound()
- window.open('ms-windows-store://review/?ProductId=9P3JMHN9M4NR', '_blank')
- }}
- >
- <MicrosoftStoreLogo width={14} height={14} className="store-logo-icon" />
- <span>{t('footer.reviewOnStore')}</span>
- </button>
- ) : (
- <button
- type="button"
- className="github-promo-btn"
- onClick={() => {
- playButtonClickSound()
- window.open('https://github.com/Deepender25/Edge-Drop', '_blank')
- }}
- >
- <GithubOctocatLogo width={14} height={14} className="github-octocat-icon" />
- <span>{t('footer.starOnGithub')}</span>
- <StarIcon width={13} height={13} className="star-icon" weight="fill" fill="#fbbf24" style={{ marginLeft: 2 }} />
- </button>
- )}
- </div>
- <div className="app-version-footer">
- <span>{t('footer.version')} {currentVersion || '0.3.1'}</span>
- <span className="version-separator">·</span>
+ ) : (
<button
type="button"
- className="version-changelog-link"
+ className="settings-support-btn github-promo-btn"
onClick={() => {
playButtonClickSound()
- if (currentVersion) {
- patch({ lastSeenChangelogVersion: currentVersion })
- }
- window.open('https://www.edgedrop.app/changelog', '_blank')
+ window.open('https://github.com/Deepender25/Edge-Drop', '_blank')
}}
>
- <span>{t('header.whatsNew')}</span>
- <span style={{ fontSize: 10, opacity: 0.7 }}>↗</span>
+ <GithubOctocatLogo width={13} height={13} className="github-octocat-icon" />
+ <span>{t('footer.starOnGithub')}</span>
</button>
- </div>
+ )}
</div>
- </div>
+ </section>
- {/* Subtle Bottom Quit Button */}
- <div style={{ display: 'flex', justifyContent: 'center', marginTop: 12, marginBottom: 8 }}>
- <button
- className="subtle-quit-btn"
- onClick={() => {
- playButtonClickSound()
- void window.edge.quitApp()
- }}
- >
- <LogOutIcon width={13} height={13} />
- <span>{t('tray.quit')}</span>
- </button>
- </div>
+ <section className={`settings-support settings-about${isHorizontal ? ' is-h' : ''}`} data-card="about">
+ <h3 className="set-group-label">{t('groups.aboutEdgeDrop') || 'ABOUT EDGE-DROP'}</h3>
+ <div className="settings-about-title">Edge-Drop {currentVersion || '0.3.1'}</div>
+ <div className="settings-support-tagline">{t('footer.feedbackDesc')}</div>
+ <div className="settings-support-actions">
+ <button
+ type="button"
+ className="settings-support-btn"
+ onClick={() => {
+ playButtonClickSound()
+ window.open('https://github.com/Deepender25/Edge-Drop/issues/new/choose', '_blank')
+ }}
+ >
+ <span>{t('footer.submitFeedback')}</span>
+ </button>
+ <button
+ type="button"
+ className="settings-support-link subtle-quit-btn"
+ onClick={() => {
+ playButtonClickSound()
+ void window.edge.quitApp()
+ }}
+ >
+ <LogOutIcon width={12} height={12} />
+ <span>{t('tray.quit')}</span>
+ </button>
+ </div>
+ </section>
</>
)
@@ -772,100 +721,651 @@ export function Settings({
return null
}
- // ── Manual update card renderer (idle/check states at the bottom) ──
- const renderManualUpdateCard = (withRef = false) => {
- // Hidden while the promoted top card shows an actionable state — the
- // top card already carries Download/Skip/Restart/progress, so rendering
- // both would duplicate the prompt. The idle branch below IS the Check
- // button, which is exactly what belongs at the bottom.
+ // ── Update check: a row in the Updates group ─────────────────────────────
+ // Hidden while the promoted top card shows an actionable state (it already
+ // carries Download / Skip / Restart / progress).
+ const renderUpdateCheckRow = (): RowSpec | null => {
if (isStoreBuild || hasPromotedTopUpdate) return null
- return (
- <div className="manual-update-section" ref={withRef ? updateBannerRef : undefined} style={{ width: '100%' }}>
- <div className="manual-update-card">
- {checkState.status === 'checking' ? (
- <>
- <div className="manual-update-info">
- <div className="manual-update-title">{t('behaviour.checkForUpdates')}</div>
- <div className="manual-update-desc">{t('behaviour.checkingForUpdates')}</div>
- </div>
- <button
- type="button"
- className="manual-update-pill outline"
- disabled
- >
- <span className="update-dot checking" />
- <span>{t('behaviour.checkingForUpdates')}</span>
- </button>
- </>
- ) : checkState.status === 'up-to-date' ? (
- <>
- <div className="manual-update-info">
- <div className="manual-update-title">
- <span className="update-dot available" />
- <span>{t('behaviour.isUpToDate')}</span>
+ const status = checkState.status
+ const buttonLabel =
+ status === 'checking'
+ ? t('behaviour.checkingForUpdates')
+ : status === 'up-to-date'
+ ? t('behaviour.checkAgain')
+ : status === 'error'
+ ? t('behaviour.tryAgain')
+ : t('behaviour.checkForUpdates')
+ const version = `${t('footer.version')} ${currentVersion || '0.3.1'}`
+ // The title stays put; only the line under it reports the state.
+ return {
+ id: 'update-check',
+ title: t('behaviour.checkForUpdates'),
+ desc:
+ status === 'checking'
+ ? t('behaviour.checkingForUpdates')
+ : status === 'up-to-date'
+ ? (
+ <>
+ {t('behaviour.isUpToDate')}
+ <br />
+ {version}
+ </>
+ )
+ : status === 'error'
+ ? (checkState.error || t('behaviour.updateCheckFailed'))
+ : version,
+ descError: status === 'error',
+ trailing: (
+ <button
+ type="button"
+ className={`set-row-icon-btn${status === 'checking' ? ' is-busy' : ''}`}
+ title={buttonLabel}
+ aria-label={buttonLabel}
+ disabled={status === 'checking'}
+ onClick={() => {
+ playButtonClickSound()
+ handleManualCheck()
+ }}
+ >
+ <ArrowsClockwiseIcon width={14} height={14} />
+ </button>
+ )
+ }
+ }
+
+ // ── Building blocks shared by both layouts ────────────────────────────────
+ const pills = <T extends string | number>(
+ options: { label: string; val: T }[],
+ isActive: (val: T) => boolean,
+ onPick: (val: T) => void
+ ) => (
+ <div className="setting-pills">
+ {options.map((opt) => (
+ <button
+ key={String(opt.val)}
+ type="button"
+ className={`pill ${isActive(opt.val) ? 'active' : ''}`}
+ onClick={() => {
+ playButtonClickSound()
+ onPick(opt.val)
+ }}
+ >
+ {opt.label}
+ </button>
+ ))}
+ </div>
+ )
+
+ const offsetIsHorizontal = settings.stickPosition === 'top'
+ const offsetVal = offsetIsHorizontal ? (settings.horizontalOffset ?? 0.5) : (settings.verticalOffset ?? 0.5)
+ const thicknessPx = settings.hotZoneWidth ?? 3
+ const indicatorOn = settings.showCopyIndicator ?? true
+
+ const placementPill = (edge: 'left' | 'top' | 'right', label: string) => (
+ <button
+ type="button"
+ className={`pill ${(edgeTransition?.active ? edgeTransition.to === edge : settings.stickPosition === edge) ? 'active' : ''} ${edgeTransition?.active && edgeTransition.to === edge ? 'transitioning' : ''}`}
+ disabled={edgeTransition?.active}
+ onClick={() => {
+ void startEdgeTransition(edge)
+ }}
+ >
+ {label}
+ </button>
+ )
+
+ const languageControl = isHorizontal ? (
+ <button
+ type="button"
+ className={`language-shelf-btn language-toggle-btn ${languageFlyoutOpen ? 'flyout-open' : ''}`}
+ onClick={(e) => {
+ playButtonClickSound()
+ const rect = e.currentTarget.getBoundingClientRect()
+ setLanguageFlyoutOpen(!languageFlyoutOpen, rect)
+ }}
+ >
+ <span className="language-shelf-label">
+ <GlobeIcon width={13} height={13} />
+ <span>{getLangLabel(selectedLang)}</span>
+ </span>
+ <motion.span
+ animate={{ rotate: languageFlyoutOpen ? 180 : 0 }}
+ transition={{ duration: 0.2 }}
+ style={{ display: 'flex', alignItems: 'center', opacity: 0.65, flexShrink: 0, marginLeft: 6 }}
+ >
+ <ChevronDownIcon width={12} height={12} />
+ </motion.span>
+ </button>
+ ) : (
+ <LanguageDropdown />
+ )
+
+ /** Onboarding only: the four indicator styles inline, instead of the flyout. */
+ const tutorialIndicatorGrid = isTutorial && localInlineOpen && (
+ <motion.div
+ initial={{ opacity: 0, height: 0 }}
+ animate={{ opacity: 1, height: 'auto' }}
+ exit={{ opacity: 0, height: 0 }}
+ transition={{ duration: 0.22, ease: 'easeOut' }}
+ style={{ overflow: 'hidden', marginTop: 10 }}
+ >
+ <div className="tutorial-indicator-grid">
+ {([
+ { id: 'logo', Icon: LogoIndicatorIcon, label: t('appearance.logoStyle') },
+ { id: 'check', Icon: TickIndicatorIcon, label: t('appearance.tickStyle') },
+ { id: 'copy', Icon: CopyIndicatorIcon, label: t('appearance.copyStyle') },
+ { id: 'sparkle', Icon: SparkleIndicatorIcon, label: t('appearance.sparkleStyle') }
+ ] as const).map(({ id, Icon, label }) => (
+ <div
+ key={id}
+ className={`tutorial-indicator-option${(settings.copyIndicatorStyle || 'logo') === id ? ' active' : ''}`}
+ onClick={() => {
+ playButtonClickSound()
+ patch({ copyIndicatorStyle: id })
+ }}
+ >
+ <div className="tutorial-indicator-art">
+ <Icon fillColor="#ffffff" size={30} />
+ </div>
+ <div className="tutorial-indicator-label">{label}</div>
+ </div>
+ ))}
+ </div>
+ </motion.div>
+ )
+
+ // ── Every setting, grouped by task ─────────────────────────────────────────
+ // One definition for both layouts. A few rows only make sense on a side dock
+ // (sliding along a vertical edge, the trigger's spot, panel height, text
+ // size); the top dock leaves them out.
+ const groupsFor = (tab: SettingsTab): GroupSpec[] => {
+ if (tab === 'behaviour') {
+ const updateCheck = renderUpdateCheckRow()
+ return [
+ {
+ id: 'general',
+ label: t('tabs.generalStartup') || 'GENERAL & STARTUP',
+ rows: [
+ {
+ id: 'language',
+ title: t('behaviour.languageTitle'),
+ desc: isHorizontal ? (t('groups.languageSelectDesc') || 'Select application display language') : t('behaviour.languageDesc'),
+ below: languageControl
+ },
+ {
+ id: 'launch-at-login',
+ title: t('behaviour.launchAtLoginTitle'),
+ desc: t('behaviour.launchAtLoginDesc'),
+ trailing: (
+ <Toggle
+ checked={settings.launchAtLogin}
+ onChange={(v) => {
+ useStore.setState((s) => ({
+ settings: { ...s.settings, launchAtLogin: v }
+ }))
+ void patch({ launchAtLogin: v })
+ }}
+ />
+ )
+ },
+ {
+ id: 'incognito',
+ title: t('behaviour.incognitoTitle'),
+ desc: t('behaviour.incognitoDesc'),
+ trailing: <Toggle checked={settings.incognito} onChange={(v) => patch({ incognito: v })} />
+ }
+ ]
+ },
+ {
+ id: 'opening',
+ label: t('tabs.activationShortcuts') || 'SHORTCUTS & HOVER',
+ rows: [
+ {
+ id: 'hover-activation',
+ title: t('behaviour.hoverActivationTitle'),
+ desc: hoverOn
+ ? t('behaviour.hoverActivationDescOn')
+ : t('behaviour.hoverActivationDescOff', { shortcut: settings.toggleHotkey || 'Alt+C' }),
+ trailing: (
+ <Toggle
+ checked={hoverOn}
+ onChange={(v) => {
+ if (!v) {
+ patch({ hoverActivation: false, suppressInFullscreen: false })
+ } else {
+ patch({ hoverActivation: true, suppressInFullscreen: true })
+ }
+ }}
+ />
+ )
+ },
+ {
+ id: 'fullscreen',
+ title: t('behaviour.fullscreenProtectionTitle'),
+ desc: hoverOn ? t('behaviour.fullscreenProtectionDesc') : t('behaviour.disabledHoverOff'),
+ disabled: !hoverOn,
+ trailing: (
+ <Toggle
+ checked={hoverOn ? settings.suppressInFullscreen : false}
+ onChange={(v) => hoverOn && patch({ suppressInFullscreen: v })}
+ disabled={!hoverOn}
+ />
+ )
+ },
+ {
+ id: 'hover-delay',
+ title: t('behaviour.hoverDelayTitle') || 'Open Delay',
+ desc: hoverOn ? (t('behaviour.hoverDelayDesc') || 'Wait this long at the edge before the shelf slides open') : t('behaviour.disabledHoverOff'),
+ disabled: !hoverOn,
+ trailing: <span className="set-row-badge">{formatHoverDelay(hoverDelay)}</span>,
+ below: renderHoverDelayControl(),
+ size: 'slider'
+ },
+ {
+ id: 'shortcut',
+ title: t('behaviour.toggleHotkeyTitle'),
+ desc: isHorizontal ? (t('groups.toggleHotkeyPressDesc') || t('behaviour.toggleHotkeyDesc')) : t('behaviour.toggleHotkeyDesc'),
+ below: (
+ <HotkeyRecorder
+ hotkey={settings.toggleHotkey || 'Alt+C'}
+ onChange={(nextHotkey) => {
+ patch({ toggleHotkey: nextHotkey })
+ pushToast({
+ id: Date.now().toString(),
+ message: t('toast.shortcutUpdated', { shortcut: nextHotkey }),
+ tone: 'info'
+ })
+ }}
+ />
+ )
+ }
+ ]
+ },
+ {
+ id: 'clipboard',
+ label: t('tabs.clipboardRules') || 'CLIPBOARD RULES',
+ rows: [
+ {
+ id: 'move-to-top',
+ title: t('behaviour.movePastedToTopTitle'),
+ desc: t('behaviour.movePastedToTopDesc'),
+ trailing: <Toggle checked={settings.movePastedToTop ?? true} onChange={(v) => patch({ movePastedToTop: v })} />
+ },
+ {
+ id: 'clear-on-restart',
+ title: t('behaviour.clearUnpinnedTitle'),
+ desc: t('behaviour.clearUnpinnedDesc'),
+ trailing: <Toggle checked={settings.clearUnpinnedOnRestart} onChange={(v) => patch({ clearUnpinnedOnRestart: v })} />
+ },
+ {
+ id: 'capacity',
+ title: t('behaviour.capacityTitle'),
+ desc: t('behaviour.capacityDesc'),
+ below: pills(
+ [{ label: '100', val: 100 }, { label: '250', val: 250 }, { label: '500', val: 500 }, { label: '1000', val: 1000 }],
+ (v) => settings.historyLimit === v,
+ (v) => patch({ historyLimit: v })
+ )
+ },
+ {
+ id: 'auto-delete',
+ title: t('behaviour.autoDeleteTitle'),
+ desc: t('behaviour.autoDeleteDesc'),
+ below: pills(
+ [
+ { label: t('behaviour.never'), val: 0 },
+ { label: '1h', val: 1 },
+ { label: '6h', val: 6 },
+ { label: '24h', val: 24 },
+ { label: '7d', val: 168 }
+ ],
+ (v) => settings.autoDeleteHours === v,
+ (v) => patch({ autoDeleteHours: v })
+ )
+ }
+ ]
+ },
+ ...(!isStoreBuild ? [{
+ id: 'updates',
+ label: t('tabs.updates') || 'UPDATES',
+ rows: [
+ {
+ id: 'update-mode',
+ title: t('behaviour.autoUpdatesTitle'),
+ desc:
+ updateMode === 'auto'
+ ? t('behaviour.autoUpdatesDescOn')
+ : updateMode === 'notify'
+ ? (t('behaviour.updateModeNotifyDesc') || 'Notify when updates are available without downloading')
+ : t('behaviour.autoUpdatesDescOff'),
+ below: pills<UpdateMode>(
+ [
+ { label: t('behaviour.updateModeAuto') || 'Automatic', val: 'auto' },
+ { label: t('behaviour.updateModeNotify') || 'Notify me', val: 'notify' },
+ { label: t('behaviour.updateModeOff') || 'Off', val: 'off' }
+ ],
+ (v) => updateMode === v,
+ (v) => patch({ updateMode: v })
+ )
+ },
+ ...(updateCheck ? [updateCheck] : [])
+ ]
+ } satisfies GroupSpec] : [])
+ ]
+ }
+
+ if (tab === 'position') {
+ return [
+ {
+ id: 'position',
+ label: t('tabs.position') || 'POSITION',
+ rows: [
+ {
+ id: 'placement',
+ title: t('position.edgePlacementTitle'),
+ desc: t('position.edgePlacementDesc'),
+ below: (
+ <div className={`placement-3way-wrap${isHorizontal ? ' shelf-placement-3way' : ''}`}>
+ {placementPill('left', t('position.left') || 'Left')}
+ {placementPill('top', t('position.top') || 'Top')}
+ {placementPill('right', t('position.right') || 'Right')}
</div>
- <div className="manual-update-desc">
- {t('footer.version')} {currentVersion || '0.3.1'}
+ )
+ },
+ ...(!isHorizontal ? [{
+ id: 'offset',
+ title: offsetIsHorizontal ? (t('position.horizontalPositionTitle') || 'Horizontal Position') : t('position.verticalPositionTitle'),
+ desc: offsetIsHorizontal ? (t('position.horizontalPositionDesc') || 'Adjust horizontal alignment along screen edge') : t('position.verticalPositionDesc'),
+ trailing: <span className="set-row-badge">{`${Math.round(offsetVal * 100)}%`}</span>,
+ size: 'slider',
+ below: (
+ <div className="setting-slider-wrap">
+ <WakeSlider
+ ariaLabel={offsetIsHorizontal ? (t('position.horizontalPositionTitle') || 'Horizontal Position') : t('position.verticalPositionTitle')}
+ min={0}
+ max={1}
+ step={0.002}
+ bars={28}
+ height={28}
+ restHeight={8}
+ gap={3}
+ value={offsetVal}
+ onStart={() => {
+ void window.edge.setInteractive(true)
+ setSliderActive(true)
+ }}
+ onRelease={(val) => {
+ setSliderActive(false)
+ if (offsetIsHorizontal) {
+ patch({ horizontalOffset: val })
+ } else {
+ handleSliderRelease(val)
+ }
+ }}
+ onChange={(raw) => {
+ if (offsetIsHorizontal) {
+ patch({ horizontalOffset: raw })
+ } else {
+ handleSliderInput(raw)
+ }
+ }}
+ />
+ <div className="setting-slider-labels">
+ {[
+ { label: offsetIsHorizontal ? 'Left' : '0%', val: 0 },
+ { label: 'Center', val: 0.5 },
+ { label: offsetIsHorizontal ? 'Right' : '100%', val: 1.0 }
+ ].map((pos) => {
+ const active = Math.abs(offsetVal - pos.val) < 0.04
+ return (
+ <button
+ key={pos.val}
+ type="button"
+ className={`slider-label-btn${active ? ' active' : ''}`}
+ onClick={() => {
+ if (offsetIsHorizontal) {
+ patch({ horizontalOffset: pos.val })
+ } else {
+ handleSliderRelease(pos.val)
+ }
+ }}
+ >
+ {pos.label}
+ </button>
+ )
+ })}
+ </div>
</div>
- </div>
- <button
- type="button"
- className="manual-update-pill outline"
- onClick={() => {
- playButtonClickSound()
- handleManualCheck()
- }}
- >
- {t('behaviour.checkAgain')}
- </button>
- </>
- ) : checkState.status === 'error' ? (
- <>
- <div className="manual-update-info">
- <div className="manual-update-title error">
- {t('behaviour.updateCheckFailed')}
+ )
+ } satisfies RowSpec] : []),
+ ...(!isHorizontal ? [{
+ id: 'panel-height',
+ title: t('position.panelHeightTitle'),
+ desc: t('position.panelHeightDesc'),
+ below: pills(
+ [
+ { label: t('appearance.small'), val: 0.5 },
+ { label: t('position.medium'), val: 0.65 },
+ { label: t('appearance.large'), val: 0.8 }
+ ],
+ (v) => Math.abs((settings.panelHeight || 0.6) - v) < 0.08,
+ (v) => patch({ panelHeight: v })
+ )
+ } satisfies RowSpec] : []),
+ {
+ id: 'display',
+ title: t('position.displayTitle'),
+ desc: t('position.displayDesc'),
+ below: (
+ <div className="setting-pills">
+ {displays.length === 0 && <div className="pill disabled">{t('position.loadingDisplays')}</div>}
+ {displays.map((d) => {
+ const currentDisplay = displays.find((disp) => disp.isCurrent)
+ const activeDisplayId = currentDisplay
+ ? currentDisplay.id
+ : (settings.stickDisplayId ?? displays.find((disp) => disp.isPrimary)?.id ?? displays[0]?.id)
+ const isActive = activeDisplayId === d.id
+ const displayName = d.isPrimary ? t('position.primaryDisplay') : d.name
+ return (
+ <button
+ key={d.id}
+ type="button"
+ className={`pill display-pill ${isActive ? 'active' : ''}`}
+ onClick={() => {
+ playButtonClickSound()
+ patch({ stickDisplayId: d.id })
+ useStore.getState().notifyPositionChanged()
+ }}
+ >
+ <div className="pill-name">{displayName}</div>
+ <div className="pill-res">{d.resolution}</div>
+ </button>
+ )
+ })}
</div>
- <div className="manual-update-desc error">
- {checkState.error || t('behaviour.updateCheckFailed')}
+ )
+ }
+ ]
+ },
+ {
+ id: 'trigger-zone',
+ label: t('position.triggerZone') || 'TRIGGER ZONE',
+ rows: [
+ {
+ id: 'location-hint',
+ title: t('position.edgeLocationHintTitle'),
+ desc: isHorizontal ? (t('groups.edgeHintPulseDesc') || t('position.edgeLocationHintDesc')) : t('position.edgeLocationHintDesc'),
+ trailing: <Toggle checked={settings.showEdgeLocationHint ?? false} onChange={(v) => patch({ showEdgeLocationHint: v })} />
+ },
+ ...(!isHorizontal ? [{
+ id: 'trigger-position',
+ title: t('position.edgeTriggerPositionTitle'),
+ desc: t('position.edgeTriggerPositionDesc'),
+ below: pills<'top' | 'center' | 'bottom'>(
+ [
+ { label: offsetIsHorizontal ? (t('position.left') || 'Left') : t('position.top'), val: 'top' },
+ { label: t('position.center'), val: 'center' },
+ { label: offsetIsHorizontal ? (t('position.right') || 'Right') : t('position.bottom'), val: 'bottom' }
+ ],
+ (v) => (settings.triggerAlignment || 'center') === v,
+ (v) => {
+ patch({ triggerAlignment: v })
+ useStore.getState().notifyPositionChanged()
+ }
+ )
+ } satisfies RowSpec] : []),
+ {
+ id: 'hover-area',
+ title: t('position.hoverAreaSizeTitle'),
+ desc: t('position.hoverAreaSizeDesc'),
+ below: pills(
+ [
+ { label: t('appearance.small'), val: 0.25 },
+ { label: t('position.medium'), val: 0.4 },
+ { label: t('appearance.large'), val: 0.6 }
+ ],
+ (v) => Math.abs(settings.hotZoneHeight - v) < 0.08,
+ (v) => patch({ hotZoneHeight: v })
+ )
+ },
+ {
+ id: 'trigger-thickness',
+ title: t('position.edgeTriggerThicknessTitle'),
+ desc: t('position.edgeTriggerThicknessDesc'),
+ trailing: <span className="set-row-badge">{`${thicknessPx}px`}</span>,
+ size: 'slider',
+ below: (
+ <div className="setting-slider-wrap">
+ <WakeSlider
+ ariaLabel={t('position.edgeTriggerThicknessTitle')}
+ min={1}
+ max={7}
+ step={1}
+ bars={28}
+ height={isHorizontal ? 22 : 28}
+ restHeight={isHorizontal ? 6 : 8}
+ gap={3}
+ value={thicknessPx}
+ onStart={() => {
+ void window.edge.setInteractive(true)
+ setSliderActive(true)
+ }}
+ onRelease={(val) => {
+ handleThicknessRelease(val)
+ }}
+ onChange={(val) => {
+ handleThicknessInput(val)
+ }}
+ />
+ <div className="setting-slider-labels">
+ {[
+ { label: 'Min', val: 1 },
+ { label: 'Mid', val: 4 },
+ { label: 'Max', val: 7 }
+ ].map((preset) => (
+ <button
+ key={preset.val}
+ type="button"
+ className={`slider-label-btn${thicknessPx === preset.val ? ' active' : ''}`}
+ onClick={() => {
+ if (thicknessPx !== preset.val) {
+ handleThicknessRelease(preset.val)
+ }
+ }}
+ >
+ {preset.label}
+ </button>
+ ))}
+ </div>
</div>
- </div>
+ )
+ }
+ ]
+ }
+ ]
+ }
+
+ // appearance
+ return [
+ {
+ id: 'copy-indicator',
+ label: t('appearance.copyIndicatorTitle') || 'COPY INDICATOR',
+ rows: [
+ {
+ id: 'copy-indicator',
+ title: t('appearance.copyIndicatorTitle'),
+ desc: t('appearance.copyIndicatorDesc'),
+ trailing: <Toggle checked={indicatorOn} onChange={(v) => patch({ showCopyIndicator: v })} />
+ },
+ ...(indicatorOn ? [{
+ id: 'indicator-style',
+ title: t('appearance.indicatorStyleTitle'),
+ desc: t('appearance.indicatorStyleDesc'),
+ trailing: (
<button
type="button"
- className="manual-update-pill outline"
- onClick={() => {
+ className={`icon-btn style-preview-toggle-btn ${isFlyoutActive ? 'active' : ''}`}
+ title={isFlyoutActive ? t('appearance.closeStyleSelector') : t('appearance.openStyleSelector')}
+ onClick={(e) => {
playButtonClickSound()
- handleManualCheck()
+ handleToggleFlyout(e.currentTarget)
}}
>
- {t('behaviour.tryAgain')}
+ {isFlyoutActive ? <CloseIcon /> : <ChevronRightIcon />}
</button>
- </>
- ) : (
- <>
- <div className="manual-update-info">
- <div className="manual-update-title">{t('behaviour.checkForUpdates')}</div>
- <div className="manual-update-desc">
- {t('footer.version')} {currentVersion || '0.3.1'}
- </div>
- </div>
- <button
- type="button"
- className="manual-update-pill outline"
- onClick={() => {
- playButtonClickSound()
- handleManualCheck()
+ ),
+ extra: tutorialIndicatorGrid
+ } satisfies RowSpec] : [])
+ ]
+ },
+ ...(!isHorizontal ? [{
+ id: 'typography',
+ label: t('appearance.typography') || 'TYPOGRAPHY',
+ rows: [
+ {
+ id: 'text-size',
+ title: t('appearance.textSizeTitle'),
+ desc: t('appearance.textSizeDesc'),
+ below: pills(
+ [
+ { label: t('appearance.small'), val: 0.85 },
+ { label: t('appearance.normal'), val: 1.0 },
+ { label: t('appearance.large'), val: 1.15 }
+ ],
+ (v) => Math.abs((settings.fontSizeScale ?? 1.0) - v) < 0.05,
+ (v) => patch({ fontSizeScale: v })
+ )
+ }
+ ]
+ } satisfies GroupSpec] : []),
+ {
+ id: 'audio',
+ label: t('appearance.audioAndFeedback') || 'AUDIO FEEDBACK',
+ rows: [
+ {
+ id: 'sound',
+ title: t('behaviour.soundEffectsTitle'),
+ desc: t('behaviour.soundEffectsDesc'),
+ trailing: (
+ <Toggle
+ checked={settings.soundEffects ?? true}
+ onChange={(v) => {
+ if (v) playToggleSound(true)
+ patch({ soundEffects: v })
}}
- >
- {t('behaviour.checkForUpdates')}
- </button>
- </>
- )}
- </div>
- </div>
- )
+ />
+ )
+ }
+ ]
+ }
+ ]
}
- // ── Horizontal Layout (Top / Bottom Dock Position) ────────────────────────
+ const layout: 'v' | 'h' = isHorizontal ? 'h' : 'v'
+ const renderGroups = (tab: SettingsTab) =>
+ groupsFor(tab).map((group) => <SettingGroup key={group.id} group={group} layout={layout} />)
+
+ // ── Horizontal Layout (Top Dock) ──────────────────────────────────────────
if (isHorizontal) {
const handleShelfWheel = (e: React.WheelEvent<HTMLDivElement>) => {
if (e.deltaY !== 0) {
@@ -884,1788 +1384,146 @@ export function Settings({
horizontalTabScrollPositions.current[horizontalTab] = e.currentTarget.scrollLeft
}
- const renderHorizontalCommunityCard = () => (
- <div className="settings-shelf-card support-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('footer.communityAndSupport') || 'COMMUNITY & SUPPORT'}</div>
- <div className="setting-title">{t('footer.communityAndSupport')}</div>
- <div className="setting-desc">{t('footer.supportTagline') || '100% free & open-source clipboard'}</div>
- </div>
- <div className="shelf-card-bottom">
- <button
- type="button"
- className="shelf-kofi-btn"
- onClick={() => {
- playButtonClickSound()
- window.open('https://www.edgedrop.app/supportedgedrop', '_blank')
- }}
- >
- <svg width="13" height="13" viewBox="0 0 24 24" fill="#ff4757" stroke="none" style={{ flexShrink: 0 }}>
- <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
- </svg>
- <span>{t('footer.supportOnKofi')}</span>
- </button>
- {isStoreBuild ? (
- <button
- type="button"
- className="shelf-github-btn"
- onClick={() => {
- playButtonClickSound()
- window.open('ms-windows-store://review/?ProductId=9P3JMHN9M4NR', '_blank')
- }}
- >
- <MicrosoftStoreLogo width={13} height={13} className="store-logo-icon" />
- <span>{t('footer.reviewOnStore')}</span>
- </button>
- ) : (
- <button
- type="button"
- className="shelf-github-btn"
- onClick={() => {
- playButtonClickSound()
- window.open('https://github.com/Deepender25/Edge-Drop', '_blank')
- }}
- >
- <GithubOctocatLogo width={13} height={13} className="github-octocat-icon" />
- <span>{t('footer.starOnGithub')}</span>
- <StarIcon width={12} height={12} className="star-icon" weight="fill" fill="#fbbf24" style={{ marginLeft: 2 }} />
- </button>
- )}
+ return (
+ <div className="settings-horizontal-shelf">
+ <div
+ className="settings-shelf-track tab-view"
+ ref={shelfTrackRef}
+ onWheel={handleShelfWheel}
+ onScroll={handleShelfScroll}
+ >
+ {horizontalTab === 'behaviour' && renderPromotedHorizontalUpdateCard()}
+ {renderGroups(horizontalTab)}
+ {renderClosingCards()}
</div>
</div>
)
+ }
- const renderHorizontalAboutCard = () => (
- <div className="settings-shelf-card about-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.aboutEdgeDrop') || 'ABOUT EDGE-DROP'}</div>
- <div className="setting-title">Edge-Drop v{currentVersion || '0.3.2'}</div>
- <div className="setting-desc">{t('footer.feedbackDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <button
- type="button"
- className="pill display-pill"
- style={{ width: '100%', justifyContent: 'center', height: 30, fontSize: 11.5, fontWeight: 550, borderRadius: 999 }}
- onClick={() => {
- playButtonClickSound()
- window.open('https://github.com/Deepender25/Edge-Drop/issues/new/choose', '_blank')
- }}
- >
- {t('footer.submitFeedback')}
- </button>
+ // ── Vertical Layout (Side Docks) ──────────────────────────────────────────
+ const maxTabLen = Math.max(...TABS.map((tab) => tab.label.length))
+ const tabFontSize = maxTabLen > 15 ? '10px' : maxTabLen > 13 ? '10.5px' : maxTabLen > 11 ? '11px' : '11.5px'
+ const tabLetterSpacing = maxTabLen > 13 ? '-0.02em' : '0'
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, marginTop: 2 }}>
- <button
- type="button"
- className="version-changelog-link"
- style={{ fontSize: 11 }}
- onClick={() => {
- playButtonClickSound()
- if (currentVersion) patch({ lastSeenChangelogVersion: currentVersion })
- window.open('https://www.edgedrop.app/changelog', '_blank')
- }}
- >
- {t('header.whatsNew')} ↗
- </button>
- <button
- type="button"
- className="shelf-quit-btn"
- onClick={() => {
- playButtonClickSound()
- void window.edge.quitApp()
- }}
- >
- <LogOutIcon width={11} height={11} />
- <span>{t('tray.quit')}</span>
- </button>
- </div>
+ return (
+ <div className="settings-v" style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden', position: 'relative' }}>
+ <div className="settings-fixed-header">
+ <div className="settings-tab-bar" role="tablist">
+ {TABS.map((tab) => {
+ const active = activeTab === tab.id
+ return (
+ <button
+ key={tab.id}
+ type="button"
+ role="tab"
+ aria-selected={active}
+ className={`settings-tab-btn${active ? ' active' : ''}`}
+ onClick={() => handleTabSwitch(tab.id)}
+ style={{
+ fontSize: `calc(${tabFontSize} * var(--font-scale, 1))`,
+ letterSpacing: tabLetterSpacing
+ }}
+ >
+ <span className="settings-tab-text">{tab.label}</span>
+ </button>
+ )
+ })}
</div>
</div>
- )
-
- return (
- <div className="settings-horizontal-shelf">
- <div
- className="settings-shelf-track tab-view"
- ref={shelfTrackRef}
- onWheel={handleShelfWheel}
- onScroll={handleShelfScroll}
- >
- {/* ── TAB 1: BEHAVIOUR ── */}
- {horizontalTab === 'behaviour' && (
- <>
- {renderPromotedHorizontalUpdateCard()}
-
- {/* ── SUB-GROUP 1 DIVIDER: General & Startup ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('tabs.generalStartup') || 'GENERAL & STARTUP'}</span>
- </div>
-
- {/* Card 1: Language */}
- <div className="settings-shelf-card shortcuts-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.general') || 'GENERAL'}</div>
- <div className="setting-title">{t('behaviour.languageTitle')}</div>
- <div className="setting-desc">{t('groups.languageSelectDesc') || 'Select application display language'}</div>
- </div>
- <div className="shelf-card-bottom">
- <button
- type="button"
- className={`language-shelf-btn language-toggle-btn ${languageFlyoutOpen ? 'flyout-open' : ''}`}
- onClick={(e) => {
- playButtonClickSound()
- const rect = e.currentTarget.getBoundingClientRect()
- setLanguageFlyoutOpen(!languageFlyoutOpen, rect)
- }}
- >
- <div style={{ display: 'flex', alignItems: 'center', gap: 7, minWidth: 0, overflow: 'hidden' }}>
- <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{ opacity: 0.65, flexShrink: 0 }}>
- <circle cx="12" cy="12" r="10"/>
- <line x1="2" y1="12" x2="22" y2="12"/>
- <path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
- </svg>
- <span style={{ fontWeight: 600, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
- {getLangLabel(selectedLang)}
- </span>
- </div>
- <motion.span
- animate={{ rotate: languageFlyoutOpen ? 180 : 0 }}
- transition={{ duration: 0.2 }}
- style={{ display: 'flex', alignItems: 'center', opacity: 0.65, flexShrink: 0, marginLeft: 6 }}
- >
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
- <path d="m6 9 6 6 6-6"/>
- </svg>
- </motion.span>
- </button>
- </div>
- </div>
-
- {/* Card 2: Launch at Login */}
- <div className="settings-shelf-card system-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.startup') || 'STARTUP'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.launchAtLoginTitle')}</div>
- <div className="setting-desc">{t('behaviour.launchAtLoginDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.launchAtLogin}
- onChange={(v) => {
- useStore.setState((s) => ({
- settings: { ...s.settings, launchAtLogin: v }
- }))
- void patch({ launchAtLogin: v })
- }}
- />
- </div>
- </div>
- </div>
-
- {/* Card 3: Incognito Mode */}
- <div className="settings-shelf-card incognito-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.privacy') || 'PRIVACY'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.incognitoTitle')}</div>
- <div className="setting-desc">{t('behaviour.incognitoDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.incognito}
- onChange={(v) => patch({ incognito: v })}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 2 DIVIDER: Shortcuts & Hover ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('tabs.activationShortcuts') || 'SHORTCUTS & HOVER'}</span>
- </div>
-
- {/* Card 4: Hover Activation */}
- <div className="settings-shelf-card hover-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.hoverActivation') || 'HOVER ACTIVATION'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.hoverActivationTitle')}</div>
- <div className="setting-desc">
- {(settings.hoverActivation ?? true)
- ? t('behaviour.hoverActivationDescOn')
- : t('behaviour.hoverActivationDescOff', { shortcut: settings.toggleHotkey || 'Alt+C' })}
- </div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.hoverActivation ?? true}
- onChange={(v) => {
- if (!v) {
- patch({ hoverActivation: false, suppressInFullscreen: false })
- } else {
- patch({ hoverActivation: true, suppressInFullscreen: true })
- }
- }}
- />
- </div>
- </div>
- </div>
-
- {/* Card 4b: Hover Open Delay */}
- {renderHoverDelayCard('shelf')}
-
- {/* Card 5: Global Toggle Shortcut */}
- <div className="settings-shelf-card hotkey-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.keyboardShortcut') || 'KEYBOARD SHORTCUT'}</div>
- <div className="setting-title">{t('behaviour.toggleHotkeyTitle')}</div>
- <div className="setting-desc">{t('groups.toggleHotkeyPressDesc') || 'Press anywhere to toggle Edge-Drop'}</div>
- </div>
- <div className="shelf-card-bottom">
- <HotkeyRecorder
- hotkey={settings.toggleHotkey || 'Alt+C'}
- onChange={(nextHotkey) => {
- patch({ toggleHotkey: nextHotkey })
- pushToast({
- id: Date.now().toString(),
- message: t('toast.shortcutUpdated', { shortcut: nextHotkey }),
- tone: 'info'
- })
- }}
- />
- </div>
- </div>
-
- {/* Card 6: Fullscreen Protection */}
- <div className="settings-shelf-card fullscreen-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.fullscreenProtection') || 'FULLSCREEN PROTECTION'}</div>
- </div>
- <div className="shelf-card-inline" style={{ opacity: (settings.hoverActivation ?? true) ? 1 : 0.45 }}>
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.fullscreenProtectionTitle')}</div>
- <div className="setting-desc">
- {(settings.hoverActivation ?? true)
- ? t('behaviour.fullscreenProtectionDesc')
- : t('behaviour.disabledHoverOff')}
- </div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={(settings.hoverActivation ?? true) ? settings.suppressInFullscreen : false}
- onChange={(v) => (settings.hoverActivation ?? true) && patch({ suppressInFullscreen: v })}
- disabled={!(settings.hoverActivation ?? true)}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 3 DIVIDER: Clipboard Rules ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('tabs.clipboardRules') || 'CLIPBOARD RULES'}</span>
- </div>
-
- {/* Card 7: Move Pasted to Top */}
- <div className="settings-shelf-card order-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.clipboardBehaviour') || 'CLIPBOARD BEHAVIOUR'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.movePastedToTopTitle')}</div>
- <div className="setting-desc">{t('behaviour.movePastedToTopDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.movePastedToTop ?? true}
- onChange={(v) => patch({ movePastedToTop: v })}
- />
- </div>
- </div>
- </div>
-
- {/* Card 8: Clear Unpinned on Restart */}
- <div className="settings-shelf-card rules-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.restartCleanup') || 'RESTART CLEANUP'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.clearUnpinnedTitle')}</div>
- <div className="setting-desc">{t('behaviour.clearUnpinnedDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.clearUnpinnedOnRestart}
- onChange={(v) => patch({ clearUnpinnedOnRestart: v })}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 4 DIVIDER: Storage & Retention ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('tabs.storageRetention') || 'STORAGE & RETENTION'}</span>
- </div>
-
- {/* Card 9: History Capacity */}
- <div className="settings-shelf-card storage-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.storageCapacity') || 'STORAGE CAPACITY'}</div>
- <div className="setting-title">{t('behaviour.capacityTitle')}</div>
- <div className="setting-desc">{t('behaviour.capacityDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 5 }}>
- {[
- { label: '100', val: 100 },
- { label: '250', val: 250 },
- { label: '500', val: 500 },
- { label: '1000', val: 1000 }
- ].map((opt) => (
- <button
- key={opt.val}
- type="button"
- className={`pill ${settings.historyLimit === opt.val ? 'active' : ''}`}
- style={{ height: 32, fontSize: 11.5, fontWeight: 500, padding: 0 }}
- onClick={() => { playButtonClickSound(); patch({ historyLimit: opt.val }) }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* Card 10: Auto-Delete Timer */}
- <div className="settings-shelf-card autodelete-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.autoDelete') || 'AUTO-DELETE'}</div>
- <div className="setting-title">{t('behaviour.autoDeleteTitle')}</div>
- <div className="setting-desc">{t('behaviour.autoDeleteDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: 4 }}>
- {[
- { label: t('behaviour.never'), val: 0 },
- { label: '1h', val: 1 },
- { label: '6h', val: 6 },
- { label: '24h', val: 24 },
- { label: '7d', val: 168 }
- ].map((opt) => (
- <button
- key={opt.val}
- type="button"
- className={`pill ${settings.autoDeleteHours === opt.val ? 'active' : ''}`}
- style={{ height: 32, fontSize: 11, fontWeight: 500, padding: 0 }}
- onClick={() => { playButtonClickSound(); patch({ autoDeleteHours: opt.val }) }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 5 DIVIDER: Updates ── */}
- {!isStoreBuild && (
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('tabs.updates') || 'UPDATES'}</span>
- </div>
- )}
-
- {/* Card 11: Application Updates (3-mode selector) */}
- <div className="settings-shelf-card updates-card behaviour-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.updates') || 'UPDATES'}</div>
- <div className="setting-title">{t('behaviour.autoUpdatesTitle')}</div>
- <div className="setting-desc">
- {!isStoreBuild
- ? (updateMode === 'auto'
- ? t('behaviour.autoUpdatesDescOn')
- : updateMode === 'notify'
- ? (t('behaviour.updateModeNotifyDesc') || 'Notify when updates are available without downloading')
- : t('behaviour.autoUpdatesDescOff'))
- : 'Managed by Microsoft Store'}
- </div>
- </div>
- {!isStoreBuild && (
- <div className="shelf-card-bottom">
- <div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 5, width: '100%' }}>
- {([
- { id: 'auto' as UpdateMode, label: t('behaviour.updateModeAuto') || 'Automatic' },
- { id: 'notify' as UpdateMode, label: t('behaviour.updateModeNotify') || 'Notify me' },
- { id: 'off' as UpdateMode, label: t('behaviour.updateModeOff') || 'Off' }
- ]).map((opt) => (
- <button
- key={opt.id}
- type="button"
- className={`pill ${updateMode === opt.id ? 'active' : ''}`}
- style={{ height: 32, fontSize: 11, fontWeight: 500, padding: '0 4px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', justifyContent: 'center' }}
- onClick={() => { playButtonClickSound(); patch({ updateMode: opt.id }) }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- )}
- </div>
-
- {/* Card 12: Update Status & Actions (idle/check states; hidden
- while the promoted front card shows an actionable state) */}
- {!isStoreBuild && !hasPromotedTopUpdate && (
- <div className="settings-shelf-card check-updates-card behaviour-col" ref={updateBannerRef}>
- <div className="shelf-card-top">
- <div className="setting-group-label">
- UPDATE STATUS
- </div>
- <div className="setting-title" style={{ lineHeight: 1.3 }}>
- {checkState.status === 'checking'
- ? t('behaviour.checkingForUpdates')
- : checkState.status === 'up-to-date'
- ? t('behaviour.isUpToDate')
- : checkState.status === 'error'
- ? t('behaviour.updateCheckFailed')
- : t('behaviour.checkForUpdates')}
- </div>
- <div className="setting-desc">
- {checkState.status === 'error'
- ? (checkState.error || t('behaviour.updateCheckFailed'))
- : `Edge-Drop v${currentVersion || '0.3.1'}`}
- </div>
- </div>
- <div className="shelf-card-bottom">
- <button
- type="button"
- className="pill display-pill"
- style={{ width: '100%', justifyContent: 'center', fontSize: 11.5, height: 32 }}
- disabled={checkState.status === 'checking'}
- onClick={() => {
- playButtonClickSound()
- handleManualCheck()
- }}
- >
- {checkState.status === 'checking' ? (
- <>
- <span className="update-dot checking" style={{ marginRight: 6 }} />
- <span>{t('behaviour.checkingForUpdates')}</span>
- </>
- ) : checkState.status === 'up-to-date' ? (
- t('behaviour.checkAgain')
- ) : checkState.status === 'error' ? (
- t('behaviour.tryAgain')
- ) : (
- t('behaviour.checkForUpdates')
- )}
- </button>
- </div>
- </div>
- )}
-
- {/* ── SUB-GROUP 6 DIVIDER: Community & Support ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('footer.communityAndSupport') || 'COMMUNITY & SUPPORT'}</span>
- </div>
-
- {/* Card 13: Community & Feedback */}
- {renderHorizontalCommunityCard()}
-
- {/* Card 14: About & Quit */}
- {renderHorizontalAboutCard()}
- </>
- )}
-
- {/* ── TAB 2: POSITION ── */}
- {horizontalTab === 'position' && (
- <>
- {/* ── SUB-GROUP 1 DIVIDER: Position ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('tabs.position') || 'POSITION'}</span>
- </div>
-
- {/* Card 1: Edge Placement */}
- <div className="settings-shelf-card placement-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.placement') || 'PLACEMENT'}</div>
- <div className="setting-title" style={{ color: '#ffffff' }}>{t('position.edgePlacementTitle')}</div>
- <div className="setting-desc">{t('position.edgePlacementDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="placement-3way-wrap shelf-placement-3way">
- <button
- type="button"
- className={`pill ${(edgeTransition?.active ? edgeTransition.to === 'left' : settings.stickPosition === 'left') ? 'active' : ''} ${edgeTransition?.active && edgeTransition.to === 'left' ? 'transitioning' : ''}`}
- disabled={edgeTransition?.active}
- onClick={() => {
- void startEdgeTransition('left')
- }}
- >
- {t('position.leftEdge') || 'Left Edge'}
- </button>
- <button
- type="button"
- className={`pill ${(edgeTransition?.active ? edgeTransition.to === 'top' : settings.stickPosition === 'top') ? 'active' : ''} ${edgeTransition?.active && edgeTransition.to === 'top' ? 'transitioning' : ''}`}
- disabled={edgeTransition?.active}
- onClick={() => {
- void startEdgeTransition('top')
- }}
- >
- {t('position.topEdge') || 'Top Edge'}
- </button>
- <button
- type="button"
- className={`pill ${(edgeTransition?.active ? edgeTransition.to === 'right' : settings.stickPosition === 'right') ? 'active' : ''} ${edgeTransition?.active && edgeTransition.to === 'right' ? 'transitioning' : ''}`}
- disabled={edgeTransition?.active}
- onClick={() => {
- void startEdgeTransition('right')
- }}
- >
- {t('position.rightEdge') || 'Right Edge'}
- </button>
- </div>
- </div>
- </div>
-
- {/* Card 2: Target Display */}
- <div className="settings-shelf-card display-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.displayMonitor') || 'DISPLAY MONITOR'}</div>
- <div className="setting-title">{t('position.displayTitle')}</div>
- <div className="setting-desc">{t('position.displayDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- {displays.length === 0 ? (
- <div className="pill disabled">{t('position.loadingDisplays')}</div>
- ) : (
- displays.map((d) => {
- const currentDisplay = displays.find((disp) => disp.isCurrent)
- const activeDisplayId = currentDisplay
- ? currentDisplay.id
- : (settings.stickDisplayId ?? displays.find((disp) => disp.isPrimary)?.id ?? displays[0]?.id)
- const isActive = activeDisplayId === d.id
- const displayName = d.isPrimary ? t('position.primaryDisplay') : d.name
- return (
- <button
- key={d.id}
- type="button"
- className={`pill display-pill ${isActive ? 'active' : ''}`}
- style={{ width: '100%', justifyContent: 'space-between', padding: '6px 14px', fontSize: 11.5, height: 32, flexShrink: 0 }}
- onClick={() => {
- playButtonClickSound()
- patch({ stickDisplayId: d.id })
- useStore.getState().notifyPositionChanged()
- }}
- >
- <span className="pill-name" style={{ fontWeight: 600, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', marginRight: 8 }}>{displayName}</span>
- <span className="pill-res" style={{ opacity: 0.75, fontSize: 11, flexShrink: 0 }}>{d.resolution}</span>
- </button>
- )
- })
- )}
- </div>
- </div>
-
- {/* Card 3: Edge Location Hint */}
- <div className="settings-shelf-card beacon-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.locationHint') || 'LOCATION HINT'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('position.edgeLocationHintTitle')}</div>
- <div className="setting-desc">{t('groups.edgeHintPulseDesc') || 'Beacon pulse along edge to hint dock position'}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.showEdgeLocationHint ?? false}
- onChange={(v) => patch({ showEdgeLocationHint: v })}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 2 DIVIDER: Trigger Zone ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('position.triggerZone') || 'TRIGGER ZONE'}</span>
- </div>
-
- {/* Card 5: Hover Area Size */}
- <div className="settings-shelf-card trigger-bar-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.hoverZoneLength') || 'HOVER ZONE LENGTH'}</div>
- <div className="setting-title">{t('position.hoverAreaSizeTitle')}</div>
- <div className="setting-desc">{t('position.hoverAreaSizeDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 5, width: '100%' }}>
- {[
- { label: t('appearance.small'), val: 0.25 },
- { label: t('position.medium'), val: 0.4 },
- { label: t('appearance.large'), val: 0.6 }
- ].map((opt) => (
- <button
- key={opt.val}
- type="button"
- className={`pill ${Math.abs(settings.hotZoneHeight - opt.val) < 0.08 ? 'active' : ''}`}
- style={{ height: 32, fontSize: 11.5, fontWeight: 500, padding: 0 }}
- onClick={() => {
- playButtonClickSound()
- patch({ hotZoneHeight: opt.val })
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
- {/* Card 6: Edge Trigger Thickness */}
- <div className="settings-shelf-card trigger-thickness-card position-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.triggerThickness') || 'TRIGGER THICKNESS'}</div>
- <div className="setting-slider-header" style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }}>
- <div>
- <div className="setting-title">{t('position.edgeTriggerThicknessTitle')}</div>
- <div className="setting-desc">{t('position.edgeTriggerThicknessDesc')}</div>
- </div>
- <div className="setting-slider-val" style={{ flexShrink: 0, padding: '2px 8px', fontSize: 11, fontWeight: 600, borderRadius: 6 }}>
- {`${settings.hotZoneWidth ?? 3}px`}
- </div>
- </div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-slider-wrap" style={{ gap: 4, padding: '2px 0' }}>
- <WakeSlider
- ariaLabel={t('position.edgeTriggerThicknessTitle')}
- min={1}
- max={7}
- step={1}
- bars={28}
- height={28}
- restHeight={8}
- gap={3}
- value={settings.hotZoneWidth ?? 3}
- onStart={() => {
- void window.edge.setInteractive(true)
- setSliderActive(true)
- }}
- onRelease={(val) => {
- handleThicknessRelease(val)
- }}
- onChange={(val) => {
- handleThicknessInput(val)
- }}
- />
- <div className="setting-slider-labels" style={{ marginTop: 2 }}>
- {[
- { label: 'Min', val: 1 },
- { label: 'Mid', val: 4 },
- { label: 'Max', val: 7 }
- ].map((preset) => {
- const currentPx = settings.hotZoneWidth ?? 3
- const active = currentPx === preset.val
- return (
- <button
- key={preset.val}
- type="button"
- className={`slider-label-btn${active ? ' active' : ''}`}
- style={{ fontSize: 10, padding: '2px 8px' }}
- onClick={() => {
- if (currentPx !== preset.val) {
- handleThicknessRelease(preset.val)
- }
- }}
- >
- {preset.label}
- </button>
- )
- })}
- </div>
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 3 DIVIDER: Community & Support ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('footer.communityAndSupport') || 'COMMUNITY & SUPPORT'}</span>
- </div>
-
- {/* Card 9: Community & Feedback */}
- {renderHorizontalCommunityCard()}
-
- {/* Card 10: About & Quit */}
- {renderHorizontalAboutCard()}
- </>
- )}
-
- {/* ── TAB 3: APPEARANCE ── */}
- {horizontalTab === 'appearance' && (
- <>
- {/* ── SUB-GROUP 1 DIVIDER: Copy Indicator ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('appearance.copyIndicatorTitle') || 'COPY INDICATOR'}</span>
- </div>
-
- {/* Card 1: Copy Indicator Toggle */}
- <div className="settings-shelf-card beacon-toggle-card appearance-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.copyBeacon') || 'COPY BEACON'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('appearance.copyIndicatorTitle')}</div>
- <div className="setting-desc">{t('appearance.copyIndicatorDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.showCopyIndicator ?? true}
- onChange={(v) => patch({ showCopyIndicator: v })}
- />
- </div>
- </div>
- </div>
-
- {/* Card 2: Visual Copy Beacon Style */}
- {(settings.showCopyIndicator ?? true) && (
- <div className="settings-shelf-card copy-card appearance-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.beaconStyle') || 'BEACON STYLE'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('appearance.indicatorStyleTitle')}</div>
- <div className="setting-desc">{t('appearance.indicatorStyleDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <button
- ref={indicatorBtnRef}
- type="button"
- className={`icon-btn style-preview-toggle-btn ${isFlyoutActive ? 'active' : ''}`}
- title={isFlyoutActive ? t('appearance.closeStyleSelector') : t('appearance.openStyleSelector')}
- onClick={(e) => {
- playButtonClickSound()
- handleToggleFlyout(e.currentTarget)
- }}
- >
- {isFlyoutActive ? <CloseIcon /> : <ChevronRightIcon />}
- </button>
- </div>
- </div>
- </div>
- )}
-
- {/* ── SUB-GROUP 2 DIVIDER: Audio & Feedback ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('appearance.audioAndFeedback') || 'AUDIO FEEDBACK'}</span>
- </div>
-
- {/* Card 4: Audio & Feedback */}
- <div className="settings-shelf-card audio-card appearance-col">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.audioFeedback') || 'AUDIO FEEDBACK'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.soundEffectsTitle')}</div>
- <div className="setting-desc">{t('behaviour.soundEffectsDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.soundEffects ?? true}
- onChange={(v) => {
- if (v) playToggleSound(true)
- patch({ soundEffects: v })
- }}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 3 DIVIDER: Community & Support ── */}
- <div className="shelf-section-divider">
- <span className="shelf-section-divider-text">{t('footer.communityAndSupport') || 'COMMUNITY & SUPPORT'}</span>
- </div>
-
- {/* Card 5: Community & Feedback */}
- {renderHorizontalCommunityCard()}
-
- {/* Card 6: About & Quit */}
- {renderHorizontalAboutCard()}
- </>
- )}
- </div>
+ <div className="settings-scroll-list" ref={scrollListRef}>
+ <AnimatePresence mode="wait">
+ <motion.div
+ key={`tab-${activeTab}`}
+ initial={{ opacity: 0, y: 4 }}
+ animate={{ opacity: 1, y: 0 }}
+ exit={{ opacity: 0, y: -4 }}
+ transition={{ duration: 0.18, ease: [0.16, 1, 0.3, 1] }}
+ >
+ {activeTab === 'behaviour' && renderPromotedTopUpdateCard()}
+ {renderGroups(activeTab)}
+ {renderClosingCards()}
+ </motion.div>
+ </AnimatePresence>
</div>
- )
- }
+ </div>
+ )
+}
+// ── Grouped rows ─────────────────────────────────────────────────────────────
+
+interface RowSpec {
+ id: string
+ title: ReactNode
+ desc?: ReactNode
+ /** error styling for the description */
+ descError?: boolean
+ /** control at the right end of the row: toggle, value, small button */
+ trailing?: ReactNode
+ /** wide control under the text: pills, slider, recorder, dropdown */
+ below?: ReactNode
+ /** sliders need a taller slot in the top dock */
+ size?: 'slider'
+ disabled?: boolean
+ extra?: ReactNode
+}
- const maxTabLen = Math.max(...TABS.map((tab) => tab.label.length))
- const tabFontSize = maxTabLen > 15 ? '9px' : maxTabLen > 13 ? '9.5px' : maxTabLen > 11 ? '10px' : maxTabLen > 9 ? '10.8px' : '11.5px'
- const tabLetterSpacing = maxTabLen > 13 ? '-0.03em' : maxTabLen > 10 ? '-0.015em' : '0'
+interface GroupSpec {
+ id: string
+ label: string
+ rows: RowSpec[]
+}
+function SettingRow({ row, layout }: { row: RowSpec; layout: 'v' | 'h' }) {
+ const tooltip = layout === 'h' && typeof row.desc === 'string' ? row.desc : undefined
return (
<div
- style={{ width: '100%', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden', position: 'relative' }}
+ className={`set-row${row.below ? ' has-below' : ''}${row.size === 'slider' ? ' is-slider' : ''}${row.disabled ? ' is-disabled' : ''}`}
+ data-row={row.id}
>
- {/* ── Stationary Fixed Header (Tab Selector) ────────────────── */}
- <div className="settings-fixed-header">
- <div className="settings-tab-bar">
- {TABS.map((tab) => {
- const active = activeTab === tab.id
- return (
- <button
- key={tab.id}
- type="button"
- className={`settings-tab-btn${active ? ' active' : ''}`}
- onClick={() => handleTabSwitch(tab.id)}
- style={{
- fontSize: `calc(${tabFontSize} * var(--font-scale, 1))`,
- letterSpacing: tabLetterSpacing
- }}
- >
- <span className="settings-tab-text">{tab.label}</span>
- </button>
- )
- })}
- </div>
- </div>
-
- {/* ── Scrollable Content Area (Independent per section) ───────── */}
- <div className="settings-scroll-list" ref={scrollListRef}>
-
- {/* ── Tab 1: Behaviour (First) ──────────────────────────────── */}
- <AnimatePresence mode="wait">
- {activeTab === 'behaviour' && (
- <motion.div
- key="tab-behaviour"
- initial={{ opacity: 0, scale: 0.98, y: 4 }}
- animate={{ opacity: 1, scale: 1, y: 0 }}
- exit={{ opacity: 0, scale: 0.98, y: -4 }}
- transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
- >
- {renderPromotedTopUpdateCard()}
-
- {/* ── SUB-GROUP 1: General & Startup ───────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('tabs.generalStartup') || 'GENERAL & STARTUP'}</span>
- </div>
-
- {/* Card 1: Language */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.general') || 'GENERAL'}</div>
- <div className="setting-title">{t('behaviour.languageTitle')}</div>
- <div className="setting-desc">{t('behaviour.languageDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <LanguageDropdown />
- </div>
- </div>
-
- {/* Card 2: Launch at Login */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.startup') || 'STARTUP'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.launchAtLoginTitle')}</div>
- <div className="setting-desc">{t('behaviour.launchAtLoginDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.launchAtLogin}
- onChange={(v) => {
- useStore.setState((s) => ({
- settings: { ...s.settings, launchAtLogin: v }
- }))
- void patch({ launchAtLogin: v })
- }}
- />
- </div>
- </div>
- </div>
-
- {/* Card 3: Incognito Mode */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.privacy') || 'PRIVACY'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.incognitoTitle')}</div>
- <div className="setting-desc">{t('behaviour.incognitoDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.incognito}
- onChange={(v) => patch({ incognito: v })}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 2: Shortcuts & Hover ──────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('tabs.activationShortcuts') || 'SHORTCUTS & HOVER'}</span>
- </div>
-
- {/* Card 4: Hover Activation */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.hoverActivation') || 'HOVER ACTIVATION'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.hoverActivationTitle')}</div>
- <div className="setting-desc">
- {(settings.hoverActivation ?? true)
- ? t('behaviour.hoverActivationDescOn')
- : t('behaviour.hoverActivationDescOff', { shortcut: settings.toggleHotkey || 'Alt+C' })}
- </div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.hoverActivation ?? true}
- onChange={(v) => {
- if (!v) {
- patch({ hoverActivation: false, suppressInFullscreen: false })
- } else {
- patch({ hoverActivation: true, suppressInFullscreen: true })
- }
- }}
- />
- </div>
- </div>
- </div>
-
- {/* Card 4b: Hover Open Delay */}
- {renderHoverDelayCard('stack')}
-
- {/* Card 5: Global Toggle Shortcut */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.keyboardShortcut') || 'KEYBOARD SHORTCUT'}</div>
- <div className="setting-title">{t('behaviour.toggleHotkeyTitle')}</div>
- <div className="setting-desc">{t('behaviour.toggleHotkeyDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <HotkeyRecorder
- hotkey={settings.toggleHotkey || 'Alt+C'}
- onChange={(nextHotkey) => {
- patch({ toggleHotkey: nextHotkey })
- pushToast({
- id: Date.now().toString(),
- message: t('toast.shortcutUpdated', { shortcut: nextHotkey }),
- tone: 'info'
- })
- }}
- />
- </div>
- </div>
-
- {/* Card 6: Fullscreen Protection */}
- <div className="setting-card" style={{ opacity: (settings.hoverActivation ?? true) ? 1 : 0.45, transition: 'opacity 0.2s ease' }}>
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.fullscreenProtection') || 'FULLSCREEN PROTECTION'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.fullscreenProtectionTitle')}</div>
- <div className="setting-desc">
- {(settings.hoverActivation ?? true)
- ? t('behaviour.fullscreenProtectionDesc')
- : t('behaviour.disabledHoverOff')}
- </div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={(settings.hoverActivation ?? true) ? settings.suppressInFullscreen : false}
- onChange={(v) => (settings.hoverActivation ?? true) && patch({ suppressInFullscreen: v })}
- disabled={!(settings.hoverActivation ?? true)}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 3: Clipboard Rules ─────────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('tabs.clipboardRules') || 'CLIPBOARD RULES'}</span>
- </div>
-
- {/* Card 7: Move Pasted to Top */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.clipboardBehaviour') || 'CLIPBOARD BEHAVIOUR'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.movePastedToTopTitle')}</div>
- <div className="setting-desc">{t('behaviour.movePastedToTopDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.movePastedToTop ?? true}
- onChange={(v) => patch({ movePastedToTop: v })}
- />
- </div>
- </div>
- </div>
-
- {/* Card 8: Clear Unpinned on Restart */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.restartCleanup') || 'RESTART CLEANUP'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.clearUnpinnedTitle')}</div>
- <div className="setting-desc">{t('behaviour.clearUnpinnedDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.clearUnpinnedOnRestart}
- onChange={(v) => patch({ clearUnpinnedOnRestart: v })}
- />
- </div>
- </div>
- </div>
-
- {/* ── SUB-GROUP 4: Storage & Retention ─────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('tabs.storageRetention') || 'STORAGE & RETENTION'}</span>
- </div>
-
- {/* Card 9: History Capacity */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.storageCapacity') || 'STORAGE CAPACITY'}</div>
- <div className="setting-title">{t('behaviour.capacityTitle')}</div>
- <div className="setting-desc">{t('behaviour.capacityDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills">
- {[
- { label: '100', val: 100 },
- { label: '250', val: 250 },
- { label: '500', val: 500 },
- { label: '1000', val: 1000 }
- ].map((opt) => (
- <button
- key={opt.val}
- className={`pill ${settings.historyLimit === opt.val ? 'active' : ''}`}
- onClick={() => { playButtonClickSound(); patch({ historyLimit: opt.val }) }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* Card 10: Auto-Delete Timer */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.autoDelete') || 'AUTO-DELETE'}</div>
- <div className="setting-title">{t('behaviour.autoDeleteTitle')}</div>
- <div className="setting-desc">{t('behaviour.autoDeleteDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills">
- {[
- { label: t('behaviour.never'), val: 0 },
- { label: '1h', val: 1 },
- { label: '6h', val: 6 },
- { label: '24h', val: 24 },
- { label: '7d', val: 168 }
- ].map((opt) => (
- <button
- key={opt.val}
- className={`pill ${settings.autoDeleteHours === opt.val ? 'active' : ''}`}
- onClick={() => { playButtonClickSound(); patch({ autoDeleteHours: opt.val }) }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* ── UPDATES SECTION (Consolidated above Community & Support) ── */}
- {!isStoreBuild && (
- <>
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('tabs.updates') || 'UPDATES'}</span>
- </div>
-
- {/* Card 11: Auto Updates (3-way selector) */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.updates') || 'UPDATES'}</div>
- <div className="setting-title">{t('behaviour.autoUpdatesTitle')}</div>
- <div className="setting-desc">
- {updateMode === 'auto'
- ? t('behaviour.autoUpdatesDescOn')
- : updateMode === 'notify'
- ? (t('behaviour.updateModeNotifyDesc') || 'Notify when updates are available without downloading')
- : t('behaviour.autoUpdatesDescOff')}
- </div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills" style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 5 }}>
- {([
- { label: t('behaviour.updateModeAuto') || 'Automatic', val: 'auto' as UpdateMode },
- { label: t('behaviour.updateModeNotify') || 'Notify me', val: 'notify' as UpdateMode },
- { label: t('behaviour.updateModeOff') || 'Off', val: 'off' as UpdateMode }
- ]).map((opt) => (
- <button
- key={opt.val}
- className={`pill ${updateMode === opt.val ? 'active' : ''}`}
- onClick={() => { playButtonClickSound(); patch({ updateMode: opt.val }) }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {renderManualUpdateCard(true)}
- </>
- )}
-
- {PersistentFooter}
- </motion.div>
- )}
-
- {/* ── Tab 2: Position (Second) ─────────────────────────────── */}
- {activeTab === 'position' && (
- <motion.div
- key="tab-position"
- initial={{ opacity: 0, scale: 0.98, y: 4 }}
- animate={{ opacity: 1, scale: 1, y: 0 }}
- exit={{ opacity: 0, scale: 0.98, y: -4 }}
- transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
- >
- {/* ── GROUP: Position ──────────────────────────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('tabs.position') || 'POSITION'}</span>
- </div>
-
- {/* Card 1: Edge Placement */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.placement') || 'PLACEMENT'}</div>
- <div className="setting-title">{t('position.edgePlacementTitle')}</div>
- <div className="setting-desc">{t('position.edgePlacementDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="placement-3way-wrap">
- <button
- type="button"
- className={`pill ${(edgeTransition?.active ? edgeTransition.to === 'left' : settings.stickPosition === 'left') ? 'active' : ''} ${edgeTransition?.active && edgeTransition.to === 'left' ? 'transitioning' : ''}`}
- disabled={edgeTransition?.active}
- onClick={() => {
- void startEdgeTransition('left')
- }}
- >
- {t('position.leftEdge') || 'Left Edge'}
- </button>
- <button
- type="button"
- className={`pill ${(edgeTransition?.active ? edgeTransition.to === 'top' : settings.stickPosition === 'top') ? 'active' : ''} ${edgeTransition?.active && edgeTransition.to === 'top' ? 'transitioning' : ''}`}
- disabled={edgeTransition?.active}
- onClick={() => {
- void startEdgeTransition('top')
- }}
- >
- {t('position.topEdge') || 'Top Edge'}
- </button>
- <button
- type="button"
- className={`pill ${(edgeTransition?.active ? edgeTransition.to === 'right' : settings.stickPosition === 'right') ? 'active' : ''} ${edgeTransition?.active && edgeTransition.to === 'right' ? 'transitioning' : ''}`}
- disabled={edgeTransition?.active}
- onClick={() => {
- void startEdgeTransition('right')
- }}
- >
- {t('position.rightEdge') || 'Right Edge'}
- </button>
- </div>
- </div>
- </div>
-
- {/* Card 2: Position Range Slider */}
- {(() => {
- const isHorizontal = settings.stickPosition === 'top'
- const offsetVal = isHorizontal ? (settings.horizontalOffset ?? 0.5) : (settings.verticalOffset ?? 0.5)
- const sliderTitle = isHorizontal ? (t('position.horizontalPositionTitle') || 'Horizontal Position') : t('position.verticalPositionTitle')
- const sliderDesc = isHorizontal ? (t('position.horizontalPositionDesc') || 'Adjust horizontal alignment along screen edge') : t('position.verticalPositionDesc')
-
- return (
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.alignment') || 'ALIGNMENT'}</div>
- <div className="setting-slider-header" style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }}>
- <div>
- <div className="setting-title">{sliderTitle}</div>
- <div className="setting-desc">{sliderDesc}</div>
- </div>
- <div className="setting-slider-val">
- {`${Math.round(offsetVal * 100)}%`}
- </div>
- </div>
- </div>
-
- <div className="shelf-card-bottom">
- <div className="setting-slider-wrap">
- <WakeSlider
- ariaLabel={sliderTitle}
- min={0}
- max={1}
- step={0.002}
- bars={28}
- height={28}
- restHeight={8}
- gap={3}
- value={offsetVal}
- onStart={() => {
- void window.edge.setInteractive(true)
- setSliderActive(true)
- }}
- onRelease={(val) => {
- setSliderActive(false)
- if (isHorizontal) {
- patch({ horizontalOffset: val })
- } else {
- handleSliderRelease(val)
- }
- }}
- onChange={(raw) => {
- if (isHorizontal) {
- patch({ horizontalOffset: raw })
- } else {
- handleSliderInput(raw)
- }
- }}
- />
-
- <div className="setting-slider-labels">
- {[
- { label: isHorizontal ? 'Left' : '0%', val: 0 },
- { label: 'Center', val: 0.5 },
- { label: isHorizontal ? 'Right' : '100%', val: 1.0 }
- ].map((pos) => {
- const active = Math.abs(offsetVal - pos.val) < 0.04
- return (
- <button
- key={pos.val}
- type="button"
- className={`slider-label-btn${active ? ' active' : ''}`}
- onClick={() => {
- if (isHorizontal) {
- patch({ horizontalOffset: pos.val })
- } else {
- handleSliderRelease(pos.val)
- }
- }}
- >
- {pos.label}
- </button>
- )
- })}
- </div>
- </div>
- </div>
- </div>
- )
- })()}
-
- {/* Card 3: Target Display */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.displayMonitor') || 'DISPLAY MONITOR'}</div>
- <div className="setting-title">{t('position.displayTitle')}</div>
- <div className="setting-desc">{t('position.displayDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills">
- {displays.length === 0 && <div className="pill disabled">{t('position.loadingDisplays')}</div>}
- {displays.map((d) => {
- const currentDisplay = displays.find((disp) => disp.isCurrent)
- const activeDisplayId = currentDisplay
- ? currentDisplay.id
- : (settings.stickDisplayId ?? displays.find((disp) => disp.isPrimary)?.id ?? displays[0]?.id)
- const isActive = activeDisplayId === d.id
- const displayName = d.isPrimary ? t('position.primaryDisplay') : d.name
- return (
- <button
- key={d.id}
- className={`pill display-pill ${isActive ? 'active' : ''}`}
- onClick={() => {
- playButtonClickSound()
- patch({ stickDisplayId: d.id })
- useStore.getState().notifyPositionChanged()
- }}
- >
- <div className="pill-name">{displayName}</div>
- <div className="pill-res">{d.resolution}</div>
- </button>
- )
- })}
- </div>
- </div>
- </div>
-
- {/* ── GROUP: Trigger Zone ──────────────────────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('position.triggerZone') || 'TRIGGER ZONE'}</span>
- </div>
-
- {/* Card 4: Location Hint */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.locationHint') || 'LOCATION HINT'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('position.edgeLocationHintTitle')}</div>
- <div className="setting-desc">{t('position.edgeLocationHintDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.showEdgeLocationHint ?? false}
- onChange={(v) => patch({ showEdgeLocationHint: v })}
- />
- </div>
- </div>
- </div>
-
- {/* Card 5: Trigger Alignment */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.triggerPosition') || 'TRIGGER POSITION'}</div>
- <div className="setting-title">{t('position.edgeTriggerPositionTitle')}</div>
- <div className="setting-desc">{t('position.edgeTriggerPositionDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills">
- {[
- { label: (settings.stickPosition === 'top') ? (t('position.left') || 'Left') : t('position.top'), val: 'top' as const },
- { label: t('position.center'), val: 'center' as const },
- { label: (settings.stickPosition === 'top') ? (t('position.right') || 'Right') : t('position.bottom'), val: 'bottom' as const }
- ].map((opt) => (
- <button
- key={opt.val}
- className={`pill ${(settings.triggerAlignment || 'center') === opt.val ? 'active' : ''}`}
- onClick={() => {
- playButtonClickSound()
- patch({ triggerAlignment: opt.val })
- useStore.getState().notifyPositionChanged()
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* Card 6: Hover Area Size */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.hoverZoneLength') || 'HOVER ZONE LENGTH'}</div>
- <div className="setting-title">{t('position.hoverAreaSizeTitle')}</div>
- <div className="setting-desc">{t('position.hoverAreaSizeDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills">
- {[
- { label: t('appearance.small'), val: 0.25 },
- { label: t('position.medium'), val: 0.4 },
- { label: t('appearance.large'), val: 0.6 }
- ].map((opt) => (
- <button
- key={opt.label}
- className={`pill ${Math.abs(settings.hotZoneHeight - opt.val) < 0.08 ? 'active' : ''}`}
- onClick={() => {
- playButtonClickSound()
- patch({ hotZoneHeight: opt.val })
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* Card 7: Edge Trigger Thickness */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.triggerThickness') || 'TRIGGER THICKNESS'}</div>
- <div className="setting-slider-header" style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%' }}>
- <div>
- <div className="setting-title">{t('position.edgeTriggerThicknessTitle')}</div>
- <div className="setting-desc">{t('position.edgeTriggerThicknessDesc')}</div>
- </div>
- <div className="setting-slider-val">
- {`${settings.hotZoneWidth ?? 3}px`}
- </div>
- </div>
- </div>
-
- <div className="shelf-card-bottom">
- <div className="setting-slider-wrap">
- <WakeSlider
- min={1}
- max={7}
- step={1}
- bars={28}
- height={28}
- restHeight={8}
- gap={3}
- value={settings.hotZoneWidth ?? 3}
- onStart={() => {
- void window.edge.setInteractive(true)
- setSliderActive(true)
- }}
- onRelease={(val) => {
- handleThicknessRelease(val)
- }}
- onChange={(val) => {
- handleThicknessInput(val)
- }}
- />
-
- <div className="setting-slider-labels">
- {[
- { label: 'Min', val: 1 },
- { label: 'Mid', val: 4 },
- { label: 'Max', val: 7 }
- ].map((preset) => {
- const currentPx = settings.hotZoneWidth ?? 3
- const active = currentPx === preset.val
- return (
- <button
- key={preset.val}
- type="button"
- className={`slider-label-btn${active ? ' active' : ''}`}
- onClick={() => {
- if (currentPx !== preset.val) {
- handleThicknessRelease(preset.val)
- }
- }}
- >
- {preset.label}
- </button>
- )
- })}
- </div>
- </div>
- </div>
- </div>
-
- {/* Card 8: Panel Height */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.panelHeight') || 'PANEL HEIGHT'}</div>
- <div className="setting-title">{t('position.panelHeightTitle')}</div>
- <div className="setting-desc">{t('position.panelHeightDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills">
- {[
- { label: t('appearance.small'), val: 0.5 },
- { label: t('position.medium'), val: 0.65 },
- { label: t('appearance.large'), val: 0.8 }
- ].map((opt) => (
- <button
- key={opt.label}
- className={`pill ${Math.abs((settings.panelHeight || 0.6) - opt.val) < 0.08 ? 'active' : ''}`}
- onClick={() => {
- playButtonClickSound()
- patch({ panelHeight: opt.val })
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {PersistentFooter}
- </motion.div>
- )}
-
- {/* ── Tab 3: Appearance (Third) ────────────────────────────── */}
- {activeTab === 'appearance' && (
- <motion.div
- key="tab-appearance"
- initial={{ opacity: 0, scale: 0.98, y: 4 }}
- animate={{ opacity: 1, scale: 1, y: 0 }}
- exit={{ opacity: 0, scale: 0.98, y: -4 }}
- transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
- >
- {/* ── GROUP: Copy Indicator ────────────────────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('appearance.copyIndicatorTitle') || 'COPY INDICATOR'}</span>
- </div>
-
- {/* Card 1: Copy Indicator Toggle */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.copyBeacon') || 'COPY BEACON'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('appearance.copyIndicatorTitle')}</div>
- <div className="setting-desc">{t('appearance.copyIndicatorDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.showCopyIndicator ?? true}
- onChange={(v) => patch({ showCopyIndicator: v })}
- />
- </div>
- </div>
- </div>
-
- {/* Card 2: Indicator Style */}
- {(settings.showCopyIndicator ?? true) && (
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.beaconStyle') || 'BEACON STYLE'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('appearance.indicatorStyleTitle')}</div>
- <div className="setting-desc">
- {t('appearance.indicatorStyleDesc')}
- </div>
- </div>
- <div className="shelf-card-inline-action">
- <button
- type="button"
- className={`icon-btn style-preview-toggle-btn ${isFlyoutActive ? 'active' : ''}`}
- title={isFlyoutActive ? t('appearance.closeStyleSelector') : t('appearance.openStyleSelector')}
- onClick={(e) => {
- playButtonClickSound()
- handleToggleFlyout(e.currentTarget)
- }}
- >
- {isFlyoutActive ? <CloseIcon /> : <ChevronRightIcon />}
- </button>
- </div>
- </div>
-
- {isTutorial && localInlineOpen && (
- <motion.div
- initial={{ opacity: 0, height: 0 }}
- animate={{ opacity: 1, height: 'auto' }}
- exit={{ opacity: 0, height: 0 }}
- transition={{ duration: 0.22, ease: 'easeOut' }}
- style={{ overflow: 'hidden', marginTop: 12, marginBottom: 8 }}
- >
- <div style={{
- display: 'grid',
- gridTemplateColumns: 'repeat(2, 1fr)',
- gap: 10,
- padding: 12,
- background: '#09090b',
- borderRadius: 12,
- border: '1px solid rgba(255, 255, 255, 0.08)'
- }}>
- {/* Logo Card */}
- <div
- onClick={() => {
- playButtonClickSound()
- patch({ copyIndicatorStyle: 'logo' })
- }}
- style={{
- background: (settings.copyIndicatorStyle || 'logo') === 'logo' ? 'rgba(255, 255, 255, 0.12)' : 'rgba(255, 255, 255, 0.04)',
- border: '1px solid transparent',
- borderRadius: 10,
- padding: '12px 8px',
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- cursor: 'pointer',
- gap: 8,
- transition: 'all 0.2s ease'
- }}
- >
- <div style={{ height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
- <LogoIndicatorIcon fillColor="#ffffff" size={30} />
- </div>
- <div style={{ fontSize: 12, fontWeight: 600, color: '#ffffff' }}>{t('appearance.logoStyle')}</div>
- </div>
-
- {/* Tick Card */}
- <div
- onClick={() => {
- playButtonClickSound()
- patch({ copyIndicatorStyle: 'check' })
- }}
- style={{
- background: settings.copyIndicatorStyle === 'check' ? 'rgba(255, 255, 255, 0.12)' : 'rgba(255, 255, 255, 0.04)',
- border: '1px solid transparent',
- borderRadius: 10,
- padding: '12px 8px',
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- cursor: 'pointer',
- gap: 8,
- transition: 'all 0.2s ease'
- }}
- >
- <div style={{ height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
- <TickIndicatorIcon fillColor="#ffffff" size={30} />
- </div>
- <div style={{ fontSize: 12, fontWeight: 600, color: '#ffffff' }}>{t('appearance.tickStyle')}</div>
- </div>
-
- {/* Copy Card */}
- <div
- onClick={() => {
- playButtonClickSound()
- patch({ copyIndicatorStyle: 'copy' })
- }}
- style={{
- background: settings.copyIndicatorStyle === 'copy' ? 'rgba(255, 255, 255, 0.12)' : 'rgba(255, 255, 255, 0.04)',
- border: '1px solid transparent',
- borderRadius: 10,
- padding: '12px 8px',
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- cursor: 'pointer',
- gap: 8,
- transition: 'all 0.2s ease'
- }}
- >
- <div style={{ height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
- <CopyIndicatorIcon fillColor="#ffffff" size={30} />
- </div>
- <div style={{ fontSize: 12, fontWeight: 600, color: '#ffffff' }}>{t('appearance.copyStyle')}</div>
- </div>
-
- {/* Sparkle Card */}
- <div
- onClick={() => {
- playButtonClickSound()
- patch({ copyIndicatorStyle: 'sparkle' })
- }}
- style={{
- background: settings.copyIndicatorStyle === 'sparkle' ? 'rgba(255, 255, 255, 0.12)' : 'rgba(255, 255, 255, 0.04)',
- border: '1px solid transparent',
- borderRadius: 10,
- padding: '12px 8px',
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- cursor: 'pointer',
- gap: 8,
- transition: 'all 0.2s ease'
- }}
- >
- <div style={{ height: 36, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
- <SparkleIndicatorIcon fillColor="#ffffff" size={30} />
- </div>
- <div style={{ fontSize: 12, fontWeight: 600, color: '#ffffff' }}>{t('appearance.sparkleStyle')}</div>
- </div>
- </div>
- </motion.div>
- )}
- </div>
- )}
-
- {/* ── GROUP: Typography ────────────────────────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('appearance.typography') || 'TYPOGRAPHY'}</span>
- </div>
-
- {/* Card 3: Text Size */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.textSize') || 'TEXT SIZE'}</div>
- <div className="setting-title">{t('appearance.textSizeTitle')}</div>
- <div className="setting-desc">{t('appearance.textSizeDesc')}</div>
- </div>
- <div className="shelf-card-bottom">
- <div className="setting-pills">
- {[
- { label: t('appearance.small'), val: 0.85 },
- { label: t('appearance.normal'), val: 1.0 },
- { label: t('appearance.large'), val: 1.15 }
- ].map((opt) => (
- <button
- key={opt.label}
- className={`pill ${Math.abs((settings.fontSizeScale ?? 1.0) - opt.val) < 0.05 ? 'active' : ''}`}
- onClick={() => {
- playButtonClickSound()
- patch({ fontSizeScale: opt.val })
- }}
- >
- {opt.label}
- </button>
- ))}
- </div>
- </div>
- </div>
-
- {/* ── GROUP: Audio & Feedback ──────────────────────────── */}
- <div className="setting-section-divider">
- <span className="setting-section-divider-text">{t('appearance.audioAndFeedback') || 'AUDIO FEEDBACK'}</span>
- </div>
-
- {/* Card 4: Audio Feedback */}
- <div className="setting-card">
- <div className="shelf-card-top">
- <div className="setting-group-label">{t('groups.audioFeedback') || 'AUDIO FEEDBACK'}</div>
- </div>
- <div className="shelf-card-inline">
- <div className="shelf-card-inline-text">
- <div className="setting-title">{t('behaviour.soundEffectsTitle')}</div>
- <div className="setting-desc">{t('behaviour.soundEffectsDesc')}</div>
- </div>
- <div className="shelf-card-inline-action">
- <Toggle
- checked={settings.soundEffects ?? true}
- onChange={(v) => {
- if (v) playToggleSound(true)
- patch({ soundEffects: v })
- }}
- />
- </div>
- </div>
- </div>
+ <div className="set-row-main">
+ <div className="set-row-text" title={tooltip}>
+ <div className="set-row-title">{row.title}</div>
+ {row.desc && <div className={`set-row-desc${row.descError ? ' is-error' : ''}`}>{row.desc}</div>}
+ </div>
+ {row.trailing && <div className="set-row-trailing">{row.trailing}</div>}
+ </div>
+ {row.below && <div className="set-row-below">{row.below}</div>}
+ {row.extra}
+ </div>
+ )
+}
- {PersistentFooter}
- </motion.div>
- )}
- </AnimatePresence>
+/** Top dock columns: a setting with a wide control (pills, slider, recorder)
+ * fills a column; settings with just a toggle or button stack two to one. */
+function columnsOf(rows: RowSpec[]): RowSpec[][] {
+ const cols: RowSpec[][] = []
+ for (const row of rows) {
+ const last = cols[cols.length - 1]
+ if (!row.below && last && last.length === 1 && !last[0].below) last.push(row)
+ else cols.push([row])
+ }
+ return cols
+}
- </div>
- </div>
- )
- }
+function SettingGroup({ group, layout }: { group: GroupSpec; layout: 'v' | 'h' }) {
+ return (
+ <section className={`set-group${layout === 'h' ? ' is-h' : ''}`} data-group={group.id}>
+ <h3 className="set-group-label">{group.label}</h3>
+ <div className="set-group-card">
+ {layout === 'h'
+ ? columnsOf(group.rows).map((col) => (
+ <div key={col[0].id} className={`set-col${col.length > 1 ? ' is-pair' : ''}`}>
+ {col.map((row) => (
+ <SettingRow key={row.id} row={row} layout={layout} />
+ ))}
+ </div>
+ ))
+ : group.rows.map((row) => <SettingRow key={row.id} row={row} layout={layout} />)}
+ </div>
+ </section>
+ )
+}
function Toggle({
checked,
diff --git a/src/components/icons.tsx b/src/components/icons.tsx
index 1015e27..b785a35 100644
--- a/src/components/icons.tsx
+++ b/src/components/icons.tsx
@@ -123,6 +123,8 @@ export const TagIcon = uiIcon('tag')
export const PasteIcon = uiIcon('clipboardText')
export const DownloadIcon = uiIcon('downloadSimple')
+export const ArrowsClockwiseIcon = uiIcon('arrowsClockwise')
+
export const EmojiSmileIcon = uiIcon('smiley', 18)
export const EmojiClockIcon = (p: P) => <ClockIcon width={p.width ?? 18} height={p.height ?? 18} {...(p as any)} />
export const EmojiUserIcon = uiIcon('users', 18)
diff --git a/src/components/phosphorPaths.ts b/src/components/phosphorPaths.ts
index aaaa9ea..e45b05e 100644
--- a/src/components/phosphorPaths.ts
+++ b/src/components/phosphorPaths.ts
@@ -32,9 +32,10 @@
export const PHOSPHOR_BOLD = {
arrowCounterClockwise: 'M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z',
arrowLineDown: 'M47.51,112.49a12,12,0,0,1,17-17L116,147V32a12,12,0,0,1,24,0V147l51.51-51.52a12,12,0,0,1,17,17l-72,72a12,12,0,0,1-17,0ZM216,204H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z',
- arrowSquareOut: 'M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z',
+ arrowsClockwise: 'M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z',
arrowsInSimple: 'M216.49,56.48,177,96h19a12,12,0,0,1,0,24H148a12,12,0,0,1-12-12V60a12,12,0,0,1,24,0V79l39.51-39.52a12,12,0,0,1,17,17ZM108,136H60a12,12,0,0,0,0,24H79L39.51,199.51a12,12,0,0,0,17,17L96,177v19a12,12,0,0,0,24,0V148A12,12,0,0,0,108,136Z',
arrowsOutSimple: 'M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z',
+ arrowSquareOut: 'M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z',
caretDown: 'M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z',
caretLeft: 'M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z',
caretRight: 'M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z',
@@ -45,8 +46,8 @@ export const PHOSPHOR_BOLD = {
clockCounterClockwise: 'M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z',
coffee: 'M212,76H32A12,12,0,0,0,20,88v48a100.24,100.24,0,0,0,26.73,68H32a12,12,0,0,0,0,24H208a12,12,0,0,0,0-24H193.27a100.75,100.75,0,0,0,20-32A44,44,0,0,0,256,128v-8A44.05,44.05,0,0,0,212,76Zm-16,60a76.27,76.27,0,0,1-42,68H86a76.27,76.27,0,0,1-42-68V100H196Zm36-8a20,20,0,0,1-12.57,18.55A97.17,97.17,0,0,0,220,136V101.68A20,20,0,0,1,232,120ZM68,48V24a12,12,0,0,1,24,0V48a12,12,0,0,1-24,0Zm40,0V24a12,12,0,0,1,24,0V48a12,12,0,0,1-24,0Zm40,0V24a12,12,0,0,1,24,0V48a12,12,0,0,1-24,0Z',
copy: 'M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z',
- downloadSimple: 'M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z',
dotsSixVertical: 'M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z',
+ downloadSimple: 'M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z',
files: 'M220.49,59.51l-40-40A12,12,0,0,0,172,16H92A20,20,0,0,0,72,36V56H56A20,20,0,0,0,36,76V216a20,20,0,0,0,20,20H164a20,20,0,0,0,20-20V196h20a20,20,0,0,0,20-20V68A12,12,0,0,0,220.49,59.51ZM160,212H60V80h67l33,33Zm40-40H184V108a12,12,0,0,0-3.51-8.49l-40-40A12,12,0,0,0,132,56H96V40h71l33,33Zm-56-28a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h44A12,12,0,0,1,144,144Zm0,40a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h44A12,12,0,0,1,144,184Z',
flag: 'M40.14,46.88A12,12,0,0,0,36,56V224a12,12,0,0,0,24,0V181.72c22.84-17.12,42.1-9.12,70.68,5,16.23,8,34.74,17.2,54.8,17.2,14.72,0,30.28-4.94,46.38-18.88A12,12,0,0,0,236,176V56a12,12,0,0,0-19.86-9.07c-24.71,21.41-44.53,13.31-74.82-1.68C113.19,31.27,78.17,13.94,40.14,46.88ZM212,170.26c-22.84,17.13-42.1,9.11-70.68-5C118.16,153.76,90.33,140,60,153.87V61.69c22.84-17.12,42.1-9.12,70.68,5,16.23,8,34.74,17.2,54.8,17.2A63,63,0,0,0,212,78.08Z',
folderOpen: 'M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z',
diff --git a/src/styles/settings.css b/src/styles/settings.css
index acb277f..18a5029 100644
--- a/src/styles/settings.css
+++ b/src/styles/settings.css
@@ -69,16 +69,6 @@
box-shadow: none;
}
-.settings-tab-indicator {
- position: absolute;
- inset: 0;
- border-radius: 999px;
- background: #ffffff;
- box-shadow: none;
- z-index: 0;
- pointer-events: none;
-}
-
.settings-tab-text {
position: relative;
z-index: 1;
@@ -88,29 +78,6 @@
white-space: nowrap;
}
-.setting-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 16px;
- padding: 14px 4px;
-}
-
-.setting-row.vertical {
- flex-direction: column;
- align-items: flex-start;
- gap: 12px;
-}
-
-.setting-info {
- flex: 1;
- min-width: 0;
- display: flex;
- flex-direction: column;
- gap: 4px;
- margin-right: 8px;
-}
-
.setting-title {
font-size: calc(14px * var(--font-scale, 1));
font-weight: 600;
@@ -132,62 +99,7 @@
overflow-wrap: break-word;
}
-.setting-divider {
- height: 1px;
- background: rgba(255, 255, 255, 0.08);
- margin: 4px 4px;
- flex-shrink: 0;
-}
-
-/* ── Section Dividers across Vertical Settings (Matches Horizontal Subcategory Style) ── */
-.setting-section-divider {
- display: flex;
- align-items: center;
- gap: 10px;
- margin: 22px 2px 10px;
- user-select: none;
- flex-shrink: 0;
-}
-
-.setting-section-divider:first-of-type,
-.setting-section-divider:first-child {
- margin-top: 6px;
-}
-
-.setting-section-divider .setting-section-divider-text {
- font-size: calc(9.5px * var(--font-scale, 1));
- font-weight: 600;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- color: rgba(255, 255, 255, 0.38);
- white-space: nowrap;
-}
-
-.setting-section-divider::after {
- content: '';
- flex: 1;
- height: 1px;
- background: rgba(255, 255, 255, 0.08);
-}
-
-.setting-group-label {
- font-size: calc(10px * var(--font-scale, 1));
- font-weight: 700;
- text-transform: uppercase;
- letter-spacing: 0.08em;
- color: rgba(255, 255, 255, 0.42);
- margin: 18px 4px 8px;
- user-select: none;
- white-space: normal;
- word-break: break-word;
- overflow-wrap: break-word;
-}
-
-.setting-group-label:first-of-type {
- margin-top: 4px;
-}
-
-/* ── Vertical Setting Card (Matches Horizontal Shelf Card Aesthetic) ── */
+/* ── Update card (side docks); the settings themselves use .set-group ── */
.setting-card {
width: 100%;
background: var(--bg-card, #141414);
@@ -238,16 +150,6 @@
opacity: 1.2;
}
-.setting-card .setting-group-label {
- font-size: 9.5px;
- font-weight: 700;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- color: rgba(255, 255, 255, 0.42);
- margin: 0 0 2px 0;
- flex-shrink: 0;
-}
-
.setting-card .setting-title {
font-size: calc(13px * var(--font-scale, 1));
font-weight: 600;
@@ -262,14 +164,6 @@
margin-top: 2px;
}
-.setting-card .shelf-card-inline {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 12px;
- width: 100%;
-}
-
.setting-card .shelf-card-top {
display: flex;
flex-direction: column;
@@ -308,21 +202,6 @@
box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}
-.setting-badge-subtle {
- display: inline-flex;
- align-items: center;
- margin-top: 4px;
- padding: 2px 7px;
- font-size: calc(10px * var(--font-scale, 1));
- font-weight: 500;
- color: rgba(255, 255, 255, 0.55);
- background: rgba(255, 255, 255, 0.04);
- border: 1px solid rgba(255, 255, 255, 0.08);
- border-radius: 4px;
- width: fit-content;
- user-select: none;
-}
-
/* Minimalist Pill Selector (Replaces Sliders!) */
.setting-pills {
display: flex;
@@ -399,8 +278,7 @@
}
/* Edge pill transition pulse */
-.placement-3way-wrap .pill.transitioning,
-.placement-diamond-wrap .pill.transitioning {
+.placement-3way-wrap .pill.transitioning {
animation: edgePillPulse 0.44s ease-in-out infinite alternate;
box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}
@@ -425,99 +303,6 @@
width: 100%;
}
-.setting-slider-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 12px;
- width: 100%;
-}
-
-.setting-slider-val {
- font-size: calc(11px * var(--font-scale, 1));
- font-weight: 600;
- font-family: var(--font-mono);
- color: #ffffff;
- background: rgba(255, 255, 255, 0.1);
- border: 1px solid rgba(255, 255, 255, 0.18);
- padding: 3px 9px;
- border-radius: 999px;
- letter-spacing: 0.02em;
- white-space: nowrap;
- flex-shrink: 0;
-}
-
-.setting-range-input {
- -webkit-appearance: none;
- appearance: none;
- width: 100%;
- height: 6px;
- border-radius: 999px;
- outline: none;
- cursor: pointer;
- margin: 6px 0 2px 0;
- transition: background 0.15s ease;
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
- transform: translateZ(0);
-}
-
-.setting-range-input::-webkit-slider-thumb {
- -webkit-appearance: none;
- appearance: none;
- width: 14px;
- height: 14px;
- border-radius: 50%;
- background: #ffffff;
- border: 1.5px solid #000000;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
- cursor: grab;
- transition: transform 0.15s ease;
-}
-
-.setting-range-input::-webkit-slider-thumb:hover {
- transform: scale(1.18);
- box-shadow: 0 1.5px 6px rgba(0, 0, 0, 0.6);
-}
-
-.setting-range-input::-webkit-slider-thumb:active {
- cursor: grabbing;
- transform: scale(1.24);
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
-}
-
-/* Slider 5% Tick Marks Bar */
-.setting-slider-ticks {
- position: relative;
- display: flex;
- justify-content: space-between;
- align-items: flex-end;
- width: 100%;
- height: 8px;
- padding: 0 6px;
- margin-top: 1px;
- pointer-events: none;
-}
-
-.slider-tick {
- width: 1px;
- height: 4px;
- background: rgba(255, 255, 255, 0.22);
- border-radius: 1px;
- transition: background 0.15s ease, height 0.15s ease;
-}
-
-.slider-tick.major {
- height: 7px;
- width: 1.5px;
- background: rgba(255, 255, 255, 0.55);
-}
-
-.slider-tick.active {
- background: #ffffff;
- box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
-}
-
/* 3 Main Percentage Labels (0%, 50%, 100%) */
.setting-slider-labels {
display: flex;
@@ -641,371 +426,94 @@
background: #000000;
}
-/* Update Prompt Banner (Monochrome Glassmorphic Glow) */
-.update-prompt {
- display: flex;
- flex-direction: column;
- gap: 10px;
- padding: 14px 12px;
- background: rgba(255, 255, 255, 0.04);
- border: 1px solid rgba(255, 255, 255, 0.12);
- border-radius: 10px;
- margin: 6px 4px 10px 4px;
-}
-
-.update-text {
- font-size: 12.5px;
- font-weight: 500;
+/* Indicator style: opens the style flyout */
+.style-preview-toggle-btn {
+ width: 32px;
+ height: 32px;
+ border-radius: 8px;
+ background: rgba(255, 255, 255, 0.06);
+ border: 1px solid transparent;
color: #ffffff;
- line-height: 1.45;
- letter-spacing: 0.01em;
-}
-
-.update-btn {
- width: 100%;
- padding: 8px 0;
- border-radius: 6px;
- font-size: 12.5px;
- font-weight: 600;
- color: #000000;
- background: #ffffff;
- border: none;
+ display: flex;
+ align-items: center;
+ justify-content: center;
cursor: pointer;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
- transition: opacity 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
- text-align: center;
+ transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
+ flex-shrink: 0;
+ outline: none;
}
-.update-btn:hover {
- opacity: 0.92;
- box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
+.style-preview-toggle-btn:hover {
+ background: rgba(255, 255, 255, 0.14);
+ color: #ffffff;
}
-.update-btn:active {
- transform: scale(0.98);
+.style-preview-toggle-btn.active {
+ background: rgba(255, 255, 255, 0.18);
+ color: #ffffff;
+ box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
}
-/* Quit Application Button */
-.quit-app-btn {
- width: 100%;
- display: inline-flex;
+.indicator-card {
+ position: relative;
+ display: flex;
+ flex-direction: column;
align-items: center;
- justify-content: center;
- gap: 8px;
- padding: 8px 16px;
- border-radius: 8px;
- font-size: 12.5px;
- font-weight: 600;
- color: #ff5555;
- background: rgba(255, 60, 60, 0.08);
- border: 1px solid transparent;
+ gap: 6px;
+ padding: 10px 8px 12px;
+ background: var(--bg-card);
+ border: 2px solid transparent;
+ border-radius: 16px;
cursor: pointer;
- white-space: nowrap;
- transition: all 0.2s ease;
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
- transform: translateZ(0);
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
+ transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
+ user-select: none;
+ overflow: hidden;
+ box-sizing: border-box;
}
-.quit-app-btn:hover {
- background: rgba(255, 60, 60, 0.16);
- color: #ff7777;
- box-shadow: 0 0 16px rgba(255, 60, 60, 0.2);
+.indicator-card:hover {
+ background: var(--bg-card-hover);
}
-.quit-app-btn:active {
- transform: scale(0.98);
+.indicator-card.active {
+ background: #262626;
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 255, 255, 0.12);
+ outline: none;
}
-/* Support & GitHub Promo Footer Card */
-.support-promo {
+.indicator-card-stage {
+ width: 100%;
+ height: 64px;
+ background: #000000;
+ border-radius: 6px;
+ position: relative;
display: flex;
- flex-direction: column;
align-items: center;
- gap: 12px;
- padding: 16px 14px 14px;
- background: #141414;
+ justify-content: center;
+ overflow: hidden;
border: none;
- border-radius: 16px;
- margin: 16px 4px 8px 4px;
- text-align: center;
- box-shadow: none;
}
-.support-promo-title {
- font-size: 12px;
- color: rgba(255, 255, 255, 0.68);
- line-height: 1.48;
- font-weight: 450;
- max-width: 100%;
- white-space: normal;
- word-break: break-word;
- overflow-wrap: break-word;
- padding: 0 4px;
+.indicator-card-badge {
+ position: absolute;
+ top: 6px;
+ right: 6px;
+ width: 18px;
+ height: 18px;
+ border-radius: 50%;
+ background: #ffffff;
+ color: #000000;
+ font-size: 11px;
+ font-weight: 700;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
+ z-index: 5;
}
-.support-buttons-group {
- display: flex;
- flex-direction: column;
- gap: 8px;
- width: 100%;
- max-width: 100%;
- margin-top: 2px;
-}
-
-.kofi-support-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- width: 100%;
- height: 38px;
- padding: 0 16px;
- border-radius: 999px;
- font-size: 12.5px;
- font-weight: 600;
- color: #000000;
- background: #ffffff;
- border: none;
- box-shadow: none;
- cursor: pointer;
- white-space: nowrap;
- transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
-}
-
-.kofi-support-btn:hover {
- background: rgba(255, 255, 255, 0.92);
- transform: translateY(-1px);
-}
-
-.kofi-support-btn:active {
- transform: scale(0.98);
-}
-
-/* Secondary Action Promo Footer (GitHub Star on GitHub builds / Store Review on Store builds) */
-.github-promo-btn,
-.store-review-promo-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- width: 100%;
- height: 38px;
- padding: 0 16px;
- border-radius: 999px;
- font-size: 12.5px;
- font-weight: 550;
- color: rgba(255, 255, 255, 0.9);
- background: #1c1c1c;
- border: none;
- box-shadow: none;
- cursor: pointer;
- white-space: nowrap;
- transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
-}
-
-.github-promo-btn:hover,
-.store-review-promo-btn:hover {
- background: #252525;
- color: #ffffff;
- transform: translateY(-1px);
-}
-
-.github-promo-btn:active,
-.store-review-promo-btn:active {
- transform: scale(0.98);
-}
-
-.github-promo-btn .github-octocat-icon,
-.store-review-promo-btn .store-logo-icon {
- flex-shrink: 0;
- color: rgba(255, 255, 255, 0.9);
-}
-
-.github-promo-btn .star-icon {
- color: #fbbf24;
-}
-
-.app-version-footer {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 6px;
- font-size: 11px;
- color: rgba(255, 255, 255, 0.38);
- font-weight: 500;
- letter-spacing: 0.02em;
- margin-top: 4px;
- user-select: none;
-}
-
-.version-separator {
- opacity: 0.35;
-}
-
-.version-changelog-link {
- background: transparent;
- border: none;
- color: rgba(255, 255, 255, 0.45);
- font: inherit;
- font-size: 11px;
- cursor: pointer;
- padding: 0;
- display: inline-flex;
- align-items: center;
- gap: 3px;
- transition: color 0.15s ease;
-}
-
-.version-changelog-link:hover {
- color: #ffffff;
-}
-
-/* Subtle Bottom Quit Button */
-.subtle-quit-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 6px;
- height: 28px;
- padding: 0 14px;
- border-radius: 999px;
- font-size: 11.5px;
- font-weight: 500;
- color: rgba(255, 255, 255, 0.5);
- background: transparent;
- border: none;
- box-shadow: none;
- cursor: pointer;
- transition: all 0.18s ease;
-}
-
-.subtle-quit-btn:hover {
- background: rgba(255, 80, 80, 0.12);
- color: #ff6b6b;
-}
-
-.subtle-quit-btn:active {
- transform: scale(0.96);
-}
-
-/* Visual Copy Indicator Style Cards */
-.indicator-card-grid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 10px;
- width: 100%;
- margin-top: 6px;
-}
-
-.indicator-card-grid.three-col {
- grid-template-columns: repeat(3, 1fr);
- gap: 8px;
-}
-
-.style-preview-toggle-btn {
- width: 32px;
- height: 32px;
- border-radius: 8px;
- background: rgba(255, 255, 255, 0.06);
- border: 1px solid transparent;
- color: #ffffff;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
- flex-shrink: 0;
- outline: none;
-}
-
-.style-preview-toggle-btn:hover {
- background: rgba(255, 255, 255, 0.14);
- color: #ffffff;
-}
-
-.style-preview-toggle-btn.active {
- background: rgba(255, 255, 255, 0.18);
- color: #ffffff;
- box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
-}
-
-.indicator-card {
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 6px;
- padding: 10px 8px 12px;
- background: var(--bg-card);
- border: 2px solid transparent;
- border-radius: 16px;
- cursor: pointer;
- transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
- user-select: none;
- overflow: hidden;
- box-sizing: border-box;
-}
-
-.indicator-card:hover {
- background: var(--bg-card-hover);
-}
-
-.indicator-card.active {
- background: #262626;
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 255, 255, 0.12);
- outline: none;
-}
-
-.indicator-card-stage {
- width: 100%;
- height: 64px;
- background: #000000;
- border-radius: 6px;
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- border: none;
-}
-
-.indicator-card-title {
- font-size: 12px;
- font-weight: 600;
- color: #ffffff;
- margin-top: 2px;
-}
-
-.indicator-card-desc {
- font-size: 10.5px;
- color: #a1a1aa;
- text-align: center;
- line-height: 1.2;
-}
-
-.indicator-card-badge {
- position: absolute;
- top: 6px;
- right: 6px;
- width: 18px;
- height: 18px;
- border-radius: 50%;
- background: #ffffff;
- color: #000000;
- font-size: 11px;
- font-weight: 700;
- display: flex;
- align-items: center;
- justify-content: center;
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
- z-index: 5;
-}
-
-/* Hotkey Recorder UI */
-.hotkey-recorder-wrap {
+/* Hotkey Recorder UI */
+.hotkey-recorder-wrap {
width: 100%;
}
@@ -1180,279 +688,49 @@
line-height: 1;
}
-/* ── Top Update Banner (Live Downloading Progress & Ready to Install) ── */
-.settings-top-update-card {
- display: flex;
- flex-direction: column;
- gap: 8px;
- padding: 14px 16px;
- background: #141414;
- border-radius: 14px;
- margin: 4px 4px 14px 4px;
- box-shadow: none;
- box-sizing: border-box;
- animation: updateCardFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
+/* ── Unified Update Indicator Dots ── */
+.update-dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ flex-shrink: 0;
+ display: inline-block;
+ background: #ffffff;
}
-@keyframes updateCardFadeIn {
- from {
- opacity: 0;
- transform: translateY(-3px);
- }
- to {
+.update-dot.checking {
+ animation: dotPulse 1.2s ease-in-out infinite;
+}
+
+@keyframes dotPulse {
+ 0%, 100% {
opacity: 1;
- transform: translateY(0);
+ }
+ 50% {
+ opacity: 0.35;
}
}
-.settings-update-header {
+/* ── Unified Group Labels & Header for Update Cards ── */
+.update-header-row {
display: flex;
align-items: center;
- gap: 8px;
- min-height: 18px;
+ justify-content: space-between;
+ width: 100%;
+ margin-bottom: 3px;
}
-.settings-update-badge-pill {
+.update-group-label {
display: inline-flex;
align-items: center;
- gap: 8px;
- font-size: 12px;
- font-weight: 550;
- color: #ffffff;
- letter-spacing: -0.01em;
-}
-
-.settings-update-desc {
- font-size: 11px;
- color: rgba(255, 255, 255, 0.65);
- line-height: 1.35;
-}
-
-.update-status-dot {
- width: 6px;
- height: 6px;
- border-radius: 50%;
- flex-shrink: 0;
- background: #ffffff;
-}
-
-.settings-update-restart-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 36px;
- min-height: 36px;
- max-height: 36px;
- background: #ffffff;
- color: #000000;
- border: none;
- border-radius: 999px;
- font-size: 12.5px;
- font-weight: 600;
- cursor: pointer;
- box-shadow: none;
- transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
- margin-top: 4px;
- box-sizing: border-box;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-variant-numeric: tabular-nums;
-}
-
-.settings-update-restart-btn:hover {
- background: rgba(255, 255, 255, 0.92);
- transform: translateY(-1px);
-}
-
-.settings-update-restart-btn:active {
- transform: scale(0.98);
-}
-
-.settings-update-restart-btn.downloading {
- cursor: default;
- opacity: 0.92;
-}
-
-.settings-update-restart-btn.downloading:hover {
- background: #ffffff;
- transform: none;
-}
-
-.settings-update-restart-btn.downloading:active {
- transform: none;
-}
-
-/* ── Manual Update Section (Bottom of Behaviour, above Community) ── */
-.manual-update-section {
- display: flex;
- flex-direction: column;
- gap: 10px;
- margin-top: 8px;
-}
-
-.manual-update-card {
- display: flex;
- flex-direction: column;
- gap: 8px;
- padding: 12px 14px;
- background: var(--bg-card, #141414);
- border-radius: var(--radius-card, 16px);
- border: 1px solid rgba(255, 255, 255, 0.08);
- box-sizing: border-box;
- animation: updateCardFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
- transition: background 0.14s ease, border-color 0.14s ease;
-}
-
-.manual-update-card:hover {
- background: var(--bg-card-hover, #1c1c1c);
- border-color: rgba(255, 255, 255, 0.14);
-}
-
-.manual-update-info {
- display: flex;
- flex-direction: column;
- gap: 2px;
-}
-
-.manual-update-title {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- font-size: calc(13px * var(--font-scale, 1));
- font-weight: 600;
- color: #ffffff;
- line-height: 1.3;
-}
-
-.manual-update-title.error {
- color: #f87171;
-}
-
-.manual-update-desc {
- font-size: calc(11.5px * var(--font-scale, 1));
- color: rgba(255, 255, 255, 0.62);
- line-height: 1.35;
-}
-
-.manual-update-desc.error {
- color: rgba(248, 113, 113, 0.75);
-}
-
-.manual-update-pill {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 6px;
- width: 100%;
- height: 32px;
- min-height: 32px;
- max-height: 32px;
- padding: 0 14px;
- border-radius: 10px;
- font-size: 11.5px;
- font-weight: 600;
- box-sizing: border-box;
- cursor: pointer;
- border: none;
- transition: all 0.15s ease;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- outline: none;
- user-select: none;
-}
-
-.manual-update-pill.primary {
- background: #ffffff;
- color: #000000;
-}
-
-.manual-update-pill.primary:hover:not(:disabled) {
- background: rgba(255, 255, 255, 0.9);
- transform: translateY(-1px);
-}
-
-.manual-update-pill.primary:active:not(:disabled) {
- transform: scale(0.98);
-}
-
-.manual-update-pill.primary:disabled {
- cursor: default;
- opacity: 0.92;
-}
-
-.manual-update-pill.outline {
- background: rgba(255, 255, 255, 0.05);
- border: 1px solid transparent;
- color: rgba(255, 255, 255, 0.85);
- font-weight: 500;
-}
-
-.manual-update-pill.outline:hover:not(:disabled) {
- background: rgba(255, 255, 255, 0.09);
- color: #ffffff;
- transform: translateY(-1px);
-}
-
-.manual-update-pill.outline:active:not(:disabled) {
- transform: scale(0.98);
-}
-
-.manual-update-pill.outline:disabled {
- cursor: default;
- opacity: 0.6;
-}
-
-/* ── Unified Update Indicator Dots ── */
-.update-dot {
- width: 6px;
- height: 6px;
- border-radius: 50%;
- flex-shrink: 0;
- display: inline-block;
- background: #30d158;
- box-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
-}
-
-.update-dot.checking {
- animation: dotPulse 1.2s ease-in-out infinite;
-}
-
-@keyframes dotPulse {
- 0%, 100% {
- opacity: 1;
- transform: scale(1);
- box-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
- }
- 50% {
- opacity: 0.4;
- transform: scale(0.85);
- box-shadow: 0 0 2px rgba(48, 209, 88, 0.2);
- }
-}
-
-/* ── Unified Group Labels & Header for Update Cards ── */
-.update-header-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- margin-bottom: 3px;
-}
-
-.update-group-label {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- font-size: 9.5px;
- font-weight: 700;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- color: rgba(255, 255, 255, 0.45);
- margin: 0;
- user-select: none;
+ gap: 6px;
+ font-size: calc(10px * var(--font-scale, 1));
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.42);
+ margin: 0;
+ user-select: none;
}
.update-info-btn {
@@ -1495,9 +773,10 @@
height: 32px;
min-height: 32px;
max-height: 32px;
- padding: 0 12px;
- border-radius: 10px;
- font-size: 11.5px;
+ padding: 0 14px;
+ border-radius: 999px;
+ font-family: inherit;
+ font-size: calc(12px * var(--font-scale, 1));
font-weight: 600;
display: inline-flex;
align-items: center;
@@ -1517,43 +796,25 @@
transform: scale(0.98);
}
-.update-action-btn.full-width {
- width: 100%;
-}
-
.update-action-btn.primary {
+ flex: 1;
background: #ffffff;
color: #000000;
- box-shadow: 0 0 14px rgba(255, 255, 255, 0.16), 0 2px 8px rgba(0, 0, 0, 0.35);
- animation: updateBtnGlow 3s ease-in-out infinite;
}
.update-action-btn.primary:hover:not(:disabled) {
- background: #ffffff;
- box-shadow: 0 0 22px rgba(255, 255, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.45);
- transform: translateY(-1px);
-}
-
-@keyframes updateBtnGlow {
- 0%, 100% {
- box-shadow: 0 0 12px rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.35);
- }
- 50% {
- box-shadow: 0 0 20px rgba(255, 255, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.4);
- }
+ background: rgba(255, 255, 255, 0.88);
}
.update-action-btn.secondary {
- background: rgba(255, 255, 255, 0.06);
- border: 1px solid transparent;
- color: rgba(255, 255, 255, 0.85);
- font-weight: 500;
+ background: rgba(255, 255, 255, 0.07);
+ border: none;
+ color: #ffffff;
+ font-weight: 600;
}
.update-action-btn.secondary:hover:not(:disabled) {
- background: rgba(255, 255, 255, 0.11);
- color: #ffffff;
- transform: translateY(-1px);
+ background: rgba(255, 255, 255, 0.12);
}
.update-action-btn.secondary:disabled {
@@ -1569,18 +830,18 @@
transition: background 0.14s ease;
}
-.update-promoted-card:hover {
- background: var(--bg-card-hover, #1c1c1c) !important;
+.setting-card.update-promoted-card {
+ border-radius: 14px;
+ padding: 14px;
}
.settings-shelf-card.update-promoted-card {
- width: 250px;
+ width: 252px;
+ padding: 10px 14px;
+}
+.update-promoted-card .setting-desc {
+ color: rgba(255, 255, 255, 0.58);
}
-
-/* ==========================================================================
- Horizontal Settings Layout (Top / Bottom Dock Position)
- Fixed 210px Height Shelf with Horizontal Scrolling Cards
- ========================================================================== */
/* Header category pills for horizontal mode */
.settings-header-pills {
@@ -1660,42 +921,7 @@
gap: 12px;
}
-/* Vertical subsection divider in horizontal shelf matching recent-header */
-.settings-shelf-track.tab-view .shelf-section-divider {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 20px;
- min-width: 20px;
- height: 146px;
- margin: 0 2px 0 0;
- padding: 0;
- background: transparent;
- border-left: 1px solid rgba(255, 255, 255, 0.08);
- box-sizing: border-box;
- flex-shrink: 0;
- user-select: none;
-}
-
-.settings-shelf-track.tab-view .shelf-section-divider:first-child {
- border-left: none;
-}
-
-.settings-shelf-track.tab-view .shelf-section-divider .shelf-section-divider-text {
- writing-mode: vertical-rl;
- transform: rotate(180deg);
- font-size: calc(9.5px * var(--font-scale, 1));
- font-weight: 600;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- color: rgba(255, 255, 255, 0.38);
- max-height: 130px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
+/* Top-dock update card */
.settings-shelf-track.tab-view .settings-shelf-card,
.settings-shelf-card {
flex: 0 0 auto;
@@ -1765,16 +991,6 @@
border-radius: 10px;
}
-.settings-shelf-card .setting-group-label {
- font-size: 9.5px;
- font-weight: 700;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- color: rgba(255, 255, 255, 0.42);
- margin: 0 0 3px 0;
- flex-shrink: 0;
-}
-
.settings-shelf-card .setting-title {
font-size: 13px;
font-weight: 600;
@@ -1804,26 +1020,6 @@
gap: 6px;
}
-.shelf-card-inline {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 10px;
- height: 100%;
-}
-
-.shelf-card-inline-text {
- min-width: 0;
- flex: 1;
-}
-
-.shelf-card-inline-action {
- flex-shrink: 0;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
/* Segmented pills in shelf cards */
.settings-shelf-card .setting-pills .pill {
height: 32px;
@@ -1848,11 +1044,6 @@
box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}
-/* Specific Card Widths tailored dynamically to content */
-.settings-shelf-card.shortcuts-card {
- width: 250px;
-}
-
/* Language Shelf Select Button */
.language-shelf-btn {
width: 100%;
@@ -1885,358 +1076,13 @@
box-shadow: 0 0 12px rgba(255, 255, 255, 0.06);
}
-.settings-shelf-card.hotkey-card {
- width: 250px;
-}
-
-.settings-shelf-card.hover-card {
- width: 240px;
-}
-
-/* Measured: 310px keeps the longest translations (ro) inside the 146px card. */
-.settings-shelf-card.hover-delay-card {
- width: 310px;
-}
-
-.settings-shelf-card.fullscreen-card {
- width: 250px;
-}
-
-.settings-shelf-card.system-card {
- width: 230px;
-}
-
-.settings-shelf-card.incognito-card {
- width: 230px;
-}
-
-.settings-shelf-card.rules-card {
- width: 240px;
-}
-
-.settings-shelf-card.order-card {
- width: 240px;
-}
-
-.settings-shelf-card.storage-card {
- width: 270px;
-}
-
-.settings-shelf-card.autodelete-card {
- width: 330px;
-}
-
-.settings-shelf-card.updates-card {
- width: 290px;
-}
-
-.settings-shelf-card.check-updates-card {
- width: 240px;
-}
-
-.settings-shelf-card.placement-card {
- width: 320px;
-}
-
-.settings-shelf-card.display-card {
- width: 280px;
-}
-
-.settings-shelf-card.display-card .shelf-card-bottom {
- max-height: 74px;
- overflow-y: auto;
- overflow-x: hidden;
- padding-right: 2px;
- gap: 5px;
-}
-
-.settings-shelf-card.display-card .shelf-card-bottom::-webkit-scrollbar {
- width: 3px;
-}
-
-.settings-shelf-card.display-card .shelf-card-bottom::-webkit-scrollbar-track {
- background: transparent;
-}
-
-.settings-shelf-card.display-card .shelf-card-bottom::-webkit-scrollbar-thumb {
- background: rgba(255, 255, 255, 0.2);
- border-radius: 999px;
-}
-
-.settings-shelf-card.beacon-card {
- width: 240px;
-}
-
-.settings-shelf-card.position-slider-card {
- width: 320px;
-}
-
-.settings-shelf-card.dimensions-card {
- width: 270px;
-}
-
-.settings-shelf-card.panel-height-card {
- width: 270px;
-}
-
-.settings-shelf-card.trigger-bar-card {
- width: 300px;
-}
-
-.settings-shelf-card.trigger-thickness-card {
- width: 290px;
-}
-
-.settings-shelf-card.copy-card {
- width: 240px;
-}
-
-.settings-shelf-card.beacon-toggle-card {
- width: 230px;
-}
-
-.settings-shelf-card.typography-card {
- width: 280px;
-}
-
-.settings-shelf-card.audio-card {
- width: 230px;
-}
-
-.settings-shelf-card.support-card {
- width: 260px;
-}
-
-.settings-shelf-card.about-card {
- width: 260px;
-}
-
-.settings-shelf-card.update-card {
- width: 250px;
-}
-
-/* Card Header */
-.shelf-card-header {
- display: flex;
- flex-direction: column;
- gap: 1px;
- flex-shrink: 0;
-}
-
-.shelf-card-category {
- font-size: 9px;
- font-weight: 700;
- letter-spacing: 0.08em;
- color: rgba(255, 255, 255, 0.45);
- text-transform: uppercase;
-}
-
-.shelf-card-title {
- font-size: calc(12.5px * var(--font-scale, 1));
- font-weight: 600;
- color: #ffffff;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 1.25;
- letter-spacing: 0.01em;
-}
-
-/* Card Body */
-.shelf-card-body {
- display: flex;
- flex-direction: column;
- justify-content: center;
- flex: 1;
- min-height: 0;
- gap: 6px;
-}
-
-/* Shelf Row for Toggle items */
-.shelf-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 8px;
- width: 100%;
-}
-
-.shelf-row-label {
- font-size: calc(11.5px * var(--font-scale, 1));
- font-weight: 500;
- color: rgba(255, 255, 255, 0.85);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- flex: 1;
-}
-
-/* Card Footer */
-.shelf-card-footer {
- font-size: calc(10.5px * var(--font-scale, 1));
- color: rgba(255, 255, 255, 0.45);
- line-height: 1.3;
- flex-shrink: 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-/* Miniature 4-tile Indicator Style Grid */
-.shelf-indicator-grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 6px;
- width: 100%;
-}
-
-.shelf-indicator-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- gap: 3px;
- padding: 5px 3px;
- border-radius: 8px;
- background: rgba(255, 255, 255, 0.04);
- border: 1px solid transparent;
- cursor: pointer;
- transition: all 0.15s ease;
- user-select: none;
-}
-
-.shelf-indicator-item:hover {
- background: rgba(255, 255, 255, 0.08);
-}
-
-.shelf-indicator-item.active {
- background: rgba(255, 255, 255, 0.12);
- box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
-}
-
-.shelf-indicator-icon {
- height: 22px;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.shelf-indicator-name {
- font-size: 9.5px;
- font-weight: 500;
- color: rgba(255, 255, 255, 0.85);
- white-space: nowrap;
-}
-
-/* Shelf Community & Support Action Buttons (Matches Vertical Settings Aesthetic) */
-.shelf-kofi-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 7px;
- width: 100%;
- height: 30px;
- padding: 0 14px;
- border-radius: 999px;
- font-size: 11.5px;
- font-weight: 600;
- color: #000000;
- background: #ffffff;
- border: none;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
- cursor: pointer;
- white-space: nowrap;
- transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
- box-sizing: border-box;
-}
-
-.shelf-kofi-btn:hover {
- background: rgba(255, 255, 255, 0.92);
- transform: translateY(-1px);
-}
-
-.shelf-kofi-btn:active {
- transform: scale(0.98);
-}
-
-.shelf-github-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 7px;
- width: 100%;
- height: 30px;
- padding: 0 14px;
- border-radius: 999px;
- font-size: 11.5px;
- font-weight: 550;
- color: rgba(255, 255, 255, 0.92);
- background: #1c1c1c;
- border: 1px solid transparent;
- box-shadow: none;
- cursor: pointer;
- white-space: nowrap;
- transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
- box-sizing: border-box;
-}
-
-.shelf-github-btn:hover {
- background: #262626;
- color: #ffffff;
- transform: translateY(-1px);
-}
-
-.shelf-github-btn:active {
- transform: scale(0.98);
-}
-
-.shelf-github-btn .github-octocat-icon,
-.shelf-github-btn .store-logo-icon {
- flex-shrink: 0;
- color: rgba(255, 255, 255, 0.9);
-}
-
-.shelf-github-btn .star-icon {
- color: #fbbf24;
-}
-
-/* Subtle Quit Button for Horizontal Shelf */
-.shelf-quit-btn {
- height: 24px;
- padding: 0 10px;
- border-radius: 999px;
- font-size: 11px;
- font-weight: 500;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 4px;
- color: rgba(255, 255, 255, 0.55);
- background: rgba(255, 255, 255, 0.05);
- border: 1px solid transparent;
- cursor: pointer;
- outline: none;
- transition: all 0.18s ease;
- user-select: none;
- white-space: nowrap;
-}
-
-.shelf-quit-btn:hover {
- background: rgba(255, 69, 58, 0.14);
- color: #ff5e57;
-}
-
-.shelf-quit-btn:active {
- transform: scale(0.96);
-}
-
/* Update Progress inside Shelf / Vertical Settings */
.shelf-update-progress-wrap {
width: 100%;
height: 32px;
- background: rgba(255, 255, 255, 0.05);
- border: 1px solid rgba(255, 255, 255, 0.10);
- border-radius: 10px;
+ background: rgba(255, 255, 255, 0.07);
+ border: none;
+ border-radius: 999px;
position: relative;
overflow: hidden;
display: flex;
@@ -2580,4 +1426,552 @@
}
}
+/* Tabs: one segmented control */
+.settings-tab-bar {
+ background: #141414;
+ padding: 3px;
+ border-radius: 999px;
+ gap: 2px;
+}
+.settings-tab-btn {
+ min-height: 28px;
+ padding: 5px 2px;
+ background: transparent;
+}
+.settings-tab-btn:hover:not(.active) {
+ background: rgba(255, 255, 255, 0.05);
+}
+.settings-header-pills {
+ background: rgba(255, 255, 255, 0.06);
+ padding: 2px;
+ border-radius: 999px;
+ gap: 2px;
+}
+.settings-header-pill {
+ height: 22px;
+ background: transparent;
+}
+.settings-header-pill.active {
+ box-shadow: none;
+}
+.settings-scroll-list {
+ padding: 2px var(--pad) 12px;
+}
+
+.set-group {
+ margin-top: 16px;
+}
+.set-group:first-child,
+.update-promoted-card + .set-group {
+ margin-top: 4px;
+}
+.set-group-label {
+ margin: 0 0 8px;
+ padding: 0 6px;
+ font-size: calc(10.5px * var(--font-scale, 1));
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ line-height: 1.2;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.42);
+}
+.set-group-card {
+ position: relative;
+ background: var(--bg-card, #141414);
+ border-radius: 14px;
+ padding: 2px 0;
+}
+
+.set-row {
+ position: relative;
+ padding: 12px 14px;
+}
+/* hairline between rows, inset to the text like a native list */
+.set-row + .set-row::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 14px;
+ right: 14px;
+ height: 1px;
+ background: rgba(255, 255, 255, 0.06);
+}
+.set-row-main {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ min-width: 0;
+}
+
+.set-row-text {
+ flex: 1;
+ min-width: 0;
+}
+.set-row-title {
+ font-size: calc(14px * var(--font-scale, 1));
+ font-weight: 600;
+ line-height: 1.3;
+ color: #ffffff;
+ overflow-wrap: break-word;
+}
+.set-row-desc {
+ margin-top: 3px;
+ font-size: calc(12.5px * var(--font-scale, 1));
+ line-height: 1.42;
+ color: rgba(255, 255, 255, 0.58);
+ overflow-wrap: break-word;
+}
+.set-row-desc.is-error {
+ color: rgba(255, 150, 140, 0.9);
+}
+.set-row-trailing {
+ flex: none;
+ display: flex;
+ align-items: center;
+}
+.set-row-below {
+ margin-top: 12px;
+}
+.set-row.is-disabled .set-row-main,
+.set-row.is-disabled .set-row-below {
+ opacity: 0.45;
+ transition: opacity 0.2s ease;
+}
+
+.set-row-badge {
+ padding: 3px 8px;
+ border-radius: 999px;
+ background: rgba(255, 255, 255, 0.08);
+ color: #ffffff;
+ font-size: calc(11px * var(--font-scale, 1));
+ font-weight: 600;
+ font-variant-numeric: tabular-nums;
+ white-space: nowrap;
+}
+.set-row-icon-btn {
+ width: 28px;
+ height: 28px;
+ padding: 0;
+ border: none;
+ border-radius: 999px;
+ display: grid;
+ place-items: center;
+ background: rgba(255, 255, 255, 0.08);
+ color: rgba(255, 255, 255, 0.85);
+ cursor: pointer;
+ transition: background-color 0.15s ease, color 0.15s ease;
+}
+.set-row-icon-btn:hover:not(:disabled) {
+ background: rgba(255, 255, 255, 0.14);
+ color: #ffffff;
+}
+.set-row-icon-btn:disabled {
+ cursor: default;
+}
+.set-row-icon-btn.is-busy svg {
+ animation: setRowSpin 0.9s linear infinite;
+}
+@keyframes setRowSpin {
+ to {
+ transform: rotate(360deg);
+ }
+}
+html[data-motion='reduce'] .set-row-icon-btn.is-busy svg {
+ animation: none;
+}
+
+/* controls inside a group card sit on the card, not on the page */
+.set-row .pill {
+ background: rgba(255, 255, 255, 0.06);
+}
+.set-row .pill:hover:not(.active) {
+ background: rgba(255, 255, 255, 0.1);
+}
+.set-row .pill.active {
+ background: #ffffff;
+}
+.set-row .slider-label-btn {
+ font-family: var(--font-ui);
+}
+/* choices never cut their label: they share the row, and a long
+ translation moves the last ones onto a second row */
+.set-row .setting-pills {
+ flex-wrap: wrap;
+}
+.set-row .setting-pills .pill {
+ flex: 1 1 0;
+ min-width: fit-content;
+ padding-left: 8px;
+ padding-right: 8px;
+ overflow: visible;
+}
+.set-row .placement-3way-wrap .pill {
+ max-width: none;
+}
+/* the style arrow is a small round button that stays on the title line */
+.set-row-trailing .style-preview-toggle-btn {
+ width: 26px;
+ height: 26px;
+}
+
+/* onboarding: indicator styles inline */
+.tutorial-indicator-grid {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 8px;
+ padding: 10px;
+ background: rgba(0, 0, 0, 0.35);
+ border-radius: 12px;
+}
+.tutorial-indicator-option {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 8px;
+ padding: 12px 8px;
+ border-radius: 10px;
+ background: rgba(255, 255, 255, 0.04);
+ cursor: pointer;
+ transition: background-color 0.2s ease;
+}
+.tutorial-indicator-option.active {
+ background: rgba(255, 255, 255, 0.12);
+}
+.tutorial-indicator-art {
+ height: 36px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.tutorial-indicator-label {
+ font-size: 12px;
+ font-weight: 600;
+ color: #ffffff;
+}
+
+.language-shelf-label {
+ display: flex;
+ align-items: center;
+ gap: 7px;
+ min-width: 0;
+ overflow: hidden;
+}
+.language-shelf-label > svg {
+ flex: none;
+ opacity: 0.65;
+}
+.language-shelf-label > span {
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+/* After the settings, two cards with one job each: Community & Support
+ (tagline, Ko-fi as the one white button, GitHub) and About Edge-Drop
+ (version, feedback, quit). They end every tab and scroll with it. */
+.settings-support {
+ margin-top: 18px;
+ padding: 14px;
+ border-radius: 14px;
+ background: var(--bg-card, #141414);
+ display: flex;
+ flex-direction: column;
+}
+.settings-support .set-group-label {
+ margin: 0 0 4px;
+ padding: 0;
+}
+.settings-support-tagline {
+ font-size: calc(12.5px * var(--font-scale, 1));
+ line-height: 1.4;
+ color: rgba(255, 255, 255, 0.72);
+}
+.settings-support-actions {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ margin-top: 12px;
+}
+.settings-support-btn {
+ height: 32px;
+ padding: 0 12px;
+ border: none;
+ border-radius: 999px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 7px;
+ background: rgba(255, 255, 255, 0.07);
+ color: #ffffff;
+ font-family: inherit;
+ font-size: calc(12px * var(--font-scale, 1));
+ font-weight: 600;
+ white-space: nowrap;
+ cursor: pointer;
+ transition: background-color 0.15s ease;
+}
+.settings-support-btn > span {
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.settings-support-btn > svg {
+ flex: none;
+}
+.settings-support-btn:hover {
+ background: rgba(255, 255, 255, 0.12);
+}
+.settings-support-btn.is-primary {
+ background: #ffffff;
+ color: #000000;
+}
+.settings-support-btn.is-primary:hover {
+ background: rgba(255, 255, 255, 0.88);
+}
+.settings-support-btn .store-logo-icon {
+ filter: grayscale(1) brightness(1.5);
+}
+.settings-support-link {
+ padding: 2px 0;
+ border: none;
+ background: transparent;
+ display: inline-flex;
+ align-items: center;
+ gap: 5px;
+ color: rgba(255, 255, 255, 0.5);
+ font-family: inherit;
+ font-size: calc(11.5px * var(--font-scale, 1));
+ font-weight: 500;
+ white-space: nowrap;
+ cursor: pointer;
+ transition: color 0.15s ease;
+}
+.settings-support-link:hover {
+ color: #ffffff;
+}
+.settings-support + .settings-support {
+ margin-top: 10px;
+}
+.settings-about-title {
+ font-size: calc(14px * var(--font-scale, 1));
+ font-weight: 600;
+ line-height: 1.3;
+ color: #ffffff;
+ margin-bottom: 2px;
+}
+.settings-about .subtle-quit-btn {
+ align-self: center;
+ margin-top: 4px;
+}
+
+/* ── Top dock ─────────────────────────────────────────────────────────── */
+.settings-horizontal-shelf {
+ flex-direction: row;
+}
+.settings-horizontal-shelf .settings-shelf-track.tab-view {
+ flex: 1;
+ min-width: 0;
+ gap: 10px;
+ padding: 6px 18px 12px 18px;
+}
+.set-group.is-h {
+ flex: none;
+ height: 146px;
+ margin: 0;
+ padding: 10px 14px 10px;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ background: var(--bg-card, #141414);
+ border-radius: var(--radius-card, 18px);
+}
+.set-group.is-h .set-group-label {
+ margin: 0 0 6px;
+ padding: 0;
+ font-size: calc(10px * var(--font-scale, 1));
+}
+/* Columns of one width: a setting with a wide control fills one, settings
+ with only a toggle stack two to a column, split by a hairline. Titles,
+ text and controls line up across the group. */
+.set-group.is-h .set-group-card {
+ flex: 1;
+ min-height: 0;
+ padding: 0;
+ border-radius: 0;
+ background: transparent;
+ display: flex;
+ flex-direction: row;
+}
+.set-col {
+ position: relative;
+ flex: none;
+ width: 252px;
+ min-height: 0;
+ padding: 0 16px;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+}
+.set-col:first-child {
+ padding-left: 0;
+}
+.set-col:last-child {
+ padding-right: 0;
+}
+.set-col + .set-col::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 1px;
+ background: rgba(255, 255, 255, 0.06);
+}
+.set-group.is-h .set-row {
+ flex: 1;
+ min-height: 0;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+}
+.set-group.is-h .set-row + .set-row::before {
+ display: none;
+}
+.set-col.is-pair > .set-row {
+ justify-content: center;
+}
+.set-col.is-pair > .set-row + .set-row {
+ border-top: 1px solid rgba(255, 255, 255, 0.06);
+}
+.set-group.is-h .set-row-main {
+ align-items: flex-start;
+ gap: 12px;
+}
+.set-group.is-h .set-row-title {
+ font-size: calc(13.5px * var(--font-scale, 1));
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.set-group.is-h .set-row-desc {
+ margin-top: 3px;
+ font-size: calc(11.5px * var(--font-scale, 1));
+ line-height: 1.4;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+ overflow: hidden;
+}
+/* two to a column: each keeps two lines of description */
+.set-col.is-pair > .set-row {
+ padding: 4px 0;
+}
+.set-col.is-pair > .set-row:first-child {
+ padding-top: 0;
+}
+.set-col.is-pair > .set-row:last-child {
+ padding-bottom: 0;
+}
+.set-col.is-pair .set-row-desc {
+ margin-top: 1px;
+ font-size: calc(11px * var(--font-scale, 1));
+ line-height: 1.32;
+ -webkit-line-clamp: 2;
+}
+.set-group.is-h .set-row-below {
+ margin-top: auto;
+ padding-top: 8px;
+}
+.set-group.is-h .set-row.has-below .set-row-desc {
+ -webkit-line-clamp: 2;
+}
+.set-group.is-h .set-row.is-slider .set-row-below {
+ padding-top: 4px;
+}
+.set-group.is-h .set-row.is-slider .set-row-desc {
+ -webkit-line-clamp: 2;
+}
+/* the top dock has no spare height: choices stay on one line and share it */
+.set-group.is-h .setting-pills {
+ flex-wrap: nowrap;
+}
+.set-group.is-h .setting-pills .pill {
+ flex: 1 1 auto;
+ min-width: 0;
+ padding-left: 6px;
+ padding-right: 6px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.settings-support.is-h {
+ flex: none;
+ width: 252px;
+ height: 146px;
+ margin: 0;
+ padding: 10px 14px 10px;
+ box-sizing: border-box;
+ border-radius: var(--radius-card, 18px);
+}
+.settings-support.is-h .set-group-label {
+ font-size: calc(10px * var(--font-scale, 1));
+ margin-bottom: 3px;
+}
+.settings-support.is-h .settings-support-tagline {
+ font-size: calc(11.5px * var(--font-scale, 1));
+ line-height: 1.35;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+}
+.settings-support.is-h .settings-support-actions {
+ margin-top: auto;
+ padding-top: 7px;
+ gap: 5px;
+}
+.settings-support.is-h .settings-support-btn {
+ height: 28px;
+ font-size: calc(11.5px * var(--font-scale, 1));
+}
+/* in the track the two cards sit side by side, like the groups */
+.settings-support.is-h + .settings-support.is-h {
+ margin-top: 0;
+}
+.settings-about.is-h .settings-about-title {
+ font-size: calc(13.5px * var(--font-scale, 1));
+}
+.settings-about.is-h .subtle-quit-btn {
+ margin-top: 2px;
+}
+.settings-support.is-h .settings-support-link {
+ font-size: calc(11px * var(--font-scale, 1));
+}
+
+/* Side docks are narrow: the title shares its line with the control, and
+ the description runs the full width beneath both (2 lines, not 4). */
+.set-group:not(.is-h) .set-row-main {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0 12px;
+ align-items: center;
+}
+.set-group:not(.is-h) .set-row-text {
+ display: contents;
+}
+.set-group:not(.is-h) .set-row-title {
+ grid-column: 1;
+ grid-row: 1;
+}
+.set-group:not(.is-h) .set-row-trailing {
+ grid-column: 2;
+ grid-row: 1;
+ /* a toggle or badge may overhang the title line instead of pushing the
+ description down */
+ margin: -5px 0;
+}
+.set-group:not(.is-h) .set-row-desc {
+ grid-column: 1 / 3;
+ grid-row: 2;
+}
diff --git a/tests/edgeBeacon.test.ts b/tests/edgeBeacon.test.ts
new file mode 100644
index 0000000..0cf9d97
--- /dev/null
+++ b/tests/edgeBeacon.test.ts
@@ -0,0 +1,51 @@
+import { describe, expect, it } from 'vitest'
+import { readFileSync } from 'node:fs'
+import { join } from 'node:path'
+
+const panel = readFileSync(join(__dirname, '..', 'src/components/Panel.tsx'), 'utf8')
+const motionBlock = panel.slice(panel.indexOf('const beaconMotion = startupBeacon'), panel.indexOf('return (\n <div className="root">'))
+
+describe('edge bar intro and location hint', () => {
+ it('is the bar itself, not a light: no white glow or bright gradient', () => {
+ expect(panel).not.toContain('0 0 8px rgba(255, 255, 255, 0.4)')
+ expect(panel).not.toMatch(/linear-gradient\(to (right|bottom), transparent, rgba\(255, 255, 255, 0\.75\)/)
+ })
+
+ it('launch: swells out of the slim bar, holds, then settles back to it', () => {
+ expect(motionBlock).toContain('[hotWidth, beaconWide, beaconWide, hotWidth]')
+ expect(motionBlock).toContain("['100%', '114%', '114%', '100%']")
+ // solid the whole time, so the bar under it never shows through
+ expect(motionBlock).toMatch(/startupBeacon\s+\? \{\s+animate: \{[\s\S]*?opacity: 1,/)
+ // ends on the bar's own black, edge light gone
+ expect(motionBlock).toContain("backgroundColor: ['#000000', '#2c2c2c', '#2c2c2c', '#000000']")
+ expect(motionBlock).toContain('edgeLight(0.18), edgeLight(0.18), edgeLight(0)]')
+ expect(panel).toContain('const beaconWide = hotWidth + 6')
+ })
+
+ it('hint: the same shape as a short swell', () => {
+ expect(motionBlock).toContain('[hotWidth, hotWidth + 4, hotWidth]')
+ expect(motionBlock).toContain("transition: { duration: 0.45, ease: 'easeInOut' }")
+ })
+
+ it('reduced motion keeps the size still', () => {
+ expect(motionBlock).toContain('reduceMotion ? hotWidth : [hotWidth, beaconWide, beaconWide, hotWidth]')
+ })
+
+ it('bar ends taper over 24px, matching the resting clip so the hand-over is seamless', () => {
+ expect(panel).toContain("left: '0 100% 100% 0 / 0 24px 24px 0'")
+ expect(panel).toContain("right: '100% 0 0 100% / 24px 0 0 24px'")
+ expect(panel).toContain("top: '0 0 24px 24px / 0 0 100% 100%'")
+ expect(panel).toContain('round ${hotWidth}px 0px 0px ${hotWidth}px / 24px 0px 0px 24px')
+ expect(panel).toContain('round 0px 0px 24px 24px / 0px 0px ${hotWidth}px ${hotWidth}px')
+ expect(panel).toContain('round 0px ${hotWidth}px ${hotWidth}px 0px / 0px 24px 24px 0px')
+ })
+
+ it('drawn outside the clipped panel, on the panel box, with the strip insets', () => {
+ const beacon = panel.indexOf('key="edge-beacon"')
+ const container = panel.indexOf('ref={containerRef}')
+ expect(beacon).toBeGreaterThan(-1)
+ expect(beacon).toBeLessThan(container)
+ expect(panel).toContain('const r = containerRef.current.getBoundingClientRect()')
+ expect(panel).toContain("{ position: 'absolute', top: insetTop, bottom: insetBottom, [isRight ? 'right' : 'left']: 0, width: hotWidth }")
+ })
+})
diff --git a/tests/horizontalSettings.test.ts b/tests/horizontalSettings.test.ts
index 1f3aff9..6542ce9 100644
--- a/tests/horizontalSettings.test.ts
+++ b/tests/horizontalSettings.test.ts
@@ -82,21 +82,17 @@ describe('Horizontal Card Shelf Settings Layout', () => {
expect(flyoutSrc).not.toContain("outline: active ? '2px solid #ffffff' : 'none'")
})
- it('Appearance shelf renders Show Copy Indicator toggle card first, followed by Indicator Style card matching Left/Right', () => {
+ it('Appearance lists the Copy Indicator toggle first, then the Indicator Style flyout trigger (both docks)', () => {
const src = read('src/components/Settings.tsx')
- const appearanceSection = src.slice(src.indexOf("horizontalTab === 'appearance'"), src.indexOf("horizontalTab === 'appearance'") + 4000)
- const toggleCardIdx = appearanceSection.indexOf('beacon-toggle-card')
- const styleCardIdx = appearanceSection.indexOf('copy-card')
-
- expect(toggleCardIdx).toBeGreaterThan(-1)
- expect(styleCardIdx).toBeGreaterThan(-1)
- // Card 1 (beacon-toggle-card) must appear BEFORE Card 2 (copy-card)
- expect(toggleCardIdx).toBeLessThan(styleCardIdx)
- // Indicator style card is only shown when showCopyIndicator is enabled
- expect(appearanceSection).toContain('{(settings.showCopyIndicator ?? true) && (')
- // Indicator style card uses standard style-preview-toggle-btn with Close/Chevron icons, matching Left/Right
- expect(appearanceSection).toContain('className={`icon-btn style-preview-toggle-btn ${isFlyoutActive ? \'active\' : \'\'}`}')
- expect(appearanceSection).toContain('{isFlyoutActive ? <CloseIcon /> : <ChevronRightIcon />}')
+ const appearance = src.slice(src.indexOf('// appearance'))
+ const toggleIdx = appearance.indexOf("id: 'copy-indicator',\n title")
+ const styleIdx = appearance.indexOf("id: 'indicator-style'")
+ expect(toggleIdx).toBeGreaterThan(-1)
+ expect(styleIdx).toBeGreaterThan(toggleIdx)
+ // the style row only exists while the indicator is on
+ expect(appearance).toContain('...(indicatorOn ? [{')
+ expect(appearance).toContain('className={`icon-btn style-preview-toggle-btn ${isFlyoutActive ? \'active\' : \'\'}`}')
+ expect(appearance).toContain('{isFlyoutActive ? <CloseIcon /> : <ChevronRightIcon />}')
})
it('Panel.tsx passes isHorizontal to Settings component', () => {
@@ -111,9 +107,13 @@ describe('Horizontal Card Shelf Settings Layout', () => {
expect(css).toContain('.settings-shelf-card')
expect(css).toContain('.settings-header-pills')
expect(css).toContain('.settings-header-pill')
- expect(css).toContain('.shelf-indicator-grid')
- expect(css).toContain('.shelf-indicator-item')
- expect(css).toContain('.shelf-quit-btn')
+ // grouped cards in the top dock, and the support card pinned beside them
+ expect(css).toContain('.set-group.is-h {')
+ // columns of one width; toggle-only settings stack two to a column
+ expect(css).toMatch(/\n\.set-col \{[^}]*width: 252px;/)
+ expect(css).toMatch(/\.set-col\.is-pair > \.set-row \+ \.set-row \{[^}]*border-top: 1px solid/)
+ expect(css).toMatch(/\.set-group\.is-h \.set-row-below \{[^}]*margin-top: auto;/)
+ expect(css).toContain('.settings-support.is-h {')
})
it('getHorizontalDockMetrics scales trigger bar length based on hotZoneHeight (+25% increase)', async () => {
@@ -166,75 +166,61 @@ describe('Horizontal Card Shelf Settings Layout', () => {
expect(panelSrc).toContain("insetRight = '0px'")
})
- it('Horizontal shelf includes trigger thickness and auto-updates, without panel height, horizontal position, or edge trigger position', () => {
+ it('One definition serves both docks; side-dock-only rows are left out of the top dock', () => {
const src = read('src/components/Settings.tsx')
- // Find the isHorizontal branch
- const horizontalBlock = src.slice(src.indexOf('if (isHorizontal) {'), src.indexOf('const maxTabLen ='))
- // Should NOT contain horizontal position offset slider or panel height pills
- expect(horizontalBlock).not.toContain('horizontalPositionTitle')
- expect(horizontalBlock).not.toContain('panelHeightTitle')
- // Should NOT contain trigger alignment pills in horizontal shelf
- expect(horizontalBlock).not.toContain('edgeTriggerPositionTitle')
- expect(horizontalBlock).not.toContain('triggerAlignment: opt.val')
- // Should contain trigger thickness
- expect(horizontalBlock).toContain('trigger-thickness-card')
- expect(horizontalBlock).toContain('handleThicknessRelease')
- // Should contain 3-mode updates selector (Automatic / Notify me / Off)
- expect(horizontalBlock).toContain('autoUpdatesTitle')
- expect(horizontalBlock).toContain('updateMode')
- expect(horizontalBlock).toContain("patch({ updateMode: opt.id })")
- // Should contain clearUnpinnedOnRestart
- expect(horizontalBlock).toContain('clearUnpinnedTitle')
- expect(horizontalBlock).toContain('clearUnpinnedOnRestart')
- // Should contain support links
- expect(horizontalBlock).toContain('supportOnKofi')
- expect(horizontalBlock).toContain('starOnGithub')
+ const groups = src.slice(src.indexOf('const groupsFor = (tab: SettingsTab)'), src.indexOf('const layout: '))
+ // sliding along a vertical edge, panel height, the trigger's spot and text size: side docks only
+ for (const id of ['offset', 'panel-height', 'trigger-position']) {
+ expect(groups, id).toMatch(new RegExp(`\\.\\.\\.\\(!isHorizontal \\? \\[\\{\\n\\s+id: '${id}'`))
+ }
+ expect(groups).toMatch(/\.\.\.\(!isHorizontal \? \[\{\n\s+id: 'typography'/)
+ expect(groups).toContain('verticalPositionTitle')
+ expect(groups).toContain('panelHeightTitle')
+ expect(groups).toContain('edgeTriggerPositionTitle')
+ // in both docks: thickness, the 3-mode updater, clean-up, hover area presets
+ expect(groups).toContain("id: 'trigger-thickness'")
+ expect(groups).toContain('handleThicknessRelease')
+ expect(groups).toContain('(v) => patch({ updateMode: v })')
+ expect(groups).toContain('clearUnpinnedOnRestart')
+ expect(groups).toContain("t('appearance.small')")
+ expect(groups).toContain("t('position.medium')")
+ expect(groups).toContain('`${thicknessPx}px`')
+ // both layouts render the same groups
+ expect(src.match(/renderGroups\((horizontalTab|activeTab)\)/g)).toEqual(['renderGroups(horizontalTab)', 'renderGroups(activeTab)'])
})
- it('Vertical left/right settings remain untouched with position slider and vertical controls intact', () => {
+ it('Edge placement is a 3-way control in both docks (the top dock adds its shelf variant)', () => {
const src = read('src/components/Settings.tsx')
- const verticalBlock = src.slice(src.indexOf('const maxTabLen ='))
- expect(verticalBlock).toContain('verticalPositionTitle')
- expect(verticalBlock).toContain('edgeTriggerPositionTitle')
- expect(verticalBlock).toContain('panelHeightTitle')
- })
-
- it('Vertical settings arranges edge placement buttons in 3-way layout (left, top, right)', () => {
- const src = read('src/components/Settings.tsx')
- const verticalBlock = src.slice(src.indexOf('const maxTabLen ='))
- expect(verticalBlock).toContain('placement-3way-wrap')
-
+ expect(src).toContain("className={`placement-3way-wrap${isHorizontal ? ' shelf-placement-3way' : ''}`}")
const css = read('src/styles/settings.css')
expect(css).toContain('.placement-3way-wrap')
expect(css).toContain('.placement-3way-wrap .pill')
})
- it('Horizontal dashboard uses correct translations, multi-column classes, and explicit pixel values', () => {
+ it('After the settings come two cards: Community & Support, then About Edge-Drop', () => {
const src = read('src/components/Settings.tsx')
- const horizontalBlock = src.slice(src.indexOf('if (isHorizontal) {'), src.indexOf('const maxTabLen ='))
-
- // Translation fix: supportOnKofi instead of supportDev
- expect(horizontalBlock).toContain("t('footer.supportOnKofi')")
- expect(horizontalBlock).not.toContain("t('footer.supportDev')")
-
- // Multi-column dashboard structure
- expect(horizontalBlock).toContain('tab-view')
- expect(horizontalBlock).toContain('behaviour-col')
- expect(horizontalBlock).toContain('position-col')
- expect(horizontalBlock).toContain('appearance-col')
-
- // Edge placement 3-way layout for horizontal card shelf
- expect(horizontalBlock).toContain('placement-3way-wrap')
- expect(horizontalBlock).toContain('shelf-placement-3way')
-
- // Clean names on length presets & live thickness badge without pixel strings
- expect(horizontalBlock).toContain("t('appearance.small')")
- expect(horizontalBlock).toContain("t('position.medium')")
- expect(horizontalBlock).toContain("t('appearance.large')")
- expect(horizontalBlock).not.toContain('(220px)')
- expect(horizontalBlock).not.toContain('(320px)')
- expect(horizontalBlock).not.toContain('(460px)')
- expect(horizontalBlock).toContain('${settings.hotZoneWidth ?? 3}px')
+ const cards = src.slice(src.indexOf('const renderClosingCards = () =>'), src.indexOf('const handleOpenChangelog'))
+ const support = cards.slice(0, cards.indexOf('data-card="about"'))
+ const about = cards.slice(cards.indexOf('data-card="about"'))
+ expect(support).toContain("t('footer.supportTagline')")
+ expect(support).toContain("<span>{t('footer.supportOnKofi')}</span>")
+ expect(support).not.toContain("t('footer.supportDev')")
+ expect(support).toContain("<span>{t('footer.starOnGithub')}</span>")
+ expect(about).toContain("t('groups.aboutEdgeDrop')")
+ expect(about).toContain("t('footer.submitFeedback')")
+ expect(about).toContain('window.edge.quitApp()')
+ // they end every tab and scroll with it: inside the top-dock track, after the groups
+ expect(src).toMatch(/\{renderGroups\(horizontalTab\)\}\n\s+\{renderClosingCards\(\)\}\n\s+<\/div>/)
+ expect(src).toMatch(/\{renderGroups\(activeTab\)\}\n\s+\{renderClosingCards\(\)\}/)
+ expect(src).not.toContain('PersistentFooter')
+ })
+
+ it('Top dock pairs toggle-only settings into one column; wide controls get their own', () => {
+ const src = read('src/components/Settings.tsx')
+ expect(src).toContain('if (!row.below && last && last.length === 1 && !last[0].below) last.push(row)')
+ // hover settings sit together (and pair up in the top dock)
+ expect(src.indexOf("id: 'fullscreen'")).toBe(src.indexOf("id: 'hover-activation'") + src.slice(src.indexOf("id: 'hover-activation'")).indexOf("id: 'fullscreen'"))
+ expect(src.indexOf("id: 'fullscreen'")).toBeLessThan(src.indexOf("id: 'hover-delay'"))
})
it('settings.css contains tab-view full-width obsidian rules', () => {
@@ -265,23 +251,15 @@ describe('Horizontal Card Shelf Settings Layout', () => {
// Reset to behaviour tab on mount
expect(settingsSrc).toContain("useStore.getState().setSettingsTab('behaviour')")
})
-it('Appearance shelf renders Card 1 Copy Indicator toggle first, then Card 2 Indicator Style flyout trigger second', () => {
+it('Settings rows are monochrome: no icon tiles or accent colours', () => {
const src = read('src/components/Settings.tsx')
- const appearanceIndex = src.indexOf("horizontalTab === 'appearance'")
- expect(appearanceIndex).toBeGreaterThan(-1)
- const appearanceBlock = src.slice(appearanceIndex)
-
- const toggleCardIndex = appearanceBlock.indexOf('beacon-toggle-card')
- const styleCardIndex = appearanceBlock.indexOf('copy-card')
-
- expect(toggleCardIndex).toBeGreaterThan(-1)
- expect(styleCardIndex).toBeGreaterThan(-1)
- // Toggle card must come before Indicator style card
- expect(toggleCardIndex).toBeLessThan(styleCardIndex)
-
- // Indicator style button uses style-preview-toggle-btn with Chevron/Close
- expect(appearanceBlock).toContain('style-preview-toggle-btn')
- expect(appearanceBlock).toContain('handleToggleFlyout(e.currentTarget)')
+ expect(src).not.toMatch(/\btone: '(blue|green|indigo|purple|orange|yellow|pink|red|cyan|teal|gray)'/)
+ expect(src).not.toMatch(/set-row-icon(?!-btn)/)
+ const css = read('src/styles/settings.css')
+ expect(css).not.toMatch(/\.tone-[a-z]+ \{/)
+ expect(css).not.toContain('.set-row-icon {')
+ // the style button still opens the flyout from the row
+ expect(src).toContain('handleToggleFlyout(e.currentTarget)')
})
it('IndicatorStyleFlyout anchors horizontally relative to styleFlyoutAnchorRect', () => {
diff --git a/tests/hoverOpenDelay.test.ts b/tests/hoverOpenDelay.test.ts
index ad0be29..f15c529 100644
--- a/tests/hoverOpenDelay.test.ts
+++ b/tests/hoverOpenDelay.test.ts
@@ -93,8 +93,9 @@ describe('hover open delay — wiring', () => {
it('renders the slider in both the horizontal and vertical settings layouts', () => {
const src = read('src/components/Settings.tsx')
- expect(src).toContain("{renderHoverDelayCard('shelf')}")
- expect(src).toContain("{renderHoverDelayCard('stack')}")
+ // one row definition, rendered by both layouts
+ expect(src).toContain('below: renderHoverDelayControl()')
+ expect(src).toMatch(/renderGroups\(horizontalTab\)[\s\S]*renderGroups\(activeTab\)/)
expect(src).toContain('min={HOVER_OPEN_DELAY_MIN}')
expect(src).toContain('max={HOVER_OPEN_DELAY_MAX}')
expect(src).toContain('step={HOVER_OPEN_DELAY_STEP}')
diff --git a/tests/shelfMotion.test.ts b/tests/shelfMotion.test.ts
index 167e033..4916a80 100644
--- a/tests/shelfMotion.test.ts
+++ b/tests/shelfMotion.test.ts
@@ -72,7 +72,7 @@ describe('shelf open/close motion', () => {
expect(insets.length).toBeGreaterThanOrEqual(6)
for (const clip of insets) expect(clip).not.toMatch(/800px|600px|999px|- 100px/)
// The top dock's closed bar uses the same 24px corners as the side docks.
- expect(panel).toContain('calc(100% - ${hotWidth}px) ${insetLeft} round 0px 0px 24px 24px)`')
+ expect(panel).toContain('calc(100% - ${hotWidth}px) ${insetLeft} round 0px 0px 24px 24px / 0px 0px ${hotWidth}px ${hotWidth}px)`')
})
it('content veil sits above every in-blade layer and hides only after the close finishes', () => {
diff --git a/tests/storePackaging.test.ts b/tests/storePackaging.test.ts
index 48af20d..c09522a 100644
--- a/tests/storePackaging.test.ts
+++ b/tests/storePackaging.test.ts
@@ -186,7 +186,8 @@ describe('GitHub vs Store packaging contracts (on-disk, not assumed)', () => {
it('Settings hides the in-app updater on Store builds', () => {
const src = read('src/components/Settings.tsx')
- expect(src).toContain('{!isStoreBuild && (')
+ // the Updates group only exists on GitHub builds
+ expect(src).toMatch(/\.\.\.\(!isStoreBuild \? \[\{\n\s+id: 'updates'/)
expect(src).toContain('behaviour.autoUpdatesTitle')
expect(src).toContain('hasPromotedTopUpdate = !isStoreBuild &&')
expect(src).toContain('if (isStoreBuild) return null')
diff --git a/tests/updatePlacement.test.ts b/tests/updatePlacement.test.ts
index 4cd8202..50b08bc 100644
--- a/tests/updatePlacement.test.ts
+++ b/tests/updatePlacement.test.ts
@@ -13,9 +13,24 @@ describe('update prompt placement contracts (promoted lifecycle, bottom hides wh
const src = read('src/components/Settings.tsx')
// Top card shows all active update lifecycle stages.
expect(src).toContain('hasPromotedTopUpdate = !isStoreBuild && (')
- // Bottom manual card and horizontal status card hide while promoted.
+ // The manual "check for updates" row hides while promoted, in both docks.
expect(src).toContain('if (isStoreBuild || hasPromotedTopUpdate) return null')
- expect(src).toContain('{!isStoreBuild && !hasPromotedTopUpdate && (')
+ expect(src).toContain('...(updateCheck ? [updateCheck] : [])')
+ })
+
+ it('the check row keeps its title and reports the state underneath', () => {
+ const src = read('src/components/Settings.tsx')
+ const row = src.slice(src.indexOf('const renderUpdateCheckRow'), src.indexOf('// ── Building blocks shared by both layouts'))
+ expect(row).toContain("title: t('behaviour.checkForUpdates'),")
+ expect(row).toContain("t('behaviour.checkingForUpdates')")
+ expect(row).toContain("t('behaviour.isUpToDate')")
+ expect(row).toContain("checkState.error || t('behaviour.updateCheckFailed')")
+ // the refresh arrow spins while checking (no coloured dot)
+ expect(row).toContain("status === 'checking' ? ' is-busy' : ''")
+ const css = read('src/styles/settings.css')
+ expect(css).toMatch(/\.set-row-icon-btn\.is-busy svg \{[^}]*animation: setRowSpin/)
+ expect(css).toMatch(/\.update-dot \{[^}]*background: #ffffff;/)
+ expect(css).not.toContain('updateBtnGlow')
})
it('store tracks manual-flow ownership across check, download, and dismiss', () => {