feat: implement library.rs, types.ts, api.ts, and extract CSS

- library.rs: full video library management (1948 lines, 10 tests)
  folder scanning, progress tracking, playlists, subtitle integration,
  background duration scanning
- types.ts: all TypeScript interfaces for Tauri command responses
- api.ts: typed wrappers for all 26 Tauri invoke commands
- 6 CSS files extracted from Python HTML into src/styles/
This commit is contained in:
Your Name
2026-02-19 02:08:23 +02:00
parent 4e91fe679f
commit 9c8474d24f
11 changed files with 3462 additions and 1 deletions

144
src/styles/panels.css Normal file
View File

@@ -0,0 +1,144 @@
.panel{border:1px solid var(--stroke); border-radius:var(--r); background:linear-gradient(180deg, var(--surface), rgba(255,255,255,.015)); box-shadow:0 8px 32px rgba(0,0,0,.35); overflow:hidden; min-height:0; display:flex; flex-direction:column; backdrop-filter:blur(12px);}
.panelHeader{padding:12px 12px 10px; border-bottom:1px solid var(--stroke); display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex:0 0 auto; min-width:0;}
.nowTitle{font-weight:860; font-size:13.4px; letter-spacing:.14px; max-width:60ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.nowSub{margin-top:4px; color:var(--textMuted); font-size:11.6px; font-family:var(--mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:80ch;}
.dividerWrap{display:flex; align-items:stretch; justify-content:center;}
.divider{width:14px; cursor:col-resize; position:relative; background:transparent; border:none;}
.divider::after{
content:""; position:absolute; top:50%; left:50%;
width:4px; height:54px; transform:translate(-50%,-50%);
border-radius:999px;
background:
radial-gradient(circle, rgba(255,255,255,.10) 35%, transparent 40%) 0 0/4px 12px,
radial-gradient(circle, rgba(255,255,255,.10) 35%, transparent 40%) 0 6px/4px 12px;
opacity:.20; pointer-events:none; transition:opacity .15s ease;
}
.divider:hover::after{opacity:.52;}
.dock{flex:1 1 auto; min-height:0; border-top:1px solid rgba(255,255,255,.09); display:grid; grid-template-columns:62% 14px 38%; background:radial-gradient(900px 240px at 20% 0%, rgba(100,180,255,.06), transparent 60%), rgba(0,0,0,.10); overflow:hidden;}
.dockPane{min-height:0; display:flex; flex-direction:column; overflow:hidden;}
.dockInner{padding:12px; min-height:0; display:flex; flex-direction:column; gap:10px; height:100%;}
.dockHeader{padding:12px 14px 11px; border:1px solid rgba(255,255,255,.08); border-radius:7px; display:flex; align-items:center; justify-content:space-between; gap:10px; background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); flex:0 0 auto; box-shadow:0 14px 36px rgba(0,0,0,.25);}
#notesHeader{border-bottom-right-radius:7px;}
#infoHeader{border-bottom-left-radius:7px; margin-right:12px;}
.dockTitle{font-family:var(--brand); font-weight:800; letter-spacing:.02px; font-size:13.5px; color:rgba(246,248,255,.95); display:flex; align-items:center; gap:10px;}
.dockTitle .fa{color:var(--iconStrong)!important; opacity:.88; font-size:14px;}
.notesArea{flex:1 1 auto; min-height:0; overflow:hidden; position:relative;}
.notesSaved{
position:absolute;
bottom:12px; right:12px;
padding:6px 10px;
border-radius:6px;
background:linear-gradient(135deg, rgba(100,200,130,.2), rgba(80,180,120,.15));
border:1px solid rgba(100,200,130,.25);
color:rgba(150,230,170,.95);
font-size:11px;
font-weight:600;
letter-spacing:.02em;
display:flex; align-items:center; gap:6px;
opacity:0;
transform:translateY(4px);
transition:opacity .4s ease, transform .4s ease;
pointer-events:none;
box-shadow:0 4px 12px rgba(0,0,0,.2);
}
.notesSaved.show{
opacity:1;
transform:translateY(0);
}
.notesSaved .fa{font-size:10px; color:rgba(130,220,160,.95)!important;}
.notes{width:100%; height:100%; resize:none; border-radius:6px; border:1px solid rgba(255,255,255,.10); background:radial-gradient(900px 280px at 18% 0%, rgba(100,180,255,.09), transparent 62%), rgba(255,255,255,.02); color:rgba(246,248,255,.92); padding:12px 12px; outline:none; font-family:var(--sans); font-size:12.9px; line-height:1.45; letter-spacing:.08px; box-shadow:0 18px 45px rgba(0,0,0,.40); overflow:auto; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.14) transparent;}
.notes::-webkit-scrollbar{width:2px; height:2px;}
.notes::-webkit-scrollbar-track{background:transparent;}
.notes::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16); border-radius:0;}
.notes::-webkit-scrollbar-button{width:0; height:0; display:none;}
.notes::placeholder{color:rgba(165,172,196,.55);}
.infoGrid{
flex:1 1 auto;
min-height:0;
overflow:auto;
padding-right:12px;
padding-top:8px;
padding-bottom:8px;
scrollbar-width:none;
--fade-top:30px;
--fade-bottom:30px;
mask-image:linear-gradient(180deg, transparent 0%, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
-webkit-mask-image:linear-gradient(180deg, transparent 0%, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
transition:--fade-top 0.8s ease, --fade-bottom 0.8s ease;
}
@property --fade-top {
syntax: '<length>';
initial-value: 30px;
inherits: false;
}
@property --fade-bottom {
syntax: '<length>';
initial-value: 30px;
inherits: false;
}
.infoGrid.at-top{--fade-top:0px;}
.infoGrid.at-bottom{--fade-bottom:0px;}
.infoGrid::-webkit-scrollbar{width:0; height:0;}
.kv{
display:grid;
grid-template-columns:78px 1fr;
gap:4px 14px;
align-items:baseline;
padding:12px 14px;
border-radius:var(--r2);
border:1px solid var(--strokeLight);
background:linear-gradient(170deg, rgba(20,25,35,.65), rgba(14,18,26,.75));
box-shadow:var(--shadow2), inset 0 1px 0 rgba(255,255,255,.02);
margin-bottom:8px;
}
.k{
font-family:var(--sans);
font-size:9px;
font-weight:800;
text-transform:uppercase;
letter-spacing:.12em;
color:var(--textDim);
padding-top:3px;
white-space:nowrap;
}
.v{
font-family:var(--brand);
font-size:12.5px;
font-weight:650;
color:var(--text);
letter-spacing:-.01em;
word-break:break-word;
overflow-wrap:anywhere;
line-height:1.35;
padding-left:6px;
}
.v.mono{
font-family:var(--mono);
font-size:11px;
font-weight:500;
color:var(--textMuted);
letter-spacing:.01em;
font-variant-numeric:tabular-nums;
background:linear-gradient(90deg, var(--accentBg), transparent 80%);
padding:2px 6px;
border-radius:3px;
margin:-2px 0;
}
.dockDividerWrap{display:flex; align-items:stretch; justify-content:center;}
.dockDivider{width:14px; cursor:col-resize; position:relative; background:transparent; border:none;}
.dockDivider::after{
content:""; position:absolute; top:50%; left:50%;
width:4px; height:44px; transform:translate(-50%,-50%);
border-radius:999px;
background:
radial-gradient(circle, rgba(255,255,255,.10) 35%, transparent 40%) 0 0/4px 12px,
radial-gradient(circle, rgba(255,255,255,.10) 35%, transparent 40%) 0 6px/4px 12px;
opacity:.18; pointer-events:none; transition:opacity .15s ease;
}
.dockDivider:hover::after{opacity:.44;}