Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: vod not hiding #1286

Merged
merged 7 commits into from
Jun 17, 2024
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 .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
retention-days: 30

- name: Send to Codecov
uses: codecov/codecov-action@v4.4.1
uses: codecov/codecov-action@v4.5.0
with:
files: ./results.json
flags: "e2ecoverage"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
retention-days: 30

- name: Send to Codecov
uses: codecov/codecov-action@v4.4.1
uses: codecov/codecov-action@v4.5.0
with:
files: ./results.json
flags: "e2ecoverage"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"prettier-plugin-svelte": "^3.2.1",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"svelte-preprocess": "^5.1.3",
"svelte-preprocess": "^6.0.0",
"swiper": "^11.0.1",
"tailwind-scrollbar": "^3.0.0",
"tailwindcss": "^3.4.0",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/Channel/Stream/DialogVod.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
const toggleVodVisibility = async () => {
const updatedVod = await patch(`vod`, {
channelId: vod.channelId,
uid: vod.uid,
inputId: vod.inputId,
isVisible: !vod.isVisible
})
Expand Down Expand Up @@ -46,7 +47,7 @@
type="checkbox"
class="toggle toggle-primary toggle-xs"
bind:checked={vodIsVisible} />
Hide</a>
Visible to viewers</a>
</li>
<li><a>Download</a></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Channel/Stream/StreamContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
</div>
{#if channel && nextchannel?._id === parseInt($page.params.channelId)}
<VideoGrid bind:channel />
<VodList channelId={channel._id} />
<VodList hostUserId={channel.userId} channelId={channel._id} />
{/if}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Channel/Stream/StreamControls.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@
</div>
</div>
</div>
<input
<!-- <input
type="checkbox"
class="toggle toggle-primary toggle-xs tooltip absolute right-20 hidden sm:block"
data-tip="Lock scroll"
bind:checked={isScrollable}
on:click={() => {
isScrollable = !isScrollable
}} />
}} /> -->

<dialog bind:this={rtmps_modal} class="modal">
<form method="dialog" class="modal-box overflow-x-hidden">
Expand Down
10 changes: 8 additions & 2 deletions src/lib/components/Channel/Stream/VodList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@
import { page } from '$app/stores'

export let channelId: number, hostUserId: number

let vods: any = [],
selectedVod: any

$: {
if (selectedVod) {
vods = vods.map((vod: any) => (vod.id === selectedVod.id ? selectedVod : vod))
}
}

onMount(async () => {
vods = await get(`vods?channelId=${channelId}`)
console.log('channel', vods)
if (hostUserId !== $page.data.user?.userId) {
vods = vods.filter((vod: any) => !vod.isVisible)
}
Expand Down Expand Up @@ -47,5 +53,5 @@
</div>
{/each}
</div>
<DialogVod vod={selectedVod} />
<DialogVod bind:vod={selectedVod} />
{/if}