mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
applied various optimisations to UI
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -46,10 +46,8 @@
|
|||||||
"@uiw/codemirror-extensions-color": "^4.21.25",
|
"@uiw/codemirror-extensions-color": "^4.21.25",
|
||||||
"@uiw/codemirror-theme-github": "^4.21.25",
|
"@uiw/codemirror-theme-github": "^4.21.25",
|
||||||
"@uiw/react-codemirror": "^4.21.25",
|
"@uiw/react-codemirror": "^4.21.25",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
|
||||||
"autoprefixer": "^10.4.17",
|
"autoprefixer": "^10.4.17",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
"clsx": "^2.1.0",
|
|
||||||
"color": "^4.2.3",
|
"color": "^4.2.3",
|
||||||
"dompurify": "^3.0.8",
|
"dompurify": "^3.0.8",
|
||||||
"framer-motion": "^11.0.25",
|
"framer-motion": "^11.0.25",
|
||||||
@@ -57,22 +55,15 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"million": "latest",
|
"million": "latest",
|
||||||
"motion": "^10.17.0",
|
"motion": "^10.17.0",
|
||||||
"npm": "^10.4.0",
|
|
||||||
"npm-run-all": "^4.1.5",
|
|
||||||
"pocketbase": "^0.21.1",
|
|
||||||
"preact": "^10.20.0",
|
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-best-gradient-color-picker": "3.0.5",
|
"react-best-gradient-color-picker": "3.0.5",
|
||||||
"react-confetti-explosion": "^2.1.2",
|
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-error-boundary": "^4.0.13",
|
"react-error-boundary": "^4.0.13",
|
||||||
"react-router-dom": "^6.22.0",
|
"react-router-dom": "^6.22.0",
|
||||||
"react-shadow": "^20.4.0",
|
|
||||||
"react-toastify": "^10.0.5",
|
"react-toastify": "^10.0.5",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"sortablejs": "^1.15.2",
|
"sortablejs": "^1.15.2",
|
||||||
"swiper": "^11.1.0",
|
"swiper": "^11.1.0",
|
||||||
"tailwind-merge": "^2.2.2",
|
|
||||||
"tailwindcss": "^3.4.1",
|
"tailwindcss": "^3.4.1",
|
||||||
"ts-loader": "^9.5.1",
|
"ts-loader": "^9.5.1",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { ChangeEvent, memo, useEffect, useState } from "react";
|
|||||||
import { downloadPresetBackground, openDB, readAllData, writeData } from "../hooks/BackgroundDataLoader";
|
import { downloadPresetBackground, openDB, readAllData, writeData } from "../hooks/BackgroundDataLoader";
|
||||||
import presetBackgrounds from "../assets/presetBackgrounds";
|
import presetBackgrounds from "../assets/presetBackgrounds";
|
||||||
import "./BackgroundSelector.css";
|
import "./BackgroundSelector.css";
|
||||||
import browser from "webextension-polyfill";
|
|
||||||
|
|
||||||
export interface Background {
|
export interface Background {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ type ThemeCoverProps = {
|
|||||||
onThemeDelete: (themeId: string) => void;
|
onThemeDelete: (themeId: string) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ThemeCover: React.FC<ThemeCoverProps> = ({
|
export const ThemeCover: React.FC<ThemeCoverProps> = React.memo(({
|
||||||
theme,
|
theme,
|
||||||
downloaded,
|
downloaded,
|
||||||
isSelected,
|
isSelected,
|
||||||
@@ -96,7 +96,7 @@ export const ThemeCover: React.FC<ThemeCoverProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
});
|
||||||
|
|
||||||
const LoadingSpinner = ({ size }: { size: number }) => {
|
const LoadingSpinner = ({ size }: { size: number }) => {
|
||||||
return <div style={{ width: `${size}px`, height: `${size}px` }} className={`animate-spin rounded-full border-2 border-white border-t-2 border-t-transparent`}></div>;
|
return <div style={{ width: `${size}px`, height: `${size}px` }} className={`animate-spin rounded-full border-2 border-white border-t-2 border-t-transparent`}></div>;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import Shortcuts from './SettingsPage/Shortcuts';
|
|||||||
import Picker from '../components/Picker';
|
import Picker from '../components/Picker';
|
||||||
import Themes from './SettingsPage/Themes';
|
import Themes from './SettingsPage/Themes';
|
||||||
import { ToastContainer } from 'react-toastify';
|
import { ToastContainer } from 'react-toastify';
|
||||||
|
import { memo } from 'react';
|
||||||
|
|
||||||
import browser from 'webextension-polyfill';
|
import browser from 'webextension-polyfill';
|
||||||
|
|
||||||
@@ -46,4 +47,4 @@ const SettingsPage = ({ standalone }: SettingsPage) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SettingsPage;
|
export default memo(SettingsPage);
|
||||||
@@ -6,6 +6,7 @@ import { SettingsList } from '../../types/SettingsProps';
|
|||||||
import { useSettingsContext } from '../../SettingsContext';
|
import { useSettingsContext } from '../../SettingsContext';
|
||||||
|
|
||||||
import browser from 'webextension-polyfill'
|
import browser from 'webextension-polyfill'
|
||||||
|
import { memo } from 'react';
|
||||||
|
|
||||||
const Settings: React.FC = () => {
|
const Settings: React.FC = () => {
|
||||||
const { settingsState, setSettingsState } = useSettingsContext();
|
const { settingsState, setSettingsState } = useSettingsContext();
|
||||||
@@ -89,4 +90,4 @@ const Settings: React.FC = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Settings;
|
export default memo(Settings);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { FC, createRef, useState } from 'react';
|
import { FC, createRef, useState } from 'react';
|
||||||
import BackgroundSelector from '../../components/BackgroundSelector';
|
import BackgroundSelector from '../../components/BackgroundSelector';
|
||||||
import ThemeSelector from '../../components/ThemeSelector';
|
import ThemeSelector from '../../components/ThemeSelector';
|
||||||
|
import { memo } from 'react';
|
||||||
|
|
||||||
type ThemeSelectorRef = {
|
type ThemeSelectorRef = {
|
||||||
disableTheme: () => void;
|
disableTheme: () => void;
|
||||||
@@ -26,4 +27,4 @@ const Themes: FC = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Themes;
|
export default memo(Themes);
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
import { ClassValue, clsx } from "clsx";
|
|
||||||
import { twMerge } from "tailwind-merge";
|
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
|
||||||
return twMerge(clsx(inputs));
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user