1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

feat(web): onboarding (#6066)

* feat(web): onboarding

* feat: openapi

* feat: modulization

* feat: page advancing

* Animation

* Add storage templaete settings

* sql

* more style

* Theme

* information and styling

* hide/show table

* Styling

* Update user property

* fix test

* fix test:

* fix e2e

* test

* Update web/src/lib/components/onboarding-page/onboarding-hello.svelte

Co-authored-by: bo0tzz <git@bo0tzz.me>

* naming

* use System Metadata

* better return type

* onboarding using server metadata

* revert previous changes in user entity

* sql

* test web

* fix test server

* server/web test

* more test

* consolidate color theme change logic

* consolidate save button to storage template

* merge main

* fix web

---------

Co-authored-by: bo0tzz <git@bo0tzz.me>
This commit is contained in:
Alex
2024-01-03 23:28:32 -06:00
committed by GitHub
parent f8d64be13c
commit 18f59f78e3
35 changed files with 698 additions and 111 deletions

View File

@@ -343,4 +343,37 @@ class ServerInfoApi {
}
return null;
}
/// Performs an HTTP 'POST /server-info/admin-onboarding' operation and returns the [Response].
Future<Response> setAdminOnboardingWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/server-info/admin-onboarding';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<void> setAdminOnboarding() async {
final response = await setAdminOnboardingWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
}

View File

@@ -15,6 +15,7 @@ class ServerConfigDto {
ServerConfigDto({
required this.externalDomain,
required this.isInitialized,
required this.isOnboarded,
required this.loginPageMessage,
required this.oauthButtonText,
required this.trashDays,
@@ -24,6 +25,8 @@ class ServerConfigDto {
bool isInitialized;
bool isOnboarded;
String loginPageMessage;
String oauthButtonText;
@@ -34,6 +37,7 @@ class ServerConfigDto {
bool operator ==(Object other) => identical(this, other) || other is ServerConfigDto &&
other.externalDomain == externalDomain &&
other.isInitialized == isInitialized &&
other.isOnboarded == isOnboarded &&
other.loginPageMessage == loginPageMessage &&
other.oauthButtonText == oauthButtonText &&
other.trashDays == trashDays;
@@ -43,17 +47,19 @@ class ServerConfigDto {
// ignore: unnecessary_parenthesis
(externalDomain.hashCode) +
(isInitialized.hashCode) +
(isOnboarded.hashCode) +
(loginPageMessage.hashCode) +
(oauthButtonText.hashCode) +
(trashDays.hashCode);
@override
String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, loginPageMessage=$loginPageMessage, oauthButtonText=$oauthButtonText, trashDays=$trashDays]';
String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, oauthButtonText=$oauthButtonText, trashDays=$trashDays]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'externalDomain'] = this.externalDomain;
json[r'isInitialized'] = this.isInitialized;
json[r'isOnboarded'] = this.isOnboarded;
json[r'loginPageMessage'] = this.loginPageMessage;
json[r'oauthButtonText'] = this.oauthButtonText;
json[r'trashDays'] = this.trashDays;
@@ -70,6 +76,7 @@ class ServerConfigDto {
return ServerConfigDto(
externalDomain: mapValueOfType<String>(json, r'externalDomain')!,
isInitialized: mapValueOfType<bool>(json, r'isInitialized')!,
isOnboarded: mapValueOfType<bool>(json, r'isOnboarded')!,
loginPageMessage: mapValueOfType<String>(json, r'loginPageMessage')!,
oauthButtonText: mapValueOfType<String>(json, r'oauthButtonText')!,
trashDays: mapValueOfType<int>(json, r'trashDays')!,
@@ -122,6 +129,7 @@ class ServerConfigDto {
static const requiredKeys = <String>{
'externalDomain',
'isInitialized',
'isOnboarded',
'loginPageMessage',
'oauthButtonText',
'trashDays',