Add support chat (#1066)

* Add support chat

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor the chat logic

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add HMAC signing

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Update the button styles

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Update the button styles

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Refactor the chat logic

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix the chat not loading

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix the chat not loading

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Add requested changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
gitstart-twenty
2023-08-05 07:52:59 +08:00
committed by GitHub
parent 5e6351e099
commit 57c465176a
17 changed files with 239 additions and 11 deletions

View File

@ -21,6 +21,15 @@ class Telemetry {
anonymizationEnabled: boolean;
}
@ObjectType()
class SupportChat {
@Field(() => String)
supportDriver: string;
@Field(() => String, { nullable: true })
supportFrontendKey: string | null;
}
@ObjectType()
export class ClientConfig {
@Field(() => AuthProviders, { nullable: false })
@ -34,4 +43,7 @@ export class ClientConfig {
@Field(() => Boolean)
debugMode: boolean;
@Field(() => SupportChat)
supportChat: SupportChat;
}

View File

@ -23,6 +23,10 @@ export class ClientConfigResolver {
},
signInPrefilled: this.environmentService.isSignInPrefilled(),
debugMode: this.environmentService.isDebugMode(),
supportChat: {
supportDriver: this.environmentService.getSupportDriver(),
supportFrontendKey: this.environmentService.getSupportFrontendKey(),
},
};
return Promise.resolve(clientConfig);