- Editable podcast settings: new /podcasts/:id/settings page, reusing PodcastForm.vue in an edit mode (PUT instead of POST) since it was previously create-only with no way to fix a field (e.g. lightning address) after the fact. - Recorded episodes can now be priced same as uploads: "Publish recording" gained an optional price_sats field, wired through the existing episode paywall machinery. Live streams themselves stay unpaywalled by design — only the resulting recording can be priced. - Accept Cashu tokens as an alternative to a Lightning invoice: POST .../purchase/token redeems a pasted token directly (via the mint's swap/receive flow) and finalizes the purchase in one step, no quote/confirm round trip. A token worth more than the price is treated as a tip (seller gets the full amount); worth less is rejected. Added a "pay with a Cashu token instead" option next to the existing invoice flow. - cashu.ts: fixed payout() always requesting an invoice for the full held balance with no room for the mint's routing-fee reserve, which made a balance that exactly matched one sale's price permanently unwithdrawable (needed slightly more than held to cover the fee). Now shrinks the request and requotes once if the first quote doesn't fit. - docker-compose.yml / mediamtx.yml: renamed the podsteadr container's DNS alias away from the literal string "podsteadr" — on a host whose own hostname is "podsteadr", cloud-init's self-hostname /etc/hosts entry shadowed the container-network alias, so mediamtx's auth webhook callback resolved to the wrong address and rejected every RTMP publish attempt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
import { createRouter, createWebHistory } from 'vue-router';
|
|
import { useAuthStore } from './stores/auth';
|
|
|
|
export const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{ path: '/login', component: () => import('./views/LoginView.vue') },
|
|
{ path: '/', component: () => import('./views/HomeView.vue') },
|
|
{ path: '/upload', component: () => import('./views/wizard/EpisodeWizard.vue') },
|
|
{ path: '/live', component: () => import('./views/wizard/LiveWizard.vue') },
|
|
{ path: '/streams/:id', component: () => import('./views/StreamDashboard.vue') },
|
|
{ path: '/podcasts/:id/settings', component: () => import('./views/PodcastSettingsView.vue') },
|
|
{ path: '/podcasts/:id/episodes/:eid', component: () => import('./views/EpisodeDetailView.vue') },
|
|
{ path: '/earnings', component: () => import('./views/EarningsView.vue') },
|
|
{ path: '/settings', component: () => import('./views/SettingsView.vue') },
|
|
],
|
|
});
|
|
|
|
router.beforeEach(async (to) => {
|
|
const auth = useAuthStore();
|
|
await auth.ensureLoaded();
|
|
if (to.path !== '/login' && !auth.pubkey) return '/login';
|
|
if (to.path === '/login' && auth.pubkey) return '/';
|
|
});
|