Fixed building

canary
WolverinDEV 2019-08-21 13:50:21 +02:00
parent 678e2025fc
commit b881b31153
5 changed files with 20 additions and 20 deletions

View File

@ -1,7 +1,4 @@
namespace pe { namespace pe {
import PermissionEditorMode = Modals.PermissionEditorMode;
import KeyDownEvent = JQuery.KeyDownEvent;
class HTMLPermission { class HTMLPermission {
readonly handle: HTMLPermissionEditor; readonly handle: HTMLPermissionEditor;
readonly group: HTMLPermissionGroup; readonly group: HTMLPermissionGroup;
@ -57,7 +54,7 @@ namespace pe {
} }
private static number_filter_re = /^[-+]?([0-9]{0,9})$/; private static number_filter_re = /^[-+]?([0-9]{0,9})$/;
private static number_filter = (event: KeyDownEvent) => { private static number_filter = (event: KeyboardEvent) => {
if(event.ctrlKey) if(event.ctrlKey)
return; return;
@ -77,7 +74,7 @@ namespace pe {
return; return;
} }
} else { } else {
const e = <KeyDownEvent>event; /* for some reason typescript deducts the event type to "never" */ const e = <JQuery.Event>event; /* for some reason typescript deducts the event type to "never" */
if(!HTMLPermission.number_filter_re.test(e.key)) { if(!HTMLPermission.number_filter_re.test(e.key)) {
e.preventDefault(); e.preventDefault();
return; return;
@ -120,7 +117,7 @@ namespace pe {
this._tag_value = $.spawn("input").addClass("number"); this._tag_value = $.spawn("input").addClass("number");
this._tag_value_input = this._tag_value; this._tag_value_input = this._tag_value;
this._tag_value_input.on('keydown', HTMLPermission.number_filter); this._tag_value_input.on('keydown', HTMLPermission.number_filter as any);
this._tag_value_input.on('change', event => { this._tag_value_input.on('change', event => {
const str_value = this._tag_value_input.val() as string; const str_value = this._tag_value_input.val() as string;
const value = parseInt(str_value); const value = parseInt(str_value);
@ -202,7 +199,7 @@ namespace pe {
this._tag_granted = $.spawn("input").addClass("number"); this._tag_granted = $.spawn("input").addClass("number");
this._tag_granted_input = this._tag_granted; this._tag_granted_input = this._tag_granted;
this._tag_granted_input.on('keydown', HTMLPermission.number_filter); this._tag_granted_input.on('keydown', HTMLPermission.number_filter as any);
this._tag_granted_input.on('change', event => { this._tag_granted_input.on('change', event => {
const str_value = this._tag_granted_input.val() as string; const str_value = this._tag_granted_input.val() as string;
const value = parseInt(str_value); const value = parseInt(str_value);
@ -786,7 +783,7 @@ namespace pe {
contextmenu.spawn_context_menu(event.pageX, event.pageY, ...entries); contextmenu.spawn_context_menu(event.pageX, event.pageY, ...entries);
}); });
this.set_mode(PermissionEditorMode.UNSET); this.set_mode(Modals.PermissionEditorMode.UNSET);
} }
html_tag(): JQuery<HTMLElement> { html_tag(): JQuery<HTMLElement> {
@ -816,10 +813,10 @@ namespace pe {
this.update_filter(); this.update_filter();
} }
set_mode(mode: PermissionEditorMode) { set_mode(mode: Modals.PermissionEditorMode) {
this.mode_container_permissions.css('display', mode == PermissionEditorMode.VISIBLE ? 'flex' : 'none'); this.mode_container_permissions.css('display', mode == Modals.PermissionEditorMode.VISIBLE ? 'flex' : 'none');
this.mode_container_error_permission.css('display', mode == PermissionEditorMode.NO_PERMISSION ? 'flex' : 'none'); this.mode_container_error_permission.css('display', mode == Modals.PermissionEditorMode.NO_PERMISSION ? 'flex' : 'none');
this.mode_container_unset.css('display', mode == PermissionEditorMode.UNSET ? 'block' : 'none'); this.mode_container_unset.css('display', mode == Modals.PermissionEditorMode.UNSET ? 'block' : 'none');
} }
trigger_change(permission: PermissionInfo, value?: Modals.PermissionEditor.PermissionValue) : Promise<void> { trigger_change(permission: PermissionInfo, value?: Modals.PermissionEditor.PermissionValue) : Promise<void> {

2
vendor/xbbcode vendored

@ -1 +1 @@
Subproject commit 983c9d59542a003df38e80fa1680ab9cfda4c530 Subproject commit 11773c2d5dc4a585b7a9136ac0a2bb87ebf94ebd

View File

@ -1,8 +1,3 @@
interface Navigator {
mozGetUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
webkitGetUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
}
namespace audio.player { namespace audio.player {
let _globalContext: AudioContext; let _globalContext: AudioContext;
let _global_destination: GainNode; let _global_destination: GainNode;
@ -81,7 +76,11 @@ namespace audio.player {
_initialized_listener.push(cb); _initialized_listener.push(cb);
} }
export const WEB_DEVICE: Device = {device_id: "default", name: "default playback"}; export const WEB_DEVICE: Device = {
device_id: "default",
name: "default playback",
driver: 'Web Audio'
};
export function available_devices() : Promise<Device[]> { export function available_devices() : Promise<Device[]> {
return Promise.resolve([WEB_DEVICE]) return Promise.resolve([WEB_DEVICE])

View File

@ -260,7 +260,7 @@ namespace connection {
}); });
if(json["command"] === "initserver") { if(json["command"] === "initserver") {
this._ping.thread_id = setInterval(() => this.do_ping(), this._ping.interval); this._ping.thread_id = setInterval(() => this.do_ping(), this._ping.interval) as any;
this.do_ping(); this.do_ping();
this.updateConnectionState(ConnectionState.CONNECTED); this.updateConnectionState(ConnectionState.CONNECTED);
if(this._voice_connection) if(this._voice_connection)

View File

@ -1,5 +1,9 @@
/// <reference path="../../declarations/imports_shared.d.ts"/> /// <reference path="../../declarations/imports_shared.d.ts"/>
interface MediaStream {
stop();
}
namespace audio { namespace audio {
export namespace recorder { export namespace recorder {
let _queried_devices: JavascriptInputDevice[]; let _queried_devices: JavascriptInputDevice[];