internal: move home server into internal flag
This commit is contained in:
@@ -5,9 +5,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
||||
|
||||
# [3.165.0](https://github.com/standardnotes/app/compare/@standardnotes/web@3.164.3...@standardnotes/web@3.165.0) (2023-07-04)
|
||||
|
||||
### Features
|
||||
|
||||
* New one-click Home Server, now in Labs. Launch your own self-hosted server instance with just 1 click from the Preferences window. ([#2345](https://github.com/standardnotes/app/issues/2345)) ([0552878](https://github.com/standardnotes/app/commit/05528782a4e9684dbd86fd12b77eb86727d6c414))
|
||||
**Note:** Version bump only for package @standardnotes/web
|
||||
|
||||
## [3.164.3](https://github.com/standardnotes/app/compare/@standardnotes/web@3.164.2...@standardnotes/web@3.164.3) (2023-07-04)
|
||||
|
||||
|
||||
@@ -1,19 +1,5 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "3.165.0",
|
||||
"title": "[3.165.0](https://github.com/standardnotes/app/compare/@standardnotes/web@3.164.3...@standardnotes/web@3.165.0) (2023-07-04)",
|
||||
"date": null,
|
||||
"body": "### Features\n\n* New one-click Home Server, now in Labs. Launch your own self-hosted server instance with just 1 click from the Preferences window. ([#2345](https://github.com/standardnotes/app/issues/2345)) ([0552878](https://github.com/standardnotes/app/commit/05528782a4e9684dbd86fd12b77eb86727d6c414))",
|
||||
"parsed": {
|
||||
"_": [
|
||||
"New one-click Home Server, now in Labs. Launch your own self-hosted server instance with just 1 click from the Preferences window. (#2345) (0552878)"
|
||||
],
|
||||
"Features": [
|
||||
"New one-click Home Server, now in Labs. Launch your own self-hosted server instance with just 1 click from the Preferences window. (#2345) (0552878)"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.164.3",
|
||||
"title": "[3.164.3](https://github.com/standardnotes/app/compare/@standardnotes/web@3.164.2...@standardnotes/web@3.164.3) (2023-07-04)",
|
||||
|
||||
@@ -4,6 +4,7 @@ import { WebApplicationInterface } from '@standardnotes/ui-services'
|
||||
export class DevMode {
|
||||
constructor(private application: WebApplicationInterface) {
|
||||
InternalFeatureService.get().enableFeature(InternalFeature.Vaults)
|
||||
InternalFeatureService.get().enableFeature(InternalFeature.HomeServer)
|
||||
}
|
||||
|
||||
/** Valid only when running a mock event publisher on port 3124 */
|
||||
|
||||
@@ -176,6 +176,11 @@ export class DesktopManager
|
||||
}
|
||||
}
|
||||
|
||||
consoleLog(message: string): void {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(message)
|
||||
}
|
||||
|
||||
async onComponentInstallationComplete(componentData: DecryptedTransferPayload<ComponentContent>) {
|
||||
const component = this.application.items.findItem(componentData.uuid)
|
||||
if (!component) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { PackageProvider } from './Panes/General/Advanced/Packages/Provider/Pack
|
||||
import { securityPrefsHasBubble } from './Panes/Security/securityPrefsHasBubble'
|
||||
import { PreferenceId } from '@standardnotes/ui-services'
|
||||
import { isDesktopApplication } from '@/Utils'
|
||||
import { featureTrunkVaultsEnabled } from '@/FeatureTrunk'
|
||||
import { featureTrunkHomeServerEnabled, featureTrunkVaultsEnabled } from '@/FeatureTrunk'
|
||||
|
||||
interface PreferencesMenuItem {
|
||||
readonly id: PreferenceId
|
||||
@@ -47,9 +47,7 @@ const READY_PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = [
|
||||
{ id: 'help-feedback', label: 'Help & feedback', icon: 'help', order: 11 },
|
||||
]
|
||||
|
||||
const DESKTOP_PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = [
|
||||
{ id: 'home-server', label: 'Home Server', icon: 'server', order: 5 },
|
||||
]
|
||||
const DESKTOP_PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = []
|
||||
|
||||
export class PreferencesMenu {
|
||||
private _selectedPane: PreferenceId = 'account'
|
||||
@@ -62,6 +60,10 @@ export class PreferencesMenu {
|
||||
READY_PREFERENCES_MENU_ITEMS.splice(3, 0, { id: 'vaults', label: 'Vaults', icon: 'safe-square', order: 5 })
|
||||
}
|
||||
|
||||
if (featureTrunkHomeServerEnabled()) {
|
||||
DESKTOP_PREFERENCES_MENU_ITEMS.push({ id: 'home-server', label: 'Home Server', icon: 'server', order: 5 })
|
||||
}
|
||||
|
||||
let menuItems = this._enableUnfinishedFeatures ? PREFERENCES_MENU_ITEMS : READY_PREFERENCES_MENU_ITEMS
|
||||
|
||||
if (isDesktopApplication()) {
|
||||
|
||||
@@ -11,3 +11,7 @@ export function featureTrunkEnabled(trunk: FeatureTrunkName): boolean {
|
||||
export function featureTrunkVaultsEnabled(): boolean {
|
||||
return InternalFeatureService.get().isFeatureEnabled(InternalFeature.Vaults)
|
||||
}
|
||||
|
||||
export function featureTrunkHomeServerEnabled(): boolean {
|
||||
return InternalFeatureService.get().isFeatureEnabled(InternalFeature.HomeServer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user