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:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user