You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
buster/src/contribute/App.vue

63 lines
1.2 KiB
Vue

<template>
<v-app id="app">
<vn-contribute
:extName="extName"
:extSlug="extSlug"
:notice="notice"
@open="contribute"
>
</vn-contribute>
</v-app>
</template>
<script>
import {Contribute} from 'vueton/components/contribute';
import {getText, getActiveTab} from 'utils/common';
export default {
components: {
[Contribute.name]: Contribute
},
data: function () {
return {
extName: getText('extensionName'),
extSlug: 'buster',
notice: ''
};
},
methods: {
contribute: async function ({url} = {}) {
const activeTab = await getActiveTab();
await browser.tabs.create({url, index: activeTab.index + 1});
}
},
created: function () {
document.title = getText('pageTitle', [
getText('pageTitle_contribute'),
this.extName
]);
const query = new URL(window.location.href).searchParams;
if (query.get('action') === 'auto') {
this.notice = 'This page is shown once a year while using the extension.';
}
}
};
</script>
<style lang="scss">
@use 'vueton/styles' as vueton;
@include vueton.theme-base;
.v-application__wrap {
display: flex;
align-items: center;
}
</style>