-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Philip Miglinci <pmig@glasskube.com> Signed-off-by: christophenne <christoph.enne@glasskube.eu> Co-authored-by: christophenne <christoph.enne@glasskube.eu> Co-authored-by: Jakob Steiner <kosmoz@users.noreply.github.com>
- Loading branch information
1 parent
e43d3a3
commit 489217f
Showing
23 changed files
with
1,982 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
frontend/cloud-ui/src/app/components/home/home.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="p-4 sm:ml-64 bg-gray-50 dark:bg-gray-900"> | ||
<div class="p-4 text-gray-900 dark:text-white"> | ||
@if (brandingDescription$ | async; as description) { | ||
<div [innerHTML]="description | markdown | async"></div> | ||
} @else { | ||
<div class="text-gray-500 dark:text-gray-400 italic"> | ||
Homepage not yet configured by vendor in branding settings | ||
</div> | ||
} | ||
</div> | ||
</div> |
17 changes: 17 additions & 0 deletions
17
frontend/cloud-ui/src/app/components/home/home.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {AsyncPipe} from '@angular/common'; | ||
import {Component, inject} from '@angular/core'; | ||
import {map, Observable} from 'rxjs'; | ||
import {OrganizationBrandingService} from '../../services/organization-branding.service'; | ||
import {MarkdownPipe} from 'ngx-markdown'; | ||
|
||
@Component({ | ||
selector: 'app-home', | ||
imports: [AsyncPipe, MarkdownPipe], | ||
templateUrl: './home.component.html', | ||
}) | ||
export class HomeComponent { | ||
private readonly organizationBranding = inject(OrganizationBrandingService); | ||
readonly brandingDescription$: Observable<string | undefined> = this.organizationBranding | ||
.get() | ||
.pipe(map((b) => b.description)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
frontend/cloud-ui/src/app/organization-branding/organization-branding.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<section class="bg-gray-50 dark:bg-gray-900 p-3 sm:p-5 antialiased sm:ml-64"> | ||
<div class="mx-auto max-w-screen-md px-4 lg:px-12"> | ||
<h1 class="mb-4 text-3xl font-extrabold leading-none tracking-tight text-gray-900 md:text-4xl dark:text-white"> | ||
Branding | ||
</h1> | ||
<p class="text-gray-500 dark:text-gray-400"> | ||
Customize your organization's branding by uploading a logo and setting a title and description for your | ||
organization. Your customers will see this information when they access their customer Portal. | ||
</p> | ||
|
||
<form [formGroup]="form" (ngSubmit)="save()"> | ||
<div class="grid gap-4 mb-4 sm:mb-6 mt-6"> | ||
<div class="space-y-4"> | ||
<h2 class="text-xl font-bold dark:text-white">Portal Header</h2> | ||
<div> | ||
<label class="block mb-2 text-sm font-medium text-gray-900 dark:text-white" for="file_input"> | ||
Company Logo | ||
</label> | ||
<div> | ||
@if (logoSrc | async; as logo) { | ||
<img class="h-8 mb-4" [src]="logo" alt="Logo" /> | ||
<button | ||
type="button" | ||
(click)="deleteLogo()" | ||
class="px-3 py-2 text-xs font-medium text-gray-900 bg-white border border-gray-200 rounded-lg focus:outline-none hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"> | ||
Delete | ||
</button> | ||
} @else { | ||
<input | ||
accept="image/svg+xml,image/png,image/jpeg,image/gif" | ||
(change)="onLogoChange($event)" | ||
class="w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400" | ||
aria-describedby="file_input_help" | ||
id="file_input" | ||
type="file" /> | ||
} | ||
</div> | ||
|
||
<p class="mt-1 mb-3 text-xs font-normal text-gray-500 dark:text-gray-400" id="file_input_help"> | ||
SVG, PNG, JPG or GIF (recommended height 32px). If not set, the Glasskube Logo will be shown. | ||
</p> | ||
<div class="flex items-center space-x-2.5"></div> | ||
</div> | ||
|
||
<div> | ||
<label for="title" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Title</label> | ||
<input | ||
formControlName="title" | ||
type="text" | ||
name="title" | ||
id="title" | ||
class="bg-gray-50 border border-gray-300 text-sm text-gray-900 rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" | ||
placeholder="Customer Portal" /> | ||
<p class="mt-1 mb-3 text-xs font-normal text-gray-500 dark:text-gray-400"> | ||
The title will be shown in the header next to the logo. | ||
</p> | ||
</div> | ||
|
||
<h2 class="text-xl font-bold dark:text-white mt-8">Welcome Page</h2> | ||
|
||
<div> | ||
<label for="description" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white" | ||
>Markdown Description</label | ||
> | ||
<div | ||
class="mb-4 w-full bg-gray-100 rounded-lg border border-gray-200 dark:bg-gray-600 dark:border-gray-600"> | ||
<div class="py-2 px-4 bg-gray-50 rounded-b-lg dark:bg-gray-700"> | ||
<textarea | ||
formControlName="description" | ||
id="description" | ||
rows="8" | ||
class="block px-0 w-full text-sm text-gray-800 bg-gray-50 border-0 dark:bg-gray-700 focus:ring-0 dark:text-white dark:placeholder-gray-400" | ||
placeholder="# Welcome"></textarea> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="mt-8 flex justify-center w-full pb-4 space-x-4 sm:mt-0"> | ||
<button | ||
type="submit" | ||
class="text-white w-full inline-flex items-center justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"> | ||
<fa-icon [icon]="faFloppyDisk" size="lg" class="h-4 w-4 mr-2 -ml-0.5 mb-1"></fa-icon> | ||
Save | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</section> |
Oops, something went wrong.