mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-11-06 23:47:52 +08:00
webui: add default value in select component.
unhide search bar. backend: fix type error.
This commit is contained in:
@@ -9,7 +9,7 @@ from module.models import Bangumi
|
||||
router = APIRouter(prefix="/search", tags=["search"])
|
||||
|
||||
|
||||
@router.get("/", response_model=EventSourceResponse[Bangumi])
|
||||
@router.get("/", response_model=list[Bangumi])
|
||||
async def search_torrents(
|
||||
site: str = "mikan",
|
||||
keywords: str = Query(None),
|
||||
|
||||
@@ -10,7 +10,7 @@ withDefaults(
|
||||
group?: string;
|
||||
}>(),
|
||||
{
|
||||
type: 'search',
|
||||
type: 'primary',
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ const props = withDefaults(
|
||||
modelValue?: SelectItem | string;
|
||||
items: Array<SelectItem | string>;
|
||||
}>(),
|
||||
{}
|
||||
{
|
||||
items: ['test1', 'test2'],
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
@@ -8,14 +8,14 @@ import {
|
||||
Refresh,
|
||||
} from '@icon-park/vue-next';
|
||||
|
||||
const { t, changeLocale } = useMyI18n();
|
||||
const { running, onUpdate, offUpdate } = useAppInfo();
|
||||
const {t, changeLocale} = useMyI18n();
|
||||
const {running, onUpdate, offUpdate} = useAppInfo();
|
||||
|
||||
const search = ref('');
|
||||
const show = ref(false);
|
||||
const showAdd = ref(false);
|
||||
|
||||
const { start, pause, shutdown, restart, resetRule } = useProgramStore();
|
||||
const {start, pause, shutdown, restart, resetRule} = useProgramStore();
|
||||
|
||||
const items = [
|
||||
{
|
||||
@@ -69,19 +69,21 @@ onUnmounted(() => {
|
||||
|
||||
<template>
|
||||
<div h-60px bg-theme-row text-white rounded-12px fx-cer px-24px>
|
||||
<div fx-cer space-x-16px>
|
||||
<img src="/images/logo-light.svg" alt="favicon" wh-24px />
|
||||
<img src="/images/AutoBangumi.svg" alt="AutoBangumi" h-24px rel top-2px />
|
||||
</div>
|
||||
<div flex space-x-16px>
|
||||
<div fx-cer space-x-16px>
|
||||
<img src="/images/logo-light.svg" alt="favicon" wh-24px/>
|
||||
<img src="/images/AutoBangumi.svg" alt="AutoBangumi" h-24px rel top-2px/>
|
||||
</div>
|
||||
|
||||
<ab-search v-model:value="search" hidden />
|
||||
<ab-search v-model:value="search"/>
|
||||
</div>
|
||||
|
||||
<div ml-auto>
|
||||
<ab-status-bar
|
||||
:items="items"
|
||||
:running="running"
|
||||
@click-add="() => (showAdd = true)"
|
||||
@change-lang="() => changeLocale()"
|
||||
:items="items"
|
||||
:running="running"
|
||||
@click-add="() => (showAdd = true)"
|
||||
@change-lang="() => changeLocale()"
|
||||
></ab-status-bar>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user