Importing the permission type as "{}", else the d.ts generator will make bs
This commit is contained in:
parent
758dd5333e
commit
84356be456
8 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
import * as log from "tc-shared/log";
|
||||
import {LogCategory, LogType} from "tc-shared/log";
|
||||
import PermissionType from "tc-shared/permission/PermissionType";
|
||||
import {PermissionType} from "tc-shared/permission/PermissionType";
|
||||
import {LaterPromise} from "tc-shared/utils/LaterPromise";
|
||||
import {ServerCommand} from "tc-shared/connection/ConnectionBase";
|
||||
import {CommandResult, ErrorID} from "tc-shared/connection/ServerConnectionDeclaration";
|
||||
|
|
|
@ -2,7 +2,7 @@ import {ChannelTree} from "tc-shared/ui/view";
|
|||
import {ClientEntry} from "tc-shared/ui/client";
|
||||
import * as log from "tc-shared/log";
|
||||
import {LogCategory, LogType} from "tc-shared/log";
|
||||
import PermissionType from "tc-shared/permission/PermissionType";
|
||||
import {PermissionType} from "tc-shared/permission/PermissionType";
|
||||
import {settings, Settings} from "tc-shared/settings";
|
||||
import * as contextmenu from "tc-shared/ui/elements/ContextMenu";
|
||||
import {Sound} from "tc-shared/sound/Sounds";
|
||||
|
|
|
@ -73,7 +73,7 @@ export function sliderfy(slider: JQuery, options?: SliderOptions) : Slider {
|
|||
const parent_offset = slider.offset();
|
||||
const min = parent_offset.left;
|
||||
const max = parent_offset.left + slider.width();
|
||||
const current = event instanceof MouseEvent ? event.pageX : event.touches[event.touches.length - 1].clientX;
|
||||
const current = 'touches' in event ? event.touches[event.touches.length - 1].clientX : event.pageX;
|
||||
|
||||
const range = options.max_value - options.min_value;
|
||||
const offset = Math.round(((current - min) * (range / options.step)) / (max - min)) * options.step;
|
||||
|
|
|
@ -14,7 +14,7 @@ import {spawnConnectModal} from "tc-shared/ui/modal/ModalConnect";
|
|||
import {spawnPermissionEdit} from "tc-shared/ui/modal/permission/ModalPermissionEdit";
|
||||
import {createErrorModal, createInfoModal, createInputModal} from "tc-shared/ui/elements/Modal";
|
||||
import {CommandResult} from "tc-shared/connection/ServerConnectionDeclaration";
|
||||
import PermissionType from "tc-shared/permission/PermissionType";
|
||||
import {PermissionType} from "tc-shared/permission/PermissionType";
|
||||
import {openBanList} from "tc-shared/ui/modal/ModalBanList";
|
||||
import {spawnQueryManage} from "tc-shared/ui/modal/ModalQueryManage";
|
||||
import {spawnQueryCreate} from "tc-shared/ui/modal/ModalQuery";
|
||||
|
|
|
@ -3,7 +3,7 @@ import {format} from "tc-shared/ui/frames/side/chat_helper";
|
|||
import {bbcode_chat, formatMessage} from "tc-shared/ui/frames/chat";
|
||||
import {CommandResult, ErrorID} from "tc-shared/connection/ServerConnectionDeclaration";
|
||||
import {LogCategory} from "tc-shared/log";
|
||||
import PermissionType from "tc-shared/permission/PermissionType";
|
||||
import {PermissionType} from "tc-shared/permission/PermissionType";
|
||||
import {ChatBox} from "tc-shared/ui/frames/side/chat_box";
|
||||
import {Frame, FrameContent} from "tc-shared/ui/frames/chat_frame";
|
||||
import {createErrorModal} from "tc-shared/ui/elements/Modal";
|
||||
|
|
|
@ -1779,7 +1779,7 @@ export namespace modal_settings {
|
|||
console.debug(tr("Changed default microphone device"));
|
||||
event_registry.fire_async("set-device-result", { status: "success", device_id: event.device_id });
|
||||
}).catch((error) => {
|
||||
log.warn(LogCategory.AUDIO, tr("Failed to change microphone to device %s: %o"), device ? device.unique_id : "none", error)
|
||||
log.warn(LogCategory.AUDIO, tr("Failed to change microphone to device %s: %o"), device ? device.unique_id : "none", error);
|
||||
event_registry.fire_async("set-device-result", { status: "success", device_id: event.device_id });
|
||||
});
|
||||
});
|
||||
|
@ -1956,7 +1956,7 @@ export namespace modal_settings {
|
|||
const tags = volume_bar_tags[device.device_id];
|
||||
if(!tags) continue;
|
||||
|
||||
let level = typeof device.level === "number" ? device.level : 100;
|
||||
let level = typeof device.level === "number" ? device.level : 0;
|
||||
if(level > 100) level = 100;
|
||||
else if(level < 0) level = 0;
|
||||
tags.error.attr('title', device.error || null).text(device.error || null);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
PermissionManager,
|
||||
} from "tc-shared/permission/PermissionManager";
|
||||
import PermissionType from "tc-shared/permission/PermissionType";
|
||||
import {PermissionType} from "tc-shared/permission/PermissionType";
|
||||
import {ConnectionHandler} from "tc-shared/ConnectionHandler";
|
||||
import {createErrorModal, createInfoModal, createInputModal, createModal, Modal} from "tc-shared/ui/elements/Modal";
|
||||
import {HTMLPermissionEditor} from "tc-shared/ui/modal/permission/HTMLPermissionEditor";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as contextmenu from "tc-shared/ui/elements/ContextMenu";
|
||||
import * as log from "tc-shared/log";
|
||||
import {Settings, settings} from "tc-shared/settings";
|
||||
import PermissionType from "tc-shared/permission/PermissionType";
|
||||
import {PermissionType} from "tc-shared/permission/PermissionType";
|
||||
import {LogCategory} from "tc-shared/log";
|
||||
import {KeyCode, SpecialKey} from "tc-shared/PPTListener";
|
||||
import {createInputModal} from "tc-shared/ui/elements/Modal";
|
||||
|
|
Loading…
Add table
Reference in a new issue