Skip to content

Commit

Permalink
add back button to splash
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartondock committed Jun 18, 2024
1 parent 70c2017 commit 3ca75e5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/renderer/components/splash.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Component, ChangeDetectionStrategy, EventEmitter, Output, Input } from '@angular/core';
import { SettingsService } from '../services';
import { AppSettings } from '../../models';
import { APP } from '../../variables';
import * as os from 'os';

@Component({
selector: 'splash',
Expand All @@ -22,11 +24,21 @@ export class SplashComponent {
this.appSettings = appSettings;
})
}

get lang() {
return APP.lang.settings.component;
}
get placeholderSteamDir() {
return this.lang.placeholder.bySystem[os.type()].steamDirectory;
}
moveToUsers() {
if(this.appSettings.environmentVariables.steamDirectory){
this.stage = 'userAccounts'
}
}
moveToSteamDir() {
this.stage = 'steamDir';
}

setUserAccounts(accounts: string[]) {
if(accounts) {
Expand Down
1 change: 1 addition & 0 deletions src/renderer/styles/splash.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,6 @@
&.disabled {
opacity: 0.3;
}
margin-right: 0.5em;
}
}
5 changes: 3 additions & 2 deletions src/renderer/templates/splash.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1>Welcome to SRM!</h1>
<div class="directoryInput">
<ng-text-input
class="ngTextInput"
placeholder="/path/to/steam"
[placeholder]="lang.placeholder.bySystem.Windows_NT.steamDirectory"
[(ngModel)]='appSettings.environmentVariables.steamDirectory'>
</ng-text-input>
<ng-path-input
Expand Down Expand Up @@ -50,6 +50,7 @@ <h1>Welcome to SRM!</h1>
</div>
</div>
</div>
<div class="clickButton" (click)="moveToSteamDir()">Back</div>
<div class="clickButton" [class.disabled]="!appSettings.environmentVariables.userAccounts" (click)="finishSetup()">Next</div>

</div>

0 comments on commit 3ca75e5

Please sign in to comment.