Return to page after clikcing login at navbar (#975)

This commit is contained in:
Anbraten 2022-06-16 14:38:57 +02:00 committed by GitHub
parent bdcee93f79
commit 3d8ea2e2c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { useRoute } from 'vue-router';
import Button from '~/components/atomic/Button.vue';
import IconButton from '~/components/atomic/IconButton.vue';
@ -53,12 +54,13 @@ export default defineComponent({
setup() {
const config = useConfig();
const route = useRoute();
const authentication = useAuthentication();
const { darkMode } = useDarkMode();
const docsUrl = window.WOODPECKER_DOCS;
function doLogin() {
authentication.authenticate();
authentication.authenticate(route.fullPath);
}
const version = config.version?.startsWith('next') ? 'next' : config.version;