Removed the devel blocks
parent
a82d474b32
commit
1d27f33a96
|
@ -620,8 +620,9 @@ export class ChannelEntry extends ChannelTreeEntry<ChannelEvents> {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateVariables(...variables: {key: string, value: string}[]) {
|
updateVariables(...variables: {key: string, value: string}[]) {
|
||||||
/* devel-block(log-channel-property-updates) */
|
let group;
|
||||||
let group = log.group(log.LogType.DEBUG, LogCategory.CHANNEL_PROPERTIES, tr("Update properties (%i) of %s (%i)"), variables.length, this.channelName(), this.getChannelId());
|
if(__build.mode === "debug") {
|
||||||
|
group = log.group(log.LogType.DEBUG, LogCategory.CHANNEL_PROPERTIES, tr("Update properties (%i) of %s (%i)"), variables.length, this.channelName(), this.getChannelId());
|
||||||
|
|
||||||
{
|
{
|
||||||
const entries = [];
|
const entries = [];
|
||||||
|
@ -633,7 +634,7 @@ export class ChannelEntry extends ChannelTreeEntry<ChannelEvents> {
|
||||||
});
|
});
|
||||||
log.table(LogType.DEBUG, LogCategory.PERMISSIONS, "Clannel update properties", entries);
|
log.table(LogType.DEBUG, LogCategory.PERMISSIONS, "Clannel update properties", entries);
|
||||||
}
|
}
|
||||||
/* devel-block-end */
|
}
|
||||||
|
|
||||||
/* TODO: Validate values. Example: channel_conversation_mode */
|
/* TODO: Validate values. Example: channel_conversation_mode */
|
||||||
|
|
||||||
|
@ -664,9 +665,9 @@ export class ChannelEntry extends ChannelTreeEntry<ChannelEvents> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* devel-block(log-channel-property-updates) */
|
|
||||||
group.end();
|
group?.end();
|
||||||
/* devel-block-end */
|
|
||||||
{
|
{
|
||||||
let properties = {};
|
let properties = {};
|
||||||
for(const property of variables)
|
for(const property of variables)
|
||||||
|
|
|
@ -731,8 +731,9 @@ export class ClientEntry<Events extends ClientEvents = ClientEvents> extends Cha
|
||||||
let reorder_channel = false;
|
let reorder_channel = false;
|
||||||
let update_avatar = false;
|
let update_avatar = false;
|
||||||
|
|
||||||
/* devel-block(log-client-property-updates) */
|
let group;
|
||||||
let group = log.group(log.LogType.DEBUG, LogCategory.CLIENT, tr("Update properties (%i) of %s (%i)"), variables.length, this.clientNickName(), this.clientId());
|
if(__build.mode === "debug") {
|
||||||
|
group = log.group(log.LogType.DEBUG, LogCategory.CLIENT, tr("Update properties (%i) of %s (%i)"), variables.length, this.clientNickName(), this.clientId());
|
||||||
{
|
{
|
||||||
const entries = [];
|
const entries = [];
|
||||||
for(const variable of variables)
|
for(const variable of variables)
|
||||||
|
@ -743,7 +744,7 @@ export class ClientEntry<Events extends ClientEvents = ClientEvents> extends Cha
|
||||||
});
|
});
|
||||||
log.table(LogType.DEBUG, LogCategory.PERMISSIONS, "Client update properties", entries);
|
log.table(LogType.DEBUG, LogCategory.PERMISSIONS, "Client update properties", entries);
|
||||||
}
|
}
|
||||||
/* devel-block-end */
|
}
|
||||||
|
|
||||||
for(const variable of variables) {
|
for(const variable of variables) {
|
||||||
const old_value = this._properties[variable.key];
|
const old_value = this._properties[variable.key];
|
||||||
|
@ -788,9 +789,7 @@ export class ClientEntry<Events extends ClientEvents = ClientEvents> extends Cha
|
||||||
this.channelTree.client?.fileManager?.avatars.updateCache(this.avatarId(), this.properties.client_flag_avatar);
|
this.channelTree.client?.fileManager?.avatars.updateCache(this.avatarId(), this.properties.client_flag_avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* devel-block(log-client-property-updates) */
|
group?.end();
|
||||||
group.end();
|
|
||||||
/* devel-block-end */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
let properties = {};
|
let properties = {};
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
export interface ModalWhatsNewVariables {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ModalWhatsNewEvents {
|
||||||
|
|
||||||
|
}
|
|
@ -5,7 +5,7 @@ import {exec} from "child_process";
|
||||||
import * as util from "util";
|
import * as util from "util";
|
||||||
import { Plugin as SvgSpriteGenerator } from "webpack-svg-sprite-generator";
|
import { Plugin as SvgSpriteGenerator } from "webpack-svg-sprite-generator";
|
||||||
|
|
||||||
import LoaderIndexGenerator = require("./loader/IndexGenerator");
|
import LoaderIndexGenerator from "./loader/IndexGenerator";
|
||||||
import {Configuration} from "webpack";
|
import {Configuration} from "webpack";
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
@ -20,7 +20,7 @@ const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
||||||
|
|
||||||
export let isDevelopment = process.env.NODE_ENV === 'development';
|
export let isDevelopment = process.env.NODE_ENV === 'development';
|
||||||
console.log("Webpacking for %s (%s)", isDevelopment ? "development" : "production", process.env.NODE_ENV || "NODE_ENV not specified");
|
console.log("Webpacking for %s (%s)", isDevelopment ? "development" : "production", process.env.NODE_ENV || "NODE_ENV not specified");
|
||||||
const generate_definitions = async (target: string) => {
|
const generateDefinitions = async (target: string) => {
|
||||||
const git_rev = fs.readFileSync(path.join(__dirname, ".git", "HEAD")).toString();
|
const git_rev = fs.readFileSync(path.join(__dirname, ".git", "HEAD")).toString();
|
||||||
let version;
|
let version;
|
||||||
if(git_rev.indexOf("/") === -1)
|
if(git_rev.indexOf("/") === -1)
|
||||||
|
@ -83,7 +83,7 @@ export const config = async (target: "web" | "client"): Promise<Configuration> =
|
||||||
minSize: 1024 * 8,
|
minSize: 1024 * 8,
|
||||||
maxSize: 1024 * 128
|
maxSize: 1024 * 128
|
||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin(await generate_definitions(target)),
|
new webpack.DefinePlugin(await generateDefinitions(target)),
|
||||||
new SvgSpriteGenerator({
|
new SvgSpriteGenerator({
|
||||||
dtsOutputFolder: path.join(__dirname, "shared", "svg-sprites"),
|
dtsOutputFolder: path.join(__dirname, "shared", "svg-sprites"),
|
||||||
configurations: {
|
configurations: {
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
import {RawSourceMap} from "source-map";
|
|
||||||
import * as webpack from "webpack";
|
|
||||||
import * as loaderUtils from "loader-utils";
|
|
||||||
|
|
||||||
import LoaderContext = webpack.loader.LoaderContext;
|
|
||||||
|
|
||||||
export default function loader(this: LoaderContext, source: string | Buffer, sourceMap?: RawSourceMap): string | Buffer | void | undefined {
|
|
||||||
this.cacheable();
|
|
||||||
|
|
||||||
const options = loaderUtils.getOptions(this);
|
|
||||||
if(!options.enabled) {
|
|
||||||
this.callback(null, source);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const start_regex = "devel-block\\((?<name>\\S+)\\)";
|
|
||||||
const end_regex = "devel-block-end";
|
|
||||||
|
|
||||||
const pattern = new RegExp("[\\t ]*\\/\\* ?" + start_regex + " ?\\*\\/[\\s\\S]*?\\/\\* ?" + end_regex + " ?\\*\\/[\\t ]*\\n?", "g");
|
|
||||||
source = (source as string).replace(pattern, (value, type) => {
|
|
||||||
if(type === "log-networking-commands")
|
|
||||||
return value;
|
|
||||||
|
|
||||||
return "/* snipped block \"" + type + "\" */";
|
|
||||||
});
|
|
||||||
this.callback(null, source);
|
|
||||||
}
|
|
Loading…
Reference in New Issue