-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b89099f
commit 96187af
Showing
7 changed files
with
220 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
export interface VuexUser { | ||
custom: Custom | ||
settings: Settings | ||
} | ||
|
||
interface Custom { | ||
boorus: Booru[] | ||
tagCollections: TagCollection[] | ||
savedPosts: SavedPost[] | ||
} | ||
|
||
interface Booru { | ||
domain: string | ||
type: string | ||
nsfw: boolean | ||
config: any | ||
} | ||
|
||
interface TagCollection { | ||
name: string | ||
tags: string[] | ||
} | ||
|
||
interface SavedPost { | ||
id: string | ||
data: Data | ||
meta_data: MetaData | ||
} | ||
|
||
interface Data { | ||
id: number | ||
score?: number | ||
high_res_file: HighResFile | ||
low_res_file: LowResFile | ||
preview_file: PreviewFile | ||
tags: Tags | ||
rating: string | ||
media_type: string | ||
sources: any[] | ||
} | ||
|
||
interface HighResFile { | ||
url: string | ||
width: number | ||
height: number | ||
} | ||
|
||
interface LowResFile { | ||
url: string | ||
width: number | ||
height: number | ||
} | ||
|
||
interface PreviewFile { | ||
url: string | ||
width: number | ||
height: number | ||
} | ||
|
||
interface Tags { | ||
character: any[] | ||
copyright: any[] | ||
artist: any[] | ||
general: string[] | ||
meta: any[] | ||
} | ||
|
||
interface MetaData { | ||
booru_domain: string | ||
created_at: string | ||
} | ||
|
||
interface Settings { | ||
touchGestures: TouchGestures | ||
fullSizeImages: FullSizeImages | ||
postsPerPage: PostsPerPage | ||
score: Score | ||
} | ||
|
||
interface TouchGestures { | ||
value: boolean | ||
} | ||
|
||
interface FullSizeImages { | ||
value: boolean | ||
} | ||
|
||
interface PostsPerPage { | ||
value: number | ||
} | ||
|
||
interface Score { | ||
value: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script lang='ts' setup> | ||
import PageHeader from '~/components/layout/PageHeader.vue' | ||
useSeoMeta({ | ||
title: 'Migrate old data' | ||
}) | ||
// definePageMeta({ middleware: 'auth' }) | ||
</script> | ||
|
||
<template> | ||
<main class='container mx-auto max-w-3xl flex-1 px-4 py-4 sm:px-6 lg:px-8'> | ||
<!-- --> | ||
|
||
<PageHeader> | ||
<template #title>Migrate old data</template> | ||
<template #text> | ||
<div class='text-sm'> | ||
With the new version of the app, we have changed the way we store your data. | ||
|
||
This means that you will need to migrate your data to the new format. | ||
|
||
Don't worry, we will do this for you automatically once you click the button below. | ||
</div> | ||
</template> | ||
</PageHeader> | ||
|
||
<section class='mt-8 flex justify-around'> | ||
<!-- --> | ||
</section> | ||
</main> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { describe, expect, it } from 'vitest' | ||
import { createPage, setup } from '@nuxt/test-utils' | ||
|
||
describe('/premium/migrate-old-data', async () => { | ||
await setup({ | ||
browser: true | ||
}) | ||
|
||
it('renders', async () => { | ||
const page = await createPage('/premium/migrate-old-data') | ||
|
||
await page.waitForSelector('h1') | ||
|
||
expect(await page.textContent('h1')).toBe('Migrate old data') | ||
}) | ||
|
||
it('migrates old data', async () => { | ||
const page = await createPage('/premium/migrate-old-data') | ||
|
||
// Load data to localStorage | ||
|
||
// Click Button | ||
|
||
// Check data is in IndexedDB & localStorage | ||
}) | ||
}) |