mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
change refresh delay to 2s
This commit is contained in:
@@ -69,7 +69,7 @@ const ThemeSelector: ForwardRefExoticComponent<Omit<ThemeSelectorProps, "ref"> &
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let intervalId: any;
|
let intervalId: any;
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
intervalId = setInterval(fetchThemes, 5000);
|
intervalId = setInterval(fetchThemes, 2000);
|
||||||
} else {
|
} else {
|
||||||
clearInterval(intervalId);
|
clearInterval(intervalId);
|
||||||
}
|
}
|
||||||
|
|||||||
+29
-22
@@ -1,35 +1,42 @@
|
|||||||
import { defineConfig } from 'vite'
|
import MillionLint from '@million/lint';
|
||||||
import { crx } from '@crxjs/vite-plugin'
|
import { defineConfig } from 'vite';
|
||||||
import million from "million/compiler"
|
import { crx } from '@crxjs/vite-plugin';
|
||||||
import manifest from './manifest.json'
|
import million from "million/compiler";
|
||||||
import react from '@vitejs/plugin-react-swc'
|
import manifest from './manifest.json';
|
||||||
import { join } from 'path'
|
import react from '@vitejs/plugin-react-swc';
|
||||||
|
import { join } from 'path';
|
||||||
|
|
||||||
|
const plugins = [
|
||||||
|
react(),
|
||||||
|
million.vite({
|
||||||
|
auto: {
|
||||||
|
threshold: 0.005,
|
||||||
|
// default: 0.1,
|
||||||
|
skip: [] // default []
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
crx({
|
||||||
|
manifest
|
||||||
|
})
|
||||||
|
];
|
||||||
|
plugins.unshift(MillionLint.vite())
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: plugins,
|
||||||
react(),
|
|
||||||
million.vite({
|
|
||||||
auto: {
|
|
||||||
threshold: 0.005, // default: 0.1,
|
|
||||||
skip: [], // default []
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
crx({ manifest }),
|
|
||||||
],
|
|
||||||
server: {
|
server: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
hmr: {
|
hmr: {
|
||||||
host: "localhost",
|
host: "localhost",
|
||||||
protocol: "ws",
|
protocol: "ws",
|
||||||
port: 5173,
|
port: 5173
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
minify: false,
|
minify: false,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input: {
|
||||||
settings: join(__dirname, 'src', 'interface', 'index.html'),
|
settings: join(__dirname, 'src', 'interface', 'index.html')
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
Reference in New Issue
Block a user