Compare commits
No commits in common. "c2b9b5759a9c0b53920f8c49834cc4a4092a1b6f" and "5439786652669788d8e6a5b712643df9e422c36f" have entirely different histories.
c2b9b5759a
...
5439786652
8
.gitignore
vendored
8
.gitignore
vendored
@ -3,11 +3,3 @@ dist/
|
|||||||
release/
|
release/
|
||||||
*.log
|
*.log
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# Test-Artefakte
|
|
||||||
tmp_e2e_full/
|
|
||||||
tmp_bugtest/
|
|
||||||
tmp_dl/
|
|
||||||
|
|
||||||
# Dev-Scripts ohne Token (Stub, nicht produktiv)
|
|
||||||
codeberg_api_upload.sh
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "5.1.0-alpha.2",
|
"version": "5.1.0-alpha.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "5.1.0-alpha.2",
|
"version": "5.1.0-alpha.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.0",
|
"axios": "^1.6.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "5.1.0-alpha.2",
|
"version": "5.1.0-alpha.1",
|
||||||
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"author": "xRangerDE",
|
"author": "xRangerDE",
|
||||||
|
|||||||
@ -18,55 +18,27 @@ interface PaletteCommand {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function buildCommands(): PaletteCommand[] {
|
function buildCommands(): PaletteCommand[] {
|
||||||
const w = window as unknown as {
|
const showTab = (window as unknown as { showTab?: (tab: string) => void }).showTab;
|
||||||
showTab?: (tab: string) => void;
|
|
||||||
selectStreamer?: (name: string, forceRefresh?: boolean) => Promise<void>;
|
|
||||||
config?: { streamers?: Array<{ name: string }> };
|
|
||||||
};
|
|
||||||
const showTab = w.showTab;
|
|
||||||
if (typeof showTab !== 'function') {
|
if (typeof showTab !== 'function') {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const tabs: Array<{ id: string; labels: string[]; hint: string }> = [
|
const tabs: Array<{ id: string; labels: string[]; hint: string }> = [
|
||||||
{ id: 'vods', labels: ['VODs', 'videos', 'streams'], hint: 'Tab' },
|
{ id: 'vods', labels: ['VODs', 'videos', 'streams'], hint: 'Go' },
|
||||||
{ id: 'queue', labels: ['Queue', 'downloads', 'warteschlange'], hint: 'Tab' },
|
{ id: 'queue', labels: ['Queue', 'downloads', 'warteschlange'], hint: 'Go' },
|
||||||
{ id: 'streamers', labels: ['Streamers', 'channels'], hint: 'Tab' },
|
{ id: 'streamers', labels: ['Streamers', 'channels'], hint: 'Go' },
|
||||||
{ id: 'stats', labels: ['Stats', 'statistiken', 'dashboard'], hint: 'Tab' },
|
{ id: 'stats', labels: ['Stats', 'statistiken', 'dashboard'], hint: 'Go' },
|
||||||
{ id: 'archive', labels: ['Archive', 'archiv'], hint: 'Tab' },
|
{ id: 'archive', labels: ['Archive', 'archiv'], hint: 'Go' },
|
||||||
{ id: 'settings', labels: ['Settings', 'einstellungen', 'config'], hint: 'Tab' },
|
{ id: 'settings', labels: ['Settings', 'einstellungen', 'config'], hint: 'Go' },
|
||||||
];
|
];
|
||||||
|
|
||||||
const tabCommands: PaletteCommand[] = tabs.map(t => ({
|
return tabs.map(t => ({
|
||||||
id: 'tab:' + t.id,
|
id: 'tab:' + t.id,
|
||||||
label: t.labels[0],
|
label: t.labels[0],
|
||||||
hint: t.hint,
|
hint: t.hint,
|
||||||
keywords: t.labels.join(' ').toLowerCase(),
|
keywords: t.labels.join(' ').toLowerCase(),
|
||||||
action: () => showTab(t.id),
|
action: () => showTab(t.id),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Streamer-Liste aus globalem config (gefuellt nach renderer-Init).
|
|
||||||
const streamerCommands: PaletteCommand[] = [];
|
|
||||||
const streamers = Array.isArray(w.config?.streamers) ? w.config.streamers : [];
|
|
||||||
const selectStreamer = w.selectStreamer;
|
|
||||||
if (typeof selectStreamer === 'function') {
|
|
||||||
for (const entry of streamers) {
|
|
||||||
if (!entry || typeof entry.name !== 'string') continue;
|
|
||||||
const name = entry.name;
|
|
||||||
streamerCommands.push({
|
|
||||||
id: 'streamer:' + name.toLowerCase(),
|
|
||||||
label: name,
|
|
||||||
hint: 'Streamer',
|
|
||||||
keywords: ('@' + name + ' ' + name).toLowerCase(),
|
|
||||||
action: () => {
|
|
||||||
showTab('vods');
|
|
||||||
void selectStreamer(name);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return [...tabCommands, ...streamerCommands];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getModal(): HTMLElement | null {
|
function getModal(): HTMLElement | null {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user