2022-04-15 14:24:30 +00:00
|
|
|
|
<template>
|
2022-10-27 21:19:26 +00:00
|
|
|
|
<div v-koel-focus class="about text-secondary" data-testid="about-koel" tabindex="0" @keydown.esc="close">
|
2022-04-15 14:24:30 +00:00
|
|
|
|
<main>
|
|
|
|
|
<div class="logo">
|
2022-04-21 22:58:32 +00:00
|
|
|
|
<img alt="Koel's logo" src="@/../img/logo.svg" width="128">
|
2022-04-15 14:24:30 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
2022-10-26 21:39:24 +00:00
|
|
|
|
<p class="current-version">Koel {{ currentVersion }}</p>
|
2022-04-15 14:24:30 +00:00
|
|
|
|
|
2022-05-07 09:26:32 +00:00
|
|
|
|
<p v-if="shouldNotifyNewVersion" data-testid="new-version-about">
|
2022-04-30 14:05:02 +00:00
|
|
|
|
<a :href="latestVersionReleaseUrl" target="_blank">
|
2022-08-10 14:56:01 +00:00
|
|
|
|
A new version of Koel is available ({{ latestVersion }})!
|
2022-04-15 14:24:30 +00:00
|
|
|
|
</a>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<p class="author">
|
2022-04-21 22:58:32 +00:00
|
|
|
|
Made with ❤️ by
|
|
|
|
|
<a href="https://github.com/phanan" rel="noopener" target="_blank">Phan An</a>
|
2022-04-15 14:24:30 +00:00
|
|
|
|
and quite a few
|
2022-10-26 20:44:44 +00:00
|
|
|
|
<a href="https://github.com/koel/core/graphs/contributors" rel="noopener" target="_blank">awesome</a> <a
|
|
|
|
|
href="https://github.com/koel/koel/graphs/contributors" rel="noopener" target="_blank">contributors</a>.
|
2022-04-15 14:24:30 +00:00
|
|
|
|
</p>
|
|
|
|
|
|
2022-10-26 21:39:24 +00:00
|
|
|
|
<div v-if="credits" class="credit-wrapper" data-testid="demo-credits">
|
2022-08-04 08:34:13 +00:00
|
|
|
|
Music by
|
|
|
|
|
<ul class="credits">
|
|
|
|
|
<li v-for="credit in credits" :key="credit.name">
|
|
|
|
|
<a :href="credit.url" target="_blank">{{ credit.name }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2022-04-15 14:24:30 +00:00
|
|
|
|
|
2022-10-26 21:39:24 +00:00
|
|
|
|
<SponsorList/>
|
|
|
|
|
|
2022-04-15 14:24:30 +00:00
|
|
|
|
<p>
|
|
|
|
|
Loving Koel? Please consider supporting its development via
|
2022-04-21 22:58:32 +00:00
|
|
|
|
<a href="https://github.com/users/phanan/sponsorship" rel="noopener" target="_blank">GitHub Sponsors</a>
|
2022-04-15 14:24:30 +00:00
|
|
|
|
and/or
|
2022-04-21 22:58:32 +00:00
|
|
|
|
<a href="https://opencollective.com/koel" rel="noopener" target="_blank">OpenCollective</a>.
|
2022-04-15 14:24:30 +00:00
|
|
|
|
</p>
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
<footer>
|
2022-05-03 16:51:59 +00:00
|
|
|
|
<Btn data-testid="close-modal-btn" red rounded @click.prevent="close">Close</Btn>
|
2022-04-15 14:24:30 +00:00
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2022-04-15 17:00:08 +00:00
|
|
|
|
<script lang="ts" setup>
|
2022-08-04 08:34:13 +00:00
|
|
|
|
import { orderBy } from 'lodash'
|
|
|
|
|
import { onMounted, ref } from 'vue'
|
2022-04-29 20:15:10 +00:00
|
|
|
|
import { isDemo } from '@/utils'
|
2022-04-30 14:05:02 +00:00
|
|
|
|
import { useNewVersionNotification } from '@/composables'
|
2022-09-15 09:07:25 +00:00
|
|
|
|
import { http } from '@/services'
|
2022-04-15 14:24:30 +00:00
|
|
|
|
|
2022-10-26 21:39:24 +00:00
|
|
|
|
import SponsorList from '@/components/meta/SponsorList.vue'
|
2022-07-07 18:05:46 +00:00
|
|
|
|
import Btn from '@/components/ui/Btn.vue'
|
2022-04-15 14:24:30 +00:00
|
|
|
|
|
2022-08-04 08:34:13 +00:00
|
|
|
|
type DemoCredits = {
|
|
|
|
|
name: string
|
|
|
|
|
url: string
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-26 21:39:24 +00:00
|
|
|
|
const credits = ref<DemoCredits[] | null>(null)
|
2022-08-04 08:34:13 +00:00
|
|
|
|
|
2022-04-30 14:05:02 +00:00
|
|
|
|
const {
|
|
|
|
|
shouldNotifyNewVersion,
|
|
|
|
|
currentVersion,
|
|
|
|
|
latestVersion,
|
|
|
|
|
latestVersionReleaseUrl
|
|
|
|
|
} = useNewVersionNotification()
|
2022-04-15 17:00:08 +00:00
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['close'])
|
|
|
|
|
const close = () => emit('close')
|
2022-08-04 08:34:13 +00:00
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
2022-10-26 21:39:24 +00:00
|
|
|
|
credits.value = isDemo() ? orderBy(await http.get<DemoCredits[]>('demo/credits'), 'name') : null
|
2022-08-04 08:34:13 +00:00
|
|
|
|
})
|
2022-04-15 14:24:30 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.about {
|
|
|
|
|
text-align: center;
|
|
|
|
|
max-width: 480px;
|
|
|
|
|
overflow: hidden;
|
2022-10-26 21:39:24 +00:00
|
|
|
|
position: relative;
|
2022-04-15 14:24:30 +00:00
|
|
|
|
|
|
|
|
|
main {
|
2022-10-27 21:19:26 +00:00
|
|
|
|
padding: 1.8rem;
|
2022-04-15 14:24:30 +00:00
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
margin: 1rem 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-26 21:39:24 +00:00
|
|
|
|
footer {
|
2022-04-15 14:24:30 +00:00
|
|
|
|
padding: 1rem;
|
2022-10-26 21:39:24 +00:00
|
|
|
|
background: rgba(255, 255, 255, .02);
|
2022-04-15 14:24:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a {
|
|
|
|
|
color: var(--color-text-primary);
|
|
|
|
|
|
|
|
|
|
&:hover {
|
2022-10-26 21:39:24 +00:00
|
|
|
|
color: var(--color-accent);
|
2022-04-15 14:24:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-08-04 08:34:13 +00:00
|
|
|
|
|
|
|
|
|
.credit-wrapper {
|
|
|
|
|
max-height: 9rem;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.credits, .credits li {
|
|
|
|
|
display: inline;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.credits {
|
|
|
|
|
display: inline;
|
|
|
|
|
|
|
|
|
|
li {
|
|
|
|
|
display: inline;
|
|
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
|
&::before {
|
|
|
|
|
content: ', and '
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
|
content: '.';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
li + li {
|
|
|
|
|
&::before {
|
|
|
|
|
content: ', ';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-10-26 21:39:24 +00:00
|
|
|
|
|
|
|
|
|
.sponsors {
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
}
|
2022-04-15 14:24:30 +00:00
|
|
|
|
</style>
|