Build Service / BuildPackage (push) Canceled after 0s
Group Actions and Config by category (Space-CLI, Bitcoin, Spaced, Subspaces, Certrelay, Nacho) and build x86 + arm only. Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { storeJson } from '../fileModels/storeJson'
|
|
import { actionGroups } from '../actionGroups'
|
|
import { i18n } from '../i18n'
|
|
import { sdk } from '../sdk'
|
|
|
|
export const disableSubspaces = sdk.Action.withoutInput(
|
|
// id
|
|
'disable-subspaces',
|
|
|
|
// metadata
|
|
async ({ effects }) => {
|
|
const current = await storeJson.read((s) => s.enableSubspaces).once()
|
|
return {
|
|
name: i18n('Disable Subspaces'),
|
|
description: i18n(
|
|
'Stop the embedded Subspaces service. The compiled binaries and data at /data/subspaces are preserved and will be reused if Subspaces is re-enabled. Service restarts automatically.',
|
|
),
|
|
warning: null,
|
|
allowedStatuses: 'any',
|
|
group: actionGroups.subspaces,
|
|
visibility: current === true ? 'enabled' : 'hidden',
|
|
}
|
|
},
|
|
|
|
// run
|
|
async ({ effects }) => {
|
|
await storeJson.merge(effects, { enableSubspaces: false })
|
|
|
|
return {
|
|
version: '1',
|
|
title: i18n('Success'),
|
|
message: i18n(
|
|
'Subspaces disabled. The service is restarting; the Subspaces Web UI is no longer listening. Run "Enable Subspaces" to turn it back on.',
|
|
),
|
|
result: null,
|
|
}
|
|
},
|
|
)
|