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

v0.1.0 #708

Merged
merged 65 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
3c31da7
event calendar setup
Aug 21, 2023
ba66fe6
lazy loading
Aug 21, 2023
a5daa1d
data sourcing
Aug 23, 2023
bae7e41
event calender ui
sitaradev Aug 23, 2023
c6851ca
update button style
Aug 23, 2023
d26542b
reset form data
Aug 23, 2023
5b9a4c4
Feat: added vime lib for hls stream
gagansuie Aug 24, 2023
35c3d5d
Merge pull request #683 from gagan-suie/dev
gagansuie Aug 24, 2023
43f3d89
remove unwanted
Aug 24, 2023
632c973
Feat: added dialog for mobile apps
gagansuie Aug 25, 2023
71ae84b
Fix: hls video streaming
gagansuie Aug 25, 2023
8508d34
Merge pull request #684 from gagan-suie/dev
gagansuie Aug 25, 2023
d02514e
Merge branch 'dev' into pr/682
gagansuie Aug 25, 2023
7a11084
Fix: delete event endpoint
gagansuie Aug 25, 2023
5dd8dad
apply theme classes
Aug 25, 2023
bd881e6
Merge branch 'event-scheduler' of github.com:sitaradev/mage-website i…
Aug 25, 2023
d3d49ed
api update and btn primary
Aug 28, 2023
c06b82c
decrese line opacity
Aug 29, 2023
d0c17b2
Merge branch 'dev' into pr/682
gagansuie Aug 29, 2023
ab3d057
Fix: minor theming change to event buttons
gagansuie Aug 30, 2023
dc015f7
Fix: more event theming changes
gagansuie Aug 30, 2023
de931a0
Merge pull request #682 from sitaradev/event-scheduler
gagansuie Aug 30, 2023
05202be
Chore: time and views
da7a90-backup Aug 31, 2023
4c400c3
Fix: adding end stream timestamp
da7a90-backup Aug 31, 2023
46b90bf
Merge remote-tracking branch 'upstream/main' into dev
gagansuie Sep 6, 2023
072c6c0
Merge pull request #688 from gagan-suie/dev
gagansuie Sep 6, 2023
1fc887d
Merge remote-tracking branch 'upstream/dev' into pr/686
gagansuie Sep 6, 2023
5bbfdde
Fix: adjusted placement of profile view post endpoint
gagansuie Sep 6, 2023
5865f01
Fix: removed webcam setting stats, and added await to put calls
gagansuie Sep 6, 2023
6b6a636
join button and visible icon
sitaradev Sep 7, 2023
2302fe1
Fix: stat endpoints and minor design changes
gagansuie Sep 7, 2023
8ca7f4a
Merge pull request #686 from da7a90-backup/timeandviews
gagansuie Sep 7, 2023
34a755a
Fix: temporarily removed player for OBS
gagansuie Sep 7, 2023
5ed3578
Merge pull request #689 from gagan-suie/dev
gagansuie Sep 7, 2023
6469f0e
Fix: stream timer and stream stability
gagansuie Sep 11, 2023
bfe48c8
Merge pull request #691 from gagan-suie/dev
gagansuie Sep 11, 2023
f80d45e
Merge remote-tracking branch 'upstream/dev' into pr/690
gagansuie Sep 11, 2023
8d21000
Merge pull request #690 from sitaradev/event-scheduler
gagansuie Sep 11, 2023
7fbef3d
Fix: changed event color and margins
gagansuie Sep 11, 2023
c26b94f
Merge remote-tracking branch 'upstream/dev' into dev
gagansuie Sep 11, 2023
3aea443
Merge pull request #692 from gagan-suie/dev
gagansuie Sep 11, 2023
93a167f
Fix: get channel view count in channels
gagansuie Sep 11, 2023
81120dc
Merge pull request #695 from gagan-suie/dev
gagansuie Sep 11, 2023
083a13f
Fix: changed hours to minutes
gagansuie Sep 11, 2023
db2a6d0
Merge pull request #696 from gagan-suie/dev
gagansuie Sep 11, 2023
388f4c0
Feat: added favorite endpoints
gagansuie Sep 11, 2023
3cac163
Merge pull request #697 from gagan-suie/dev
gagansuie Sep 11, 2023
e41bbed
Merge remote-tracking branch 'upstream/main' into dev
gagansuie Sep 12, 2023
1501c09
Merge pull request #698 from gagan-suie/dev
gagansuie Sep 12, 2023
ce08960
Fix: favorites endpoints and obs streaming
gagansuie Sep 12, 2023
01f9685
Merge pull request #699 from gagan-suie/dev
gagansuie Sep 12, 2023
1d6f505
Fix: obs streaming
gagansuie Sep 13, 2023
6501c7a
Chore: updated version
gagansuie Sep 13, 2023
31de195
Merge pull request #700 from gagan-suie/dev
gagansuie Sep 13, 2023
1515e41
Fix: username overlapping obs buttons
gagansuie Sep 13, 2023
9c208db
Fix: obs streaming live-inputs not deleting
gagansuie Sep 13, 2023
bfc006b
Merge pull request #701 from gagan-suie/dev
gagansuie Sep 13, 2023
59eeb03
Fix: added new twitter icon
gagansuie Sep 13, 2023
4be6dab
Merge pull request #702 from gagan-suie/dev
gagansuie Sep 13, 2023
c805a47
Fix: added channel stats lookup using host
da7a90-backup Sep 14, 2023
133292b
Merge pull request #704 from da7a90-backup/channelstats
gagansuie Sep 14, 2023
c63becf
Fix: sending more data for notifications
gagansuie Sep 18, 2023
2a6b484
Merge pull request #706 from gagan-suie/dev
gagansuie Sep 18, 2023
50af3c4
Chore: updated version
gagansuie Sep 18, 2023
acdf069
Merge pull request #707 from gagan-suie/dev
gagansuie Sep 18, 2023
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
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage-website",
"version": "0.0.17",
"version": "0.1.0",
"license": "GPL-3.0",
"private": true,
"type": "module",
Expand Down Expand Up @@ -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",
Expand Down
16 changes: 12 additions & 4 deletions src/lib/WHEPClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }))
}
}
}

