-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create custom progress bar for reasons
- Loading branch information
Showing
9 changed files
with
105 additions
and
45 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
3 changes: 3 additions & 0 deletions
3
wowup-electron/src/app/components/common/progress-bar/progress-bar.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,3 @@ | ||
<div class="progress-background"> | ||
<div class="progress-value" [style.width]="value + '%'"></div> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
wowup-electron/src/app/components/common/progress-bar/progress-bar.component.scss
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,12 @@ | ||
.progress-background { | ||
width: 100%; | ||
height: 0.5rem; | ||
background-color: var(--background-secondary-1); | ||
overflow: hidden; | ||
border-radius: 4px; | ||
|
||
.progress-value { | ||
background-color: var(--background-primary-3); | ||
height: 100%; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
wowup-electron/src/app/components/common/progress-bar/progress-bar.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,11 @@ | ||
import { Component, Input } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "app-progress-bar", | ||
templateUrl: "./progress-bar.component.html", | ||
styleUrls: ["./progress-bar.component.scss"], | ||
}) | ||
export class ProgressBarComponent { | ||
@Input() value: number; | ||
|
||
} |
12 changes: 10 additions & 2 deletions
12
wowup-electron/src/app/components/common/progress-button/progress-button.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,4 +1,12 @@ | ||
<button mat-flat-button color="primary" class="progress-button" (click)="onClickButton($event)" [disabled]="disable"> | ||
<mat-progress-bar class="progress-bar" color="secondary" [value]="value" *ngIf="showProgress"></mat-progress-bar> | ||
<button | ||
class="progress-button" | ||
[ngClass]="{ 'show-progress': showProgress }" | ||
(click)="onClickButton($event)" | ||
[disabled]="disable" | ||
> | ||
<div> | ||
<app-progress-bar *ngIf="showProgress" [value]="value"></app-progress-bar> | ||
<!-- <progress *ngIf="showProgress" max="100" [value]="value"></progress> --> | ||
</div> | ||
<ng-content></ng-content> | ||
</button> |
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,18 @@ | ||
.progress-button { | ||
background-color: var(--background-primary); | ||
color: var(--text-1); | ||
font-family: Roboto, sans-serif; | ||
font-weight: 500; | ||
font-size: 14px; | ||
letter-spacing: normal; | ||
border: none; | ||
border-radius: 4px; | ||
padding: 0.5rem 0.5rem; | ||
line-height: 1rem; | ||
max-width: 100%; | ||
|
||
&[disabled] { | ||
background-color: grey; | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,49 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>WowUp.io CF</title> | ||
<base href="/" /> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>WowUp.io CF</title> | ||
<base href="/" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta | ||
http-equiv="Content-Security-Policy" | ||
content="default-src ws: file: data: http: https: 'unsafe-eval' 'unsafe-inline';" | ||
/> | ||
<link rel="icon" type="image/x-icon" href="assets/icons/favicon.ico" /> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet" /> | ||
</head> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta http-equiv="Content-Security-Policy" | ||
content="default-src ws: file: data: http: https: 'unsafe-eval' 'unsafe-inline';" /> | ||
<link rel="icon" type="image/x-icon" href="assets/icons/favicon.ico" /> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet" /> | ||
</head> | ||
|
||
<body class="mat-typography" style="overflow: hidden"> | ||
<app-root> | ||
<div id="preload-container" style=" | ||
<body class="mat-typography" style="overflow: hidden"> | ||
<app-root> | ||
<div | ||
id="preload-container" | ||
style=" | ||
width: 100%; | ||
height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
color: white; | ||
justify-content: center; | ||
align-items: center; | ||
"> | ||
<img id="preload-logo" src="assets/wowup_logo_purple.png" style="width: 150px; " /> | ||
</div> | ||
</app-root> | ||
<script> | ||
try { | ||
window.global = window; | ||
|
||
document.body.classList.add(window.platform) | ||
if (window.platform === 'darwin') { | ||
document.getElementById('preload-logo').style.borderRadius = '23px'; | ||
} | ||
" | ||
> | ||
<img id="preload-logo" src="assets/wowup_logo_purple.png" style="width: 150px" /> | ||
</div> | ||
</app-root> | ||
<script> | ||
try { | ||
window.global = window; | ||
|
||
document.body.style.backgroundColor = window.baseBgColor; | ||
} catch (e) { | ||
console.error(e) | ||
} | ||
</script> | ||
</body> | ||
document.body.classList.add(window.platform); | ||
if (window.platform === "darwin") { | ||
document.getElementById("preload-logo").style.borderRadius = "23px"; | ||
} | ||
|
||
</html> | ||
document.body.style.backgroundColor = window.baseBgColor; | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
</script> | ||
</body> | ||
</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