Release v0.1.8
This commit is contained in:
@@ -79,7 +79,7 @@ export function apiUrl(settings: ApiSettings, path: string): string {
|
||||
|
||||
export function loadApiSettings(): ApiSettings {
|
||||
const storedBaseUrl = loadStoredSetting("baseUrl");
|
||||
const storedApiKey = loadStoredSetting("apiKey");
|
||||
const storedApiKey = sessionStorage.getItem(`${SESSION_STORAGE_KEY}.apiKey`);
|
||||
const configuredBaseUrl = storedBaseUrl !== null ? storedBaseUrl : import.meta.env.VITE_API_BASE_URL ?? "";
|
||||
const apiBaseUrl = normalizeApiBaseUrl(configuredBaseUrl);
|
||||
|
||||
@@ -87,11 +87,9 @@ export function loadApiSettings(): ApiSettings {
|
||||
if (storedBaseUrl !== null && storedBaseUrl !== apiBaseUrl) {
|
||||
localStorage.setItem(`${STORAGE_KEY}.baseUrl`, apiBaseUrl);
|
||||
}
|
||||
if (storedApiKey !== null) {
|
||||
localStorage.setItem(`${STORAGE_KEY}.apiKey`, storedApiKey);
|
||||
}
|
||||
clearLegacyStoredSetting("baseUrl");
|
||||
clearLegacyStoredSetting("apiKey");
|
||||
localStorage.removeItem(`${STORAGE_KEY}.apiKey`);
|
||||
|
||||
localStorage.removeItem(`${STORAGE_KEY}.accessToken`);
|
||||
sessionStorage.removeItem(`${SESSION_STORAGE_KEY}.accessToken`);
|
||||
@@ -106,9 +104,14 @@ export function loadApiSettings(): ApiSettings {
|
||||
|
||||
export function saveApiSettings(settings: ApiSettings): void {
|
||||
localStorage.setItem(`${STORAGE_KEY}.baseUrl`, normalizeApiBaseUrl(settings.apiBaseUrl));
|
||||
localStorage.setItem(`${STORAGE_KEY}.apiKey`, settings.apiKey);
|
||||
if (settings.apiKey) {
|
||||
sessionStorage.setItem(`${SESSION_STORAGE_KEY}.apiKey`, settings.apiKey);
|
||||
} else {
|
||||
sessionStorage.removeItem(`${SESSION_STORAGE_KEY}.apiKey`);
|
||||
}
|
||||
clearLegacyStoredSetting("baseUrl");
|
||||
clearLegacyStoredSetting("apiKey");
|
||||
localStorage.removeItem(`${STORAGE_KEY}.apiKey`);
|
||||
localStorage.removeItem(`${STORAGE_KEY}.accessToken`);
|
||||
sessionStorage.removeItem(`${SESSION_STORAGE_KEY}.accessToken`);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Activity, CalendarDays, FileText, Folder, Form, LayoutDashboard, Mail, Mails, Shield, Users, type LucideIcon } from "lucide-react";
|
||||
import { Activity, Building2, CalendarDays, ClipboardPenLine, FileText, Folder, Form, LayoutDashboard, LayoutTemplate, Mail, Mails, RadioTower, Shield, Users, type LucideIcon } from "lucide-react";
|
||||
import installedWebModules from "virtual:govoplan-installed-modules";
|
||||
import type { AuthInfo, DashboardWidgetContribution, DashboardWidgetsUiCapability, PlatformModuleInfo, PlatformNavItem, PlatformWebModule } from "../types";
|
||||
import {
|
||||
@@ -39,14 +39,20 @@ type RemoteAssetManifest = {
|
||||
const iconByName: Record<string, LucideIcon> = {
|
||||
activity: Activity,
|
||||
admin: Shield,
|
||||
building: Building2,
|
||||
"building-2": Building2,
|
||||
calendar: CalendarDays,
|
||||
campaign: Mails,
|
||||
"clipboard-pen-line": ClipboardPenLine,
|
||||
dashboard: LayoutDashboard,
|
||||
file: Folder,
|
||||
files: Folder,
|
||||
folder: Folder,
|
||||
form: Form,
|
||||
"layout-template": LayoutTemplate,
|
||||
mail: Mail,
|
||||
operator: RadioTower,
|
||||
"radio-tower": RadioTower,
|
||||
reports: FileText,
|
||||
users: Users
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user