mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
chore: improve password error message (#6255)
chore: improve error message chore: add password minlength & maxlength i18n chore: check max length fix: i18n variables feat: add CredentialsRequirementType
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
fragment CredentialsRequirement on CredentialsRequirementType {
|
||||
password {
|
||||
...PasswordLimits
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fragment PasswordLimits on PasswordLimitsType {
|
||||
minLength
|
||||
maxLength
|
||||
}
|
||||
@@ -7,6 +7,17 @@ export interface GraphQLQuery {
|
||||
containsFile?: boolean;
|
||||
}
|
||||
|
||||
export const passwordLimitsFragment = `
|
||||
fragment PasswordLimits on PasswordLimitsType {
|
||||
minLength
|
||||
maxLength
|
||||
}`
|
||||
export const credentialsRequirementFragment = `
|
||||
fragment CredentialsRequirement on CredentialsRequirementType {
|
||||
password {
|
||||
...PasswordLimits
|
||||
}
|
||||
}`
|
||||
export const checkBlobSizesQuery = {
|
||||
id: 'checkBlobSizesQuery' as const,
|
||||
operationName: 'checkBlobSizes',
|
||||
@@ -708,8 +719,12 @@ query serverConfig {
|
||||
name
|
||||
features
|
||||
type
|
||||
credentialsRequirement {
|
||||
...CredentialsRequirement
|
||||
}
|
||||
}
|
||||
}`,
|
||||
}${passwordLimitsFragment}
|
||||
${credentialsRequirementFragment}`,
|
||||
};
|
||||
|
||||
export const setWorkspacePublicByIdMutation = {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#import './fragments/password-limits.gql'
|
||||
#import './fragments/credentials-requirement.gql'
|
||||
|
||||
query serverConfig {
|
||||
serverConfig {
|
||||
version
|
||||
@@ -5,5 +8,8 @@ query serverConfig {
|
||||
name
|
||||
features
|
||||
type
|
||||
credentialsRequirement {
|
||||
...CredentialsRequirement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,6 +292,21 @@ export type RemoveEarlyAccessMutation = {
|
||||
removeEarlyAccess: number;
|
||||
};
|
||||
|
||||
export type CredentialsRequirementFragment = {
|
||||
__typename?: 'CredentialsRequirementType';
|
||||
password: {
|
||||
__typename?: 'PasswordLimitsType';
|
||||
minLength: number;
|
||||
maxLength: number;
|
||||
};
|
||||
};
|
||||
|
||||
export type PasswordLimitsFragment = {
|
||||
__typename?: 'PasswordLimitsType';
|
||||
minLength: number;
|
||||
maxLength: number;
|
||||
};
|
||||
|
||||
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never }>;
|
||||
|
||||
export type GetCurrentUserQuery = {
|
||||
@@ -701,6 +716,14 @@ export type ServerConfigQuery = {
|
||||
name: string;
|
||||
features: Array<ServerFeature>;
|
||||
type: ServerDeploymentType;
|
||||
credentialsRequirement: {
|
||||
__typename?: 'CredentialsRequirementType';
|
||||
password: {
|
||||
__typename?: 'PasswordLimitsType';
|
||||
minLength: number;
|
||||
maxLength: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user