mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-10 04:22:18 +00:00
address comment.
This commit is contained in:
@@ -143,8 +143,8 @@ export const preferredVersion = writable<Version | null>(
|
|||||||
globalThis?.localStorage?.getItem('preferredVersion') as Version
|
globalThis?.localStorage?.getItem('preferredVersion') as Version
|
||||||
);
|
);
|
||||||
|
|
||||||
export const preferredPlatform = writable<Platform | null>(
|
export const preferredPlatform = writable<Platform>(
|
||||||
(globalThis?.localStorage?.getItem('preferredPlatform') as Platform) ?? 'client-web'
|
(globalThis?.localStorage?.getItem('preferredPlatform') ?? 'client-web') as Platform
|
||||||
);
|
);
|
||||||
|
|
||||||
if (browser) {
|
if (browser) {
|
||||||
|
|||||||
@@ -26,11 +26,11 @@
|
|||||||
selected.subscribe((language) => {
|
selected.subscribe((language) => {
|
||||||
// apply if exists in snippets
|
// apply if exists in snippets
|
||||||
if (language && $snippets.has(language as Language)) {
|
if (language && $snippets.has(language as Language)) {
|
||||||
preferredPlatform?.set(language as Platform);
|
preferredPlatform.set(language as Platform);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
preferredPlatform?.subscribe((language) => {
|
preferredPlatform.subscribe((language) => {
|
||||||
if (
|
if (
|
||||||
language &&
|
language &&
|
||||||
language !== $selected &&
|
language !== $selected &&
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
PUBLIC_APPWRITE_COL_MESSAGES_ID,
|
PUBLIC_APPWRITE_COL_MESSAGES_ID,
|
||||||
PUBLIC_APPWRITE_COL_THREADS_ID,
|
PUBLIC_APPWRITE_COL_THREADS_ID,
|
||||||
PUBLIC_APPWRITE_DB_MAIN_ID,
|
PUBLIC_APPWRITE_DB_MAIN_ID
|
||||||
PUBLIC_APPWRITE_FN_TLDR_ID
|
|
||||||
} from '$env/static/public';
|
} from '$env/static/public';
|
||||||
import { databases, functions } from '$lib/appwrite';
|
import { databases } from '$lib/appwrite';
|
||||||
import { Query } from '@appwrite.io/console';
|
import { Query } from '@appwrite.io/console';
|
||||||
import type { DiscordMessage, DiscordThread } from './types';
|
import type { DiscordMessage, DiscordThread } from './types';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user