wip, waiting for backend endpoint
This commit is contained in:
parent
b70a06cc5f
commit
b7df19b790
@ -21,7 +21,37 @@
|
|||||||
|
|
||||||
<div class="red-content-inner">
|
<div class="red-content-inner">
|
||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<div class="dialog">
|
<div class="dialog mb-8">
|
||||||
|
<div class="dialog-header">
|
||||||
|
<div class="heading-l" translate="smtp-config-screen.general.title"></div>
|
||||||
|
<div translate="smtp-config-screen.general.subtitle"></div>
|
||||||
|
</div>
|
||||||
|
<div class="dialog-content">
|
||||||
|
<div class="inline-input-group flex-align-items-center">
|
||||||
|
<mat-slide-toggle
|
||||||
|
[(ngModel)]="showForgotPassword"
|
||||||
|
color="primary"
|
||||||
|
></mat-slide-toggle>
|
||||||
|
<span
|
||||||
|
translate="smtp-config-screen.general.form.forgot-password"
|
||||||
|
class="ml-8"
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dialog-actions">
|
||||||
|
<button
|
||||||
|
[disabled]="!generalConfigChanged"
|
||||||
|
(click)="saveGeneralConfig()"
|
||||||
|
color="primary"
|
||||||
|
mat-flat-button
|
||||||
|
type="submit"
|
||||||
|
>
|
||||||
|
{{ 'smtp-config-screen.actions.save' | translate }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dialog mt-16">
|
||||||
<div class="dialog-header">
|
<div class="dialog-header">
|
||||||
<div class="heading-l" translate="smtp-config-screen.title"></div>
|
<div class="heading-l" translate="smtp-config-screen.title"></div>
|
||||||
<div translate="smtp-config-screen.subtitle"></div>
|
<div translate="smtp-config-screen.subtitle"></div>
|
||||||
|
|||||||
@ -4,7 +4,25 @@
|
|||||||
.content-container {
|
.content-container {
|
||||||
background-color: $grey-2;
|
background-color: $grey-2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
@include scroll-bar;
|
@include scroll-bar;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-100 {
|
||||||
|
min-width: 100px;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-input-group {
|
||||||
|
background-color: rgba($grey-6, 0.8);
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 1px 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
export class SmtpConfigScreenComponent implements OnInit {
|
export class SmtpConfigScreenComponent implements OnInit {
|
||||||
viewReady = false;
|
viewReady = false;
|
||||||
configForm: FormGroup;
|
configForm: FormGroup;
|
||||||
|
showForgotPassword = false;
|
||||||
|
|
||||||
private _initialValue: SMTPConfigurationModel;
|
private _initialValue: SMTPConfigurationModel;
|
||||||
|
|
||||||
@ -59,6 +60,10 @@ export class SmtpConfigScreenComponent implements OnInit {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get generalConfigChanged(): boolean {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
await this._loadData();
|
await this._loadData();
|
||||||
}
|
}
|
||||||
@ -72,6 +77,12 @@ export class SmtpConfigScreenComponent implements OnInit {
|
|||||||
this.viewReady = true;
|
this.viewReady = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async saveGeneralConfig() {
|
||||||
|
this.viewReady = false;
|
||||||
|
console.log('Saving general configuration...');
|
||||||
|
this.viewReady = true;
|
||||||
|
}
|
||||||
|
|
||||||
openAuthConfigDialog(skipDisableOnCancel?: boolean) {
|
openAuthConfigDialog(skipDisableOnCancel?: boolean) {
|
||||||
this._dialogService.openSMTPAuthConfigDialog(this.configForm.getRawValue(), authConfig => {
|
this._dialogService.openSMTPAuthConfigDialog(this.configForm.getRawValue(), authConfig => {
|
||||||
if (authConfig) {
|
if (authConfig) {
|
||||||
|
|||||||
@ -68,10 +68,6 @@
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-8 {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ml-2 {
|
.ml-2 {
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1088,6 +1088,13 @@
|
|||||||
},
|
},
|
||||||
"configurations": "Configurations",
|
"configurations": "Configurations",
|
||||||
"smtp-config-screen": {
|
"smtp-config-screen": {
|
||||||
|
"general": {
|
||||||
|
"title": "General Configurations",
|
||||||
|
"subtitle": "",
|
||||||
|
"form": {
|
||||||
|
"forgot-password": "Show Forgot password link on Login screen"
|
||||||
|
}
|
||||||
|
},
|
||||||
"title": "Configure SMTP Account",
|
"title": "Configure SMTP Account",
|
||||||
"subtitle": "SMTP (Simple Mail Transfer Protocol) enables you to send your emails through the specified server settings.",
|
"subtitle": "SMTP (Simple Mail Transfer Protocol) enables you to send your emails through the specified server settings.",
|
||||||
"actions": {
|
"actions": {
|
||||||
|
|||||||
@ -234,7 +234,7 @@ section.settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mt-16 {
|
.mt-16 {
|
||||||
margin-top: 16px;
|
margin-top: 16px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mt-20 {
|
.mt-20 {
|
||||||
@ -253,6 +253,10 @@ section.settings {
|
|||||||
margin-bottom: 8px !important;
|
margin-bottom: 8px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ml-8 {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.ml-14 {
|
.ml-14 {
|
||||||
margin-left: 14px;
|
margin-left: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user