Skip to content

Commit

Permalink
feat: db location button hidden in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Feb 13, 2024
1 parent 0c65c6d commit e465ac7
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions src/components/TheFooter.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<v-footer color='transparent' id='footer' absolute app class='ma-0 pa-0'>
<v-row justify='center' align='center' class='no-gutters ma-0 pa-0 ma-4'>
<v-row justify='space-between' align='center' class='no-gutters ma-0 pa-0 ma-4'>
<v-col cols='2' class='ma-0 pa-0'>

</v-col>

<v-col cols='auto' class='no-gutters unselectable ma-0 pa-0'>

Expand All @@ -21,29 +24,42 @@

</v-chip>
</v-col>
<v-col cols='2' class='ma-0 pa-0 text-caption text-primary'>
<section v-if='showBuild' class='cl' @click='opendb'>
<v-row class='ma-0 pa-0' justify='end' align='center'>
<v-col cols='auto' class='ma-0 pa-0'>
database location
</v-col>
<v-col cols='auto' class='ma-0 pa-0 ml-1'>
<v-icon :icon='mdiOpenInNew' color='primary' size='x-small' />
</v-col>
</v-row>

</section>
</v-col>
</v-row>

</v-footer>
</template>

<script setup lang='ts'>
import { mdiGithub } from '@mdi/js';
import { mdiGithub, mdiOpenInNew } from '@mdi/js';
import { invoke } from '@tauri-apps/api';
import { InvokeMessage } from '../types';
const buildTimeout = ref(0);
const showBuild = ref(false);
const appVersion = computed((): string => {
return packageinfoModule().version;
});
const appVersion = computed(() => packageinfoModule().version);
const buildDate = computed((): string => {
return new Date(Number(packageinfoModule().build_date) * 1000).toISOString();
});
const buildDate = computed(() => new Date(Number(packageinfoModule().build_date) * 1000).toISOString());
const href = computed((): string => {
return packageinfoModule().homepage;
});
const opendb = async (): Promise<void> => {
await invoke(InvokeMessage.OpenDatabaseLocation);
};
const href = computed(() => packageinfoModule().homepage);
onUnmounted(() => {
clearTimeout(buildTimeout.value);
Expand Down

0 comments on commit e465ac7

Please sign in to comment.