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