diff --git a/src/tailwind.config.js b/src/tailwind.config.js
deleted file mode 100644
index bc7b40da..00000000
--- a/src/tailwind.config.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/** @type {import('tailwindcss').Config} */
-
-'use strict';
-
-module.exports = {
- darkMode: 'selector',
- content: ['./www/**/*.{html,js}'],
- theme: {
- screens: {
- xxs: '450px',
- xs: '576px',
- sm: '640px',
- md: '768px',
- lg: '1024px',
- xl: '1280px',
- '2xl': '1536px',
- },
- },
- plugins: [
- function addDisabledClass({ addUtilities }) {
- const newUtilities = {
- '.is-disabled': {
- opacity: '0.25',
- cursor: 'default',
- },
- };
- addUtilities(newUtilities);
- },
- ],
-};
diff --git a/webui/src/App.vue b/webui/src/App.vue
index 5de9147b..5ac04823 100644
--- a/webui/src/App.vue
+++ b/webui/src/App.vue
@@ -17,7 +17,11 @@
-
@@ -125,7 +129,6 @@ onBeforeMount(() => {
.getSession()
.then((session) => {
authenticated.value = session.authenticated;
- // authenticated.value = false; //debug
requiresPassword.value = session.requiresPassword;
refresh();
refreshInterval.value = setInterval(refresh, 1000);
diff --git a/webui/src/components/Client.vue b/webui/src/components/Client.vue
index 8526222d..90f73fdd 100644
--- a/webui/src/components/Client.vue
+++ b/webui/src/components/Client.vue
@@ -1,8 +1,5 @@
-
+
diff --git a/webui/src/components/ClientCharts.vue b/webui/src/components/ClientCharts.vue
index 317a1408..f8e11002 100644
--- a/webui/src/components/ClientCharts.vue
+++ b/webui/src/components/ClientCharts.vue
@@ -1,7 +1,7 @@
-
+
-
+
{
if (uiTheme.value === 'auto') {
diff --git a/webui/src/store/store.js b/webui/src/store/store.js
index c6bfead5..0332713f 100644
--- a/webui/src/store/store.js
+++ b/webui/src/store/store.js
@@ -1,5 +1,5 @@
import API from '@/services/api';
-import { ref, reactive } from 'vue';
+import { ref, computed } from 'vue';
import sha256 from 'crypto-js/sha256';
import { defineStore } from 'pinia';
@@ -13,7 +13,7 @@ export const useStore = defineStore('store', () => {
const requiresPassword = ref(null);
const clients = ref(null);
- const clientsPersist = reactive({});
+ const clientsPersist = ref({});
const clientToDelete = ref(null);
const clientCreateShowModal = ref(null);
const clientCreateName = ref('');
@@ -28,6 +28,10 @@ export const useStore = defineStore('store', () => {
const uiShowCharts = ref(localStorage.getItem('uiShowCharts') === '1');
const uiTrafficStats = ref(false);
+ const updateCharts = computed(() => {
+ return uiChartType.value > 0 && uiShowCharts.value;
+ });
+
function login(e) {
e.preventDefault();
@@ -88,7 +92,7 @@ export const useStore = defineStore('store', () => {
clientToDelete.value = null;
}
- async function refresh({ updateCharts = false } = {}) {
+ async function refresh() {
if (!authenticated.value) return;
try {
@@ -107,11 +111,10 @@ export const useStore = defineStore('store', () => {
}
// Debug
- client.transferRx = clientsPersist[client.id].transferRxPrevious + Math.random() * 1000;
- client.transferTx = clientsPersist[client.id].transferTxPrevious + Math.random() * 1000;
- updateCharts = true; // DEV TODO: Update. Get from settings
+ // client.transferRx = clientsPersist[client.id].transferRxPrevious + Math.random() * 1000;
+ // client.transferTx = clientsPersist[client.id].transferTxPrevious + Math.random() * 1000;
- if (updateCharts) {
+ if (updateCharts.value) {
clientsPersist[client.id].transferRxCurrent =
client.transferRx - clientsPersist[client.id].transferRxPrevious;
clientsPersist[client.id].transferRxPrevious = client.transferRx;
@@ -185,6 +188,7 @@ export const useStore = defineStore('store', () => {
uiChartType,
uiShowCharts,
uiTrafficStats,
+ updateCharts,
login,
logout,
createClient,