add about page. fixes #15
This commit is contained in:
parent
419f26b8bf
commit
30570ff662
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@ -4,7 +4,7 @@ on: [push, pull_request]
|
||||
|
||||
env:
|
||||
IMAGE: ${{ github.repository }}
|
||||
VERSION: ${{ github.sha }}
|
||||
TAG: ${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -20,7 +20,10 @@ jobs:
|
||||
run: yarn install
|
||||
|
||||
- name: Build
|
||||
run: VUE_APP_VERSION=$VERSION yarn build
|
||||
run: |
|
||||
export VUE_APP_BUILD=$TAG
|
||||
export VUE_APP_BUILD_DATE=$(date --iso-8601)
|
||||
yarn build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
@ -29,12 +32,12 @@ jobs:
|
||||
path: dist
|
||||
|
||||
- name: Build docker image
|
||||
run: docker build -t $IMAGE:$VERSION -f docker/Dockerfile .
|
||||
run: docker build -t $IMAGE:$TAG -f docker/Dockerfile .
|
||||
|
||||
- name: Push docker image
|
||||
run: |
|
||||
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
docker push $IMAGE:$VERSION
|
||||
docker push $IMAGE:$TAG
|
||||
|
||||
preview:
|
||||
runs-on: ubuntu-latest
|
||||
@ -79,7 +82,7 @@ jobs:
|
||||
steps:
|
||||
- name: Push latest
|
||||
run: |
|
||||
docker pull $IMAGE:$VERSION
|
||||
docker tag $IMAGE:$VERSION $IMAGE:latest
|
||||
docker pull $IMAGE:$TAG
|
||||
docker tag $IMAGE:$TAG $IMAGE:latest
|
||||
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
docker push $IMAGE:latest
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head data-version="<%= process.env.VUE_APP_VERSION %>">
|
||||
<head data-build="<%= process.env.VUE_APP_BUILD %>">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<% if (process.env.NODE_ENV === "production") { %>
|
||||
|
40
src/app/About.vue
Normal file
40
src/app/About.vue
Normal 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>
|
@ -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',
|
||||
|
@ -5,6 +5,7 @@
|
||||
import Vue from 'vue'
|
||||
import {
|
||||
BIcon,
|
||||
BIconBoxArrowUpRight,
|
||||
BIconBroadcast,
|
||||
BIconCardText,
|
||||
BIconChevronCompactRight,
|
||||
@ -29,6 +30,7 @@
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
BIcon,
|
||||
BIconBoxArrowUpRight,
|
||||
BIconBroadcast,
|
||||
BIconCardText,
|
||||
BIconChevronCompactRight,
|
||||
|
Loading…
x
Reference in New Issue
Block a user