From b438abcbed7b20019fafded40e34c5fc07b47806 Mon Sep 17 00:00:00 2001 From: Sergei Birukov Date: Sun, 24 Mar 2024 22:05:58 +0300 Subject: [PATCH] Use single API instance. Server dev/prod url. Debug --- webui/src/App.vue | 6 ++---- webui/src/components/ClientAddress.vue | 4 +--- webui/src/components/ClientAvatar.vue | 2 +- webui/src/components/ClientControls.vue | 3 +-- webui/src/components/ClientName.vue | 5 ++--- webui/src/components/UpdateNotification.vue | 4 ++-- webui/src/services/api.js | 6 ++++-- webui/src/services/apiInstance.js | 5 +++++ webui/src/store/store.js | 10 ++++++---- 9 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 webui/src/services/apiInstance.js diff --git a/webui/src/App.vue b/webui/src/App.vue index 5ac04823..0e8961ff 100644 --- a/webui/src/App.vue +++ b/webui/src/App.vue @@ -80,7 +80,7 @@ import ModalCreateClient from '@/components/ModalCreateClient.vue'; import ModalDeleteClient from '@/components/ModalDeleteClient.vue'; import Header from '@/components/Header.vue'; -import API from '@/services/api'; +import api from '@/services/apiInstance'; import Client from '@/components/Client.vue'; import { useStore } from '@/store/store'; @@ -113,12 +113,10 @@ const latestRelease = ref(null); const refreshInterval = ref(null); -const api = new API(); - const refresh = store.refresh; const setTheme = store.setTheme; -watch(prefersDarkScheme.value, () => { +watch(prefersDarkScheme, () => { setTheme(uiTheme.value); }); diff --git a/webui/src/components/ClientAddress.vue b/webui/src/components/ClientAddress.vue index 85505603..17d45ecb 100644 --- a/webui/src/components/ClientAddress.vue +++ b/webui/src/components/ClientAddress.vue @@ -26,9 +26,7 @@