-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updates to the map editor to resolve GBAPI #360. * Start of porting feedback report. Updated to use local dev id server * WIP - role rework * Add support for topomox * Fix novnc package versions. * Fixes to topomox * Add NoVNCService provider to console * Update to fix typescript compiler errors. Allow configuration of hypervisor in settings. * Misc tweaks for proxmox * Revert console code to match topo mks code for now. * Fix feedback report bugs. Update role selection UI in admin -> users. * npm audit * Fix navigation bug * Minor reformatting fixes from test * Bug fixing and new admin game cards look * Fix session reset hiding bug * Add auto-tag for practice * Add structural directive for permissions * Fix new structural directive bug * More hiding stuff for permissions * Support binding of permission on permission structural directive * Remove old unpublished icon * Fix permissions show/hide bugs * Key changes * Fix tooltip stuff * Fix role dropdown, hide api keys and roles as appropriate * Style roles * Hide game creation if you can't create * Fix bug that prevented enroll outside registration window * Hide add players for ineligible users * Maybe really fix enroll thing * Fix out of band registration * Fix registration out of band * Really fix out of band registration * Hide game editor if you can't edit * Support autotags foundations * Add game center url to router service * Fix user registrar false error * Improvements to autotags and fix login repeat issue * Update autotag stuff * More refining autotags and refactor tools stuff * Fix long-content-hider fadeout bug * fix notifications admin layout * Long-content-hider fixes * Fix game center navigation * Fix game mapper binding bugs * Fix game center display issues * Remove legacy reports link
- Loading branch information
1 parent
9ea69b8
commit bbb59a9
Showing
195 changed files
with
2,806 additions
and
12,190 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
95 changes: 95 additions & 0 deletions
95
projects/gameboard-mks/src/app/components/console/services/novnc-console.service.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,95 @@ | ||
// Copyright 2021 Carnegie Mellon University. | ||
// Released under a 3 Clause BSD-style license. See LICENSE.md in the project root. | ||
|
||
import { Injectable } from '@angular/core'; | ||
import { ConsoleService } from './console.service'; | ||
import NoVncClient from '@novnc/novnc/core/rfb'; | ||
|
||
@Injectable() | ||
export class NoVNCConsoleService implements ConsoleService { | ||
private client!: NoVncClient; | ||
options: any = { | ||
rescale: true, | ||
changeResolution: false, | ||
useVNCHandshake: false, | ||
position: 0, // WMKS.CONST.Position.CENTER, | ||
}; | ||
stateChanged!: (state: string) => void; | ||
|
||
constructor() { } | ||
|
||
connect( | ||
url: string, | ||
stateCallback: (state: string) => void, | ||
options: any = {} | ||
): void { | ||
if (stateCallback) { | ||
this.stateChanged = stateCallback; | ||
} | ||
this.options = { ...this.options, ...options }; | ||
|
||
this.client = new NoVncClient( | ||
document.getElementById(this.options.canvasId)!, | ||
url, | ||
{ | ||
credentials: { | ||
password: this.options.ticket, | ||
target: '', | ||
username: '', | ||
}, | ||
} | ||
); | ||
|
||
this.client.viewOnly = this.options.viewOnly; | ||
this.client.scaleViewport = true; | ||
|
||
this.client.addEventListener('connect', () => { | ||
stateCallback('connected'); | ||
}); | ||
|
||
this.client.addEventListener('disconnect', () => { | ||
stateCallback('disconnected'); | ||
}); | ||
|
||
this.client.addEventListener('clipboard', (e: CustomEvent<{ text: string }>) => { | ||
stateCallback('clip:' + e.detail.text); | ||
}); | ||
} | ||
|
||
disconnect(): void { } | ||
|
||
sendCAD(): void { | ||
this.client.sendCtrlAltDel(); | ||
} | ||
|
||
copy(): void { } | ||
|
||
async paste(text: string): Promise<void> { | ||
console.log(text); | ||
this.client.clipboardPasteFrom(text); | ||
} | ||
|
||
refresh(): void { } | ||
|
||
toggleScale(): void { | ||
// if (this.wmks) { | ||
// this.options.rescale = !this.options.rescale; | ||
// this.wmks.setOption('rescale', this.options.rescale); | ||
// } | ||
} | ||
|
||
// NOTE: can't seem to set `changeResolution` dynamically | ||
// Tried to set up a button to go fullbleed, but doesn't | ||
// work if changeResolution is false initially | ||
resolve(): void { } | ||
|
||
fullscreen(): void { } | ||
|
||
showKeyboard(): void { } | ||
|
||
showExtKeypad(): void { } | ||
|
||
showTrackpad(): void { } | ||
|
||
dispose(): void { } | ||
} |
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.