Expand Down
12 changes: 12 additions & 0 deletions src/lib/assets/icons/IconFollowers.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" />
</svg>
13 changes: 13 additions & 0 deletions src/lib/assets/icons/IconViews.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions src/lib/assets/icons/social/IconMobileAppiOS.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/lib/assets/icons/social/IconSocialTwitter2.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<script>
import { current_theme } from '$lib/stores/helperStore'
import { onMount } from 'svelte'

export let customClass = 'w-5'

let color = '#fff'
onMount(() => {
current_theme.subscribe((theme) => {
switch (theme) {
case 'dark':
case 'synthwave':
color = '#fff'
break
case 'light':
case 'cyberpunk':
color = '#000'
break
}
})
})
</script>

<div class={customClass}>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" style="fill: {color};">
<path
d="M 14.878906 10.582031 L 24.183594 0 L 21.980469 0 L 13.898438 9.1875 L 7.445312 0 L 0 0 L 9.761719 13.890625 L 0 24.988281 L 2.207031 24.988281 L 10.738281 15.285156 L 17.554688 24.988281 L 25 24.988281 Z M 11.859375 14.015625 L 10.867188 12.632812 L 3 1.625 L 6.386719 1.625 L 12.738281 10.507812 L 13.726562 11.890625 L 21.980469 23.4375 L 18.59375 23.4375 Z M 11.859375 14.015625 " />
</svg>
</div>
25 changes: 14 additions & 11 deletions src/lib/components/Browse/Sections/ItemCarousel.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script lang="ts">
import IconViews from '$lib/assets/icons/IconViews.svelte'
import IconViewers from '$lib/assets/icons/IconViewers.svelte'
import IconDrawerVerification from '$lib/assets/icons/drawer/IconDrawerVerification.svelte'
// import IconBrowseItemPlay from '$lib/assets/icons/browse/IconBrowseItemPlay.svelte'
import { category_list } from '$lib/stores/channelStore'
import { getNumberInThousands } from '$lib/utils'

export let channel: any = {}

