Tighten TimeSpinner spacing and fix build warnings
Reduce gap between numbers and h/m unit labels in the workday schedule spinners. Remove unused parse_hour function and fix Svelte state_referenced_locally warning in BreakScreen.
This commit is contained in:
@@ -462,14 +462,6 @@ pub enum IdleCheckResult {
|
|||||||
NaturalBreakDetected(u64), // duration in seconds
|
NaturalBreakDetected(u64), // duration in seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_hour(time_str: &str) -> u32 {
|
|
||||||
time_str
|
|
||||||
.split(':')
|
|
||||||
.next()
|
|
||||||
.and_then(|h| h.parse().ok())
|
|
||||||
.unwrap_or(9)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the number of seconds since last user input (mouse/keyboard).
|
/// Returns the number of seconds since last user input (mouse/keyboard).
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
pub fn get_idle_seconds() -> u64 {
|
pub fn get_idle_seconds() -> u64 {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
let { standalone = false }: Props = $props();
|
let { standalone = false }: Props = $props();
|
||||||
|
|
||||||
const appWindow = standalone ? getCurrentWebviewWindow() : null;
|
const appWindow = $derived(standalone ? getCurrentWebviewWindow() : null);
|
||||||
|
|
||||||
let currentActivity = $state<BreakActivity>(pickRandomActivity());
|
let currentActivity = $state<BreakActivity>(pickRandomActivity());
|
||||||
let activityCycleTimer: ReturnType<typeof setInterval> | null = null;
|
let activityCycleTimer: ReturnType<typeof setInterval> | null = null;
|
||||||
|
|||||||
@@ -324,14 +324,14 @@
|
|||||||
.time-spinner {
|
.time-spinner {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 2px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wheel-field {
|
.wheel-field {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 50px;
|
width: 44px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: rgba(255, 255, 255, 0.05);
|
background: rgba(255, 255, 255, 0.05);
|
||||||
@@ -376,13 +376,13 @@
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
backface-visibility: hidden;
|
backface-visibility: hidden;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
padding-right: 12px;
|
padding-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unit label pinned to the right of the field */
|
/* Unit label pinned to the right of the field */
|
||||||
.unit-badge {
|
.unit-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 5px;
|
right: 3px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user