diff --git a/package.json b/package.json
index 957d55e8..22f4647a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mage-website",
- "version": "0.0.17",
+ "version": "0.1.0",
"license": "GPL-3.0",
"private": true,
"type": "module",
@@ -46,16 +46,18 @@
"tailwindcss": "^3.2.7",
"tslib": "^2.5.0",
"typescript": "^5.0.2",
- "video.js": "^8.3.0",
"vite": "^4.1.4"
},
"dependencies": {
+ "@event-calendar/core": "^2.0.0",
+ "@event-calendar/time-grid": "^2.0.0",
"@neodrag/svelte": "^2.0.3",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/typography": "^0.5.9",
"animate.css": "^4.1.1",
"daisyui": "^3.2.1",
"emoji-picker-element": "^1.18.1",
+ "moment": "^2.29.4",
"nprogress": "^0.2.0",
"playwright-e2e-coverage-report": "^1.0.28",
"svelte-tags-input": "^5.0.0",
diff --git a/src/lib/WHEPClient.ts b/src/lib/WHEPClient.ts
index 377e26d6..2ebb6898 100644
--- a/src/lib/WHEPClient.ts
+++ b/src/lib/WHEPClient.ts
@@ -68,11 +68,19 @@ export default class WHEPClient extends EventTarget {
console.log('got unknown track ' + track)
}
- if (trackType === 'screen' && track.readyState === 'live') {
- this.dispatchEvent(new CustomEvent(`isScreenLive`, { detail: true }))
+ if (trackType === 'screen' && track.kind === 'video') {
+ if (track.readyState === 'live') {
+ this.dispatchEvent(new CustomEvent(`isScreenLive`, { detail: true }))
+ } else {
+ this.dispatchEvent(new CustomEvent(`isScreenLive`, { detail: false }))
+ }
}
- if (trackType === 'webcam' && track.readyState === 'live') {
- this.dispatchEvent(new CustomEvent(`isWebcamLive`, { detail: true }))
+ if (trackType === 'webcam' && track.kind === 'video') {
+ if (track.readyState === 'live') {
+ this.dispatchEvent(new CustomEvent(`isWebcamLive`, { detail: true }))
+ } else {
+ this.dispatchEvent(new CustomEvent(`isWebcamLive`, { detail: false }))
+ }
}
}
diff --git a/src/lib/assets/icons/IconFollowers.svelte b/src/lib/assets/icons/IconFollowers.svelte
new file mode 100644
index 00000000..eb34ae56
--- /dev/null
+++ b/src/lib/assets/icons/IconFollowers.svelte
@@ -0,0 +1,12 @@
+
diff --git a/src/lib/assets/icons/IconViews.svelte b/src/lib/assets/icons/IconViews.svelte
new file mode 100644
index 00000000..805047b8
--- /dev/null
+++ b/src/lib/assets/icons/IconViews.svelte
@@ -0,0 +1,13 @@
+
diff --git a/src/lib/assets/icons/social/IconMobileAppAndroid.png b/src/lib/assets/icons/social/IconMobileAppAndroid.png
new file mode 100644
index 00000000..131f3aca
Binary files /dev/null and b/src/lib/assets/icons/social/IconMobileAppAndroid.png differ
diff --git a/src/lib/assets/icons/social/IconMobileAppiOS.svg b/src/lib/assets/icons/social/IconMobileAppiOS.svg
new file mode 100644
index 00000000..072b425a
--- /dev/null
+++ b/src/lib/assets/icons/social/IconMobileAppiOS.svg
@@ -0,0 +1,46 @@
+
diff --git a/src/lib/assets/icons/social/IconSocialTwitter2.svelte b/src/lib/assets/icons/social/IconSocialTwitter2.svelte
new file mode 100644
index 00000000..de7c7997
--- /dev/null
+++ b/src/lib/assets/icons/social/IconSocialTwitter2.svelte
@@ -0,0 +1,29 @@
+
+
+
diff --git a/src/lib/components/Browse/Sections/ItemCarousel.svelte b/src/lib/components/Browse/Sections/ItemCarousel.svelte
index cdd70515..31e8695f 100644
--- a/src/lib/components/Browse/Sections/ItemCarousel.svelte
+++ b/src/lib/components/Browse/Sections/ItemCarousel.svelte
@@ -1,8 +1,9 @@
@@ -18,14 +20,19 @@
LIVE
{/if}
-
-
diff --git a/src/lib/components/Browse/Sections/ItemTable.svelte b/src/lib/components/Browse/Sections/ItemTable.svelte
index 0a027c01..64c7fc84 100644
--- a/src/lib/components/Browse/Sections/ItemTable.svelte
+++ b/src/lib/components/Browse/Sections/ItemTable.svelte
@@ -1,8 +1,10 @@
@@ -38,9 +40,19 @@
-
-
- {channel.memberCount || '0'}
+
+
+
+ {getNumberInThousands(channel.viewDetails?.count || 0)}
+
+
+
+ {getNumberInThousands(channel?.memberCount || 0)}
+
|
diff --git a/src/lib/components/Channel/Chat/DropdownViewChannel.svelte b/src/lib/components/Channel/Chat/DropdownViewChannel.svelte
index 294f0ff6..c831edf4 100644
--- a/src/lib/components/Channel/Chat/DropdownViewChannel.svelte
+++ b/src/lib/components/Channel/Chat/DropdownViewChannel.svelte
@@ -19,6 +19,16 @@
isFollowing: boolean = false,
isFavorite: boolean = false
+ onMount(async () => {
+ if ($page.data.user?.userId) {
+ const favorites = await get(`favorites?channelId=${channel._id}`, {
+ userId: $page.data.user?.userId,
+ token: $page.data.user?.token
+ })
+ isFavorite = favorites?.length > 0
+ }
+ })
+
const getHostRelationship = async () => {
isHost = channel.user === $page?.data?.user?.userId
if ($page.data.user?.userId) {
@@ -30,10 +40,6 @@
}
}
- onMount(async () => {
- isFavorite = $page.data.user?.user?.favChannelIds?.includes(channel._id)
- })
-
const toggleFollow = async () => {
isFollowing = !isFollowing
if (isFollowing) {
@@ -54,12 +60,12 @@
isFavorite = !isFavorite
if (isFavorite) {
await put(
- `users/channel?channelId=${channel._id}`,
+ `favorite?channelId=${channel._id}`,
{},
{ userId: $page.data.user?.userId, token: $page.data.user?.token }
)
} else {
- await del(`users/channel?channelId=${channel._id}`, {
+ await del(`favorites?channelId=${channel._id}`, {
userId: $page.data.user?.userId,
token: $page.data.user?.token
})
diff --git a/src/lib/components/Channel/Stream/StreamContainer.svelte b/src/lib/components/Channel/Stream/StreamContainer.svelte
index a81310bb..9945d8cc 100644
--- a/src/lib/components/Channel/Stream/StreamContainer.svelte
+++ b/src/lib/components/Channel/Stream/StreamContainer.svelte
@@ -1,11 +1,19 @@
+
+
(isHoverVideo = true)}
on:mouseleave={() => (isHoverVideo = false)}>
@@ -427,49 +478,47 @@
? 'mask-hexagon'
: 'mask-squircle'} object-cover m-auto" />
- {#if $is_feature_stats_enabled && (isScreenLive || isWebcamLive)}
+ {#if $is_feature_stats_enabled && (isScreenLive || iframeUrl)}
{formattedTime}
{/if}
- {#if $is_feature_obs_enabled}
-
-
-
+ {#if $is_feature_obs_enabled && iframeUrl}
+
+
+
{/if}
-
-
-
+ {#if !iframeUrl}
-
-
-
+ class="rounded-md w-full h-full" />
+
+
+
+
+ {/if}
+
|