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

This commit is contained in:
Mo
2023-07-03 08:30:48 -05:00
committed by GitHub
parent d79e7b14b1
commit 96f42643a9
367 changed files with 5895 additions and 570 deletions

View File

@@ -4,6 +4,7 @@ import { ChallengeInterface } from './ChallengeInterface'
import { ChallengePrompt } from './Prompt/ChallengePrompt'
import { ChallengeReason } from './Types/ChallengeReason'
import { ChallengeValidation } from './Types/ChallengeValidation'
import { ChallengeValue } from './Types/ChallengeValue'
/**
* A challenge is a stateless description of what the client needs to provide
@@ -11,6 +12,7 @@ import { ChallengeValidation } from './Types/ChallengeValidation'
*/
export class Challenge implements ChallengeInterface {
public readonly id = Math.random()
customHandler?: (challenge: ChallengeInterface, values: ChallengeValue[]) => Promise<void>
constructor(
public readonly prompts: ChallengePrompt[],
@@ -18,9 +20,7 @@ export class Challenge implements ChallengeInterface {
public readonly cancelable: boolean,
public readonly _heading?: string,
public readonly _subheading?: string,
) {
Object.freeze(this)
}
) {}
/** Outside of the modal, this is the title of the modal itself */
get modalTitle(): string {

View File

@@ -1,6 +1,7 @@
import { ChallengePromptInterface } from './Prompt/ChallengePromptInterface'
import { ChallengeReason } from './Types/ChallengeReason'
import { ChallengeValidation } from './Types/ChallengeValidation'
import { ChallengeValue } from './Types/ChallengeValue'
export interface ChallengeInterface {
readonly id: number
@@ -8,6 +9,8 @@ export interface ChallengeInterface {
readonly reason: ChallengeReason
readonly cancelable: boolean
customHandler?: (challenge: ChallengeInterface, values: ChallengeValue[]) => Promise<void>
/** Outside of the modal, this is the title of the modal itself */
get modalTitle(): string