mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-21 08:26:40 +00:00
feat(extension): add Firefox browser extension and native integration
- Implement Firefox extension to intercept downloads and scrape selected links via context menus - Create LocalExtensionServer over TCP (localhost:6412) to receive links from the extension - Automatically package extension to firelink.xpi in create_app_bundle.sh - Add Integrations tab in SettingsView with one-click installer for Firefox variants - Modify ContentView and TrayMenuView to automatically open the Add Downloads window on extension trigger
This commit is contained in:
@@ -0,0 +1,282 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
|
||||
|
||||
:root {
|
||||
/* Dark Theme Variables (Default fallback) */
|
||||
--bg-color: #0d0d0f;
|
||||
--text-primary: #f5f5f7;
|
||||
--text-secondary: #8e8e93;
|
||||
--text-hover: #a1a1a6;
|
||||
--row-bg: rgba(255, 255, 255, 0.03);
|
||||
--row-border: rgba(255, 255, 255, 0.06);
|
||||
--row-bg-hover: rgba(255, 255, 255, 0.05);
|
||||
--row-border-hover: rgba(255, 255, 255, 0.1);
|
||||
--header-border: rgba(255, 255, 255, 0.08);
|
||||
--blob-color-1: rgba(255, 45, 85, 0.4);
|
||||
--blob-color-2: rgba(255, 149, 0, 0.1);
|
||||
--toggle-bg: rgba(255, 255, 255, 0.15);
|
||||
--toggle-border: rgba(255, 255, 255, 0.05);
|
||||
--toggle-knob: #ffffff;
|
||||
--shadow-color: rgba(0, 0, 0, 0.2);
|
||||
--icon-hover: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--bg-color: #f2f2f7;
|
||||
--text-primary: #1c1c1e;
|
||||
--text-secondary: #636366;
|
||||
--text-hover: #3a3a3c;
|
||||
--row-bg: rgba(255, 255, 255, 0.6);
|
||||
--row-border: rgba(0, 0, 0, 0.05);
|
||||
--row-bg-hover: rgba(255, 255, 255, 0.9);
|
||||
--row-border-hover: rgba(0, 0, 0, 0.1);
|
||||
--header-border: rgba(0, 0, 0, 0.08);
|
||||
--blob-color-1: rgba(255, 45, 85, 0.2);
|
||||
--blob-color-2: rgba(255, 149, 0, 0.05);
|
||||
--toggle-bg: rgba(0, 0, 0, 0.1);
|
||||
--toggle-border: rgba(0, 0, 0, 0.05);
|
||||
--toggle-knob: #ffffff;
|
||||
--shadow-color: rgba(0, 0, 0, 0.05);
|
||||
--icon-hover: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root:not([data-theme="dark"]) {
|
||||
--bg-color: #f2f2f7;
|
||||
--text-primary: #1c1c1e;
|
||||
--text-secondary: #636366;
|
||||
--text-hover: #3a3a3c;
|
||||
--row-bg: rgba(255, 255, 255, 0.6);
|
||||
--row-border: rgba(0, 0, 0, 0.05);
|
||||
--row-bg-hover: rgba(255, 255, 255, 0.9);
|
||||
--row-border-hover: rgba(0, 0, 0, 0.1);
|
||||
--header-border: rgba(0, 0, 0, 0.08);
|
||||
--blob-color-1: rgba(255, 45, 85, 0.2);
|
||||
--blob-color-2: rgba(255, 149, 0, 0.05);
|
||||
--toggle-bg: rgba(0, 0, 0, 0.1);
|
||||
--toggle-border: rgba(0, 0, 0, 0.05);
|
||||
--toggle-knob: #ffffff;
|
||||
--shadow-color: rgba(0, 0, 0, 0.05);
|
||||
--icon-hover: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
width: 340px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-primary);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Glassmorphic background blob animation */
|
||||
.background-blob {
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
right: -50px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: radial-gradient(circle, var(--blob-color-1) 0%, var(--blob-color-2) 50%, transparent 70%);
|
||||
border-radius: 50%;
|
||||
filter: blur(30px);
|
||||
z-index: 0;
|
||||
animation: pulse 6s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition: background 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
|
||||
100% { transform: scale(1.1) translate(-10px, 10px); opacity: 0.9; }
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 24px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid var(--header-border);
|
||||
transition: border-color 0.3s ease;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin-right: 12px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 4px 12px rgba(255, 45, 85, 0.2);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.logo:hover {
|
||||
transform: scale(1.05) rotate(2deg);
|
||||
}
|
||||
|
||||
.header-title-container {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
letter-spacing: -0.5px;
|
||||
background: linear-gradient(90deg, #ff9500, #ff2d55);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.theme-toggle-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 6px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-secondary);
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
.theme-toggle-btn:hover {
|
||||
background-color: var(--icon-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.theme-toggle-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.settings {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.setting-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 14px 16px;
|
||||
background: var(--row-bg);
|
||||
border: 1px solid var(--row-border);
|
||||
border-radius: 14px;
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.setting-row:hover {
|
||||
background: var(--row-bg-hover);
|
||||
border-color: var(--row-border-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px var(--shadow-color);
|
||||
}
|
||||
|
||||
.setting-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.setting-title {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 4px;
|
||||
letter-spacing: -0.2px;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.setting-desc {
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.4;
|
||||
word-break: break-all;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.setting-row:hover .setting-desc {
|
||||
color: var(--text-hover);
|
||||
}
|
||||
|
||||
#current-hostname {
|
||||
color: #ff9500;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Modern Toggle Switch Styling */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 48px;
|
||||
height: 28px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--toggle-bg);
|
||||
transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
border: 1px solid var(--toggle-border);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: var(--toggle-knob);
|
||||
transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #ff2d55;
|
||||
border-color: #ff2d55;
|
||||
box-shadow: 0 0 12px rgba(255, 45, 85, 0.4);
|
||||
}
|
||||
|
||||
input:focus + .slider {
|
||||
outline: 2px solid rgba(255, 45, 85, 0.5);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
.slider.round {
|
||||
border-radius: 28px;
|
||||
}
|
||||
|
||||
.slider.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
||||
Reference in New Issue
Block a user