feat: first cut at publishing tool

This commit is contained in:
2026-02-26 16:52:29 +01:00
parent 74d6035f4a
commit 1666e6bba9
21 changed files with 976 additions and 39 deletions

View File

@@ -495,6 +495,27 @@ const App: React.FC = () => {
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('menu:uploadSite', async () => {
try {
const stored = localStorage.getItem('bds-credentials');
if (!stored) {
showToast.error(tr('app.uploadSiteNoCredentials'));
return;
}
const credentials = JSON.parse(stored);
if (!credentials.sshHost || !credentials.sshUser || !credentials.sshRemotePath) {
showToast.error(tr('app.uploadSiteNoCredentials'));
return;
}
await window.electronAPI?.publish.uploadSite(credentials);
} catch (error) {
console.error('Site upload failed:', error);
showToast.error(tr('app.uploadSiteFailed'));
}
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('menu:openDocumentation', () => {
openSingletonToolTab(openTab, 'documentation');