feat: New one-click Home Server, now in Labs. Launch your own self-hosted server instance with just 1 click from the Preferences window. (#2345)

* fix(desktop): add home server coming-soon message on windows platform

* fix(desktop): typos and remove feature block

* fix(desktop): instantiate home server only upon starting
This commit is contained in:
Karol Sójko
2023-07-04 16:55:37 +02:00
committed by GitHub
parent 9664d31c4e
commit 05528782a4
5 changed files with 43 additions and 15 deletions

View File

@@ -4,12 +4,13 @@ import {
HomeServerManagerInterface,
HomeServerEnvironmentConfiguration,
} from '@web/Application/Device/DesktopSnjsExports'
import { HomeServerInterface } from '@standardnotes/home-server'
import { HomeServer, HomeServerInterface } from '@standardnotes/home-server'
import { WebContents } from 'electron'
import { MessageToWebApp } from '../../Shared/IpcMessages'
import { FilesManagerInterface } from '../File/FilesManagerInterface'
import { HomeServerConfigurationFile } from './HomeServerConfigurationFile'
import { isWindows } from '../Types/Platforms'
const os = require('os')
@@ -126,6 +127,8 @@ export class HomeServerManager implements HomeServerManagerInterface {
}
async startHomeServer(): Promise<string | undefined> {
this.doNotInstantiateHomeServerOnWindowsUntilItIsSupported()
if (!this.homeServer) {
return
}
@@ -261,4 +264,10 @@ export class HomeServerManager implements HomeServerManagerInterface {
return configuration
}
private doNotInstantiateHomeServerOnWindowsUntilItIsSupported(): void {
if (!isWindows() && !this.homeServer) {
this.homeServer = new HomeServer()
}
}
}