mirror of
https://github.com/immich-app/immich.git
synced 2024-11-28 09:33:27 +02:00
feat(server)!: move welcome message to settings (#6157)
* feat(server): move welcome message to settings * chore: open api
This commit is contained in:
parent
52e92e9bb4
commit
f8d64be13c
6
cli/src/api/open-api/api.ts
generated
6
cli/src/api/open-api/api.ts
generated
@ -4038,6 +4038,12 @@ export interface SystemConfigServerDto {
|
||||
* @memberof SystemConfigServerDto
|
||||
*/
|
||||
'externalDomain': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SystemConfigServerDto
|
||||
*/
|
||||
'loginPageMessage': string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
@ -30,15 +30,14 @@ These environment variables are used by the `docker-compose.yml` file and do **N
|
||||
|
||||
## General
|
||||
|
||||
| Variable | Description | Default | Services |
|
||||
| :-------------------------- | :------------------------------------------- | :-----------------: | :------------------------------------------- |
|
||||
| `TZ` | Timezone | | microservices |
|
||||
| `NODE_ENV` | Environment (production, development) | `production` | server, microservices, machine learning, web |
|
||||
| `LOG_LEVEL` | Log Level (verbose, debug, log, warn, error) | `log` | server, microservices |
|
||||
| `IMMICH_MEDIA_LOCATION` | Media Location | `./upload` | server, microservices |
|
||||
| `PUBLIC_LOGIN_PAGE_MESSAGE` | Public Login Page Message | | web |
|
||||
| `IMMICH_CONFIG_FILE` | Path to config file | | server |
|
||||
| `IMMICH_WEB_ROOT` | Path of root index.html | `/usr/src/app/www'` | server |
|
||||
| Variable | Description | Default | Services |
|
||||
| :---------------------- | :------------------------------------------- | :-----------------: | :------------------------------------------- |
|
||||
| `TZ` | Timezone | | microservices |
|
||||
| `NODE_ENV` | Environment (production, development) | `production` | server, microservices, machine learning, web |
|
||||
| `LOG_LEVEL` | Log Level (verbose, debug, log, warn, error) | `log` | server, microservices |
|
||||
| `IMMICH_MEDIA_LOCATION` | Media Location | `./upload` | server, microservices |
|
||||
| `IMMICH_CONFIG_FILE` | Path to config file | | server |
|
||||
| `IMMICH_WEB_ROOT` | Path of root index.html | `/usr/src/app/www'` | server |
|
||||
|
||||
:::tip
|
||||
|
||||
|
BIN
mobile/openapi/doc/SystemConfigServerDto.md
generated
BIN
mobile/openapi/doc/SystemConfigServerDto.md
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/system_config_server_dto.dart
generated
BIN
mobile/openapi/lib/model/system_config_server_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/test/system_config_server_dto_test.dart
generated
BIN
mobile/openapi/test/system_config_server_dto_test.dart
generated
Binary file not shown.
@ -9371,10 +9371,14 @@
|
||||
"properties": {
|
||||
"externalDomain": {
|
||||
"type": "string"
|
||||
},
|
||||
"loginPageMessage": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"externalDomain"
|
||||
"externalDomain",
|
||||
"loginPageMessage"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
|
@ -78,14 +78,10 @@ export class ServerInfoService {
|
||||
|
||||
async getConfig(): Promise<ServerConfigDto> {
|
||||
const config = await this.configCore.getConfig();
|
||||
|
||||
// TODO move to system config
|
||||
const loginPageMessage = process.env.PUBLIC_LOGIN_PAGE_MESSAGE || '';
|
||||
|
||||
const isInitialized = await this.userRepository.hasAdmin();
|
||||
|
||||
return {
|
||||
loginPageMessage,
|
||||
loginPageMessage: config.server.loginPageMessage,
|
||||
trashDays: config.trash.days,
|
||||
oauthButtonText: config.oauth.buttonText,
|
||||
isInitialized,
|
||||
|
@ -3,4 +3,7 @@ import { IsString } from 'class-validator';
|
||||
export class SystemConfigServerDto {
|
||||
@IsString()
|
||||
externalDomain!: string;
|
||||
|
||||
@IsString()
|
||||
loginPageMessage!: string;
|
||||
}
|
||||
|
@ -129,6 +129,7 @@ export const defaults = Object.freeze<SystemConfig>({
|
||||
},
|
||||
server: {
|
||||
externalDomain: '',
|
||||
loginPageMessage: '',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -102,6 +102,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
|
||||
},
|
||||
server: {
|
||||
externalDomain: '',
|
||||
loginPageMessage: '',
|
||||
},
|
||||
storageTemplate: {
|
||||
enabled: false,
|
||||
|
@ -85,6 +85,7 @@ export enum SystemConfigKey {
|
||||
PASSWORD_LOGIN_ENABLED = 'passwordLogin.enabled',
|
||||
|
||||
SERVER_EXTERNAL_DOMAIN = 'server.externalDomain',
|
||||
SERVER_LOGIN_PAGE_MESSAGE = 'server.loginPageMessage',
|
||||
|
||||
STORAGE_TEMPLATE_ENABLED = 'storageTemplate.enabled',
|
||||
STORAGE_TEMPLATE_HASH_VERIFICATION_ENABLED = 'storageTemplate.hashVerificationEnabled',
|
||||
@ -248,5 +249,6 @@ export interface SystemConfig {
|
||||
};
|
||||
server: {
|
||||
externalDomain: string;
|
||||
loginPageMessage: string;
|
||||
};
|
||||
}
|
||||
|
6
web/src/api/open-api/api.ts
generated
6
web/src/api/open-api/api.ts
generated
@ -4038,6 +4038,12 @@ export interface SystemConfigServerDto {
|
||||
* @memberof SystemConfigServerDto
|
||||
*/
|
||||
'externalDomain': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SystemConfigServerDto
|
||||
*/
|
||||
'loginPageMessage': string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
@ -92,6 +92,15 @@
|
||||
bind:value={serverConfig.externalDomain}
|
||||
isEdited={serverConfig.externalDomain !== savedConfig.externalDomain}
|
||||
/>
|
||||
|
||||
<SettingInputField
|
||||
inputType={SettingInputFieldType.TEXT}
|
||||
label="WELCOME MESSAGE"
|
||||
desc="A message that is displayed on the login page."
|
||||
bind:value={serverConfig.loginPageMessage}
|
||||
isEdited={serverConfig.loginPageMessage !== savedConfig.loginPageMessage}
|
||||
/>
|
||||
|
||||
<div class="ml-4">
|
||||
<SettingButtonsRow
|
||||
on:reset={({ detail }) => handleReset(detail)}
|
||||
|
Loading…
Reference in New Issue
Block a user