Browse Source

Run `deno fmt` utility

master
buttercat1791 3 months ago
parent
commit
e57285c6a4
  1. 3
      src/app.css
  2. 9
      src/lib/services/publisher.ts
  3. 2
      src/lib/stores/themeStore.ts

3
src/app.css

@ -810,7 +810,8 @@
/* Table of Contents highlighting - improved contrast */ /* Table of Contents highlighting - improved contrast */
.toc-highlight { .toc-highlight {
@apply bg-primary-300 dark:bg-primary-700 border-s-4 border-primary-700 @apply bg-primary-300 dark:bg-primary-700 border-s-4 border-primary-700
rounded dark:border-primary-300 font-medium text-gray-900 dark:text-gray-100; rounded dark:border-primary-300 font-medium text-gray-900
dark:text-gray-100;
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
} }

9
src/lib/services/publisher.ts

@ -134,10 +134,13 @@ export async function publishSingleEvent(
dTag: tags.find((t) => t[0] === "d")?.[1], dTag: tags.find((t) => t[0] === "d")?.[1],
}); });
// Simulate network delay // Simulate network delay
await new Promise((resolve) => setTimeout(resolve, 300 + Math.random() * 200)); await new Promise((resolve) =>
setTimeout(resolve, 300 + Math.random() * 200)
);
// Generate a fake event ID // Generate a fake event ID
const fakeEventId = Array.from({ length: 64 }, () => const fakeEventId = Array.from(
Math.floor(Math.random() * 16).toString(16), { length: 64 },
() => Math.floor(Math.random() * 16).toString(16),
).join(""); ).join("");
return { success: true, eventId: fakeEventId }; return { success: true, eventId: fakeEventId };
} }

2
src/lib/stores/themeStore.ts

@ -13,7 +13,7 @@ theme.subscribe((v) => {
const themeValue = String(v); const themeValue = String(v);
document.documentElement.dataset.theme = themeValue; document.documentElement.dataset.theme = themeValue;
localStorage.setItem(KEY, themeValue); localStorage.setItem(KEY, themeValue);
// Add .dark class for non-light themes (ocean, forrest are dark themes) // Add .dark class for non-light themes (ocean, forrest are dark themes)
// Remove .dark class for light theme // Remove .dark class for light theme
if (themeValue === "light") { if (themeValue === "light") {

Loading…
Cancel
Save