-
Settings
+
+ Settings
+
}>
Error loading configuration: {configError.message}
@@ -74,254 +77,279 @@ export function Settings() {
async function handleThemeChange(value: string) {
updateTheme(value as ThemeName);
- return updateConfigTheme(value).then(() => {
- refreshConfig();
- setNotification({
- type: NotificationType.Success,
- title: 'Theme updated',
- message: 'Theme has been successfully updated',
- autoClose: true,
+ return updateConfigTheme(value)
+ .then(() => {
+ refreshConfig();
+ setNotification({
+ type: NotificationType.Success,
+ title: "Theme updated",
+ message: "Theme has been successfully updated",
+ autoClose: true,
+ });
+ })
+ .catch((error) => {
+ setNotification({
+ type: NotificationType.Error,
+ title: "Error updating theme",
+ message: error.message,
+ autoClose: true,
+ });
});
- }).catch((error) => {
- setNotification({
- type: NotificationType.Error,
- title: 'Error updating theme',
- message: error.message,
- autoClose: true,
- });
- });
}
async function handleLogModeChange(value: string) {
- return updateLogMode(value).then(() => {
- refreshConfig();
- setNotification({
- type: NotificationType.Success,
- title: 'Log mode updated',
- message: 'Log mode has been successfully updated',
- autoClose: true,
- });
- }).catch((error) => {
- setNotification({
- type: NotificationType.Error,
- title: 'Error updating log mode',
- message: error.message,
- autoClose: true,
+ return updateLogMode(value)
+ .then(() => {
+ refreshConfig();
+ setNotification({
+ type: NotificationType.Success,
+ title: "Log mode updated",
+ message: "Log mode has been successfully updated",
+ autoClose: true,
+ });
+ })
+ .catch((error) => {
+ setNotification({
+ type: NotificationType.Error,
+ title: "Error updating log mode",
+ message: error.message,
+ autoClose: true,
+ });
});
- });
}
- async function handleDefaultTimeoutChange(value: string){
- return updateDefaultTimeout(value).then(() => {
- refreshConfig();
- setNotification({
- type: NotificationType.Success,
- title: 'Default timeout updated',
- message: 'Default timeout has been successfully updated',
- autoClose: true,
+ async function handleDefaultTimeoutChange(value: string) {
+ return updateDefaultTimeout(value)
+ .then(() => {
+ refreshConfig();
+ setNotification({
+ type: NotificationType.Success,
+ title: "Default timeout updated",
+ message: "Default timeout has been successfully updated",
+ autoClose: true,
+ });
+ })
+ .catch((error) => {
+ setNotification({
+ type: NotificationType.Error,
+ title: "Error updating default timeout",
+ message: error.message,
+ autoClose: true,
+ });
});
- }).catch((error) => {
- setNotification({
- type: NotificationType.Error,
- title: 'Error updating default timeout',
- message: error.message,
- autoClose: true,
- });
- });
}
- async function handleCurrentWorkspaceChange(value: string){
- return updateCurrentWorkspace(value).then(() => {
- refreshConfig();
- setNotification({
- type: NotificationType.Success,
- title: 'Current workspace updated',
- message: 'Current workspace has been successfully updated',
- autoClose: true,
- });
- }).catch((error) => {
- setNotification({
- type: NotificationType.Error,
- title: 'Error updating current workspace',
- message: error.message,
- autoClose: true,
+ async function handleCurrentWorkspaceChange(value: string) {
+ return updateCurrentWorkspace(value)
+ .then(() => {
+ refreshConfig();
+ setNotification({
+ type: NotificationType.Success,
+ title: "Current workspace updated",
+ message: "Current workspace has been successfully updated",
+ autoClose: true,
+ });
+ })
+ .catch((error) => {
+ setNotification({
+ type: NotificationType.Error,
+ title: "Error updating current workspace",
+ message: error.message,
+ autoClose: true,
+ });
});
- });
}
- async function handleWorkspaceModeChange(value: string){
- return updateWorkspaceMode(value).then(() => {
- refreshConfig();
- setNotification({
- type: NotificationType.Success,
- title: 'Workspace mode updated',
- message: 'Workspace mode has been successfully updated',
- autoClose: true,
+ async function handleWorkspaceModeChange(value: string) {
+ return updateWorkspaceMode(value)
+ .then(() => {
+ refreshConfig();
+ setNotification({
+ type: NotificationType.Success,
+ title: "Workspace mode updated",
+ message: "Workspace mode has been successfully updated",
+ autoClose: true,
+ });
+ })
+ .catch((error) => {
+ setNotification({
+ type: NotificationType.Error,
+ title: "Error updating workspace mode",
+ message: error.message,
+ autoClose: true,
+ });
});
- }).catch((error) => {
- setNotification({
- type: NotificationType.Error,
- title: 'Error updating workspace mode',
- message: error.message,
- autoClose: true,
- });
- });
}
- async function handleNamespaceChange(value: string){
- return updateNamespace(value).then(() => {
- refreshConfig();
- setNotification({
- type: NotificationType.Success,
- title: 'Namespace updated',
- message: 'Namespace has been successfully updated',
- autoClose: true,
- });
- }).catch((error) => {
- setNotification({
- type: NotificationType.Error,
- title: 'Error updating namespace',
- message: error.message,
- autoClose: true,
+ async function handleNamespaceChange(value: string) {
+ return updateNamespace(value)
+ .then(() => {
+ refreshConfig();
+ setNotification({
+ type: NotificationType.Success,
+ title: "Namespace updated",
+ message: "Namespace has been successfully updated",
+ autoClose: true,
+ });
+ })
+ .catch((error) => {
+ setNotification({
+ type: NotificationType.Error,
+ title: "Error updating namespace",
+ message: error.message,
+ autoClose: true,
+ });
});
- });
}
function handleNamespaceSubmit() {
- if (namespaceInput !== (config?.currentNamespace || '')) {
+ if (namespaceInput !== (config?.currentNamespace || "")) {
handleNamespaceChange(namespaceInput);
}
}
return (
-
-
-
-
- Settings
-
+
+
+
-
-
-
-
+
+ Settings
+
-
-
-
-
- handleDefaultTimeoutChange(e.currentTarget.value)}
- placeholder="e.g., 30s, 5m, 1h"
- variant="filled"
- />
-
-
+
+
+
+
-
-
-
-
-
-
+
+
-
- setNamespaceInput(e.currentTarget.value)}
- onBlur={handleNamespaceSubmit}
- onKeyDown={(e) => {
- if (e.key === 'Enter') {
- handleNamespaceSubmit();
+
+
+ handleDefaultTimeoutChange(e.currentTarget.value)
}
- }}
- placeholder="Enter namespace"
- variant="filled"
- spellCheck={false}
- />
-
-
+ placeholder="e.g., 30s, 5m, 1h"
+ variant="filled"
+ />
+
+
-
-
- updateWorkspaceApp(event.currentTarget.value)}
- placeholder="System default"
- variant="filled"
- spellCheck={false}
- />
-
-
-
- updateExecutableApp(event.currentTarget.value)}
- placeholder="System default"
- variant="filled"
- spellCheck={false}
- />
-
-
-
-
+
+
+
+
+
+
+
+
+ setNamespaceInput(e.currentTarget.value)}
+ onBlur={handleNamespaceSubmit}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ handleNamespaceSubmit();
+ }
+ }}
+ placeholder="Enter namespace"
+ variant="filled"
+ spellCheck={false}
+ />
+
+
+
+
+
+
+ updateWorkspaceApp(event.currentTarget.value)
+ }
+ placeholder="System default"
+ variant="filled"
+ spellCheck={false}
+ />
+
+
+
+
+ updateExecutableApp(event.currentTarget.value)
+ }
+ placeholder="System default"
+ variant="filled"
+ spellCheck={false}
+ />
+
+
+
+
+
);
}
diff --git a/desktop/src/pages/Workspace/Workspace.tsx b/desktop/src/pages/Workspace/Workspace.tsx
index 41a2080d..c9af9765 100644
--- a/desktop/src/pages/Workspace/Workspace.tsx
+++ b/desktop/src/pages/Workspace/Workspace.tsx
@@ -150,7 +150,7 @@ export function Workspace({ workspace }: WorkspaceProps) {
>
{path}
- )
+ ),
)}
@@ -167,7 +167,7 @@ export function Workspace({ workspace }: WorkspaceProps) {