feat(front): [WIP] search modal layout
This commit is contained in:
parent
681f3fced0
commit
790111dcc0
|
@ -32,6 +32,13 @@ const isLoading = ref(false)
|
||||||
const results = ref<null | components['schemas']['SearchResult']>(null)
|
const results = ref<null | components['schemas']['SearchResult']>(null)
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
|
|
||||||
|
// If query has the shape of a federated object, search the federation
|
||||||
|
|
||||||
|
|
||||||
|
// Else, use the user database endpoint to search
|
||||||
|
|
||||||
|
|
||||||
if (queryDebounced.value.length < 1) {
|
if (queryDebounced.value.length < 1) {
|
||||||
isOpen.value = false
|
isOpen.value = false
|
||||||
return
|
return
|
||||||
|
@ -169,16 +176,20 @@ const toggle = (id: QueryType): void => {
|
||||||
autofocus
|
autofocus
|
||||||
icon="bi-search"
|
icon="bi-search"
|
||||||
/>
|
/>
|
||||||
</template>
|
<Button
|
||||||
<Layout flex>
|
v-bind="{[results? 'primary' : 'disabled']: true}"
|
||||||
<Spacer grow />
|
min-width
|
||||||
<Button @click="startRadio()">
|
@click="startRadio"
|
||||||
|
>
|
||||||
{{ t('components.audio.podcast.Modal.button.startRadio') }}
|
{{ t('components.audio.podcast.Modal.button.startRadio') }}
|
||||||
</Button>
|
</Button>
|
||||||
</Layout>
|
</template>
|
||||||
<Section
|
<Spacer />
|
||||||
|
<template
|
||||||
v-for="type in types"
|
v-for="type in types"
|
||||||
:key="type.id"
|
:key="type.id"
|
||||||
|
>
|
||||||
|
<Section
|
||||||
:action="{ text: type.label, onClick: () => { toggle(type.id) } }"
|
:action="{ text: type.label, onClick: () => { toggle(type.id) } }"
|
||||||
tiny-items
|
tiny-items
|
||||||
align-left
|
align-left
|
||||||
|
@ -197,5 +208,7 @@ const toggle = (id: QueryType): void => {
|
||||||
<!-- TODO: Implement all the other cards here -->
|
<!-- TODO: Implement all the other cards here -->
|
||||||
</template>
|
</template>
|
||||||
</Section>
|
</Section>
|
||||||
|
<Spacer />
|
||||||
|
</template>
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue