From 2ad9a9bd3e0cb93db1dd970b2fd4d957bef12d2c Mon Sep 17 00:00:00 2001 From: Kawsar Ahmed Date: Sun, 5 Feb 2023 00:53:54 -0500 Subject: [PATCH 01/19] fix form and responsive --- .../components/Browse/CreateChannelDrawer.svelte | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/components/Browse/CreateChannelDrawer.svelte b/src/lib/components/Browse/CreateChannelDrawer.svelte index 599f1cd4..bf78f718 100644 --- a/src/lib/components/Browse/CreateChannelDrawer.svelte +++ b/src/lib/components/Browse/CreateChannelDrawer.svelte @@ -78,11 +78,11 @@ bind:categoryIcons bind:categories={newChannel.category} /> {:else} -
-

- Create a new channel -

-
addChannel()}> + addChannel()}> +
+

+ Create a new channel +

When you create a channel, you may allow viewer's to observe your desktop as you host @@ -176,8 +176,8 @@ >Cancel

- -
+
+ {/if} From d6bf860e174d8d70777ea2b1dedbdb25ae1ee7d5 Mon Sep 17 00:00:00 2001 From: Kawsar Ahmed Date: Sun, 5 Feb 2023 01:20:10 -0500 Subject: [PATCH 02/19] fix loading sections --- src/lib/components/Browse/Sections/ChannelSection.svelte | 6 ++++-- src/lib/components/Browse/Sections/UserSection.svelte | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/components/Browse/Sections/ChannelSection.svelte b/src/lib/components/Browse/Sections/ChannelSection.svelte index a785a01e..dc3d8252 100644 --- a/src/lib/components/Browse/Sections/ChannelSection.svelte +++ b/src/lib/components/Browse/Sections/ChannelSection.svelte @@ -30,8 +30,10 @@ } -{#if !channels.error} -
+{#if channels && !channels.error} +
{#if channels && channels.length}
{title} diff --git a/src/lib/components/Browse/Sections/UserSection.svelte b/src/lib/components/Browse/Sections/UserSection.svelte index 31d961ab..0dcdd55d 100644 --- a/src/lib/components/Browse/Sections/UserSection.svelte +++ b/src/lib/components/Browse/Sections/UserSection.svelte @@ -30,8 +30,8 @@ } -{#if !users.error} -
+{#if users && !users.error} +
{#if users && users.length}
{title} From 8467b7e47b2dca3545052451aff5c89c3a01636a Mon Sep 17 00:00:00 2001 From: Kawsar Ahmed Date: Sun, 5 Feb 2023 01:27:05 -0500 Subject: [PATCH 03/19] fix carousela nd table loading --- .../Browse/Sections/CarouselSection.svelte | 4 +- .../Browse/Sections/LoadingTableItem.svelte | 54 +++++++++---------- .../Browse/Sections/TableSection.svelte | 12 +++-- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/lib/components/Browse/Sections/CarouselSection.svelte b/src/lib/components/Browse/Sections/CarouselSection.svelte index 2caf1883..9ddcb2ad 100644 --- a/src/lib/components/Browse/Sections/CarouselSection.svelte +++ b/src/lib/components/Browse/Sections/CarouselSection.svelte @@ -9,7 +9,7 @@ let ref: any, showback = false - $: channels = channels + $: channels = channels.splice(0, 5) const prev = () => { if (ref) { @@ -46,7 +46,6 @@ bind:this={ref} class="carousel-content relative w-full flex gap-6 snap-x snap-mandatory overflow-x-auto pt-14 flex-grow"> {#if channels && channels.length} -
{#each channels as channel}
@@ -67,7 +66,6 @@
{/each} -
{:else}
{#each Array(6) as _, index (index)} diff --git a/src/lib/components/Browse/Sections/LoadingTableItem.svelte b/src/lib/components/Browse/Sections/LoadingTableItem.svelte index 0ef17cd3..bd74e28a 100644 --- a/src/lib/components/Browse/Sections/LoadingTableItem.svelte +++ b/src/lib/components/Browse/Sections/LoadingTableItem.svelte @@ -1,27 +1,27 @@ - - -
- Loading... -
- - -
- Loading... -
- - -
- Loading... -
- - -
- Loading... -
- - -
- Loading... -
- - + + +
+ Loading... +
+ + +
+ Loading... +
+ + +
+ Loading... +
+ + +
+ Loading... +
+ + +
+ Loading... +
+ + diff --git a/src/lib/components/Browse/Sections/TableSection.svelte b/src/lib/components/Browse/Sections/TableSection.svelte index e1e28407..e9fadec3 100644 --- a/src/lib/components/Browse/Sections/TableSection.svelte +++ b/src/lib/components/Browse/Sections/TableSection.svelte @@ -76,12 +76,14 @@ {/each} {:else} -
- {#each Array(6) as _, index (index)} + + {#each Array(5) as _, index (index)} + - {/each} - Loading... -
+ + {/each} + Loading... + {/if} From 546b36e8b4fa550102f6f268ae5d139163fd24f5 Mon Sep 17 00:00:00 2001 From: Gagan Suie Date: Mon, 6 Feb 2023 00:01:34 -0600 Subject: [PATCH 04/19] Feat: maintenance mode will block login attempts and fixed logout --- .../components/Chat/ChatProfileCard.svelte | 12 +++--- .../components/MainDrawer/MainDrawer.svelte | 39 ++++++++++--------- .../components/MainDrawer/SmallDrawer.svelte | 39 ++++++++++--------- src/routes/logout/+page.server.ts | 8 +++- 4 files changed, 55 insertions(+), 43 deletions(-) diff --git a/src/lib/components/Chat/ChatProfileCard.svelte b/src/lib/components/Chat/ChatProfileCard.svelte index 7964115d..1005e761 100644 --- a/src/lib/components/Chat/ChatProfileCard.svelte +++ b/src/lib/components/Chat/ChatProfileCard.svelte @@ -4,7 +4,7 @@ class="absolute z-10 invisible inline-block w-64 text-sm font-light text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm opacity-0 dark:text-gray-400 dark:bg-gray-800 dark:border-gray-600">

- Jese Leos + Jese Leos

- @jeseleos + @jeseleos

Open-source contributor. Building flowbite.com.

  • - + 799 Following
  • - + 3,758 Followers diff --git a/src/lib/components/MainDrawer/MainDrawer.svelte b/src/lib/components/MainDrawer/MainDrawer.svelte index 0bd65a1b..ce64c389 100644 --- a/src/lib/components/MainDrawer/MainDrawer.svelte +++ b/src/lib/components/MainDrawer/MainDrawer.svelte @@ -22,6 +22,7 @@ import { env } from '$env/dynamic/public' import { current_user, user_role } from '$lib/stores/authStore' import { + isMaintenanceModeEnabled, isFeatureMintPageEnabled, isFeaturePremiumPageEnabled, isFeatureGroupChatEnabled, @@ -177,24 +178,26 @@ Settings
  • {/if} - {#if $current_user} -
  • - -
  • - {:else} -
  • - -
  • + {#if !$isMaintenanceModeEnabled} + {#if $current_user} +
  • + +
  • + {:else} +
  • + +
  • + {/if} {/if}
diff --git a/src/lib/components/MainDrawer/SmallDrawer.svelte b/src/lib/components/MainDrawer/SmallDrawer.svelte index ddbf525a..9bfc1934 100644 --- a/src/lib/components/MainDrawer/SmallDrawer.svelte +++ b/src/lib/components/MainDrawer/SmallDrawer.svelte @@ -15,6 +15,7 @@ import { env } from '$env/dynamic/public' import { current_user, user_role } from '$lib/stores/authStore' import { + isMaintenanceModeEnabled, isFeatureMintPageEnabled, isFeaturePremiumPageEnabled, isFeatureGroupChatEnabled, @@ -150,24 +151,26 @@ {/if} - {#if $current_user} -
  • - -
  • - {:else} -
  • - -
  • + {#if !$isMaintenanceModeEnabled} + {#if $current_user} +
  • + +
  • + {:else} +
  • + +
  • + {/if} {/if}
    diff --git a/src/routes/logout/+page.server.ts b/src/routes/logout/+page.server.ts index 7b7fef6e..8e3c179d 100644 --- a/src/routes/logout/+page.server.ts +++ b/src/routes/logout/+page.server.ts @@ -2,9 +2,15 @@ import { redirect } from '@sveltejs/kit' import { current_user, user_role } from '$lib/stores/authStore' import type { PageServerLoad } from './$types' -export const load = (async ({ cookies }) => { +export const load = (async ({ cookies, locals }) => { current_user.set(null) user_role.set(null) + locals.user = { + token: '', + userId: '', + user: undefined + } + locals.isBanned = false // eat the cookie const cookieItem = ['token', 'userId', 'user'] From e41997f55ac561a0df6e14d42d736a27f8a15f16 Mon Sep 17 00:00:00 2001 From: Gagan Suie Date: Mon, 6 Feb 2023 00:09:23 -0600 Subject: [PATCH 05/19] Fix: removed social icons --- src/lib/components/MainDrawer/MainDrawer.svelte | 8 ++++---- .../MainDrawer/{Messages.svelte => MessagesDrawer.svelte} | 0 src/lib/components/MainDrawer/SmallDrawer.svelte | 2 +- src/routes/+layout.svelte | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) rename src/lib/components/MainDrawer/{Messages.svelte => MessagesDrawer.svelte} (100%) diff --git a/src/lib/components/MainDrawer/MainDrawer.svelte b/src/lib/components/MainDrawer/MainDrawer.svelte index ce64c389..56dd69bd 100644 --- a/src/lib/components/MainDrawer/MainDrawer.svelte +++ b/src/lib/components/MainDrawer/MainDrawer.svelte @@ -50,7 +50,7 @@