2020-05-08 18:02:18 +02:00
|
|
|
<template>
|
|
|
|
<div id="footer" class="text-light">
|
|
|
|
<div class="footer-left-elements">
|
|
|
|
<ul class="footer-elements">
|
2021-02-01 16:31:48 +01:00
|
|
|
<li class="footer-element">
|
|
|
|
<i class="mdi mdi-18px mdi-database mr-1" />
|
|
|
|
<small>{{ versionString }}</small>
|
2020-05-08 18:02:18 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="footer-right-elements">
|
|
|
|
<ul class="footer-elements">
|
2022-07-16 12:01:37 +02:00
|
|
|
<li
|
|
|
|
v-if="workspace !== 'NEW'"
|
|
|
|
class="footer-element footer-link"
|
|
|
|
@click="toggleConsole"
|
|
|
|
>
|
|
|
|
<i class="mdi mdi-18px mdi-console-line mr-1" />
|
|
|
|
<small>{{ t('word.console') }}</small>
|
|
|
|
</li>
|
2022-02-11 23:19:43 +01:00
|
|
|
<li class="footer-element footer-link" @click="openOutside('https://www.paypal.com/paypalme/fabiodistasio')">
|
|
|
|
<i class="mdi mdi-18px mdi-coffee mr-1" />
|
2022-07-16 12:01:37 +02:00
|
|
|
<small>{{ t('word.donate') }}</small>
|
2020-05-08 18:02:18 +02:00
|
|
|
</li>
|
2022-07-16 12:01:37 +02:00
|
|
|
<li
|
|
|
|
class="footer-element footer-link"
|
|
|
|
:title="t('message.reportABug')"
|
|
|
|
@click="openOutside('https://github.com/antares-sql/antares/issues')"
|
|
|
|
>
|
2020-08-12 10:48:18 +02:00
|
|
|
<i class="mdi mdi-18px mdi-bug" />
|
2020-05-31 17:56:33 +02:00
|
|
|
</li>
|
2022-07-16 12:01:37 +02:00
|
|
|
<li
|
|
|
|
class="footer-element footer-link"
|
|
|
|
:title="t('word.about')"
|
|
|
|
@click="showSettingModal('about')"
|
|
|
|
>
|
2020-08-12 10:48:18 +02:00
|
|
|
<i class="mdi mdi-18px mdi-information-outline" />
|
2020-05-08 18:02:18 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-05-14 11:15:42 +02:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { shell } from 'electron';
|
|
|
|
import { storeToRefs } from 'pinia';
|
2022-07-16 12:01:37 +02:00
|
|
|
import { useI18n } from 'vue-i18n';
|
2022-04-27 18:23:48 +02:00
|
|
|
import { useApplicationStore } from '@/stores/application';
|
2022-04-30 00:47:37 +02:00
|
|
|
import { useWorkspacesStore } from '@/stores/workspaces';
|
2022-05-14 11:15:42 +02:00
|
|
|
import { computed, ComputedRef } from 'vue';
|
2022-07-16 12:01:37 +02:00
|
|
|
import { useConsoleStore } from '@/stores/console';
|
|
|
|
|
|
|
|
const { t } = useI18n();
|
2020-05-08 18:02:18 +02:00
|
|
|
|
2022-05-14 11:15:42 +02:00
|
|
|
interface DatabaseInfos {// TODO: temp
|
|
|
|
name: string;
|
|
|
|
number: string;
|
|
|
|
arch: string;
|
|
|
|
os: string;
|
|
|
|
}
|
2022-04-30 00:47:37 +02:00
|
|
|
|
2022-05-14 11:15:42 +02:00
|
|
|
const applicationStore = useApplicationStore();
|
|
|
|
const workspacesStore = useWorkspacesStore();
|
2022-04-27 18:23:48 +02:00
|
|
|
|
2022-05-14 11:15:42 +02:00
|
|
|
const { getSelected: workspace } = storeToRefs(workspacesStore);
|
2022-07-16 12:01:37 +02:00
|
|
|
const { toggleConsole } = useConsoleStore();
|
2022-04-27 18:23:48 +02:00
|
|
|
|
2022-05-14 11:15:42 +02:00
|
|
|
const { showSettingModal } = applicationStore;
|
|
|
|
const { getWorkspace } = workspacesStore;
|
|
|
|
|
|
|
|
const version: ComputedRef<DatabaseInfos> = computed(() => {
|
|
|
|
return getWorkspace(workspace.value) ? getWorkspace(workspace.value).version : null;
|
|
|
|
});
|
|
|
|
|
|
|
|
const versionString = computed(() => {
|
|
|
|
if (version.value)
|
|
|
|
return `${version.value.name} ${version.value.number} (${version.value.arch} ${version.value.os})`;
|
|
|
|
return '';
|
|
|
|
});
|
|
|
|
|
|
|
|
const openOutside = (link: string) => shell.openExternal(link);
|
2020-05-08 18:02:18 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2020-07-31 18:16:28 +02:00
|
|
|
#footer {
|
|
|
|
height: $footer-height;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0 0.2rem;
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
|
|
|
|
.footer-elements {
|
|
|
|
list-style: none;
|
|
|
|
margin: 0;
|
2020-05-08 18:02:18 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
2020-07-31 18:16:28 +02:00
|
|
|
.footer-element {
|
|
|
|
height: $footer-height;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0 0.4rem;
|
|
|
|
margin: 0;
|
2020-05-31 17:56:33 +02:00
|
|
|
|
2020-07-31 18:16:28 +02:00
|
|
|
&.footer-link {
|
|
|
|
cursor: pointer;
|
|
|
|
transition: background 0.2s;
|
|
|
|
}
|
2020-05-08 18:02:18 +02:00
|
|
|
}
|
2020-07-31 18:16:28 +02:00
|
|
|
}
|
|
|
|
}
|
2020-05-08 18:02:18 +02:00
|
|
|
</style>
|