Fixed microphone profile does not save
parent
2b3a4c396a
commit
f721b3d4fd
|
@ -14720,9 +14720,9 @@
|
|||
}
|
||||
},
|
||||
"webpack-svg-sprite-generator": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/webpack-svg-sprite-generator/-/webpack-svg-sprite-generator-1.0.9.tgz",
|
||||
"integrity": "sha512-i1jfHW998QHWd/CszJCvNt0/x9AKosjGBA1mBDCip9up0ck+vecXOMebaZMJM3u2s1ng20RopEU85bRYmUx/ZQ==",
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/webpack-svg-sprite-generator/-/webpack-svg-sprite-generator-1.0.13.tgz",
|
||||
"integrity": "sha512-1KZG+RpLeBZiFCUzKIVWfWUW24JccomaoYyNgKoYldCt4A4DgZPxsBi1QttfTtPzKJlGKXSlwps9RANGLEJY+Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs-extra": "^9.0.1",
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
"webpack": "^4.42.1",
|
||||
"webpack-bundle-analyzer": "^3.6.1",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-svg-sprite-generator": "^1.0.9",
|
||||
"webpack-svg-sprite-generator": "^1.0.13",
|
||||
"worker-plugin": "^4.0.2",
|
||||
"xml-parser": "^1.2.1"
|
||||
},
|
||||
|
|
|
@ -31,39 +31,4 @@ fi
|
|||
./shared/generate_declarations.sh; _exit_code=$?
|
||||
[[ $_exit_code -ne 0 ]] && {
|
||||
echo "Failed to generate shared ($_exit_code)"
|
||||
}
|
||||
|
||||
exit 0
|
||||
#Easy going: Each "module" has it's exports and imports
|
||||
#So lets first build the exports and ignore any errors
|
||||
#Note: For the client we have to use the given file
|
||||
|
||||
#Web
|
||||
npm run dtsgen -- --config web/tsconfig/dtsconfig.json -v
|
||||
replace_tribble web/declarations/exports.d.ts
|
||||
echo "Generated web declarations"
|
||||
|
||||
#Client
|
||||
npm run dtsgen -- --config client/tsconfig/dtsconfig.json -v
|
||||
replace_tribble client/declarations/exports.d.ts
|
||||
echo "Generated client declarations"
|
||||
|
||||
#replace_tribble shared/declarations/exports.d.ts
|
||||
echo "Generated shared declarations"
|
||||
|
||||
#Now build the merged declaration for the shared project
|
||||
#Link the declaration files (All interface declarations should be equal!)
|
||||
if [[ ! -d shared/declarations ]]; then
|
||||
mkdir shared/declarations
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Failed to create directory shared/declarations"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#Last but not least the client imports
|
||||
generate_link shared/declarations/exports_app.d.ts web/declarations/imports_shared.d.ts
|
||||
generate_link shared/declarations/exports_loader_app.d.ts web/declarations/imports_shared_loader.d.ts
|
||||
|
||||
generate_link shared/declarations/exports_app.d.ts client/declarations/imports_shared.d.ts
|
||||
generate_link shared/declarations/exports_loader_app.d.ts client/declarations/imports_shared_loader.d.ts
|
||||
}
|
|
@ -25,4 +25,6 @@ function generate_declaration() {
|
|||
#Generate the loader definitions first
|
||||
app_declaration="../declarations/shared-app/"
|
||||
generate_declaration dtsconfig_app.json ${app_declaration}
|
||||
|
||||
cp -r svg-sprites "../declarations/svg-sprites"
|
||||
exit 0
|
|
@ -33,7 +33,7 @@ import {FileTransferState, TransferProvider,} from "tc-shared/file/Transfer";
|
|||
import {MenuEntryType, spawn_context_menu} from "tc-shared/ui/elements/ContextMenu";
|
||||
import {copy_to_clipboard} from "tc-shared/utils/helpers";
|
||||
import ContextMenuEvent = JQuery.ContextMenuEvent;
|
||||
import "svg-sprite/client-icons";
|
||||
import "svg-sprites/client-icons";
|
||||
|
||||
/* required import for init */
|
||||
import "../css/load-css"
|
||||
|
|
|
@ -4,12 +4,17 @@ import * as loader from "tc-loader";
|
|||
import {Stage} from "tc-loader";
|
||||
import {Registry} from "tc-shared/events";
|
||||
|
||||
type ConfigValueTypes = boolean | number | string;
|
||||
type ConfigValueTypeNames = "boolean" | "number" | "string";
|
||||
type ConfigValueTypes = boolean | number | string | object;
|
||||
type ConfigValueTypeNames = "boolean" | "number" | "string" | "object";
|
||||
|
||||
type ValueTypeMapping<T> = T extends boolean ? "boolean" :
|
||||
T extends number ? "number" :
|
||||
T extends string ? "string" :
|
||||
T extends object ? "object" : never;
|
||||
|
||||
export interface SettingsKey<ValueType extends ConfigValueTypes> {
|
||||
key: string;
|
||||
valueType: ConfigValueTypeNames;
|
||||
valueType: ValueTypeMapping<ValueType>;
|
||||
|
||||
defaultValue?: ValueType;
|
||||
|
||||
|
@ -44,6 +49,13 @@ export class SettingsBase {
|
|||
case "number":
|
||||
return parseFloat(input) as any;
|
||||
|
||||
case "object":
|
||||
try {
|
||||
return JSON.parse(input);
|
||||
} catch (error) {
|
||||
return {} as any;
|
||||
}
|
||||
|
||||
default:
|
||||
return defaultValue;
|
||||
}
|
||||
|
@ -62,6 +74,9 @@ export class SettingsBase {
|
|||
case "number":
|
||||
return input.toString();
|
||||
|
||||
case "object":
|
||||
return JSON.stringify(input);
|
||||
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
|
@ -486,7 +501,7 @@ export class Settings extends StaticSettings {
|
|||
static readonly FN_LOG_LEVEL_ENABLED: (category: string) => SettingsKey<boolean> = category => {
|
||||
return {
|
||||
key: "log.level." + category.toLowerCase() + ".enabled",
|
||||
valueType: "boolean",
|
||||
valueType: "boolean"
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -512,10 +527,10 @@ export class Settings extends StaticSettings {
|
|||
}
|
||||
};
|
||||
|
||||
static readonly FN_PROFILE_RECORD: (name: string) => SettingsKey<any> = name => {
|
||||
static readonly FN_PROFILE_RECORD: (name: string) => SettingsKey<object> = name => {
|
||||
return {
|
||||
key: 'profile_record' + name,
|
||||
valueType: "string",
|
||||
valueType: "object",
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import {spawnPermissionEditorModal} from "tc-shared/ui/modal/permission/ModalPer
|
|||
import {EventClient, EventType} from "tc-shared/ui/frames/log/Definitions";
|
||||
import {W2GPluginCmdHandler} from "tc-shared/video-viewer/W2GPlugin";
|
||||
import {global_client_actions} from "tc-shared/events/GlobalEvents";
|
||||
import { ClientIcon } from "svg-sprite/client-icons";
|
||||
import { ClientIcon } from "svg-sprites/client-icons";
|
||||
|
||||
export enum ClientType {
|
||||
CLIENT_VOICE,
|
||||
|
|
|
@ -1719,6 +1719,7 @@ export namespace modal_settings {
|
|||
const update_level_meter = () => {
|
||||
destroy_meters();
|
||||
|
||||
return; /* FIXME: Remove! */
|
||||
for(const device of arecorder.devices()) {
|
||||
let promise = arecorder.create_levelmeter(device).then(meter => {
|
||||
meter.set_observer(level => {
|
||||
|
|
|
@ -153,7 +153,7 @@ export class RecorderProfile {
|
|||
}
|
||||
|
||||
private save(enforce?: boolean) {
|
||||
if(enforce || !this.volatile)
|
||||
if(!this.volatile)
|
||||
settings.changeGlobal(Settings.FN_PROFILE_RECORD(this.name), this.config);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
/*
|
||||
* DO NOT MODIFY THIS FILE!
|
||||
*
|
||||
* This file has been auto generated by the svg-sprite generator.
|
||||
* Sprite source directory: D:\TeaSpeak\web\shared\img\client-icons
|
||||
* Sprite count: 200
|
||||
*/
|
||||
export type ClientIconClass = "client-about" | "client-activate_microphone" | "client-add" | "client-add_foe" | "client-add_folder" | "client-add_friend" | "client-addon-collection" | "client-addon" | "client-apply" | "client-arrow_down" | "client-arrow_left" | "client-arrow_right" | "client-arrow_up" | "client-away" | "client-ban_client" | "client-ban_list" | "client-bookmark_add" | "client-bookmark_add_folder" | "client-bookmark_duplicate" | "client-bookmark_manager" | "client-bookmark_remove" | "client-broken_image" | "client-browse-addon-online" | "client-capture" | "client-change_nickname" | "client-changelog" | "client-channel_chat" | "client-channel_collapse_all" | "client-channel_commander" | "client-channel_create" | "client-channel_create_sub" | "client-channel_default" | "client-channel_delete" | "client-channel_edit" | "client-channel_expand_all" | "client-channel_green" | "client-channel_green_subscribed" | "client-channel_green_subscribed2" | "client-channel_private" | "client-channel_red" | "client-channel_red_subscribed" | "client-channel_switch" | "client-channel_unsubscribed" | "client-channel_yellow" | "client-channel_yellow_subscribed" | "client-check_update" | "client-client_hide" | "client-client_show" | "client-close_button" | "client-complaint_list" | "client-conflict-icon" | "client-connect" | "client-contact" | "client-copy" | "client-copy_url" | "client-d_sound" | "client-d_sound_me" | "client-d_sound_user" | "client-default" | "client-default_for_all_bookmarks" | "client-delete" | "client-delete_avatar" | "client-disconnect" | "client-down" | "client-download" | "client-edit" | "client-edit_friend_foe_status" | "client-emoticon" | "client-error" | "client-file_home" | "client-file_refresh" | "client-filetransfer" | "client-find" | "client-folder" | "client-folder_up" | "client-group_100" | "client-group_200" | "client-group_300" | "client-group_500" | "client-group_600" | "client-guisetup" | "client-hardware_input_muted" | "client-hardware_output_muted" | "client-home" | "client-hoster_button" | "client-hotkeys" | "client-icon-pack" | "client-iconsview" | "client-iconviewer" | "client-identity_default" | "client-identity_export" | "client-identity_import" | "client-identity_manager" | "client-info" | "client-input_muted" | "client-input_muted_local" | "client-invite_buddy" | "client-is_talker" | "client-kick_channel" | "client-kick_server" | "client-listview" | "client-loading_image" | "client-message_incoming" | "client-message_info" | "client-message_outgoing" | "client-messages" | "client-moderated" | "client-move_client_to_own_channel" | "client-music" | "client-new_chat" | "client-notifications" | "client-offline_messages" | "client-on_whisperlist" | "client-output_muted" | "client-permission_channel" | "client-permission_client" | "client-permission_overview" | "client-permission_server_groups" | "client-phoneticsnickname" | "client-ping_1" | "client-ping_2" | "client-ping_3" | "client-ping_4" | "client-ping_calculating" | "client-ping_disconnected" | "client-play" | "client-player_chat" | "client-player_commander_off" | "client-player_commander_on" | "client-player_off" | "client-player_on" | "client-player_whisper" | "client-plugins" | "client-poke" | "client-present" | "client-recording_start" | "client-recording_stop" | "client-refresh" | "client-register" | "client-reload" | "client-remove_foe" | "client-remove_friend" | "client-security" | "client-selectfolder" | "client-send_complaint" | "client-server_green" | "client-server_log" | "client-server_query" | "client-settings" | "client-sort_by_name" | "client-sound-pack" | "client-soundpack" | "client-stop" | "client-subscribe_mode" | "client-subscribe_to_all_channels" | "client-subscribe_to_channel" | "client-subscribe_to_channel_family" | "client-switch_advanced" | "client-switch_standard" | "client-sync-disable" | "client-sync-enable" | "client-sync-icon" | "client-tab_close_button" | "client-talk_power_grant" | "client-talk_power_grant_next" | "client-talk_power_request" | "client-talk_power_request_cancel" | "client-talk_power_revoke" | "client-talk_power_revoke_all_grant_next" | "client-temp_server_password" | "client-temp_server_password_add" | "client-textformat" | "client-textformat_bold" | "client-textformat_foreground" | "client-textformat_italic" | "client-textformat_underline" | "client-theme" | "client-toggle_server_query_clients" | "client-toggle_whisper" | "client-token" | "client-token_use" | "client-translation" | "client-unsubscribe_from_all_channels" | "client-unsubscribe_from_channel_family" | "client-unsubscribe_mode" | "client-up" | "client-upload" | "client-upload_avatar" | "client-urlcatcher" | "client-user-account" | "client-virtualserver_edit" | "client-volume" | "client-w2g" | "client-warning" | "client-warning_external_link" | "client-warning_info" | "client-warning_question" | "client-weblist" | "client-whisper" | "client-whisperlists";
|
||||
|
||||
export enum ClientIcon {
|
||||
About = "client-about",
|
||||
ActivateMicrophone = "client-activate_microphone",
|
||||
|
@ -201,5 +209,18 @@ export enum ClientIcon {
|
|||
Whisper = "client-whisper",
|
||||
Whisperlists = "client-whisperlists",
|
||||
}
|
||||
|
||||
export const spriteEntries: {
|
||||
id: string;
|
||||
className: string;
|
||||
width: number;
|
||||
height: number;
|
||||
xOffset: number;
|
||||
yOffset: number;
|
||||
}[];
|
||||
|
||||
export const spriteUrl: string;
|
||||
export const classList: string[];
|
||||
export const classList: string[];
|
||||
|
||||
export const spriteWidth: number;
|
||||
export const spriteHeight: number;
|
|
@ -16,7 +16,7 @@
|
|||
"tc-backend/web/*": ["web/app/*"], /* specific web part */
|
||||
"tc-backend/*": ["shared/backend.d/*"],
|
||||
"tc-loader": ["loader/exports/loader.d.ts"],
|
||||
"svg-sprite/*": ["shared/svg-sprites/*"],
|
||||
"svg-sprites/*": ["shared/svg-sprites/*"],
|
||||
|
||||
"vendor/xbbcode/*": ["vendor/xbbcode/src/*"]
|
||||
}
|
||||
|
|
|
@ -18,13 +18,15 @@ class ManifestGenerator {
|
|||
apply(compiler: webpack.Compiler) {
|
||||
compiler.hooks.afterCompile.tap(this.constructor.name, compilation => {
|
||||
const chunks_data = {};
|
||||
for(const chunk_group of compilation.chunkGroups) {
|
||||
const js_files = [];
|
||||
const css_files = [];
|
||||
for(const chunkGroup of compilation.chunkGroups) {
|
||||
const fileJs = [];
|
||||
const filesCss = [];
|
||||
const modules = [];
|
||||
|
||||
for(const chunk of chunk_group.chunks) {
|
||||
if(!chunk.files.length) continue;
|
||||
for(const chunk of chunkGroup.chunks) {
|
||||
if(!chunk.files.length)
|
||||
continue;
|
||||
|
||||
if(chunk.files.length !== 1) {
|
||||
console.error("Expected only one file per chunk but got " + chunk.files.length);
|
||||
chunk.files.forEach(e => console.log(" - %s", e));
|
||||
|
@ -33,25 +35,39 @@ class ManifestGenerator {
|
|||
|
||||
for(const file of chunk.files) {
|
||||
const extension = path.extname(file);
|
||||
if(extension === ".js")
|
||||
js_files.push({
|
||||
if(extension === ".js") {
|
||||
fileJs.push({
|
||||
hash: chunk.hash,
|
||||
file: file
|
||||
});
|
||||
else if(extension === ".css")
|
||||
css_files.push({
|
||||
} else if(extension === ".css") {
|
||||
filesCss.push({
|
||||
hash: chunk.hash,
|
||||
file: file
|
||||
});
|
||||
else
|
||||
} else {
|
||||
throw "Unknown chunk file with extension " + extension;
|
||||
}
|
||||
}
|
||||
|
||||
for(const module of chunk._modules) {
|
||||
for(const module of chunk.getModules()) {
|
||||
if(!module.type.startsWith("javascript/"))
|
||||
continue;
|
||||
|
||||
if(!module.resource || !module.context)
|
||||
if(!module.context)
|
||||
continue;
|
||||
|
||||
if(module.context.startsWith("svg-sprites/")) {
|
||||
/* custom svg sprite handler */
|
||||
modules.push({
|
||||
id: module.id,
|
||||
context: "svg-sprites",
|
||||
resource: module.context.substring("svg-sprites/".length)
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!module.resource)
|
||||
continue;
|
||||
|
||||
if(module.context !== path.dirname(module.resource))
|
||||
|
@ -65,9 +81,9 @@ class ManifestGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
chunks_data[chunk_group.options.name] = {
|
||||
files: js_files,
|
||||
css_files: css_files,
|
||||
chunks_data[chunkGroup.options.name] = {
|
||||
files: fileJs,
|
||||
css_files: filesCss,
|
||||
modules: modules
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue