fix: trying to fix jenkins
Some checks failed
Gitea djledda.de/arne-drums/pipeline/head There was a failure building this commit
Some checks failed
Gitea djledda.de/arne-drums/pipeline/head There was a failure building this commit
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -12,7 +12,9 @@ pipeline {
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh '/usr/bin/rsync ./public /var/www/public/html/drums'
|
||||
sh '''#!/bin/bash -l
|
||||
/usr/bin/rsync ./public /var/www/public/html/drums'
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
src/Beat.ts
16
src/Beat.ts
@@ -40,15 +40,15 @@ export default class Beat implements IPublisher<BeatEvents>{
|
||||
return this.publisher.addSubscriber(subscriber, eventType);
|
||||
}
|
||||
|
||||
setTimeSignature(up: number, down: number): void {
|
||||
if (Beat.isValidTimeSigRange(up)) {
|
||||
if (Beat.isValidTimeSigRange(down)) {
|
||||
this.timeSigUp = up | 0;
|
||||
this.timeSigDown = down | 0;
|
||||
this.updateBeatUnitLength();
|
||||
this.publisher.notifySubs(BeatEvents.NewTimeSig);
|
||||
}
|
||||
setTimeSignature(timeSig: {up?: number, down?: number}): void {
|
||||
if (timeSig.up && Beat.isValidTimeSigRange(timeSig.up)) {
|
||||
this.timeSigUp = timeSig.up | 0;
|
||||
}
|
||||
if (timeSig.down && Beat.isValidTimeSigRange(timeSig.down)) {
|
||||
this.timeSigDown = timeSig.down | 0;
|
||||
}
|
||||
this.updateBeatUnitLength();
|
||||
this.publisher.notifySubs(BeatEvents.NewTimeSig);
|
||||
}
|
||||
|
||||
setBars(barCount: number): void {
|
||||
|
||||
@@ -11,8 +11,9 @@ export type BeatSettingsViewUINodeOptions = UINodeOptions & {
|
||||
export default class BeatSettingsView extends UINode implements ISubscriber {
|
||||
private beat: Beat;
|
||||
private visible = false;
|
||||
private timeSigUp: HTMLInputElement | null = null;
|
||||
private timeSigDown: HTMLInputElement | null = null;
|
||||
private timeSigUp: HTMLInputElement;
|
||||
private timeSigDown: HTMLInputElement;
|
||||
private barCountInput: HTMLInputElement;
|
||||
|
||||
constructor(options: BeatSettingsViewUINodeOptions) {
|
||||
super(options);
|
||||
@@ -26,10 +27,10 @@ export default class BeatSettingsView extends UINode implements ISubscriber {
|
||||
|
||||
notify<T extends string | number>(publisher: IPublisher<T>, event: "all" | T[] | T) {
|
||||
if (event === BeatEvents.NewTimeSig) {
|
||||
if (this.timeSigUp && this.timeSigDown) {
|
||||
this.timeSigUp.value = this.beat.getTimeSigUp().toString();
|
||||
this.timeSigDown.value = this.beat.getTimeSigDown().toString();
|
||||
}
|
||||
this.timeSigUp.value = this.beat.getTimeSigUp().toString();
|
||||
this.timeSigDown.value = this.beat.getTimeSigDown().toString();
|
||||
} else if (event === BeatEvents.NewBarCount) {
|
||||
this.barCountInput.value = this.beat.getBarCount();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +48,19 @@ export default class BeatSettingsView extends UINode implements ISubscriber {
|
||||
}
|
||||
|
||||
rebuild(): HTMLElement {
|
||||
this.timeSigUp = UINode.make("input", {});
|
||||
this.timeSigUp.addEventListener("input",
|
||||
(event) => this.beat.setTimeSignature({
|
||||
up: Number((event.target as HTMLInputElement).value) }));
|
||||
this.timeSigDown = UINode.make("input", {});
|
||||
this.timeSigDown.addEventListener("input",
|
||||
(event) => this.beat.setTimeSignature({
|
||||
down: Number((event.target as HTMLInputElement).value) }));
|
||||
this.node = UINode.make("div", {
|
||||
subs: [
|
||||
UINode.make("p", {innerText: `Settings for ${this.beat.getName()}`}),
|
||||
this.timeSigUp,
|
||||
this.timeSigDown,
|
||||
],
|
||||
classes: ["beatSettingsView"]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user