Skip to content

Commit

Permalink
comment out svelte-legos as it doesn't support svelte5
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Dec 16, 2023
1 parent af19f4b commit b0557a2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
24 changes: 12 additions & 12 deletions src/Exceptionless.Web/ClientApp/src/lib/api/WebSocketClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { accessToken } from './auth';
import { documentVisibilityStore } from 'svelte-legos';
//import { documentVisibilityStore } from 'svelte-legos';

export class WebSocketClient {
private accessToken: string | null = null;
Expand Down Expand Up @@ -33,17 +33,17 @@ export class WebSocketClient {
}
});

const visibility = documentVisibilityStore();
visibility.subscribe((visible) => {
if (
visible === 'visible' &&
(this.readyState === WebSocket.CLOSING || this.readyState === WebSocket.CLOSED)
) {
this.connect();
} else if (visible === 'hidden') {
this.close();
}
});
// const visibility = documentVisibilityStore();
// visibility.subscribe((visible) => {
// if (
// visible === 'visible' &&
// (this.readyState === WebSocket.CLOSING || this.readyState === WebSocket.CLOSED)
// ) {
// this.connect();
// } else if (visible === 'hidden') {
// this.close();
// }
// });
}

public connect(reconnectAttempt: boolean = true) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import type { VariantProps } from 'tailwind-variants';
import IconContentCopy from '~icons/mdi/content-copy';
import { clickToCopyAction } from 'svelte-legos';
//import { clickToCopyAction } from 'svelte-legos';
import { toast } from 'svoast';
import { Button, buttonVariants } from '$comp/ui/button';
Expand All @@ -18,12 +18,9 @@
}
</script>

<div
use:clickToCopyAction={() => value || ''}
on:copy-done={handleCopyDone}
on:copy-error={handleCopyError}
>
<!-- use:clickToCopyAction={() => value || ''} -->
<div on:copy-done={handleCopyDone} on:copy-error={handleCopyError}>
<Button {title} {size}>
<slot><IconContentCopy class="h-4 w-4" /></slot>
<slot><IconContentCopy class="w-4 h-4" /></slot>
</Button>
</div>
8 changes: 4 additions & 4 deletions src/Exceptionless.Web/ClientApp/src/lib/stores/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { writable, type Writable } from 'svelte/store';
import { persisted } from 'svelte-local-storage-store';
import { mediaQuery } from 'svelte-legos';
//import { mediaQuery } from 'svelte-legos';

export const isSidebarOpen = persisted('sidebar-open', false);
export const isPageWithSidebar: Writable<boolean> = writable(true);

// Helper functions
export const isSmallScreen = mediaQuery('(min-width: 640px)');
export const isMediumScreen = mediaQuery('(min-width: 768px)');
export const isLargeScreen = mediaQuery('(min-width: 1024px)');
export const isSmallScreen = writable(false); //mediaQuery('(min-width: 640px)');
export const isMediumScreen = writable(false); // mediaQuery('(min-width: 768px)');
export const isLargeScreen = writable(false); // mediaQuery('(min-width: 1024px)');

0 comments on commit b0557a2

Please sign in to comment.