-
-
Notifications
You must be signed in to change notification settings - Fork 9
feat(local): refactor and manager ui #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Lipraty
wants to merge
24
commits into
main
Choose a base branch
from
local-webui
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+979
−326
Draft
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
504dce3
chore(local): init webui
Lipraty 9460a67
Merge branch 'main' into local-webui
Lipraty 134a891
Merge branch 'main' into local-webui
Lipraty c17344e
sync of main
Lipraty af29f7b
refactor(local): simplify
Lipraty 9b2f027
fix(local): fail deps
Lipraty e23bf5a
docs(local): update
Lipraty 04ee863
feat(local): refactor scraper. add author field and support for addit…
Lipraty a524708
feat(local): add proxy support.
Lipraty e8d4de3
feat(local): add user index management with load and save functionality
Lipraty a1af3d0
feat(local): add user index management and data provider
Lipraty 0d6b340
chore(local): impl simple queue
Lipraty ce08c69
feat(local): simpiify entry and refactor file proxy server
Lipraty 4d591cb
chore(local): move types
Lipraty efa4e7a
chore(local): add i18n support in notifier
Lipraty 129119d
feat(local): update console events and manager, add i18n support
Lipraty bc2b788
fix(local): build index by condition
Lipraty c378bba
fix(local): use full path for image scanning and fix typo
Lipraty b6e50fe
fix(local): replace pipeline with streaming
Lipraty e614b89
chore(local): edge case check and bug fix
Lipraty 3a37c4e
fix(local): add image titile parame
Lipraty 6ec6e9c
feat(local): add image dimensions support and update types. fix conso…
Lipraty 1729fd6
chore(local): update type definitions
Lipraty 2ed38be
chore: change log message
Lipraty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,11 @@ | ||
| import { Context } from '@koishijs/client' | ||
|
|
||
| import Main from './main.vue' | ||
|
|
||
| export default (ctx: Context) => { | ||
| ctx.page({ | ||
| name: 'Local WebUI', | ||
| path: '/booru-local-ui', | ||
| component: Main, | ||
| }) | ||
| } |
This file contains hidden or 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,17 @@ | ||
| <template> | ||
| <k-layout> | ||
| <div class="flex flex-col h-full"> | ||
| <k-content class="flex-1"> | ||
|
|
||
| </k-content> | ||
| </div> | ||
| </k-layout> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
|
|
||
| </script> | ||
|
|
||
| <style scoped> | ||
|
|
||
| </style> |
This file contains hidden or 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,11 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "rootDir": ".", | ||
| "module": "esnext", | ||
| "moduleResolution": "node", | ||
| "types": [ | ||
| "@koishijs/client/global", | ||
| ], | ||
| }, | ||
| "include": ["."], | ||
| } |
This file contains hidden or 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 hidden or 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,47 @@ | ||
| import { resolve } from 'node:path' | ||
|
|
||
| import { } from '@koishijs/console' | ||
| import { Context } from 'koishi' | ||
|
|
||
| import { Image } from './types' | ||
|
|
||
| declare module '@koishijs/console' { | ||
| namespace Console { | ||
| interface Services { | ||
|
|
||
| } | ||
| } | ||
|
|
||
| interface Events { | ||
| 'booru-local/user-locale': (locale: string) => void | ||
| 'booru-local/image-update': (metadata: Image) => Promise<void> | ||
| 'booru-local/image-remove': (id: string) => Promise<void> | ||
| 'booru-local/tags-update': (tags: string[]) => Promise<void> | ||
| 'booru-local/tags-remove': (tags: number[]) => Promise<void> | ||
| } | ||
| } | ||
|
|
||
| export const inject = ['console'] | ||
|
|
||
| export function apply(ctx: Context) { | ||
| ctx.console.addEntry({ | ||
| dev: resolve(__dirname, '../client/index.ts'), | ||
| prod: resolve(__dirname, '../dist'), | ||
| }) | ||
|
|
||
| ctx.console.addListener('booru-local/image-update', async (metadata) => { | ||
| await ctx.booruLocal.updateImage(metadata) | ||
| }) | ||
|
|
||
| ctx.console.addListener('booru-local/image-remove', async (id) => { | ||
| await ctx.booruLocal.removeImage(id) | ||
| }) | ||
|
|
||
| ctx.console.addListener('booru-local/tags-update', async (tags) => { | ||
| await ctx.booruLocal.updateTags(tags) | ||
| }) | ||
|
|
||
| ctx.console.addListener('booru-local/tags-remove', async (tagIDs) => { | ||
| await ctx.booruLocal.removeTags(tagIDs) | ||
| }) | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.