update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* ============================================================
|
||||
Fusion Clock - Floating Action Button (FAB)
|
||||
Bottom-left corner clock widget with ripple animation
|
||||
Fusion Clock - Systray Icon & Dropdown Panel
|
||||
Top-right navbar clock widget with pulse animation
|
||||
Theme-aware: adapts to Odoo light / dark mode
|
||||
============================================================ */
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
--fclk-fab-divider: #e5e7eb;
|
||||
--fclk-fab-location-bg: rgba(16, 185, 129, 0.08);
|
||||
--fclk-fab-error-bg: rgba(239, 68, 68, 0.06);
|
||||
--fclk-fab-arrow-bg: #ffffff;
|
||||
}
|
||||
|
||||
// ---- Dark-mode tokens ----
|
||||
@@ -27,7 +26,6 @@ html.o_dark {
|
||||
--fclk-fab-divider: #3a3d48;
|
||||
--fclk-fab-location-bg: rgba(16, 185, 129, 0.1);
|
||||
--fclk-fab-error-bg: rgba(239, 68, 68, 0.1);
|
||||
--fclk-fab-arrow-bg: #1e2028;
|
||||
}
|
||||
|
||||
// Static color palette
|
||||
@@ -36,349 +34,214 @@ $fclk-blue: #3b82f6;
|
||||
$fclk-green: #10B981;
|
||||
$fclk-red: #ef4444;
|
||||
|
||||
// Gradient used on the FAB (teal-to-blue like the portal header)
|
||||
$fclk-gradient: linear-gradient(135deg, $fclk-teal 0%, #2563eb 100%);
|
||||
$fclk-gradient-active: linear-gradient(135deg, $fclk-green 0%, $fclk-teal 100%);
|
||||
|
||||
// ===========================================================
|
||||
// Wrapper - anchored bottom-LEFT
|
||||
// Systray Icon & Dropdown
|
||||
// ===========================================================
|
||||
.fclk-fab-wrapper {
|
||||
position: fixed;
|
||||
bottom: 24px;
|
||||
left: 24px;
|
||||
z-index: 1050;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
pointer-events: none;
|
||||
|
||||
> * { pointer-events: auto; }
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// FAB Button
|
||||
// ===========================================================
|
||||
.fclk-fab-btn {
|
||||
.fclk-systray-btn {
|
||||
position: relative;
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
border-radius: 50%;
|
||||
background: none;
|
||||
border: none;
|
||||
background: $fclk-gradient;
|
||||
color: #fff;
|
||||
font-size: 21px;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 20px rgba($fclk-teal, 0.35);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
outline: none;
|
||||
overflow: visible;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
transform: scale(1.1);
|
||||
box-shadow: 0 6px 28px rgba($fclk-teal, 0.45);
|
||||
.fclk-systray-icon {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
.fa-clock-o {
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: scale(0.93);
|
||||
}
|
||||
&--in {
|
||||
.fa-clock-o {
|
||||
color: var(--bs-success, var(--o-success, #198754));
|
||||
}
|
||||
|
||||
// Clocked-in: green-teal gradient
|
||||
&.fclk-fab-btn--active {
|
||||
background: $fclk-gradient-active;
|
||||
box-shadow: 0 4px 20px rgba($fclk-green, 0.4);
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--bs-success, var(--o-success, #198754));
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
animation: fclk-wave 2.4s infinite ease-out;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 6px 28px rgba($fclk-green, 0.5);
|
||||
&::after {
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
}
|
||||
|
||||
// Panel-open: muted
|
||||
&.fclk-fab-btn--open {
|
||||
background: #374151;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
|
||||
color: #d1d5db;
|
||||
}
|
||||
|
||||
.fclk-fab-icon {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
transition: transform 0.3s ease;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
&.fclk-fab-btn--open .fclk-fab-icon {
|
||||
transform: rotate(90deg);
|
||||
&--out {
|
||||
.fa-clock-o {
|
||||
color: var(--bs-danger, var(--o-danger, #dc3545));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---- Ripple rings radiating outward from the FAB ----
|
||||
.fclk-fab-ripple-ring {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba($fclk-green, 0.5);
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
|
||||
&.fclk-fab-ripple-ring--1 {
|
||||
animation: fclk-ripple-out 2.4s ease-out infinite;
|
||||
}
|
||||
&.fclk-fab-ripple-ring--2 {
|
||||
animation: fclk-ripple-out 2.4s ease-out 0.8s infinite;
|
||||
}
|
||||
&.fclk-fab-ripple-ring--3 {
|
||||
animation: fclk-ripple-out 2.4s ease-out 1.6s infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fclk-ripple-out {
|
||||
@keyframes fclk-wave {
|
||||
0% {
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
opacity: 0.55;
|
||||
opacity: 0.7;
|
||||
}
|
||||
100% {
|
||||
transform: translate(-50%, -50%) scale(2.6);
|
||||
transform: translate(-50%, -50%) scale(2.8);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ---- Mini timer badge ----
|
||||
.fclk-fab-badge {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: #111827;
|
||||
color: $fclk-green;
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
|
||||
padding: 2px 7px;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
letter-spacing: 0.5px;
|
||||
border: 1px solid rgba($fclk-green, 0.35);
|
||||
pointer-events: none;
|
||||
z-index: 3;
|
||||
animation: fclk-badge-in 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes fclk-badge-in {
|
||||
from { opacity: 0; transform: translateX(-50%) translateY(4px); }
|
||||
to { opacity: 1; transform: translateX(-50%) translateY(0); }
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// Expanded Panel
|
||||
// ===========================================================
|
||||
.fclk-fab-panel {
|
||||
.fclk-systray-dropdown {
|
||||
width: 280px;
|
||||
background: var(--fclk-fab-panel-bg);
|
||||
border: 1px solid var(--fclk-fab-panel-border);
|
||||
border-radius: 16px;
|
||||
padding: 18px;
|
||||
box-shadow: var(--fclk-fab-panel-shadow);
|
||||
animation: fclk-panel-slide-up 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
position: relative;
|
||||
border-radius: 12px !important;
|
||||
overflow: hidden;
|
||||
box-shadow: var(--fclk-fab-panel-shadow) !important;
|
||||
}
|
||||
|
||||
@keyframes fclk-panel-slide-up {
|
||||
from { opacity: 0; transform: translateY(12px) scale(0.96); }
|
||||
to { opacity: 1; transform: translateY(0) scale(1); }
|
||||
}
|
||||
|
||||
// Arrow pointing down toward the FAB
|
||||
.fclk-fab-panel-arrow {
|
||||
position: absolute;
|
||||
bottom: -6px;
|
||||
left: 22px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: var(--fclk-fab-arrow-bg);
|
||||
border-right: 1px solid var(--fclk-fab-panel-border);
|
||||
border-bottom: 1px solid var(--fclk-fab-panel-border);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
// ---- Header row ----
|
||||
.fclk-fab-panel-header {
|
||||
.fclk-systray-panel {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 14px;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
background: var(--fclk-fab-panel-bg);
|
||||
}
|
||||
|
||||
.fclk-fab-panel-title {
|
||||
.fclk-systray-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--fclk-fab-text);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.fclk-fab-status-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #9ca3af;
|
||||
.fclk-systray-header-dot {
|
||||
font-size: 8px;
|
||||
flex-shrink: 0;
|
||||
|
||||
&.active {
|
||||
background: $fclk-green;
|
||||
box-shadow: 0 0 6px rgba($fclk-green, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.fclk-fab-open-link {
|
||||
color: var(--fclk-fab-muted);
|
||||
.fclk-systray-header-text {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s;
|
||||
|
||||
&:hover { color: $fclk-blue; }
|
||||
}
|
||||
|
||||
// ---- Location chip ----
|
||||
.fclk-fab-location {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 11px;
|
||||
color: $fclk-green;
|
||||
background: var(--fclk-fab-location-bg);
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
.fa { font-size: 12px; }
|
||||
}
|
||||
|
||||
// ---- Timer ----
|
||||
.fclk-fab-timer {
|
||||
text-align: center;
|
||||
color: var(--fclk-fab-text);
|
||||
font-size: 28px;
|
||||
font-weight: 300;
|
||||
font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
|
||||
letter-spacing: 2px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
margin-bottom: 14px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
// ---- Stats row ----
|
||||
.fclk-fab-stats {
|
||||
.fclk-systray-link {
|
||||
margin-left: auto;
|
||||
color: var(--fclk-fab-muted);
|
||||
font-size: 12px;
|
||||
&:hover { color: var(--fclk-fab-text); }
|
||||
}
|
||||
|
||||
.fclk-systray-location {
|
||||
font-size: 12px;
|
||||
color: var(--fclk-fab-muted);
|
||||
.fa { margin-right: 4px; }
|
||||
}
|
||||
|
||||
.fclk-systray-timer {
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
letter-spacing: 2px;
|
||||
color: var(--fclk-fab-text);
|
||||
font-variant-numeric: tabular-nums;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.fclk-systray-stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
margin-bottom: 14px;
|
||||
padding: 8px;
|
||||
background: var(--fclk-fab-location-bg);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.fclk-fab-stat {
|
||||
text-align: center;
|
||||
|
||||
.fclk-fab-stat-val {
|
||||
display: block;
|
||||
color: var(--fclk-fab-text);
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.fclk-fab-stat-lbl {
|
||||
display: block;
|
||||
color: var(--fclk-fab-muted);
|
||||
font-size: 9px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.6px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.fclk-systray-stat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.fclk-fab-stat-divider {
|
||||
.fclk-systray-stat-val {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: var(--fclk-fab-text);
|
||||
}
|
||||
|
||||
.fclk-systray-stat-lbl {
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: var(--fclk-fab-muted);
|
||||
}
|
||||
|
||||
.fclk-systray-stat-sep {
|
||||
width: 1px;
|
||||
height: 28px;
|
||||
height: 24px;
|
||||
background: var(--fclk-fab-divider);
|
||||
}
|
||||
|
||||
// ---- Action button ----
|
||||
.fclk-fab-action {
|
||||
.fclk-systray-action {
|
||||
width: 100%;
|
||||
padding: 10px 16px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
padding: 11px 0;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
letter-spacing: 0.3px;
|
||||
transition: opacity 0.15s, transform 0.1s;
|
||||
color: #fff;
|
||||
|
||||
.fa { font-size: 15px; }
|
||||
|
||||
&.fclk-fab-action--in {
|
||||
background: $fclk-gradient;
|
||||
color: #fff;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
box-shadow: 0 4px 16px rgba($fclk-teal, 0.4);
|
||||
}
|
||||
&--in {
|
||||
background: var(--bs-success, var(--o-success, #198754));
|
||||
&:hover { opacity: 0.9; }
|
||||
}
|
||||
|
||||
&.fclk-fab-action--out {
|
||||
background: $fclk-red;
|
||||
color: #fff;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
box-shadow: 0 4px 16px rgba($fclk-red, 0.35);
|
||||
}
|
||||
&--out {
|
||||
background: var(--bs-danger, var(--o-danger, #dc3545));
|
||||
&:hover { opacity: 0.9; }
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.55;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
&:active { transform: scale(0.98); }
|
||||
&:disabled { opacity: 0.6; cursor: not-allowed; }
|
||||
}
|
||||
|
||||
// ---- Error ----
|
||||
.fclk-fab-error {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
color: $fclk-red;
|
||||
font-size: 11px;
|
||||
.fclk-systray-error {
|
||||
padding: 8px 12px;
|
||||
background: var(--fclk-fab-error-bg);
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
margin-top: 10px;
|
||||
animation: fclk-shake 0.35s ease;
|
||||
line-height: 1.4;
|
||||
|
||||
.fa { font-size: 12px; margin-top: 1px; flex-shrink: 0; }
|
||||
}
|
||||
|
||||
@keyframes fclk-shake {
|
||||
0%, 100% { transform: translateX(0); }
|
||||
25% { transform: translateX(-4px); }
|
||||
75% { transform: translateX(4px); }
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
color: var(--bs-warning, var(--o-warning, #856404));
|
||||
.fa { margin-right: 4px; }
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// FAB Dialog Overlays (reason, clock-out confirmation)
|
||||
// Dialog Overlays (reason, clock-out confirmation)
|
||||
// ===========================================================
|
||||
.fclk-fab-dialog-overlay {
|
||||
position: fixed;
|
||||
@@ -593,7 +456,6 @@ $fclk-gradient-active: linear-gradient(135deg, $fclk-green 0%, $fclk-teal 100%);
|
||||
}
|
||||
}
|
||||
|
||||
// Summary card (used in clock-out confirmation)
|
||||
.fclk-fab-dialog-summary {
|
||||
background: var(--fclk-fab-location-bg, rgba(0, 0, 0, 0.04));
|
||||
border: 1px solid var(--fclk-fab-panel-border);
|
||||
@@ -678,7 +540,6 @@ html.o_dark {
|
||||
.fa { margin-right: 4px; }
|
||||
}
|
||||
|
||||
// Google Places dropdown z-index fix
|
||||
.pac-container {
|
||||
z-index: 2100 !important;
|
||||
border-radius: 8px;
|
||||
@@ -732,7 +593,6 @@ html.o_dark {
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
// -- Total (blue/slate) --
|
||||
.fclk-dash-card--total {
|
||||
background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
|
||||
border: 1px solid #bfdbfe;
|
||||
@@ -742,7 +602,6 @@ html.o_dark {
|
||||
.fclk-dash-card-label { color: #3b82f6; }
|
||||
}
|
||||
|
||||
// -- Present (green) --
|
||||
.fclk-dash-card--present {
|
||||
background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
|
||||
border: 1px solid #a7f3d0;
|
||||
@@ -752,7 +611,6 @@ html.o_dark {
|
||||
.fclk-dash-card-label { color: #10b981; }
|
||||
}
|
||||
|
||||
// -- Absent (red) --
|
||||
.fclk-dash-card--absent {
|
||||
background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
|
||||
border: 1px solid #fecaca;
|
||||
@@ -762,7 +620,6 @@ html.o_dark {
|
||||
.fclk-dash-card-label { color: #ef4444; }
|
||||
}
|
||||
|
||||
// -- Late (amber) --
|
||||
.fclk-dash-card--late {
|
||||
background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
|
||||
border: 1px solid #fde68a;
|
||||
@@ -772,7 +629,6 @@ html.o_dark {
|
||||
.fclk-dash-card-label { color: #f59e0b; }
|
||||
}
|
||||
|
||||
// -- Dark mode overrides --
|
||||
html.o_dark {
|
||||
.fclk-dash-card--total {
|
||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
|
||||
|
||||
Reference in New Issue
Block a user