Removed the devel blocks
parent
a82d474b32
commit
1d27f33a96
|
@ -620,8 +620,9 @@ export class ChannelEntry extends ChannelTreeEntry<ChannelEvents> {
|
|||
}
|
||||
|
||||
updateVariables(...variables: {key: string, value: string}[]) {
|
||||
/* devel-block(log-channel-property-updates) */
|
||||
let group = log.group(log.LogType.DEBUG, LogCategory.CHANNEL_PROPERTIES, tr("Update properties (%i) of %s (%i)"), variables.length, this.channelName(), this.getChannelId());
|
||||
let group;
|
||||
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 = [];
|
||||
|
@ -633,7 +634,7 @@ export class ChannelEntry extends ChannelTreeEntry<ChannelEvents> {
|
|||
});
|
||||
log.table(LogType.DEBUG, LogCategory.PERMISSIONS, "Clannel update properties", entries);
|
||||
}
|
||||
/* devel-block-end */
|
||||
}
|
||||
|
||||
/* 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();
|
||||
/* devel-block-end */
|
||||
|
||||
group?.end();
|
||||
|
||||
{
|
||||
let properties = {};
|
||||
for(const property of variables)
|
||||
|
|
|
@ -731,8 +731,9 @@ export class ClientEntry<Events extends ClientEvents = ClientEvents> extends Cha
|
|||
let reorder_channel = false;
|
||||
let update_avatar = false;
|
||||
|
||||
/* devel-block(log-client-property-updates) */
|
||||
let group = log.group(log.LogType.DEBUG, LogCategory.CLIENT, tr("Update properties (%i) of %s (%i)"), variables.length, this.clientNickName(), this.clientId());
|
||||
let group;
|
||||
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 = [];
|
||||
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);
|
||||
}
|
||||
/* devel-block-end */
|
||||
}
|
||||
|
||||
for(const variable of variables) {
|
||||
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);
|
||||
}
|
||||
|
||||
/* devel-block(log-client-property-updates) */
|
||||
group.end();
|
||||
/* devel-block-end */
|
||||
group?.end();
|
||||
|
||||
{
|
||||
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 { Plugin as SvgSpriteGenerator } from "webpack-svg-sprite-generator";
|
||||
|
||||
import LoaderIndexGenerator = require("./loader/IndexGenerator");
|
||||
import LoaderIndexGenerator from "./loader/IndexGenerator";
|
||||
import {Configuration} from "webpack";
|
||||
|
||||
const path = require('path');
|
||||
|
@ -20,7 +20,7 @@ const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|||
|
||||
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");
|
||||
const generate_definitions = async (target: string) => {
|
||||
const generateDefinitions = async (target: string) => {
|
||||
const git_rev = fs.readFileSync(path.join(__dirname, ".git", "HEAD")).toString();
|
||||
let version;
|
||||
if(git_rev.indexOf("/") === -1)
|
||||
|
@ -83,7 +83,7 @@ export const config = async (target: "web" | "client"): Promise<Configuration> =
|
|||
minSize: 1024 * 8,
|
||||
maxSize: 1024 * 128
|
||||
}),
|
||||
new webpack.DefinePlugin(await generate_definitions(target)),
|
||||
new webpack.DefinePlugin(await generateDefinitions(target)),
|
||||
new SvgSpriteGenerator({
|
||||
dtsOutputFolder: path.join(__dirname, "shared", "svg-sprites"),
|
||||
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