Skip to content
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

fix: Support for low-res displays (#285) #295

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions frontend/src/components/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
*
* The `clickSearch` event is emitted when the search button is clicked.
*/
import { computed } from 'vue'
import { useTheme } from 'vuetify'

import { GENOME_BUILD_LABELS, type GenomeBuild } from '@/lib/genomeBuilds'

const theme = useTheme()

/** Type definition for component's props. */
interface Props {
searchTerm?: string
Expand Down Expand Up @@ -36,10 +41,15 @@ const runSearch = async () => {
emit('clickSearch', props.searchTerm, props.genomeRelease)
}
}

/** Return font color for genome build based on current theme. */
const fontColor = computed(() => {
return theme.global.current.value.dark ? 'white' : 'black'
})
</script>

<template>
<div class="d-flex d-flex-row flex-grow-0" style="min-width: 600px">
<div class="d-flex d-flex-row flex-grow-0" style="min-width: 400px">
<v-text-field
class="my-3 search-term"
:label="props.density != 'compact' ? 'Search for variant or gene' : undefined"
Expand All @@ -59,7 +69,7 @@ const runSearch = async () => {
<v-menu :transition="false">
<template #activator="{ props: innerProps }">
<v-btn
color="black"
:color="fontColor"
v-bind="innerProps"
rounded="xs"
spacing="compact"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/GeneDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const SECTIONS: Section[] = [
<v-app>
<PageHeader />
<v-main :class="mainBackgroundColor">
<v-container>
<v-container fluid>
<v-row>
<v-col cols="2">
<div v-if="geneInfoStore.storeState == StoreState.Active">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/ProfileView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const mainBackgroundColor = computed(() => {
<v-app>
<PageHeader />
<v-main :class="mainBackgroundColor">
<v-container>
<v-container fluid>
<div v-if="userStore.currentUser">
<v-row>
<v-col cols="2">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/SeqvarDetailsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const SECTIONS: { [key: string]: Section[] } = {
<v-app>
<PageHeader />
<v-main :class="mainBackgroundColor">
<v-container>
<v-container fluid>
<v-row>
<v-col cols="2">
<div v-if="seqvarInfoStore.storeState == StoreState.Active">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/StrucvarDetailsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const SECTIONS: { [key: string]: Section[] } = {
<v-app>
<PageHeader />
<v-main :class="mainBackgroundColor">
<v-container>
<v-container fluid>
<v-row>
<v-col cols="2">
<div v-if="strucvarInfoStore.storeState == StoreState.Active">
Expand Down