feat: expose application name via Appearance API (#9886)

This commit is contained in:
Marcin Tojek
2023-09-27 17:02:18 +02:00
committed by GitHub
parent 68738771b9
commit cb5f8df4c2
18 changed files with 212 additions and 21 deletions
+1
View File
@@ -1088,6 +1088,7 @@ export const getAppearance = async (): Promise<TypesGen.AppearanceConfig> => {
} catch (ex) {
if (axios.isAxiosError(ex) && ex.response?.status === 404) {
return {
application_name: "",
logo_url: "",
service_banner: {
enabled: false,
+2
View File
@@ -46,6 +46,7 @@ export interface AppHostResponse {
// From codersdk/deployment.go
export interface AppearanceConfig {
readonly application_name: string;
readonly logo_url: string;
readonly service_banner: ServiceBannerConfig;
readonly support_links?: LinkConfig[];
@@ -1091,6 +1092,7 @@ export interface UpdateActiveTemplateVersion {
// From codersdk/deployment.go
export interface UpdateAppearanceConfig {
readonly application_name: string;
readonly logo_url: string;
readonly service_banner: ServiceBannerConfig;
}
@@ -6,6 +6,7 @@ const meta: Meta<typeof AppearanceSettingsPageView> = {
component: AppearanceSettingsPageView,
args: {
appearance: {
application_name: "",
logo_url: "https://github.com/coder.png",
service_banner: {
enabled: true,
+1
View File
@@ -2152,6 +2152,7 @@ export const MockDeploymentConfig: DeploymentConfig = {
};
export const MockAppearanceConfig: TypesGen.AppearanceConfig = {
application_name: "",
logo_url: "",
service_banner: {
enabled: false,