Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jira): improve mobile experience for config stepper
- Loading branch information
1 parent
58ceab8
commit 639cbfd
Showing
2 changed files
with
114 additions
and
102 deletions.
There are no files selected for viewing
210 changes: 108 additions & 102 deletions
210
src/app/issue/jira/jira-cfg-stepper/jira-cfg-stepper.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 |
---|---|---|
@@ -1,113 +1,119 @@ | ||
<!--<pre><code>{{jiraCfg|json}}</code></pre>--> | ||
|
||
<mat-horizontal-stepper [linear]="true" | ||
dynamicHeight | ||
#stepper> | ||
<mat-step [stepControl]="credentialsFormGroup"> | ||
<form [formGroup]="credentialsFormGroup" | ||
(submit)="saveStepForm(jiraCfg)"> | ||
<ng-template matStepLabel>Credentials</ng-template> | ||
<div class="wrapper"> | ||
<mat-horizontal-stepper [linear]="true" | ||
dynamicHeight | ||
#stepper> | ||
<mat-step [stepControl]="credentialsFormGroup"> | ||
<form [formGroup]="credentialsFormGroup" | ||
(submit)="saveStepForm(jiraCfg)"> | ||
<ng-template matStepLabel>Credentials</ng-template> | ||
|
||
<p class="isHideWhenJiraSupport">Please | ||
<a href="https://chrome.google.com/webstore/detail/super-productivity/ljkbjodfmekklcoibdnhahlaalhihmlb"> | ||
download the chrome extension</a> in order to allow communication with the Jira Api. Note that this doesn't work for mobile. | ||
</p> | ||
|
||
<formly-form [model]="jiraCfg" | ||
[fields]="credentialsFormConfig" | ||
[form]="credentialsFormGroup"> | ||
<formly-form [model]="jiraCfg" | ||
[fields]="credentialsFormConfig" | ||
[form]="credentialsFormGroup"> | ||
|
||
<div class="welcome" | ||
[@expand] | ||
*ngIf="user"> | ||
<img [src]="user.avatarUrls['48x48']" | ||
class="user-avatar" | ||
alt="User Avatar"> | ||
<div class="welcome-txt">Login successful!<br>Welcome {{user.displayName}}!</div> | ||
</div> | ||
<div class="welcome" | ||
[@expand] | ||
*ngIf="user"> | ||
<img [src]="user.avatarUrls['48x48']" | ||
class="user-avatar" | ||
alt="User Avatar"> | ||
<div class="welcome-txt">Login successful!<br>Welcome {{user.displayName}}!</div> | ||
</div> | ||
|
||
<div class="center-wrapper"> | ||
<button mat-raised-button | ||
(click)="testCredentials()" | ||
[disabled]="!credentialsFormGroup.valid"> | ||
<mat-icon *ngIf="!isTestCredentialsSuccess">import_export</mat-icon> | ||
<mat-icon *ngIf="isTestCredentialsSuccess">checkmark</mat-icon> | ||
Test Credentials | ||
</button> | ||
<button mat-raised-button | ||
type="submit" | ||
color="primary" | ||
matStepperNext | ||
[disabled]="!credentialsFormGroup.valid"> | ||
Next | ||
<mat-icon>arrow_forward</mat-icon> | ||
</button> | ||
</div> | ||
</formly-form> | ||
<div class="center-wrapper"> | ||
<button mat-raised-button | ||
(click)="testCredentials()" | ||
[disabled]="!credentialsFormGroup.valid"> | ||
<mat-icon *ngIf="!isTestCredentialsSuccess">import_export</mat-icon> | ||
<mat-icon *ngIf="isTestCredentialsSuccess">checkmark</mat-icon> | ||
Test Credentials | ||
</button> | ||
<button mat-raised-button | ||
type="submit" | ||
color="primary" | ||
matStepperNext | ||
[disabled]="!credentialsFormGroup.valid"> | ||
Next | ||
<mat-icon>arrow_forward</mat-icon> | ||
</button> | ||
</div> | ||
</formly-form> | ||
|
||
</form> | ||
</mat-step> | ||
</form> | ||
</mat-step> | ||
|
||
|
||
<mat-step [stepControl]="advancedSettingsFormGroup"> | ||
<form [formGroup]="advancedSettingsFormGroup" | ||
(submit)="saveStepForm(jiraCfg)"> | ||
<ng-template matStepLabel>Advanced</ng-template> | ||
<formly-form [model]="jiraCfg" | ||
[fields]="advancedSettingsFormConfig" | ||
[form]="advancedSettingsFormGroup"> | ||
<mat-step [stepControl]="advancedSettingsFormGroup"> | ||
<form [formGroup]="advancedSettingsFormGroup" | ||
(submit)="saveStepForm(jiraCfg)"> | ||
<ng-template matStepLabel>Advanced</ng-template> | ||
<formly-form [model]="jiraCfg" | ||
[fields]="advancedSettingsFormConfig" | ||
[form]="advancedSettingsFormGroup"> | ||
|
||
<div class="center-wrapper"> | ||
<button mat-raised-button="" | ||
matStepperPrevious> | ||
<mat-icon>arrow_backward</mat-icon> | ||
Back | ||
</button> | ||
<button mat-raised-button | ||
type="submit" | ||
[disabled]="!advancedSettingsFormGroup.valid" | ||
color="primary" | ||
matStepperNext> | ||
<mat-icon>arrow_forward</mat-icon> | ||
Next | ||
</button> | ||
</div> | ||
</formly-form> | ||
</form> | ||
</mat-step> | ||
<div class="center-wrapper"> | ||
<button mat-raised-button="" | ||
matStepperPrevious> | ||
<mat-icon>arrow_backward</mat-icon> | ||
Back | ||
</button> | ||
<button mat-raised-button | ||
type="submit" | ||
[disabled]="!advancedSettingsFormGroup.valid" | ||
color="primary" | ||
matStepperNext> | ||
<mat-icon>arrow_forward</mat-icon> | ||
Next | ||
</button> | ||
</div> | ||
</formly-form> | ||
</form> | ||
</mat-step> | ||
|
||
<!--<mat-step [stepControl]="thirdFormGroup">--> | ||
<!--<form [formGroup]="thirdFormGroup">--> | ||
<!--<ng-template matStepLabel>Advanced</ng-template>--> | ||
<!--<mat-form-field>--> | ||
<!--<!–<input matInput–>--> | ||
<!--<!–placeholder="Address"–>--> | ||
<!--<!–formControlName="secondCtrl"–>--> | ||
<!--<!–required>–>--> | ||
<!--</mat-form-field>--> | ||
<!--<div class="center-wrapper">--> | ||
<!--<button mat-raised-button=""--> | ||
<!--matStepperPrevious>Back--> | ||
<!--</button>--> | ||
<!--<button mat-raised-button=""--> | ||
<!--matStepperNext>Save--> | ||
<!--</button>--> | ||
<!--</div>--> | ||
<!--</form>--> | ||
<!--</mat-step> | ||
--> | ||
<mat-step> | ||
<ng-template matStepLabel>Done</ng-template> | ||
You are now done. | ||
<div class="center-wrapper"> | ||
<button mat-raised-button="" | ||
matStepperPrevious> | ||
<mat-icon>arrow_backward</mat-icon> | ||
Back | ||
</button> | ||
<button mat-raised-button="" | ||
color="primary" | ||
type="button" | ||
(click)="saveCfg()"> | ||
<mat-icon>save</mat-icon> | ||
Save | ||
</button> | ||
</div> | ||
</mat-step> | ||
</mat-horizontal-stepper> | ||
<!--<mat-step [stepControl]="thirdFormGroup">--> | ||
<!--<form [formGroup]="thirdFormGroup">--> | ||
<!--<ng-template matStepLabel>Advanced</ng-template>--> | ||
<!--<mat-form-field>--> | ||
<!--<!–<input matInput–>--> | ||
<!--<!–placeholder="Address"–>--> | ||
<!--<!–formControlName="secondCtrl"–>--> | ||
<!--<!–required>–>--> | ||
<!--</mat-form-field>--> | ||
<!--<div class="center-wrapper">--> | ||
<!--<button mat-raised-button=""--> | ||
<!--matStepperPrevious>Back--> | ||
<!--</button>--> | ||
<!--<button mat-raised-button=""--> | ||
<!--matStepperNext>Save--> | ||
<!--</button>--> | ||
<!--</div>--> | ||
<!--</form>--> | ||
<!--</mat-step> | ||
--> | ||
<mat-step> | ||
<ng-template matStepLabel>Done</ng-template> | ||
You are now done. | ||
<div class="center-wrapper"> | ||
<button mat-raised-button="" | ||
matStepperPrevious> | ||
<mat-icon>arrow_backward</mat-icon> | ||
Back | ||
</button> | ||
<button mat-raised-button="" | ||
color="primary" | ||
type="button" | ||
(click)="saveCfg()"> | ||
<mat-icon>save</mat-icon> | ||
Save | ||
</button> | ||
</div> | ||
</mat-step> | ||
</mat-horizontal-stepper> | ||
</div> |
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