Add team preference to use logo for branding (#4285)

* feat: add team preference to use logo for branding

* fix: allow on cloud version too
This commit is contained in:
Apoorv Mishra
2022-10-19 10:01:24 +05:30
committed by GitHub
parent 98f997387c
commit bb21fa725c
11 changed files with 27 additions and 17 deletions

View File

@@ -197,11 +197,6 @@ export class Environment {
@IsOptional()
public DEPLOYMENT = this.toOptionalString(process.env.DEPLOYMENT);
/**
* Custom company logo that displays on the authentication screen.
*/
public TEAM_LOGO = process.env.TEAM_LOGO;
/**
* The default interface language. See translate.getoutline.com for a list of
* available language codes and their percentage translated.

View File

@@ -16,7 +16,6 @@ export default function present(env: Environment): PublicEnv {
ENVIRONMENT: env.ENVIRONMENT,
SENTRY_DSN: env.SENTRY_DSN,
SENTRY_TUNNEL: env.SENTRY_TUNNEL,
TEAM_LOGO: env.TEAM_LOGO,
SLACK_CLIENT_ID: env.SLACK_CLIENT_ID,
SLACK_APP_ID: env.SLACK_APP_ID,
MAXIMUM_IMPORT_SIZE: env.MAXIMUM_IMPORT_SIZE,

View File

@@ -54,6 +54,7 @@ router.post("auth.config", async (ctx) => {
ctx.body = {
data: {
name: team.name,
logo: team.preferences?.publicBranding ? team.avatarUrl : undefined,
providers: filterProviders(team),
},
};
@@ -74,6 +75,7 @@ router.post("auth.config", async (ctx) => {
ctx.body = {
data: {
name: team.name,
logo: team.preferences?.publicBranding ? team.avatarUrl : undefined,
hostname: ctx.request.hostname,
providers: filterProviders(team),
},
@@ -95,6 +97,7 @@ router.post("auth.config", async (ctx) => {
ctx.body = {
data: {
name: team.name,
logo: team.preferences?.publicBranding ? team.avatarUrl : undefined,
hostname: ctx.request.hostname,
providers: filterProviders(team),
},