Files
spacesopsandCursor 073344d4d1
Build Service / BuildPackage (push) Canceled after 0s
0.3.0:1
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>
2026-08-24 03:34:34 -04:00

59 lines
1.4 KiB
TypeScript

import { storeJson } from '../fileModels/storeJson'
import { actionGroups } from '../actionGroups'
import { i18n } from '../i18n'
import { sdk } from '../sdk'
import { APP_USER } from '../utils'
export const showCredentials = sdk.Action.withoutInput(
// id
'show-credentials',
// metadata
async ({ effects }) => ({
name: i18n('Show Space-CLI Web UI Credentials'),
description: i18n(
'Display the username and password for the Spaces web terminal',
),
warning: null,
allowedStatuses: 'any',
group: actionGroups.spaceCli,
visibility: 'hidden',
}),
// run
async ({ effects }) => {
const password = await storeJson.read((s) => s.password).once()
return {
version: '1',
title: i18n('Show Space-CLI Web UI Credentials'),
message: i18n(
'Use these credentials to log in to the Spaces web terminal.',
),
result: {
type: 'group',
value: [
{
type: 'single',
name: i18n('Username'),
description: null,
value: APP_USER,
masked: false,
copyable: true,
qr: false,
},
{
type: 'single',
name: i18n('Password'),
description: null,
value: password ?? '',
masked: true,
copyable: true,
qr: false,
},
],
},
}
},
)