Merged all scss files directly into the app and do not load them separately
parent
3fe530a55d
commit
21c51548eb
|
@ -1,29 +0,0 @@
|
||||||
html, body {
|
|
||||||
border: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-container {
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: absolute;
|
|
||||||
display: flex;
|
|
||||||
justify-content: stretch;
|
|
||||||
|
|
||||||
.app {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
display: flex; flex-direction: column; resize: both;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
display: none!important;
|
|
||||||
}
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
:global {
|
||||||
|
html, body {
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-container {
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
justify-content: stretch;
|
||||||
|
|
||||||
|
.app {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
display: flex; flex-direction: column; resize: both;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
display: none!important;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,7 @@
|
||||||
declare const __webpack_require__;
|
declare const __webpack_require__;
|
||||||
window["shared-require"] = __webpack_require__;
|
window["shared-require"] = __webpack_require__;
|
||||||
|
|
||||||
|
import "./index.scss";
|
||||||
|
|
||||||
/* firstly assign the shared-require */
|
/* firstly assign the shared-require */
|
||||||
setTimeout(() => require("tc-shared/main"), 0);
|
setTimeout(() => require("tc-shared/main"), 0);
|
164
file.ts
164
file.ts
|
@ -62,47 +62,6 @@ const APP_FILE_LIST_SHARED_SOURCE: ProjectResource[] = [
|
||||||
"path": "css/",
|
"path": "css/",
|
||||||
"local-path": "./loader/css/"
|
"local-path": "./loader/css/"
|
||||||
},
|
},
|
||||||
{ /* shared developer single css files */
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.css$/,
|
|
||||||
"build-target": "dev",
|
|
||||||
|
|
||||||
"path": "css/",
|
|
||||||
"local-path": "./shared/css/"
|
|
||||||
},
|
|
||||||
{ /* shared css mapping files (development mode only) */
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.(css.map|scss)$/,
|
|
||||||
"build-target": "dev",
|
|
||||||
|
|
||||||
"path": "css/",
|
|
||||||
"local-path": "./shared/css/",
|
|
||||||
"req-parm": ["--mappings"]
|
|
||||||
},
|
|
||||||
{ /* shared release css files */
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.css$/,
|
|
||||||
"build-target": "rel",
|
|
||||||
|
|
||||||
"path": "css/",
|
|
||||||
"local-path": "./shared/generated/"
|
|
||||||
},
|
|
||||||
{ /* shared release css files */
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.css$/,
|
|
||||||
"build-target": "rel",
|
|
||||||
|
|
||||||
"path": "css/loader/",
|
|
||||||
"local-path": "./shared/css/loader/"
|
|
||||||
},
|
|
||||||
{ /* shared release css files */
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.css$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "css/theme/",
|
|
||||||
"local-path": "./shared/css/theme/"
|
|
||||||
},
|
|
||||||
{ /* shared sound files */
|
{ /* shared sound files */
|
||||||
"type": "wav",
|
"type": "wav",
|
||||||
"search-pattern": /.*\.wav$/,
|
"search-pattern": /.*\.wav$/,
|
||||||
|
@ -129,17 +88,7 @@ const APP_FILE_LIST_SHARED_SOURCE: ProjectResource[] = [
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const APP_FILE_LIST_SHARED_VENDORS: ProjectResource[] = [
|
const APP_FILE_LIST_SHARED_VENDORS: ProjectResource[] = [];
|
||||||
{
|
|
||||||
"type": "js",
|
|
||||||
"search-pattern": /.*(\.min)?\.js$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
"search-exclude": /.*xbbcode.*/g,
|
|
||||||
|
|
||||||
"path": "vendor/",
|
|
||||||
"local-path": "./vendor/"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const APP_FILE_LIST_CLIENT_SOURCE: ProjectResource[] = [
|
const APP_FILE_LIST_CLIENT_SOURCE: ProjectResource[] = [
|
||||||
{ /* client css files */
|
{ /* client css files */
|
||||||
|
@ -172,24 +121,6 @@ const APP_FILE_LIST_WEB_SOURCE: ProjectResource[] = [
|
||||||
"path": "wasm/",
|
"path": "wasm/",
|
||||||
"local-path": "./web/native-codec/generated/"
|
"local-path": "./web/native-codec/generated/"
|
||||||
},
|
},
|
||||||
{ /* web css files */
|
|
||||||
"web-only": true,
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.css$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "css/",
|
|
||||||
"local-path": "./web/css/"
|
|
||||||
},
|
|
||||||
{ /* web html files */
|
|
||||||
"web-only": true,
|
|
||||||
"type": "html",
|
|
||||||
"search-pattern": /.*\.(html)/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "./",
|
|
||||||
"local-path": "./web/html/"
|
|
||||||
},
|
|
||||||
{ /* translations */
|
{ /* translations */
|
||||||
"web-only": true, /* Only required for the web client */
|
"web-only": true, /* Only required for the web client */
|
||||||
"type": "i18n",
|
"type": "i18n",
|
||||||
|
@ -201,98 +132,6 @@ const APP_FILE_LIST_WEB_SOURCE: ProjectResource[] = [
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
//FIXME: This isn't working right now
|
|
||||||
const CERTACCEPT_FILE_LIST: ProjectResource[] = [
|
|
||||||
{ /* html files */
|
|
||||||
"type": "html",
|
|
||||||
"search-pattern": /^([a-zA-Z]+)\.(html|json)$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/",
|
|
||||||
"local-path": "./shared/popup/certaccept/html/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* javascript loader (debug) */
|
|
||||||
"type": "js",
|
|
||||||
"search-pattern": /(loader|certaccept)\.js$/,
|
|
||||||
"build-target": "dev",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/loader/",
|
|
||||||
"local-path": "./shared/loader/"
|
|
||||||
},
|
|
||||||
{ /* javascript loader (releases) */
|
|
||||||
"type": "js",
|
|
||||||
"search-pattern": /.*loader_certaccept.min.js$/,
|
|
||||||
"build-target": "rel",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/loader/",
|
|
||||||
"local-path": "./shared/generated/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* javascript imported from shared for debug */
|
|
||||||
"type": "js",
|
|
||||||
"search-pattern": /^(BrowserIPC|log|proto|settings)\.js$/,
|
|
||||||
"build-target": "dev",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/js/",
|
|
||||||
"local-path": "./shared/js/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* javascript for debug */
|
|
||||||
"type": "js",
|
|
||||||
"search-pattern": /^certaccept\.min\.js$/,
|
|
||||||
"build-target": "rel",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/js/",
|
|
||||||
"local-path": "./shared/generated/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* javascript for release */
|
|
||||||
"type": "js",
|
|
||||||
"search-pattern": /^.*\.js$/,
|
|
||||||
"build-target": "dev",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/js/",
|
|
||||||
"local-path": "./shared/popup/certaccept/js/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* shared css files */
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.css$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/css/loader/",
|
|
||||||
"local-path": "./shared/css/loader/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* shared css files */
|
|
||||||
"type": "css",
|
|
||||||
"search-pattern": /.*\.css$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/css/static/",
|
|
||||||
"local-path": "./shared/popup/certaccept/css/static/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* img files */
|
|
||||||
"type": "img",
|
|
||||||
"search-pattern": /^(loading_error.*)\.(svg)$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/img/",
|
|
||||||
"local-path": "./shared/img/"
|
|
||||||
},
|
|
||||||
|
|
||||||
{ /* jquery vendor */
|
|
||||||
"type": "js",
|
|
||||||
"search-pattern": /^jquery\/.*\.js$/,
|
|
||||||
"build-target": "dev|rel",
|
|
||||||
|
|
||||||
"path": "./popup/certaccept/vendor/",
|
|
||||||
"local-path": "./vendor/"
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const CLIENT_APP_FILE_LIST = [
|
const CLIENT_APP_FILE_LIST = [
|
||||||
...APP_FILE_LIST_SHARED_SOURCE,
|
...APP_FILE_LIST_SHARED_SOURCE,
|
||||||
...APP_FILE_LIST_SHARED_VENDORS,
|
...APP_FILE_LIST_SHARED_VENDORS,
|
||||||
|
@ -303,7 +142,6 @@ const WEB_APP_FILE_LIST = [
|
||||||
...APP_FILE_LIST_SHARED_SOURCE,
|
...APP_FILE_LIST_SHARED_SOURCE,
|
||||||
...APP_FILE_LIST_SHARED_VENDORS,
|
...APP_FILE_LIST_SHARED_VENDORS,
|
||||||
...APP_FILE_LIST_WEB_SOURCE,
|
...APP_FILE_LIST_WEB_SOURCE,
|
||||||
...CERTACCEPT_FILE_LIST,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
|
|
@ -68,76 +68,6 @@ const loader_webassembly = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const loader_style = {
|
|
||||||
load_style: async taskId => {
|
|
||||||
if(__build.mode === "debug") {
|
|
||||||
await loader_style.load_style_debug(taskId);
|
|
||||||
} else {
|
|
||||||
await loader_style.load_style_release(taskId);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
load_style_debug: async taskId => {
|
|
||||||
await loader.style.load_multiple([
|
|
||||||
"css/static/main.css",
|
|
||||||
"css/static/main-layout.css",
|
|
||||||
"css/static/scroll.css",
|
|
||||||
"css/static/channel-tree.css",
|
|
||||||
"css/static/ts/tab.css",
|
|
||||||
"css/static/ts/icons.css",
|
|
||||||
"css/static/ts/icons_em.css",
|
|
||||||
"css/static/ts/country.css",
|
|
||||||
"css/static/general.css",
|
|
||||||
"css/static/modal.css",
|
|
||||||
"css/static/modals.css",
|
|
||||||
"css/static/modal-about.css",
|
|
||||||
"css/static/modal-avatar.css",
|
|
||||||
"css/static/modal-icons.css",
|
|
||||||
"css/static/modal-bookmarks.css",
|
|
||||||
"css/static/modal-connect.css",
|
|
||||||
"css/static/modal-channel.css",
|
|
||||||
"css/static/modal-query.css",
|
|
||||||
"css/static/modal-latency.css",
|
|
||||||
"css/static/modal-invite.css",
|
|
||||||
"css/static/modal-banlist.css",
|
|
||||||
"css/static/modal-banclient.css",
|
|
||||||
"css/static/modal-channelinfo.css",
|
|
||||||
"css/static/modal-clientinfo.css",
|
|
||||||
"css/static/modal-serverinfo.css",
|
|
||||||
"css/static/modal-musicmanage.css",
|
|
||||||
"css/static/modal-serverinfobandwidth.css",
|
|
||||||
"css/static/modal-identity.css",
|
|
||||||
"css/static/modal-newcomer.css",
|
|
||||||
"css/static/modal-settings.css",
|
|
||||||
"css/static/modal-poke.css",
|
|
||||||
"css/static/modal-server.css",
|
|
||||||
"css/static/modal-keyselect.css",
|
|
||||||
"css/static/modal-group-assignment.css",
|
|
||||||
"css/static/overlay-image-preview.css",
|
|
||||||
"css/static/context_menu.css",
|
|
||||||
"css/static/frame-chat.css",
|
|
||||||
"css/static/connection_handlers.css",
|
|
||||||
"css/static/server-log.css",
|
|
||||||
"css/static/htmltags.css",
|
|
||||||
"css/static/hostbanner.css",
|
|
||||||
"css/static/menu-bar.css"
|
|
||||||
], {
|
|
||||||
cache_tag: cache_tag(),
|
|
||||||
max_parallel_requests: -1
|
|
||||||
}, LoaderTaskCallback(taskId));
|
|
||||||
},
|
|
||||||
|
|
||||||
load_style_release: async taskId => {
|
|
||||||
await loader.style.load_multiple([
|
|
||||||
"css/static/base.css",
|
|
||||||
"css/static/main.css",
|
|
||||||
], {
|
|
||||||
cache_tag: cache_tag(),
|
|
||||||
max_parallel_requests: -1
|
|
||||||
}, LoaderTaskCallback(taskId));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
loader.register_task(loader.Stage.INITIALIZING, {
|
loader.register_task(loader.Stage.INITIALIZING, {
|
||||||
name: "secure tester",
|
name: "secure tester",
|
||||||
function: async () => {
|
function: async () => {
|
||||||
|
@ -165,12 +95,6 @@ loader.register_task(loader.Stage.JAVASCRIPT, {
|
||||||
priority: 10
|
priority: 10
|
||||||
});
|
});
|
||||||
|
|
||||||
loader.register_task(loader.Stage.STYLE, {
|
|
||||||
name: "style",
|
|
||||||
function: loader_style.load_style,
|
|
||||||
priority: 10
|
|
||||||
});
|
|
||||||
|
|
||||||
loader.register_task(loader.Stage.TEMPLATES, {
|
loader.register_task(loader.Stage.TEMPLATES, {
|
||||||
name: "templates",
|
name: "templates",
|
||||||
function: async taskId => {
|
function: async taskId => {
|
||||||
|
|
11
package.json
11
package.json
|
@ -1,22 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "client",
|
"name": "teaspeak-web",
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"description": "Welcome here! This repository is created with two reasons:\n 1. People can bring their own ideas and follow their implementation\n 2. People can see TeaSpeak Web client progress and avoid creating repetitive issues all the time.",
|
"description": "Welcome here! This repository is created with two reasons:\n 1. People can bring their own ideas and follow their implementation\n 2. People can see TeaSpeak Web client progress and avoid creating repetitive issues all the time.",
|
||||||
"main": "main.js",
|
|
||||||
"directories": {},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile-sass": "sass --update shared/css/:shared/css/ loader/css/:loader/css/ web/css/:web/css/ client/css/:client/css/ vendor/:vendor/",
|
|
||||||
"compile-project-base": "tsc -p tsbaseconfig.json",
|
"compile-project-base": "tsc -p tsbaseconfig.json",
|
||||||
"dtsgen": "node tools/dtsgen/index.js",
|
"dtsgen": "node tools/dtsgen/index.js",
|
||||||
"trgen": "node tools/trgen/index.js",
|
"trgen": "node tools/trgen/index.js",
|
||||||
"sass": "sass",
|
|
||||||
"csso": "csso",
|
|
||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"start": "npm run compile-project-base && node file.js ndevelop",
|
"start": "npm run compile-project-base && node file.js ndevelop",
|
||||||
"build-web": "webpack --config webpack-web.config.js",
|
"build-web": "webpack --config webpack-web.config.js",
|
||||||
"develop-web": "npm run compile-project-base && node file.js develop web",
|
|
||||||
"build-client": "webpack --config webpack-client.config.js",
|
"build-client": "webpack --config webpack-client.config.js",
|
||||||
"develop-client": "npm run compile-project-base && node file.js develop client",
|
|
||||||
"webpack-web": "webpack --config webpack-web.config.js",
|
"webpack-web": "webpack --config webpack-web.config.js",
|
||||||
"webpack-client": "webpack --config webpack-client.config.js",
|
"webpack-client": "webpack --config webpack-client.config.js",
|
||||||
"generate-i18n-gtranslate": "node shared/generate_i18n_gtranslate.js"
|
"generate-i18n-gtranslate": "node shared/generate_i18n_gtranslate.js"
|
||||||
|
@ -24,6 +17,7 @@
|
||||||
"author": "TeaSpeak (WolverinDEV)",
|
"author": "TeaSpeak (WolverinDEV)",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/jsrender": "^1.0.5",
|
||||||
"@babel/core": "^7.10.4",
|
"@babel/core": "^7.10.4",
|
||||||
"@babel/plugin-transform-runtime": "^7.10.4",
|
"@babel/plugin-transform-runtime": "^7.10.4",
|
||||||
"@babel/preset-env": "^7.10.4",
|
"@babel/preset-env": "^7.10.4",
|
||||||
|
@ -89,7 +83,6 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://www.teaspeak.de",
|
"homepage": "https://www.teaspeak.de",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/jsrender": "^1.0.5",
|
|
||||||
"detect-browser": "^5.1.1",
|
"detect-browser": "^5.1.1",
|
||||||
"dompurify": "^2.0.8",
|
"dompurify": "^2.0.8",
|
||||||
"emoji-mart": "git+https://github.com/WolverinDEV/emoji-mart.git",
|
"emoji-mart": "git+https://github.com/WolverinDEV/emoji-mart.git",
|
||||||
|
|
|
@ -49,36 +49,7 @@ if [[ $_exit_code -ne 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Generating style files"
|
|
||||||
npm run compile-sass; _exit_code=$?
|
|
||||||
if [[ $_exit_code -ne 0 ]]; then
|
|
||||||
echo "Failed to generate style files"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Compile vendor XBBCode"
|
|
||||||
execute_tsc -p ./vendor/xbbcode/tsconfig.json; _exit_code=$?
|
|
||||||
if [[ $_exit_code -ne 0 ]]; then
|
|
||||||
echo "Failed to build the XBBCode vendor"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Compile vendor emoji-picker"
|
|
||||||
execute_tsc ./vendor/emoji-picker/src/jquery.lsxemojipicker.ts
|
|
||||||
if [[ $_exit_code -ne 0 ]]; then
|
|
||||||
echo "Failed to build the emoji-picker vendor"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$build_type" == "release" ]]; then # Compile everything for release mode
|
if [[ "$build_type" == "release" ]]; then # Compile everything for release mode
|
||||||
echo "Packing generated css files"
|
|
||||||
chmod +x ./shared/css/generate_packed.sh
|
|
||||||
./shared/css/generate_packed.sh; _exit_code=$?
|
|
||||||
if [[ $_exit_code -ne 0 ]]; then
|
|
||||||
echo "Failed to package generated css files"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
NODE_ENV=production npm run build-$build_target; _exit_code=$?
|
NODE_ENV=production npm run build-$build_target; _exit_code=$?
|
||||||
if [[ $_exit_code -ne 0 ]]; then
|
if [[ $_exit_code -ne 0 ]]; then
|
||||||
echo "Failed to build the $build_target applcation"
|
echo "Failed to build the $build_target applcation"
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/properties.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/main-layout.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/general.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/channel-tree.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/connection_handlers.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/context_menu.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/frame-chat.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/server-log.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/scroll.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/hostbanner.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/htmltags.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/menu-bar.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/mixin.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modals.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-about.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-avatar.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-banclient.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-banlist.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-bookmarks.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-channel.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-channelinfo.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-clientinfo.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-connect.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-group-assignment.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-icons.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-identity.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-newcomer.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-invite.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-keyselect.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-poke.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-query.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-server.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-musicmanage.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-serverinfobandwidth.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-serverinfo.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/modal-settings.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/overlay-image-preview.scss"
|
||||||
|
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/ts/tab.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/ts/icons.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/ts/icons_em.scss"
|
||||||
|
import "!style-loader!css-loader?url=false!sass-loader?sourceMap=true!./static/ts/country.scss"
|
|
@ -35,6 +35,7 @@ import {copy_to_clipboard} from "tc-shared/utils/helpers";
|
||||||
import ContextMenuEvent = JQuery.ContextMenuEvent;
|
import ContextMenuEvent = JQuery.ContextMenuEvent;
|
||||||
|
|
||||||
/* required import for init */
|
/* required import for init */
|
||||||
|
import "../css/load-css"
|
||||||
import "./proto";
|
import "./proto";
|
||||||
import "./ui/elements/ContextDivider";
|
import "./ui/elements/ContextDivider";
|
||||||
import "./ui/elements/Tab";
|
import "./ui/elements/Tab";
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
body {
|
|
||||||
position: fixed;
|
|
||||||
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
background-color: #212529;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container-success {
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: stretch;
|
|
||||||
|
|
||||||
.container {
|
|
||||||
flex-grow: 0;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
align-self: center;
|
|
||||||
|
|
||||||
color: #999999;
|
|
||||||
background-color: #19191b;
|
|
||||||
|
|
||||||
border-radius: 5px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
margin: 1em;
|
|
||||||
|
|
||||||
max-width: 80%;
|
|
||||||
width: 40em;
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 1em;
|
|
||||||
|
|
||||||
border-left: 2px solid #00d400;
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.spacer-top {
|
|
||||||
flex-shrink: 1;
|
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
height: 10%;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spacer-bottom {
|
|
||||||
flex-shrink: 1;
|
|
||||||
flex-grow: 4;
|
|
||||||
|
|
||||||
height: 10%;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,112 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
|
|
||||||
<title>Certificate callback</title>
|
|
||||||
|
|
||||||
<meta name="app-loader-target" content="certaccept">
|
|
||||||
|
|
||||||
<!-- required static style for the critical page and the enable javascript page -->
|
|
||||||
<style>
|
|
||||||
.fulloverlay {
|
|
||||||
z-index: 10000;
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
|
|
||||||
background-color: gray;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fulloverlay .container {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
top: 20%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#critical-load.shown {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-height: 750px) {
|
|
||||||
#critical-load .container {
|
|
||||||
top: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
#critical-load {
|
|
||||||
font-size: .8rem;
|
|
||||||
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#critical-load.shown {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<x-properties id="properties" style="display: none"> </x-properties>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="style">
|
|
||||||
<link rel="stylesheet" href="css/loader/loader.css">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="scripts">
|
|
||||||
<script type="application/javascript" src="loader/loader_certaccept.min.js" defer></script>
|
|
||||||
<script type="application/javascript" src="loader/loader_certaccept.js" defer></script>
|
|
||||||
<script type="application/javascript" src="loader/loader.js?_<?php echo time() ?>" defer></script>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Loading screen -->
|
|
||||||
<div class="loader" id="loader-overlay">
|
|
||||||
<div class="half right"></div>
|
|
||||||
<div class="half left"></div>
|
|
||||||
<div class="bookshelf_wrapper">
|
|
||||||
<ul class="books_list">
|
|
||||||
<li class="book_item first"></li>
|
|
||||||
<li class="book_item second"></li>
|
|
||||||
<li class="book_item third"></li>
|
|
||||||
<li class="book_item fourth"></li>
|
|
||||||
<li class="book_item fifth"></li>
|
|
||||||
<li class="book_item sixth"></li>
|
|
||||||
</ul>
|
|
||||||
<div class="shelf"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Critical load error -->
|
|
||||||
<div class="fulloverlay" id="critical-load">
|
|
||||||
<div class="container">
|
|
||||||
<img src="img/loading_error_right.svg" style="height: 12em">
|
|
||||||
<h1 class="error" style="color: red; margin-bottom: 0"></h1>
|
|
||||||
<h3 class="detail" style="margin-top: .5em"></h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- success window -->
|
|
||||||
<div id="container-success">
|
|
||||||
<div class="spacer-top"></div>
|
|
||||||
<div class="container">
|
|
||||||
<div class="content">
|
|
||||||
<h1>Success!</h1>
|
|
||||||
<p>
|
|
||||||
<a>You've successfully accepted the certificate.</a>
|
|
||||||
<a>You will now connecting to the target server in the original tab.</a>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a>This window will close automatically in <span id="time-left">X</span> seconds!</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="spacer-bottom"></div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,68 +0,0 @@
|
||||||
import {settings, Settings} from "tc-shared/settings";
|
|
||||||
import * as loader from "tc-loader";
|
|
||||||
import * as log from "tc-shared/log";
|
|
||||||
import {LogCategory} from "tc-shared/log";
|
|
||||||
import * as bipc from "tc-shared/ipc/BrowserIPC";
|
|
||||||
|
|
||||||
const is_debug = false; //TODO: Sync with loader!
|
|
||||||
function tr(text: string) { return text; }
|
|
||||||
|
|
||||||
loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
|
|
||||||
name: "certificate accept tester",
|
|
||||||
function: async () => {
|
|
||||||
const certificate_accept = settings.static_global(Settings.KEY_CERTIFICATE_CALLBACK, undefined);
|
|
||||||
const container_success = $("#container-success").hide();
|
|
||||||
|
|
||||||
if(!certificate_accept) {
|
|
||||||
loader.critical_error(tr("Missing certificate callback data"), tr("Please reconnect manually."));
|
|
||||||
throw "missing data";
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info(LogCategory.IPC, tr("Using this instance as certificate callback. ID: %s"), certificate_accept);
|
|
||||||
try {
|
|
||||||
await bipc.getInstance().post_certificate_accpected(certificate_accept);
|
|
||||||
log.info(LogCategory.IPC, tr("Other instance has acknowledged out work. Closing this window."));
|
|
||||||
|
|
||||||
let seconds = 5;
|
|
||||||
let interval_id;
|
|
||||||
interval_id = setInterval(() => {
|
|
||||||
seconds--;
|
|
||||||
$("#time-left").text(seconds.toString());
|
|
||||||
|
|
||||||
if(seconds <= 0) {
|
|
||||||
clearTimeout(interval_id);
|
|
||||||
log.info(LogCategory.GENERAL, tr("Closing window"));
|
|
||||||
window.close();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
container_success.show();
|
|
||||||
} catch(error) {
|
|
||||||
log.warn(LogCategory.IPC, tr("Failed to successfully post certificate accept status: %o"), error);
|
|
||||||
loader.critical_error(tr("Failed to emit success!"), tr("Please reconnect manually."));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
priority: 10
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
|
|
||||||
name: "settings initialisation",
|
|
||||||
function: async () => Settings.initialize(),
|
|
||||||
priority: 200
|
|
||||||
});
|
|
||||||
|
|
||||||
loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
|
|
||||||
name: "bipc initialisation",
|
|
||||||
function: async () => bipc.setup(),
|
|
||||||
priority: 100
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
|
|
||||||
name: "log enabled initialisation",
|
|
||||||
function: async () => log.initialize(is_debug ? log.LogType.TRACE : log.LogType.INFO),
|
|
||||||
priority: 150
|
|
||||||
});
|
|
|
@ -12,7 +12,7 @@
|
||||||
"paths": {
|
"paths": {
|
||||||
"*": ["shared/declarations/*"],
|
"*": ["shared/declarations/*"],
|
||||||
"tc-shared/*": ["shared/js/*"],
|
"tc-shared/*": ["shared/js/*"],
|
||||||
"tc-backend/web/*": ["web/js/*"], /* specific web part */
|
"tc-backend/web/*": ["web/app/*"], /* specific web part */
|
||||||
"tc-backend/*": ["shared/backend.d/*"],
|
"tc-backend/*": ["shared/backend.d/*"],
|
||||||
"tc-loader": ["loader/exports/loader.d.ts"],
|
"tc-loader": ["loader/exports/loader.d.ts"],
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ environment/
|
||||||
generated/
|
generated/
|
||||||
declarations/
|
declarations/
|
||||||
|
|
||||||
css/**/*.css
|
js/**/*.css
|
||||||
css/**/*.css.map
|
js/**/*.css.map
|
||||||
|
|
||||||
js/**/*.js
|
js/**/*.js
|
||||||
js/**/*.js.map
|
js/**/*.js.map
|
|
@ -0,0 +1,39 @@
|
||||||
|
:global {
|
||||||
|
html, body {
|
||||||
|
overflow-y: hidden;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: stretch;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
top: 1.5em!important;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
transition: all .5s linear;
|
||||||
|
|
||||||
|
.app {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
display: flex; flex-direction: column; resize: both;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$small_device: 650px;
|
||||||
|
@media only screen and (max-width: $small_device) {
|
||||||
|
html, body {
|
||||||
|
padding: 0!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-container {
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
import "webrtc-adapter";
|
||||||
|
import "./index.scss";
|
||||||
|
import "./FileTransfer";
|
||||||
|
|
||||||
|
export = require("tc-shared/main");
|
|
@ -1,37 +0,0 @@
|
||||||
html, body {
|
|
||||||
overflow-y: hidden;
|
|
||||||
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
position: fixed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: stretch;
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
top: 1.5em!important;
|
|
||||||
bottom: 0;
|
|
||||||
|
|
||||||
transition: all .5s linear;
|
|
||||||
|
|
||||||
.app {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
display: flex; flex-direction: column; resize: both;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$small_device: 650px;
|
|
||||||
@media only screen and (max-width: $small_device) {
|
|
||||||
html, body {
|
|
||||||
padding: 0!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-container {
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
BASEDIR=$(dirname "$0")
|
|
||||||
cd "$BASEDIR"
|
|
||||||
source ../scripts/resolve_commands.sh
|
|
||||||
|
|
||||||
if [[ ! -e declarations/imports_shared.d.ts ]]; then
|
|
||||||
echo "generate the declarations first!"
|
|
||||||
echo "Execute: /scripts/build_declarations.sh"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -e ../shared/generated/shared.js ]]; then
|
|
||||||
echo "generate the shared packed file first!"
|
|
||||||
echo "Execute: /shared/generate_packed.sh"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
execute_tsc -p tsconfig/tsconfig_packed.json
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
echo "Failed to build file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Merging files"
|
|
||||||
|
|
||||||
if [[ -e generated/client.js ]]; then
|
|
||||||
rm generated/client.js
|
|
||||||
fi
|
|
||||||
cat ../shared/generated/shared.js > generated/client.js
|
|
||||||
cat generated/web.js >> generated/client.js
|
|
||||||
|
|
||||||
if [[ -e generated/client.min.js ]]; then
|
|
||||||
rm generated/client.min.js
|
|
||||||
fi
|
|
||||||
|
|
||||||
npm run minify-web-rel-file `pwd`/generated/client.min.js `pwd`/generated/client.js
|
|
|
@ -1,6 +0,0 @@
|
||||||
const webrtc_adapter = require("webrtc-adapter");
|
|
||||||
/* typescript keep alive */ let _x = (webrtc_adapter || "").toString();
|
|
||||||
const tc = require("tc-shared/main");
|
|
||||||
export = tc;
|
|
||||||
|
|
||||||
require("./FileTransfer");
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"source_files": [
|
"source_files": [
|
||||||
"../js/**/*.ts"
|
"../app/**/*.ts"
|
||||||
],
|
],
|
||||||
"target_file": "../declarations/exports.d.ts"
|
"target_file": "../declarations/exports.d.ts"
|
||||||
}
|
}
|
|
@ -8,6 +8,6 @@
|
||||||
"include": [
|
"include": [
|
||||||
"../types",
|
"../types",
|
||||||
"../declarations/imports_*.d.ts",
|
"../declarations/imports_*.d.ts",
|
||||||
"../js/**/*.ts"
|
"../app/**/*.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -1,17 +0,0 @@
|
||||||
/* packed web project config */
|
|
||||||
{
|
|
||||||
"extends": "./tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "none",
|
|
||||||
"outFile": "../generated/web.js",
|
|
||||||
"allowJs": true
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"../js/workers"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"../types",
|
|
||||||
"../declarations/imports_*.d.ts",
|
|
||||||
"../js/**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -3,13 +3,13 @@ import * as config_base from "./webpack.config";
|
||||||
|
|
||||||
export = () => config_base.config("web").then(config => {
|
export = () => config_base.config("web").then(config => {
|
||||||
Object.assign(config.entry, {
|
Object.assign(config.entry, {
|
||||||
"shared-app": "./web/js/index.ts"
|
"shared-app": "./web/app/index.ts"
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.assign(config.resolve.alias, {
|
Object.assign(config.resolve.alias, {
|
||||||
"tc-shared": path.resolve(__dirname, "shared/js"),
|
"tc-shared": path.resolve(__dirname, "shared/js"),
|
||||||
"tc-backend/web": path.resolve(__dirname, "web/js"),
|
"tc-backend/web": path.resolve(__dirname, "web/app"),
|
||||||
"tc-backend": path.resolve(__dirname, "web/js"),
|
"tc-backend": path.resolve(__dirname, "web/app"),
|
||||||
"tc-generated/codec/opus": path.resolve(__dirname, "web/native-codec/generated/TeaWeb-Worker-Codec-Opus.js"),
|
"tc-generated/codec/opus": path.resolve(__dirname, "web/native-codec/generated/TeaWeb-Worker-Codec-Opus.js"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue