add about page. fixes #15

This commit is contained in:
Thomas Amland
2020-09-19 13:36:06 +02:00
parent 419f26b8bf
commit 30570ff662
5 changed files with 64 additions and 7 deletions
+40
View File
@@ -0,0 +1,40 @@
<template>
<b-modal size="lg" hide-header hide-footer :visible="visible" @change="$emit('close')">
<div style="width: 200px" class="mx-auto mb-3">
<Logo />
</div>
<div class="text-center">
<ExternalLink :href="url">
GitHub <Icon icon="box-arrow-up-right" />
</ExternalLink>
<p>
Licensed under the AGPLv3 license.
</p>
<div>Build: {{ build }}</div>
<div>Build date: {{ buildDate }}</div>
</div>
<div class="d-flex justify-content-end">
<button class="btn btn-secondary" @click="$emit('close')">
Close
</button>
</div>
</b-modal>
</template>
<script lang="ts">
import Vue from 'vue'
import Logo from './Logo.vue'
export default Vue.extend({
components: {
Logo,
},
props: {
visible: { type: Boolean, required: true },
},
computed: {
build: () => process.env.VUE_APP_BUILD,
buildDate: () => process.env.VUE_APP_BUILD_DATE,
url: () => 'https://github.com/tamland/airsonic-frontend'
},
})
</script>
+12
View File
@@ -25,22 +25,34 @@
<b-dropdown-item :href="`${server}/settings.view`">
Server settings
</b-dropdown-item>
<b-dropdown-item-button @click="showAboutModal = true">
About
</b-dropdown-item-button>
<b-dropdown-divider />
<b-dropdown-item-button @click="logout">
Log out
</b-dropdown-item-button>
</b-dropdown>
</template>
<About :visible="showAboutModal" @close="showAboutModal = false" />
</div>
</template>
<script lang="ts">
import Vue from 'vue'
import { mapActions, mapState } from 'vuex'
import About from './About.vue'
import SearchForm from '@/search/SearchForm.vue'
export default Vue.extend({
components: {
About,
SearchForm,
},
data() {
return {
showAboutModal: false
}
},
computed: {
...mapState([
'server',