-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
178 additions
and
46 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
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
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
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
16 changes: 16 additions & 0 deletions
16
...components/sleeping-animation-preset-modal/sleeping-animation-preset-modal.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,16 @@ | ||
<div class="pane modal" [@fadeUp]> | ||
<div class="pane-title"> | ||
{{ preset?.name }} | ||
</div> | ||
<div class="pane-content"> | ||
<div *ngFor='let link of preset?.infoLinks || []' class='link'> | ||
<span>{{link.label}}</span> | ||
<button class='btn btn-secondary' translate (click)='openUrl(link.url)'>shared.modals.open</button> | ||
</div> | ||
</div> | ||
<div class="pane-actions spread"> | ||
<button class="btn btn-secondary" (click)="close()"> | ||
{{ 'shared.modals.close' | translate }} | ||
</button> | ||
</div> | ||
</div> |
17 changes: 17 additions & 0 deletions
17
...components/sleeping-animation-preset-modal/sleeping-animation-preset-modal.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,17 @@ | ||
|
||
|
||
.link { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
&:not(:last-child) { | ||
margin-bottom: 1em; | ||
} | ||
span { | ||
flex: 1; | ||
} | ||
button { | ||
flex-shrink: 0; | ||
margin-left: 1em; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...ponents/sleeping-animation-preset-modal/sleeping-animation-preset-modal.component.spec.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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SleepingAnimationPresetModalComponent } from './sleeping-animation-preset-modal.component'; | ||
|
||
describe('SleepingAnimationPresetModalComponent', () => { | ||
let component: SleepingAnimationPresetModalComponent; | ||
let fixture: ComponentFixture<SleepingAnimationPresetModalComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ SleepingAnimationPresetModalComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(SleepingAnimationPresetModalComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
30 changes: 30 additions & 0 deletions
30
...p/components/sleeping-animation-preset-modal/sleeping-animation-preset-modal.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,30 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { SimpleModalComponent } from 'ngx-simple-modal'; | ||
import { SleepingAnimationPreset } from '../../models/sleeping-animation-presets'; | ||
import { open } from '@tauri-apps/api/shell'; | ||
|
||
interface SleepingAnimationPresetModalInputModel { | ||
preset?: SleepingAnimationPreset; | ||
} | ||
|
||
@Component({ | ||
selector: 'app-sleeping-animation-preset-modal', | ||
templateUrl: './sleeping-animation-preset-modal.component.html', | ||
styleUrls: ['./sleeping-animation-preset-modal.component.scss'], | ||
}) | ||
export class SleepingAnimationPresetModalComponent | ||
extends SimpleModalComponent<SleepingAnimationPresetModalInputModel, void> | ||
implements OnInit, SleepingAnimationPresetModalInputModel | ||
{ | ||
preset?: SleepingAnimationPreset; | ||
|
||
constructor() { | ||
super(); | ||
} | ||
|
||
ngOnInit(): void {} | ||
|
||
async openUrl(url: string) { | ||
await open(url); | ||
} | ||
} |
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
Oops, something went wrong.