Expand All @@ -22,14 +23,19 @@
LIVE
</span>
{/if}
<div class="dropdown dropdown-bottom">
<label
for=""
class="btn btn-sm rounded-md font-medium gap-2 btn-neutral text-white border-none"
tabindex="-1">
<div
class="tooltip"
data-tip="{getNumberInThousands(channel.viewDetails?.count || 0)} views">
<span class="btn btn-sm rounded-md font-medium gap-2 btn-neutral text-white border-none">
<IconViews />
{getNumberInThousands(channel.viewDetails.count || 0)}
</span>
</div>
<div class="tooltip" data-tip="{getNumberInThousands(channel.memberCount || 0)} watching">
<span class="btn btn-sm rounded-md font-medium gap-2 btn-neutral text-white border-none">
<IconViewers />
{channel.memberCount || '0'}
</label>
{getNumberInThousands(channel.memberCount || 0)}
</span>
</div>
</div>
<div class="flex flex-wrap">
Expand All @@ -42,9 +48,6 @@
{/if}
</div>
</div>
<!-- <div class="flex justify-center w-full">
<IconBrowseItemPlay />
</div> -->
<div class="space-y-2">
<p class="text-2xl truncate text-white font-semibold">{channel.title || ''}</p>
<div class="flex flex-row items-center gap-2">
Expand Down
21 changes: 14 additions & 7 deletions src/lib/components/Browse/Sections/ItemChannel.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<script lang="ts">
import IconViews from '$lib/assets/icons/IconViews.svelte'
import IconViewers from '$lib/assets/icons/IconViewers.svelte'
import IconDrawerVerification from '$lib/assets/icons/drawer/IconDrawerVerification.svelte'
import { category_list } from '$lib/stores/channelStore'
import { getNumberInThousands } from '$lib/utils'

export let channel: any = {}
</script>
Expand All @@ -18,14 +20,19 @@
LIVE
</span>
{/if}
<div class="dropdown dropdown-bottom">
<label
for=""
class="btn btn-sm rounded-md font-medium gap-2 btn-neutral text-white border-none"
tabindex="-1">
<div
class="tooltip"
data-tip="{getNumberInThousands(channel.viewDetails?.count || 0)} views">
<span class="btn btn-sm rounded-md font-medium gap-2 btn-neutral text-white border-none">
<IconViews />
{getNumberInThousands(channel.viewDetails?.count || 0)}
</span>
</div>
<div class="tooltip" data-tip="{getNumberInThousands(channel.memberCount || 0)} watching">
<span class="btn btn-sm rounded-md font-medium gap-2 btn-neutral text-white border-none">
<IconViewers />
{channel.memberCount || '0'}
</label>
{getNumberInThousands(channel.memberCount || 0)}
</span>
</div>
</div>
<div class="flex flex-wrap">
Expand Down
18 changes: 15 additions & 3 deletions src/lib/components/Browse/Sections/ItemTable.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<script lang="ts">
import IconViews from '$lib/assets/icons/IconViews.svelte'
import IconViewers from '$lib/assets/icons/IconViewers.svelte'
import { goto } from '$app/navigation'
import { category_list } from '$lib/stores/channelStore'
import IconDrawerVerification from '$lib/assets/icons/drawer/IconDrawerVerification.svelte'
import { getNumberInThousands } from '$lib/utils'
export let channel: any = {}
</script>

Expand Down Expand Up @@ -38,9 +40,19 @@
</div>
</td>
<td>
<div class="flex gap-2 my-3">
<IconViewers />
<span>{channel.memberCount || '0'}</span>
<div class="flex gap-4">
<div
class="flex gap-2 my-3 tooltip"
data-tip="{getNumberInThousands(channel.viewDetails?.count || 0)} views">
<IconViews />
<span>{getNumberInThousands(channel.viewDetails?.count || 0)}</span>
</div>
<div
class="flex gap-2 my-3 tooltip"
data-tip="{getNumberInThousands(channel.memberCount || 0)} watching">
<IconViewers />
<span>{getNumberInThousands(channel?.memberCount || 0)}</span>
</div>
</div>
</td>
<td>
Expand Down
18 changes: 12 additions & 6 deletions src/lib/components/Channel/Chat/DropdownViewChannel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -30,10 +40,6 @@
}
}

onMount(async () => {
isFavorite = $page.data.user?.user?.favChannelIds?.includes(channel._id)
})

const toggleFollow = async () => {
isFollowing = !isFollowing
if (isFollowing) {
Expand All @@ -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
})
Expand Down
Loading
Loading