From 99d3acaef552b4b6c3021260ffb6b7eac3029673 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 29 Jan 2021 20:10:53 +0100 Subject: [PATCH] Prettier, committed to prevent conflicts --- src/boot/axios.ts | 22 +++++++++++----------- src/pages/Login.vue | 45 ++++++++++++++++++++++++++------------------- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/src/boot/axios.ts b/src/boot/axios.ts index e6a8bc6..940b45a 100644 --- a/src/boot/axios.ts +++ b/src/boot/axios.ts @@ -4,8 +4,7 @@ import config from '../config'; import { Store } from 'vuex'; import { StateInterface } from 'src/store'; import { LocalStorage } from 'quasar'; -import {Notify} from 'quasar'; -import {Router} from 'src/router'; +import { Notify } from 'quasar'; declare module 'vue/types/vue' { interface Vue { @@ -17,21 +16,22 @@ export const setBaseUrl = (url: string) => { LocalStorage.set('baseURL', url); axios.defaults.baseURL = url; Notify.create({ - message: "Serveraddresse gespeichert", - position: "bottom", + message: 'Serveraddresse gespeichert', + position: 'bottom', caption: `${url}`, - color: "positive" - }) - setTimeout(() => {window.location.reload()}, 5000) - -} + color: 'positive' + }); + setTimeout(() => { + window.location.reload(); + }, 5000); +}; export default boot>(({ Vue, store, router }) => { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access Vue.prototype.$axios = axios; const baseURL = LocalStorage.getItem('baseURL'); - if (baseURL){ - axios.defaults.baseURL = baseURL + if (baseURL) { + axios.defaults.baseURL = baseURL; } else { axios.defaults.baseURL = config.baseURL; } diff --git a/src/pages/Login.vue b/src/pages/Login.vue index 5a0a048..9800cfe 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -35,24 +35,21 @@ -
- +
- - -
- - - -
Servereinstellung
- - -
-
- -
+ +
+ + + +
Servereinstellung
+ + +
+
+
@@ -72,16 +69,16 @@ export default defineComponent({ const userid = ref(''); const password = ref(''); const rules = [(val: string) => (val && val.length > 0) || 'Feld darf nicht leer sein!']; - const server = ref(root.$axios.defaults.baseURL) + const server = ref(root.$axios.defaults.baseURL); const visible = ref(false); function openServerSettings() { - visible.value = !visible.value + visible.value = !visible.value; } function changeUrl() { if (server.value) { - setBaseUrl(server.value) + setBaseUrl(server.value); } } @@ -147,7 +144,17 @@ export default defineComponent({ }); } - return { userid, password, doLogin, doReset, rules, server, changeUrl, visible, openServerSettings }; + return { + userid, + password, + doLogin, + doReset, + rules, + server, + changeUrl, + visible, + openServerSettings + }; } });