aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-07-25 00:19:44 -0700
committerFuwn <[email protected]>2024-07-25 00:20:23 -0700
commit2d9235070856c0a5032ddf47f7b1dc7cc5cceb60 (patch)
tree4677f0355872a0f7f55d38a372ec5e3870771182 /src/lib
parentfeat(notifications): allow unsubscribe (diff)
downloaddue.moe-2d9235070856c0a5032ddf47f7b1dc7cc5cceb60.tar.xz
due.moe-2d9235070856c0a5032ddf47f7b1dc7cc5cceb60.zip
refactor(Database): separate providers
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Data/AniList/activity.ts2
-rw-r--r--src/lib/Database/IndexedDB/activities.ts (renamed from src/lib/Database/activities.ts)0
-rw-r--r--src/lib/Database/IndexedDB/chapters.ts (renamed from src/lib/Database/chapters.ts)0
-rw-r--r--src/lib/Database/IndexedDB/user.ts (renamed from src/lib/Database/user.ts)2
-rw-r--r--src/lib/Database/Supabase/badges.ts (renamed from src/lib/Database/badges.ts)2
-rw-r--r--src/lib/Database/Supabase/events.ts (renamed from src/lib/Database/events.ts)2
-rw-r--r--src/lib/Database/Supabase/groups.ts (renamed from src/lib/Database/groups.ts)2
-rw-r--r--src/lib/Database/Supabase/userBadges.ts (renamed from src/lib/Database/userBadges.ts)2
-rw-r--r--src/lib/Database/Supabase/userConfiguration.ts (renamed from src/lib/Database/userConfiguration.ts)2
-rw-r--r--src/lib/Database/Supabase/userNotifications.ts (renamed from src/lib/Database/userNotifications.ts)2
-rw-r--r--src/lib/Database/Supabase/userPreferences.ts (renamed from src/lib/Database/userPreferences.ts)2
-rw-r--r--src/lib/Events/Event.svelte2
-rw-r--r--src/lib/Events/Group.svelte2
-rw-r--r--src/lib/List/Manga/MangaListTemplate.svelte2
-rw-r--r--src/lib/Media/Manga/cache.ts2
-rw-r--r--src/lib/Media/Manga/chapters.ts2
-rw-r--r--src/lib/Media/Manga/volumes.ts2
-rw-r--r--src/lib/Settings/Categories/Display.svelte1
-rw-r--r--src/lib/Tools/Wrapped/Tool.svelte2
-rw-r--r--src/lib/User/BadgeWall/AWC.svelte2
-rw-r--r--src/lib/User/BadgeWall/BadgePreview.svelte2
-rw-r--r--src/lib/User/BadgeWall/Badges.svelte2
-rw-r--r--src/lib/User/BadgeWall/FallbackBadge.svelte4
-rw-r--r--src/lib/User/BadgeWall/badge.ts2
24 files changed, 22 insertions, 23 deletions
diff --git a/src/lib/Data/AniList/activity.ts b/src/lib/Data/AniList/activity.ts
index fb15521e..b1f43b7d 100644
--- a/src/lib/Data/AniList/activity.ts
+++ b/src/lib/Data/AniList/activity.ts
@@ -1,4 +1,4 @@
-import { database } from '$lib/Database/activities';
+import { database } from '$lib/Database/IndexedDB/activities';
import type { User } from './follow';
import type { AniListAuthorisation, UserIdentity } from './identity';
diff --git a/src/lib/Database/activities.ts b/src/lib/Database/IndexedDB/activities.ts
index 6a505ff3..6a505ff3 100644
--- a/src/lib/Database/activities.ts
+++ b/src/lib/Database/IndexedDB/activities.ts
diff --git a/src/lib/Database/chapters.ts b/src/lib/Database/IndexedDB/chapters.ts
index 0f77f0a0..0f77f0a0 100644
--- a/src/lib/Database/chapters.ts
+++ b/src/lib/Database/IndexedDB/chapters.ts
diff --git a/src/lib/Database/user.ts b/src/lib/Database/IndexedDB/user.ts
index df68bc91..e7285a07 100644
--- a/src/lib/Database/user.ts
+++ b/src/lib/Database/IndexedDB/user.ts
@@ -1,4 +1,4 @@
-import { type AniListAuthorisation } from '$lib/Data/AniList/identity';
+import type { AniListAuthorisation } from '$lib/Data/AniList/identity';
import Dexie, { type Table } from 'dexie';
export interface User {
diff --git a/src/lib/Database/badges.ts b/src/lib/Database/Supabase/badges.ts
index 145d0bc1..022d4d14 100644
--- a/src/lib/Database/badges.ts
+++ b/src/lib/Database/Supabase/badges.ts
@@ -1,4 +1,4 @@
-import supabase from './supabase';
+import supabase from '../supabase';
interface Badge {
id: number;
diff --git a/src/lib/Database/events.ts b/src/lib/Database/Supabase/events.ts
index 8f507a83..e87fe011 100644
--- a/src/lib/Database/events.ts
+++ b/src/lib/Database/Supabase/events.ts
@@ -1,5 +1,5 @@
import type Group from '$lib/Events/Group.svelte';
-import supabase from './supabase';
+import supabase from '../supabase';
export interface Event {
id: number;
diff --git a/src/lib/Database/groups.ts b/src/lib/Database/Supabase/groups.ts
index 097d6f89..b2770e4a 100644
--- a/src/lib/Database/groups.ts
+++ b/src/lib/Database/Supabase/groups.ts
@@ -1,4 +1,4 @@
-import supabase from './supabase';
+import supabase from '../supabase';
export interface Group {
id: number;
diff --git a/src/lib/Database/userBadges.ts b/src/lib/Database/Supabase/userBadges.ts
index d21c3527..eef8490c 100644
--- a/src/lib/Database/userBadges.ts
+++ b/src/lib/Database/Supabase/userBadges.ts
@@ -1,5 +1,5 @@
import { databaseTimeToDate } from '$lib/Utility/time';
-import supabase from './supabase';
+import supabase from '../supabase';
export interface Badge {
post?: string;
diff --git a/src/lib/Database/userConfiguration.ts b/src/lib/Database/Supabase/userConfiguration.ts
index 6a22105a..cb2e4060 100644
--- a/src/lib/Database/userConfiguration.ts
+++ b/src/lib/Database/Supabase/userConfiguration.ts
@@ -1,4 +1,4 @@
-import supabase from './supabase';
+import supabase from '../supabase';
interface UserConfiguration {
user_id: number;
diff --git a/src/lib/Database/userNotifications.ts b/src/lib/Database/Supabase/userNotifications.ts
index 6516b813..48cd73c9 100644
--- a/src/lib/Database/userNotifications.ts
+++ b/src/lib/Database/Supabase/userNotifications.ts
@@ -1,4 +1,4 @@
-import supabase from './supabase';
+import supabase from '../supabase';
export interface UserNotifications {
created_at: string;
diff --git a/src/lib/Database/userPreferences.ts b/src/lib/Database/Supabase/userPreferences.ts
index ca2d62be..a717953f 100644
--- a/src/lib/Database/userPreferences.ts
+++ b/src/lib/Database/Supabase/userPreferences.ts
@@ -1,4 +1,4 @@
-import supabase from './supabase';
+import supabase from '../supabase';
export interface UserPreferences {
created_at: string;
diff --git a/src/lib/Events/Event.svelte b/src/lib/Events/Event.svelte
index 9905cd4b..49fd2b15 100644
--- a/src/lib/Events/Event.svelte
+++ b/src/lib/Events/Event.svelte
@@ -1,5 +1,5 @@
<script lang="ts">
- import type { Event } from '$lib/Database/events';
+ import type { Event } from '$lib/Database/Supabase/events';
import root from '$lib/Utility/root';
import locale from '$stores/locale';
diff --git a/src/lib/Events/Group.svelte b/src/lib/Events/Group.svelte
index 3f07d979..843d1c18 100644
--- a/src/lib/Events/Group.svelte
+++ b/src/lib/Events/Group.svelte
@@ -1,5 +1,5 @@
<script lang="ts">
- import type { Group } from '$lib/Database/groups';
+ import type { Group } from '$lib/Database/Supabase/groups';
import tooltip from '$lib/Tooltip/tooltip';
export let group: Group;
diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte
index 073cf44c..88ee4e70 100644
--- a/src/lib/List/Manga/MangaListTemplate.svelte
+++ b/src/lib/List/Manga/MangaListTemplate.svelte
@@ -6,7 +6,7 @@
import { chapterCount } from '$lib/Media/Manga/chapters';
import { pruneAllManga } from '$lib/Media/Manga/cache';
import manga from '$stores/manga';
- import { database } from '$lib/Database/chapters';
+ import { database } from '$lib/Database/IndexedDB/chapters';
import settings from '$stores/settings';
import lastPruneTimes from '$stores/lastPruneTimes';
import ListTitle from '../ListTitle.svelte';
diff --git a/src/lib/Media/Manga/cache.ts b/src/lib/Media/Manga/cache.ts
index e6c024ff..9cea6f74 100644
--- a/src/lib/Media/Manga/cache.ts
+++ b/src/lib/Media/Manga/cache.ts
@@ -1,4 +1,4 @@
-import { database } from '../../Database/chapters';
+import { database } from '../../Database/IndexedDB/chapters';
import manga from '$stores/manga';
export const pruneAllManga = async () => {
diff --git a/src/lib/Media/Manga/chapters.ts b/src/lib/Media/Manga/chapters.ts
index f9ae1b64..bee7d032 100644
--- a/src/lib/Media/Manga/chapters.ts
+++ b/src/lib/Media/Manga/chapters.ts
@@ -3,7 +3,7 @@ import { getChapterCount } from '$lib/Data/Manga/raw';
import proxy from '$lib/Utility/proxy';
import settings from '$stores/settings';
import type { UserIdentity } from '../../Data/AniList/identity';
-import { database } from '../../Database/chapters';
+import { database } from '../../Database/IndexedDB/chapters';
const getManga = async (
statusIn: string,
diff --git a/src/lib/Media/Manga/volumes.ts b/src/lib/Media/Manga/volumes.ts
index bc73bbf4..f3e4e493 100644
--- a/src/lib/Media/Manga/volumes.ts
+++ b/src/lib/Media/Manga/volumes.ts
@@ -1,5 +1,5 @@
import type { Media } from '$lib/Data/AniList/media';
-import { database } from '../../Database/chapters';
+import { database } from '../../Database/IndexedDB/chapters';
export const volumeCount = async (manga: Media): Promise<number | null> =>
(await database.chapters.get(manga.id))?.volumes as number | null;
diff --git a/src/lib/Settings/Categories/Display.svelte b/src/lib/Settings/Categories/Display.svelte
index 45f9a585..cdcc90a1 100644
--- a/src/lib/Settings/Categories/Display.svelte
+++ b/src/lib/Settings/Categories/Display.svelte
@@ -4,7 +4,6 @@
import SettingHint from '../SettingHint.svelte';
import root from '$lib/Utility/root';
import locale from '$stores/locale';
- import { browser } from '$app/environment';
import { requestNotifications } from '$lib/Utility/notifications';
const onHelperChange = () => {
diff --git a/src/lib/Tools/Wrapped/Tool.svelte b/src/lib/Tools/Wrapped/Tool.svelte
index b6e3f934..af90692b 100644
--- a/src/lib/Tools/Wrapped/Tool.svelte
+++ b/src/lib/Tools/Wrapped/Tool.svelte
@@ -17,7 +17,7 @@
import { page } from '$app/stores';
import { clearAllParameters } from '../../Utility/parameters';
import SettingHint from '$lib/Settings/SettingHint.svelte';
- import { database } from '$lib/Database/activities';
+ import { database } from '$lib/Database/IndexedDB/activities';
import Activity from './Top/Activity.svelte';
import Anime from './Top/Anime.svelte';
import Manga from './Top/Manga.svelte';
diff --git a/src/lib/User/BadgeWall/AWC.svelte b/src/lib/User/BadgeWall/AWC.svelte
index d80ae72a..70f58b3e 100644
--- a/src/lib/User/BadgeWall/AWC.svelte
+++ b/src/lib/User/BadgeWall/AWC.svelte
@@ -1,6 +1,6 @@
<script lang="ts">
import type { AWCBadgesGroup } from '$lib/Data/awc';
- import type { UserPreferences } from '$lib/Database/userPreferences';
+ import type { UserPreferences } from '$lib/Database/Supabase/userPreferences';
import { cdn, thumbnail } from '$lib/Utility/image';
import FallbackBadge from './FallbackBadge.svelte';
import './badges.css';
diff --git a/src/lib/User/BadgeWall/BadgePreview.svelte b/src/lib/User/BadgeWall/BadgePreview.svelte
index f606cfc9..3b1ec194 100644
--- a/src/lib/User/BadgeWall/BadgePreview.svelte
+++ b/src/lib/User/BadgeWall/BadgePreview.svelte
@@ -1,6 +1,6 @@
<script lang="ts">
import { thumbnail } from '$lib/Utility/image.js';
- import type { Badge } from '$lib/Database/userBadges';
+ import type { Badge } from '$lib/Database/Supabase/userBadges';
import { cdn } from '$lib/Utility/image';
import { databaseTimeToDate } from '$lib/Utility/time';
import locale from '$stores/locale';
diff --git a/src/lib/User/BadgeWall/Badges.svelte b/src/lib/User/BadgeWall/Badges.svelte
index 8d52d034..6c7d1c73 100644
--- a/src/lib/User/BadgeWall/Badges.svelte
+++ b/src/lib/User/BadgeWall/Badges.svelte
@@ -6,7 +6,7 @@
import FallbackImage from '$lib/Image/FallbackImage.svelte';
import { cdn, thumbnail } from '$lib/Utility/image';
import FallbackBadge from './FallbackBadge.svelte';
- import type { UserPreferences } from '$lib/Database/userPreferences';
+ import type { UserPreferences } from '$lib/Database/Supabase/userPreferences';
import type { IndexedBadge } from './badge';
export let ungroupedBadges: IndexedBadge[];
diff --git a/src/lib/User/BadgeWall/FallbackBadge.svelte b/src/lib/User/BadgeWall/FallbackBadge.svelte
index 7e0420ea..b9b45aad 100644
--- a/src/lib/User/BadgeWall/FallbackBadge.svelte
+++ b/src/lib/User/BadgeWall/FallbackBadge.svelte
@@ -2,12 +2,12 @@
import { classifyDesignerName } from './badge';
import locale from '$stores/locale';
import { tweened } from 'svelte/motion';
- import type { Badge } from '../../Database/userBadges';
+ import type { Badge } from '../../Database/Supabase/userBadges';
import Tooltip from '../../Tooltip/LinkedTooltip.svelte';
import { databaseTimeToDate } from '../../Utility/time';
import { cubicOut } from 'svelte/easing';
import { dev } from '$app/environment';
- import type { UserPreferences } from '$lib/Database/userPreferences';
+ import type { UserPreferences } from '$lib/Database/Supabase/userPreferences';
export let source: string | null | undefined;
export let alternative: string | null | undefined;
diff --git a/src/lib/User/BadgeWall/badge.ts b/src/lib/User/BadgeWall/badge.ts
index fb02f3c5..308a6014 100644
--- a/src/lib/User/BadgeWall/badge.ts
+++ b/src/lib/User/BadgeWall/badge.ts
@@ -1,4 +1,4 @@
-import type { Badge } from '$lib/Database/userBadges';
+import type { Badge } from '$lib/Database/Supabase/userBadges';
export interface IndexedBadge extends Badge {
index: number;