feat: performance and visual improvements

This commit is contained in:
SethBurkart123
2025-06-06 10:16:42 +10:00
parent e94008efba
commit 074c2ff4bb
4 changed files with 15 additions and 15 deletions
@@ -5,8 +5,8 @@ import { renderSkeletonLoader, renderErrorState } from './ui';
import styles from './styles.css?inline';
import { delay } from '@/seqta/utils/delay';
const gridViewPlugin: Plugin<{}> = {
id: 'assessments-grid-view',
const assessmentsOverviewPlugin: Plugin<{}> = {
id: 'assessments-overview',
name: 'Assessments Overview',
description: 'Adds an overview option to the assessments page that organizes assessments by status',
version: '1.0.0',
@@ -69,4 +69,4 @@ const gridViewPlugin: Plugin<{}> = {
},
};
export default gridViewPlugin;
export default assessmentsOverviewPlugin;
@@ -34,7 +34,7 @@
}
.filter-select {
background: #ffffff;
background: #ffffff !important;
border: 2px solid #e2e8f0;
border-radius: 8px;
color: #1a1a1a;
@@ -60,7 +60,7 @@
/* Dark mode dropdowns */
.dark .filter-select {
background: var(--background-primary);
background: var(--background-primary) !important;
border-color: var(--background-secondary);
color: var(--text-primary);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+7 -6
View File
@@ -11,6 +11,7 @@ import type {
import { eventManager } from "@/seqta/utils/listeners/EventManager";
import ReactFiber from "@/seqta/utils/ReactFiber";
import browser from "webextension-polyfill";
import { settingsState } from "@/seqta/utils/listeners/SettingsState";
function createSEQTAAPI(): SEQTAAPI {
return {
@@ -115,16 +116,16 @@ function createSettingsAPI<T extends PluginSettings>(
// Fill with defaults first
for (const key in plugin.settings) {
settingsWithMeta[key] = plugin.settings[key].default;
if (plugin.settings[key].type !== 'component' && plugin.settings[key].type !== 'button') {
settingsWithMeta[key] = plugin.settings[key].default;
}
}
// Load stored settings and override defaults
const loaded = (async () => {
try {
const stored = await browser.storage.local.get(storageKey);
const storedSettings = stored[storageKey] as Partial<
Record<keyof T, any>
>;
const allSettings = settingsState.getAll() as unknown as Record<string, unknown>;
const storedSettings = allSettings[storageKey] as Partial<Record<keyof T, any>>;
if (storedSettings) {
for (const key in storedSettings) {
if (key in settingsWithMeta) {
@@ -205,7 +206,7 @@ function createStorageAPI<T = any>(
// Load all existing storage values for this plugin
const loadStoragePromise = (async () => {
try {
const allStorage = await browser.storage.local.get(null);
const allStorage = settingsState.getAll();
// Filter for this plugin's storage keys and populate cache
Object.entries(allStorage).forEach(([key, value]) => {
+3 -4
View File
@@ -11,6 +11,7 @@ import type {
} from "./types";
import { createPluginAPI } from "./createAPI";
import browser from "webextension-polyfill";
import { settingsState } from "@/seqta/utils/listeners/SettingsState";
interface PluginSettingsStorage {
enabled?: boolean;
@@ -150,10 +151,8 @@ export class PluginManager {
// Check if plugin is enabled before starting
if (plugin.disableToggle) {
const settings = await browser.storage.local.get(
`plugin.${pluginId}.settings`,
);
const pluginSettings = settings[`plugin.${pluginId}.settings`] as
const all = settingsState.getAll() as unknown as Record<string, unknown>;
const pluginSettings = all[`plugin.${pluginId}.settings`] as
| PluginSettingsStorage
| undefined;
const enabled =