forked from CoderCoderCoder/BeatOn
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added config to populate the UI, added change event listeners to trig…
…ger update call, added extra models and message classes for updating feeds
- Loading branch information
1 parent
c3f3dd9
commit 51f33c5
Showing
11 changed files
with
241 additions
and
129 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { QuestomConfig } from './QuestomConfig'; | ||
import { SyncSaberConfig } from './SyncSaberConfig'; | ||
|
||
export interface BeatOnConfig | ||
{ | ||
Config : QuestomConfig; | ||
IsCommitted : boolean; | ||
} | ||
export interface BeatOnConfig { | ||
Config: QuestomConfig; | ||
IsCommitted: boolean; | ||
SyncConfig: SyncSaberConfig; | ||
} |
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,9 @@ | ||
import { MessageBase, MessageType } from './MessageBase'; | ||
|
||
export class ClientSetBeastSaberUsername extends MessageBase { | ||
constructor() { | ||
super(); | ||
} | ||
readonly Type: MessageType = MessageType.BeastSaberUsername; | ||
BeastSaberUsername: string; | ||
} |
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 { MessageBase, MessageType } from './MessageBase'; | ||
|
||
export class ClientUpdateFeedReader extends MessageBase { | ||
constructor() { | ||
super(); | ||
} | ||
readonly Type: MessageType = MessageType.UpdateFeedReader; | ||
MaxSongs: number; | ||
ID: string; | ||
IsEnabled: boolean; | ||
} |
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,10 @@ | ||
export interface FeedReader { | ||
DisplayName: string; | ||
FeedType: number; | ||
ID: string; | ||
IsEnabled: boolean; | ||
LastSyncAttempt: string; | ||
LastSyncSuccess: string; | ||
PlaylistID: string; | ||
MaxSongs: number; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { FeedReader } from './FeedReader'; | ||
|
||
export interface SyncSaberConfig { | ||
BeastSaberUsername: string; | ||
CheckExistingSongsUpdated: boolean; | ||
FeedReaders: FeedReader[]; | ||
} |
2 changes: 1 addition & 1 deletion
2
frontend/src/app/sync-saber-max-songs/sync-saber-max-songs.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,3 +1,3 @@ | ||
<div class="vertical-align"> | ||
<mat-icon (click)="down()">navigate_before</mat-icon>{{maxSongs === 0 ? '∞' : maxSongs}} <mat-icon (click)="up()">navigate_next</mat-icon> | ||
<mat-icon (click)="down()">navigate_before</mat-icon>{{reader.MaxSongs === 0 ? '∞' : reader.MaxSongs}} <mat-icon (click)="up()">navigate_next</mat-icon> | ||
</div> |
12 changes: 8 additions & 4 deletions
12
frontend/src/app/sync-saber-max-songs/sync-saber-max-songs.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 |
---|---|---|
@@ -1,21 +1,25 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; | ||
import { FeedReader } from '../models/FeedReader'; | ||
|
||
@Component({ | ||
selector: 'app-sync-saber-max-songs', | ||
templateUrl: './sync-saber-max-songs.component.html', | ||
styleUrls: ['./sync-saber-max-songs.component.scss'], | ||
}) | ||
export class SyncSaberMaxSongsComponent implements OnInit { | ||
@Input() maxSongs = 10; | ||
@Input() reader: FeedReader; | ||
@Output() update = new EventEmitter(); | ||
constructor() {} | ||
|
||
ngOnInit() {} | ||
|
||
down() { | ||
this.maxSongs = this.maxSongs < 1 ? 0 : this.maxSongs - 10; | ||
this.reader.MaxSongs = this.reader.MaxSongs < 1 ? 0 : this.reader.MaxSongs - 10; | ||
this.update.emit(); | ||
} | ||
|
||
up() { | ||
this.maxSongs = this.maxSongs > 199 ? 200 : this.maxSongs + 10; | ||
this.reader.MaxSongs = this.reader.MaxSongs > 199 ? 200 : this.reader.MaxSongs + 10; | ||
this.update.emit(); | ||
} | ||
} |
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.