Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"authorUrl": "https://bagerbach.com",
"fundingUrl": "https://buymeacoffee.com/chhoumann",
"isDesktopOnly": false
}
}
78 changes: 49 additions & 29 deletions src/ui/PodcastView/EpisodePlayer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -310,39 +310,43 @@
</div>
</div>

<ChapterList
{chapters}
currentTime={$currentTime}
on:seek={onChapterSeek}
/>

<EpisodeList
episodes={$queue.episodes}
showListMenu={false}
showThumbnails={true}
on:contextMenuEpisode={handleContextMenuEpisode}
on:clickEpisode={handleClickEpisode}
>
<svelte:fragment slot="header">
<h3>Queue</h3>
</svelte:fragment>
</EpisodeList>
<div class="lists-container">
<ChapterList
{chapters}
currentTime={$currentTime}
on:seek={onChapterSeek}
/>

<EpisodeList
episodes={$queue.episodes}
showListMenu={false}
showThumbnails={true}
on:contextMenuEpisode={handleContextMenuEpisode}
on:clickEpisode={handleClickEpisode}
>
<svelte:fragment slot="header">
<h3>Queue</h3>
</svelte:fragment>
</EpisodeList>
</div>
</div>

<style>
.episode-player {
display: flex;
flex-direction: column;
height: 100%;
flex: 1 1 auto;
min-height: 0;
padding: 0 1rem;
overflow-y: auto;
gap: 0.35rem;
}

.episode-image-container {
width: 100%;
max-width: 20rem;
margin: 0 auto;
padding: 1rem 0;
margin: 0 auto 0.5rem;
padding: 1rem 0 0.5rem;
}

.hover-container {
Expand Down Expand Up @@ -423,15 +427,11 @@
font-size: 1.125rem;
font-weight: 600;
line-height: 1.4;
margin: 0 0 1rem;
margin: 0 0 0.75rem;
text-align: center;
color: var(--text-normal);
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
white-space: normal;
word-break: break-word;
}

.status-container {
Expand Down Expand Up @@ -486,8 +486,7 @@
display: flex;
flex-direction: column;
gap: 1rem;
margin-top: auto;
padding: 1.5rem 0;
padding: 1rem 0 0.75rem;
border-top: 1px solid var(--background-modifier-border);
}

Expand Down Expand Up @@ -515,4 +514,25 @@
margin: 1rem 0 0.5rem;
padding: 0 0.5rem;
}

:global(.episode-player .episode-list-view-container) {
height: auto;
overflow: visible;
}

:global(.episode-player .podcast-episode-list) {
flex: 0 0 auto;
overflow: visible;
}

.lists-container {
display: flex;
flex-direction: column;
gap: 0.25rem;
padding-bottom: 0.5rem;
}

:global(.lists-container .episode-list-view-container) {
height: auto;
}
</style>
33 changes: 32 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import fs from "node:fs";
import { builtinModules } from "node:module";
import path from "node:path";
import { svelte } from "@sveltejs/vite-plugin-svelte";
Expand Down Expand Up @@ -51,13 +52,43 @@ const external = [

export default defineConfig(({ mode }) => {
const isProd = mode === "production";
const outDir = isProd ? "." : "build";

const devSymlinkPlugin = () => ({
name: "podnotes-dev-symlink",
writeBundle() {
if (isProd) return;

const ensureSymlink = (from: string, to: string) => {
try {
const stat = fs.lstatSync(to);
if (stat.isSymbolicLink() || stat.isFile()) {
fs.unlinkSync(to);
}
} catch {
// target does not exist – that's fine
}

fs.symlinkSync(from, to);
};

const builtMain = path.resolve(__dirname, outDir, "main.js");
const builtMap = path.resolve(__dirname, outDir, "main.js.map");
const rootMain = path.resolve(__dirname, "main.js");
const rootMap = path.resolve(__dirname, "main.js.map");

if (fs.existsSync(builtMain)) ensureSymlink(builtMain, rootMain);
if (fs.existsSync(builtMap)) ensureSymlink(builtMap, rootMap);
},
});

return {
plugins: [
svelte({
preprocess: sveltePreprocess(),
compilerOptions: { css: "injected" },
}),
devSymlinkPlugin(),
],
resolve: {
alias: {
Expand All @@ -72,7 +103,7 @@ export default defineConfig(({ mode }) => {
fileName: () => "main.js",
},
target: "es2020",
outDir: ".",
outDir,
emptyOutDir: false,
sourcemap: !isProd,
minify: isProd ? "esbuild" : false,
Expand Down