-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add info section with build info
- Loading branch information
Showing
15 changed files
with
123 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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,28 @@ | ||
<template> | ||
<Button | ||
:tooltip="t('app.about')" | ||
:class="classes" | ||
textual | ||
color="dimmed" | ||
icon="information-line" | ||
@click="showInfoDialog = true" | ||
/> | ||
<InfoDialog :open="showInfoDialog" @close="showInfoDialog = false" /> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed, ref } from 'vue'; | ||
import { useI18n } from 'vue-i18n'; | ||
import Button from '@components/base/button/Button.vue'; | ||
import { ClassNames } from '@utils'; | ||
import InfoDialog from './InfoDialog.vue'; | ||
const props = defineProps<{ | ||
class?: ClassNames; | ||
}>(); | ||
const { t } = useI18n(); | ||
const showInfoDialog = ref(false); | ||
const classes = computed(() => props.class); | ||
</script> |
This file contains 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,56 @@ | ||
<template> | ||
<Dialog :open="open" :title="t('app.about')" @close="emit('close')"> | ||
<div :class="$style.infoBox"> | ||
<span>{{ t('app.version', { version: OCULAR_BUILD_VERSION }) }}</span> | ||
<span>{{ t('app.releaseDate', { date: new Date(OCULAR_BUILD_TIMESTAMP).toDateString() }) }}</span> | ||
<span>{{ t('app.gitSha', { sha: OCULAR_BUILD_SHA }) }}</span> | ||
<span :class="$style.link"> | ||
<i18n-t keypath="app.github"> | ||
<template #link> | ||
<Link :custom="false" color="primary" to="https://github.com/simonwep/ocular">Github</Link> | ||
</template> | ||
</i18n-t> | ||
</span> | ||
<span :class="$style.love">{{ t('app.madeWithLove') }}</span> | ||
</div> | ||
</Dialog> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { useI18n } from 'vue-i18n'; | ||
import Dialog from '@components/base/dialog/Dialog.vue'; | ||
import Link from '@components/base/link/Link.vue'; | ||
const { OCULAR_BUILD_SHA, OCULAR_BUILD_TIMESTAMP, OCULAR_BUILD_VERSION } = import.meta.env; | ||
const emit = defineEmits<{ | ||
(e: 'close'): void; | ||
}>(); | ||
defineProps<{ | ||
open: boolean; | ||
}>(); | ||
const { t } = useI18n(); | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.infoBox { | ||
display: flex; | ||
flex-direction: column; | ||
font-size: var(--font-size-s); | ||
gap: 2px; | ||
} | ||
.link { | ||
margin-top: 4px; | ||
} | ||
.love { | ||
display: inline-block; | ||
font-size: var(--font-size-xs); | ||
font-weight: var(--font-weight-l); | ||
margin-top: 8px; | ||
text-align: center; | ||
} | ||
</style> |
This file contains 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 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 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 was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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