v1.6.0 #221
@@ -319,6 +319,9 @@
|
||||
"oidcConfigurationUpdated": "OIDC configuration updated successfully!",
|
||||
"failedToFetchOidcConfig": "Failed to fetch OIDC configuration",
|
||||
"failedToFetchRegistrationStatus": "Failed to fetch registration status",
|
||||
"user": {
|
||||
"failedToLoadVersionInfo": "Failed to load version information"
|
||||
},
|
||||
"oidcConfigurationDisabled": "OIDC configuration disabled successfully!",
|
||||
"failedToUpdateOidcConfig": "Failed to update OIDC configuration",
|
||||
"failedToDisableOidcConfig": "Failed to disable OIDC configuration",
|
||||
@@ -682,7 +685,8 @@
|
||||
"feedbackMessage": "Have ideas for what should come next for server management? Share them on",
|
||||
"failedToFetchHostConfig": "Failed to fetch host configuration",
|
||||
"failedToFetchStatus": "Failed to fetch server status",
|
||||
"failedToFetchMetrics": "Failed to fetch server metrics"
|
||||
"failedToFetchMetrics": "Failed to fetch server metrics",
|
||||
"failedToFetchHomeData": "Failed to fetch home data"
|
||||
},
|
||||
"auth": {
|
||||
"loginTitle": "Login to Termix",
|
||||
|
||||
@@ -411,7 +411,7 @@ app.post('/ssh/file_manager/ssh/writeFile', async (req, res) => {
|
||||
|
||||
fileLogger.error('Fallback write command failed:', err);
|
||||
if (!res.headersSent) {
|
||||
return res.status(500).json({error: `Write failed: ${err.message}`});
|
||||
return res.status(500).json({error: `Write failed: ${err.message}`, toast: {type: 'error', message: `Write failed: ${err.message}`}});
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -437,7 +437,7 @@ app.post('/ssh/file_manager/ssh/writeFile', async (req, res) => {
|
||||
} else {
|
||||
fileLogger.error(`Fallback write failed with code ${code}: ${errorData}`);
|
||||
if (!res.headersSent) {
|
||||
res.status(500).json({error: `Write failed: ${errorData}`});
|
||||
res.status(500).json({error: `Write failed: ${errorData}`, toast: {type: 'error', message: `Write failed: ${errorData}`}});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -602,9 +602,9 @@ app.post('/ssh/file_manager/ssh/uploadFile', async (req, res) => {
|
||||
}
|
||||
} else {
|
||||
fileLogger.error(`Fallback upload failed with code ${code}: ${errorData}`);
|
||||
if (!res.headersSent) {
|
||||
res.status(500).json({error: `Upload failed: ${errorData}`});
|
||||
}
|
||||
if (!res.headersSent) {
|
||||
res.status(500).json({error: `Upload failed: ${errorData}`, toast: {type: 'error', message: `Upload failed: ${errorData}`}});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -659,9 +659,9 @@ app.post('/ssh/file_manager/ssh/uploadFile', async (req, res) => {
|
||||
}
|
||||
} else {
|
||||
fileLogger.error(`Chunked fallback upload failed with code ${code}: ${errorData}`);
|
||||
if (!res.headersSent) {
|
||||
res.status(500).json({error: `Chunked upload failed: ${errorData}`});
|
||||
}
|
||||
if (!res.headersSent) {
|
||||
res.status(500).json({error: `Chunked upload failed: ${errorData}`, toast: {type: 'error', message: `Chunked upload failed: ${errorData}`}});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -748,7 +748,7 @@ app.post('/ssh/file_manager/ssh/createFile', async (req, res) => {
|
||||
if (code !== 0) {
|
||||
fileLogger.error(`SSH createFile command failed with code ${code}: ${errorData.replace(/\n/g, ' ').trim()}`);
|
||||
if (!res.headersSent) {
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`});
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`, toast: {type: 'error', message: `File creation failed: ${errorData}`}});
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -832,7 +832,7 @@ app.post('/ssh/file_manager/ssh/createFolder', async (req, res) => {
|
||||
if (code !== 0) {
|
||||
fileLogger.error(`SSH createFolder command failed with code ${code}: ${errorData.replace(/\n/g, ' ').trim()}`);
|
||||
if (!res.headersSent) {
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`});
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`, toast: {type: 'error', message: `Folder creation failed: ${errorData}`}});
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -915,7 +915,7 @@ app.delete('/ssh/file_manager/ssh/deleteItem', async (req, res) => {
|
||||
if (code !== 0) {
|
||||
fileLogger.error(`SSH deleteItem command failed with code ${code}: ${errorData.replace(/\n/g, ' ').trim()}`);
|
||||
if (!res.headersSent) {
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`});
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`, toast: {type: 'error', message: `Delete failed: ${errorData}`}});
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1000,7 +1000,7 @@ app.put('/ssh/file_manager/ssh/renameItem', async (req, res) => {
|
||||
if (code !== 0) {
|
||||
fileLogger.error(`SSH renameItem command failed with code ${code}: ${errorData.replace(/\n/g, ' ').trim()}`);
|
||||
if (!res.headersSent) {
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`});
|
||||
return res.status(500).json({error: `Command failed: ${errorData}`, toast: {type: 'error', message: `Rename failed: ${errorData}`}});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,9 @@ export function FileManager({onSelectView, embedded = false, initialHost = null}
|
||||
type: 'directory'
|
||||
})));
|
||||
} catch (err: any) {
|
||||
console.error('Failed to fetch home data:', err);
|
||||
const {toast} = await import('sonner');
|
||||
toast.error(t('fileManager.failedToFetchHomeData'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@ export function HomepageAlertManager({userId, loggedIn}: AlertManagerProps): Rea
|
||||
setAlerts(sortedAlerts);
|
||||
setCurrentAlertIndex(0);
|
||||
} catch (err) {
|
||||
console.error('Failed to fetch user alerts:', err);
|
||||
const {toast} = await import('sonner');
|
||||
toast.error(t('homepage.failedToLoadAlerts'));
|
||||
setError(t('homepage.failedToLoadAlerts'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
|
||||
@@ -43,6 +43,8 @@ export function UserProfile({isTopbarOpen = true}: UserProfileProps) {
|
||||
setVersionInfo({version: info.localVersion});
|
||||
} catch (err) {
|
||||
console.error("Failed to load version info", err);
|
||||
const {toast} = await import('sonner');
|
||||
toast.error(t('user.failedToLoadVersionInfo'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ export function TerminalKeyboard({onSendInput, onLayoutChange}: TerminalKeyboard
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Vibration failed:", e);
|
||||
// Don't show toast for vibration failure as it's not critical
|
||||
}
|
||||
|
||||
onSendInput(input);
|
||||
|
||||
Reference in New Issue
Block a user