Redesigned some style
This commit is contained in:
parent
9cd8f23987
commit
8afab8d100
35 changed files with 9361 additions and 128 deletions
10
ChangeLog.md
10
ChangeLog.md
|
@ -1,4 +1,14 @@
|
||||||
# Changelog:
|
# Changelog:
|
||||||
|
* **XX.XX.19**
|
||||||
|
- Improved UI now using the material design framework based on bootstrap
|
||||||
|
- Fixed several UI overflow or small screen issues
|
||||||
|
- Improved permission editor performance
|
||||||
|
- Added hash rate to identity improve
|
||||||
|
- Merged CSS files in release mode
|
||||||
|
|
||||||
|
* **04.02.19**
|
||||||
|
- Fixed channel permissions
|
||||||
|
|
||||||
* **27.01.19**
|
* **27.01.19**
|
||||||
- Made sounds configurable
|
- Made sounds configurable
|
||||||
- Added option to mute sounds when output is muted
|
- Added option to mute sounds when output is muted
|
||||||
|
|
30
files.php
30
files.php
|
@ -37,13 +37,37 @@
|
||||||
"path" => "js/workers/",
|
"path" => "js/workers/",
|
||||||
"local-path" => "./shared/js/workers/"
|
"local-path" => "./shared/js/workers/"
|
||||||
],
|
],
|
||||||
[ /* shared css files */
|
[ /* shared developer single css files */
|
||||||
|
"type" => "css",
|
||||||
|
"search-pattern" => "/.*\.css$/",
|
||||||
|
"build-target" => "dev",
|
||||||
|
|
||||||
|
"path" => "css/",
|
||||||
|
"local-path" => "./shared/css/"
|
||||||
|
],
|
||||||
|
[ /* 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",
|
"type" => "css",
|
||||||
"search-pattern" => "/.*\.css$/",
|
"search-pattern" => "/.*\.css$/",
|
||||||
"build-target" => "dev|rel",
|
"build-target" => "dev|rel",
|
||||||
|
|
||||||
"path" => "css/",
|
"path" => "css/theme/",
|
||||||
"local-path" => "./shared/css/"
|
"local-path" => "./shared/css/theme/"
|
||||||
],
|
],
|
||||||
[ /* shared sound files */
|
[ /* shared sound files */
|
||||||
"type" => "wav",
|
"type" => "wav",
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"dtsgen": "node tools/dtsgen/index.js",
|
"dtsgen": "node tools/dtsgen/index.js",
|
||||||
"trgen": "node tools/trgen/index.js",
|
"trgen": "node tools/trgen/index.js",
|
||||||
"ttsc": "ttsc",
|
"ttsc": "ttsc",
|
||||||
|
"csso": "csso",
|
||||||
"rebuild-structure-web-dev": "php files.php generate web dev"
|
"rebuild-structure-web-dev": "php files.php generate web dev"
|
||||||
},
|
},
|
||||||
"author": "TeaSpeak (WolverinDEV)",
|
"author": "TeaSpeak (WolverinDEV)",
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
"@types/node": "^9.4.6",
|
"@types/node": "^9.4.6",
|
||||||
"@types/sha256": "^0.2.0",
|
"@types/sha256": "^0.2.0",
|
||||||
"@types/websocket": "0.0.38",
|
"@types/websocket": "0.0.38",
|
||||||
|
"csso-cli": "^2.0.2",
|
||||||
"electron": "^3.0.2",
|
"electron": "^3.0.2",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"sass": "^1.14.1",
|
"sass": "^1.14.1",
|
||||||
|
@ -37,5 +39,8 @@
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/TeaSpeak/TeaWeb/issues"
|
"url": "https://github.com/TeaSpeak/TeaWeb/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://www.teaspeak.de"
|
"homepage": "https://www.teaspeak.de",
|
||||||
|
"dependencies": {
|
||||||
|
"clean-css": "^4.2.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,14 @@ BASEDIR=$(dirname "$0")
|
||||||
cd "$BASEDIR/../"
|
cd "$BASEDIR/../"
|
||||||
source ./scripts/resolve_commands.sh
|
source ./scripts/resolve_commands.sh
|
||||||
|
|
||||||
if [ "$1" == "development" ] || [ "$1" == "dev" ]; then
|
if [[ "$1" == "development" ]] || [[ "$1" == "dev" ]]; then
|
||||||
source_path="web/environment/development"
|
source_path="web/environment/development"
|
||||||
type="development"
|
type="development"
|
||||||
elif [ "$1" == "release" ] || [ "$1" == "rel" ]; then
|
elif [[ "$1" == "release" ]] || [[ "$1" == "rel" ]]; then
|
||||||
source_path="web/environment/release"
|
source_path="web/environment/release"
|
||||||
type="release"
|
type="release"
|
||||||
else
|
else
|
||||||
if [ $# -lt 1 ]; then
|
if [[ $# -lt 1 ]]; then
|
||||||
echo "Invalid argument count!"
|
echo "Invalid argument count!"
|
||||||
else
|
else
|
||||||
echo "Invalid option $1"
|
echo "Invalid option $1"
|
||||||
|
@ -22,14 +22,14 @@ fi
|
||||||
|
|
||||||
echo "Generating style files"
|
echo "Generating style files"
|
||||||
npm run compile-sass
|
npm run compile-sass
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to generate style files"
|
echo "Failed to generate style files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Generating web workers"
|
echo "Generating web workers"
|
||||||
npm run build-worker
|
npm run build-worker
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to build web workers"
|
echo "Failed to build web workers"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -37,7 +37,7 @@ fi
|
||||||
#Lets build some tools
|
#Lets build some tools
|
||||||
#dtsgen should be already build by build_declarations.sh
|
#dtsgen should be already build by build_declarations.sh
|
||||||
./tools/build_trgen.sh
|
./tools/build_trgen.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to build typescript translation generator"
|
echo "Failed to build typescript translation generator"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -45,16 +45,16 @@ fi
|
||||||
#Now lets build the declarations
|
#Now lets build the declarations
|
||||||
echo "Building declarations"
|
echo "Building declarations"
|
||||||
./scripts/build_declarations.sh
|
./scripts/build_declarations.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to generate declarations"
|
echo "Failed to generate declarations"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$type" == "release" ]; then #Compile everything for release mode
|
if [[ "$type" == "release" ]]; then #Compile everything for release mode
|
||||||
#Compile the shared source first
|
#Compile the shared source first
|
||||||
echo "Building shared source"
|
echo "Building shared source"
|
||||||
./shared/generate_packed.sh
|
./shared/generate_packed.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to build shared source"
|
echo "Failed to build shared source"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -62,21 +62,21 @@ if [ "$type" == "release" ]; then #Compile everything for release mode
|
||||||
#Now compile the web client itself
|
#Now compile the web client itself
|
||||||
echo "Building web client"
|
echo "Building web client"
|
||||||
./web/generate_packed.sh
|
./web/generate_packed.sh
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to build web client"
|
echo "Failed to build web client"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [ "$type" == "development" ]; then
|
elif [[ "$type" == "development" ]]; then
|
||||||
echo "Building shared source"
|
echo "Building shared source"
|
||||||
execute_ttsc -p ./shared/tsconfig/tsconfig.json
|
execute_ttsc -p ./shared/tsconfig/tsconfig.json
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to compile shared sources"
|
echo "Failed to compile shared sources"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Building web client source"
|
echo "Building web client source"
|
||||||
execute_ttsc -p ./web/tsconfig/tsconfig.json
|
execute_ttsc -p ./web/tsconfig/tsconfig.json
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to compile web sources"
|
echo "Failed to compile web sources"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -84,7 +84,7 @@ fi
|
||||||
|
|
||||||
echo "Generating environment"
|
echo "Generating environment"
|
||||||
php files.php generate web ${type}
|
php files.php generate web ${type}
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to generate environment"
|
echo "Failed to generate environment"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -344,7 +344,7 @@ body {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
|
|
||||||
background: url('../img/music/playlist.svg') no-repeat;
|
background: url('%%base_path%%/img/music/playlist.svg') no-repeat;
|
||||||
background-position: -11px -9px;
|
background-position: -11px -9px;
|
||||||
background-size: 50px;
|
background-size: 50px;
|
||||||
}
|
}
|
|
@ -132,17 +132,17 @@ $ease: cubic-bezier(.45, 0, .55, 1);
|
||||||
.btn-forward span {
|
.btn-forward span {
|
||||||
background-size: calc(42px * 2) calc(42px * 2);
|
background-size: calc(42px * 2) calc(42px * 2);
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
background: url("../../img/music/forward.svg") no-repeat center;
|
background: url("%%base_path%%/img/music/forward.svg") no-repeat center;
|
||||||
}
|
}
|
||||||
.btn-rewind span {
|
.btn-rewind span {
|
||||||
background-size: calc(42px * 2) calc(42px * 2);
|
background-size: calc(42px * 2) calc(42px * 2);
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
background: url("../../img/music/rewind.svg") no-repeat center;
|
background: url("%%base_path%%/img/music/rewind.svg") no-repeat center;
|
||||||
}
|
}
|
||||||
.btn-settings span {
|
.btn-settings span {
|
||||||
background-size: calc(42px * 2) calc(42px * 2);
|
background-size: calc(42px * 2) calc(42px * 2);
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
background: url("../../img/music/playlist.svg") no-repeat center;
|
background: url("%%base_path%%/img/music/playlist.svg") no-repeat center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,12 +44,6 @@
|
||||||
.channelTree div.c {justify-content: center;}
|
.channelTree div.c {justify-content: center;}
|
||||||
.channelTree div.r {justify-content: flex-end;}
|
.channelTree div.r {justify-content: flex-end;}
|
||||||
|
|
||||||
.channelTree div.solidline{ background: url('../images/viewer/spacer_solidline.gif') repeat-x left center;margin: 0px; }
|
|
||||||
.channelTree div.dashline{ background: url('../images/viewer/spacer_dashline.gif') repeat-x left center;margin: 0px; }
|
|
||||||
.channelTree div.dashdotline{ background: url('../images/viewer/spacer_dashdotline.gif') repeat-x left center;margin: 0px; }
|
|
||||||
.channelTree div.dashdotdotline{ background: url('../images/viewer/spacer_dashdotdotline.gif') repeat-x left center;margin: 0px; }
|
|
||||||
.channelTree div.dotline{ background: url('../images/viewer/spacer_dotline.gif') repeat-x left center;margin: 0px; }
|
|
||||||
|
|
||||||
.channelTree div * {vertical-align: middle;display:inline-block;height: 16px;padding: 0px;}
|
.channelTree div * {vertical-align: middle;display:inline-block;height: 16px;padding: 0px;}
|
||||||
.channelTree div img {border: 0;}
|
.channelTree div img {border: 0;}
|
||||||
.channelTree div > span {position: absolute; right: 0;}
|
.channelTree div > span {position: absolute; right: 0;}
|
||||||
|
@ -143,7 +137,7 @@
|
||||||
background: #005cbf;
|
background: #005cbf;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clicon {width:16px;height:16px;background:url('../../img/ts/basic_icons.png') no-repeat;background-size: 16px 608px;}
|
.clicon {width:16px;height:16px;background:url('%%base_path%%/img/ts/basic_icons.png') no-repeat;background-size: 16px 608px;}
|
||||||
.host {background-position: 0 -448px}
|
.host {background-position: 0 -448px}
|
||||||
|
|
||||||
.server_open {background-position: 0 -352px}
|
.server_open {background-position: 0 -352px}
|
|
@ -8,7 +8,7 @@
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|
||||||
background: url('../../img/client_icon_sprite.svg') no-repeat;
|
background: url('%%base_path%%/img/client_icon_sprite.svg') no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Icons x16 */
|
/* Icons x16 */
|
||||||
|
@ -612,7 +612,7 @@
|
||||||
|
|
||||||
.icon_x32 {
|
.icon_x32 {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background: url('../../img/client_icon_sprite.svg') no-repeat;
|
background: url('%%base_path%%/img/client_icon_sprite.svg') no-repeat;
|
||||||
background-size: calc(496px * 2) calc(400px * 2);
|
background-size: calc(496px * 2) calc(400px * 2);
|
||||||
height: 32px;
|
height: 32px;
|
||||||
width: 32px;
|
width: 32px;
|
|
@ -6,29 +6,37 @@ source ../scripts/resolve_commands.sh
|
||||||
|
|
||||||
#Generate the loader definitions first
|
#Generate the loader definitions first
|
||||||
LOADER_FILE="declarations/exports_loader.d.ts"
|
LOADER_FILE="declarations/exports_loader.d.ts"
|
||||||
if [ -e ${LOADER_FILE} ]; then
|
if [[ -e ${LOADER_FILE} ]]; then
|
||||||
rm ${LOADER_FILE}
|
rm ${LOADER_FILE}
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to remove loader file!\nThis could be critical later!"
|
echo "Failed to remove loader file!\nThis could be critical later!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
npm run dtsgen -- --config $(pwd)/tsconfig/dtsconfig_loader.json -v
|
npm run dtsgen -- --config $(pwd)/tsconfig/dtsconfig_loader.json -v
|
||||||
if [ ! -e ${LOADER_FILE} ]; then
|
if [[ ! -e ${LOADER_FILE} ]]; then
|
||||||
echo "Failed to generate definitions"
|
echo "Failed to generate definitions"
|
||||||
echo "$result"
|
echo "$result"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
execute_ttsc -p tsconfig/tsconfig_packed.json
|
execute_ttsc -p tsconfig/tsconfig_packed.json
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Failed to generate packed file!"
|
echo "Failed to generate packed file!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Now link the loader file
|
#Now link the loader file
|
||||||
if [ ! -L generated/load.js ]; then
|
if [[ ! -L generated/load.js ]]; then
|
||||||
|
rm generated/load.js 2>/dev/null
|
||||||
ln -rs js/load.js generated/load.js
|
ln -rs js/load.js generated/load.js
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -d generated/static/ ]]; then
|
||||||
|
mkdir -p generated/static/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create packed CSS file
|
||||||
|
find css/static/ -name '*.css' -exec cat {} \; | npm run csso -- --output `pwd`/generated/static/base.css
|
||||||
|
|
||||||
echo "Packed file generated!"
|
echo "Packed file generated!"
|
||||||
exit 0
|
exit 0
|
|
@ -33,6 +33,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<meta name="description" content="TeaSpeak Web Client, connect to any TeaSpeak server without installing anything." />
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(!$WEB_CLIENT) {
|
if(!$WEB_CLIENT) {
|
||||||
|
@ -42,54 +43,25 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/main.css" type="text/css">
|
<!-- PHP generated properties -->
|
||||||
<link rel="stylesheet" href="css/helptag.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/scroll.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/ts/tab.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/ts/chat.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/ts/client.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/ts/icons.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/general.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modals.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-bookmarks.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-connect.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-channel.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-query.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-playlist.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-banlist.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-bancreate.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-settings.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-poke.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-server.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/modal-permissions.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/loader.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/music/info_plate.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/frame/SelectInfo.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/control_bar.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/context_menu.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="css/htmltags.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="vendor/bbcode/xbbcode.css" type="text/css">
|
|
||||||
<!-- https://localhost:9987/?forward_url=http%3A%2F%2Flocalhost%3A63344%2FWeb-Client%2Findex.php%3F_ijt%3D82b1uhmnh0a5l1n35nnjps5eid%26loader_ignore_age%3D1%26connect_default_host%3Dlocalhost%26default_connect_type%3Dforum%26default_connect_url%3Dtrue%26default_connect_type%3Dteamspeak%26default_connect_url%3Dlocalhost%253A9987 -->
|
|
||||||
<!-- PHP generated properies -->
|
|
||||||
<!-- localhost:63342/TeaSpeak-Web/index.php?_ijt=o48hmliefjoa8cer8v7mpl98pj&connect_default_host=192.168.43.141 -->
|
|
||||||
<x-properties id="properties">
|
<x-properties id="properties">
|
||||||
<!-- <x-property key="" value=""/> -->
|
|
||||||
<?php
|
<?php
|
||||||
function spawnProperty($name, $value)
|
function spawn_property($name, $value)
|
||||||
{
|
{
|
||||||
echo '<x-property key="' . $name . '" value="' . urlencode($value) . '"></x-property>';
|
if(isset($value))
|
||||||
|
echo "\t\t\t<x-property key=\"" . $name . "\" value=\"" . urlencode($value) . "\"></x-property>\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
spawnProperty('connect_default_host', $localhost ? "localhost" : "ts.TeaSpeak.de");
|
spawn_property('connect_default_host', $localhost ? "localhost" : "ts.TeaSpeak.de");
|
||||||
spawnProperty('localhost_debug', $localhost ? "true" : "false");
|
spawn_property('localhost_debug', $localhost ? "true" : "false");
|
||||||
spawnProperty('forum_user_data', isset($GLOBALS["COOKIE_NAME_USER_DATA"]) ? $_COOKIE[$GLOBALS["COOKIE_NAME_USER_DATA"]] : "");
|
spawn_property('forum_user_data', isset($GLOBALS["COOKIE_NAME_USER_DATA"]) ? $_COOKIE[$GLOBALS["COOKIE_NAME_USER_DATA"]] : null);
|
||||||
spawnProperty('forum_user_sign', isset($GLOBALS["COOKIE_NAME_USER_SIGN"]) ? $_COOKIE[$GLOBALS["COOKIE_NAME_USER_SIGN"]] : "");
|
spawn_property('forum_user_sign', isset($GLOBALS["COOKIE_NAME_USER_SIGN"]) ? $_COOKIE[$GLOBALS["COOKIE_NAME_USER_SIGN"]] : null);
|
||||||
spawnProperty('forum_path', authPath());
|
spawn_property('forum_path', authPath());
|
||||||
|
|
||||||
$version = file_get_contents("./version");
|
$version = file_get_contents("./version");
|
||||||
if ($version === false)
|
if ($version === false)
|
||||||
$version = "unknown";
|
$version = "unknown";
|
||||||
spawnProperty("version", $version);
|
spawn_property("version", $version);
|
||||||
?>
|
?>
|
||||||
</x-properties>
|
</x-properties>
|
||||||
|
|
||||||
|
@ -106,28 +78,44 @@
|
||||||
gtag('config', 'UA-113151733-4');
|
gtag('config', 'UA-113151733-4');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- material design -->
|
<!-- required static style for the critical page and the enable javascript page -->
|
||||||
<!-- <link rel="stylesheet" href="https://unpkg.com/bootstrap-material-design@4.1.1/dist/css/bootstrap-material-design.min.css" integrity="sha384-wXznGJNEXNG1NFsbm0ugrLFMQPWswR3lds2VeinahP8N0zJw9VWSopbjv2x7WCvX" crossorigin="anonymous"> -->
|
<style>
|
||||||
<link rel="stylesheet" href="css/bootstrap-material-design.css">
|
.fulloverlay {
|
||||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
z-index: 10000;
|
||||||
<script src="https://unpkg.com/popper.js@1.12.6/dist/umd/popper.js" integrity="sha384-fA23ZRQ3G/J53mElWqVJEGJzU0sTs+SvzG8fXVWP+kJQ1lwFAOkcUOysnlKJC33U" crossorigin="anonymous"></script>
|
display: none;
|
||||||
<script src="https://unpkg.com/bootstrap-material-design@4.1.1/dist/js/bootstrap-material-design.js" integrity="sha384-CauSuKpEqAFajSpkdjv3z9t8E7RlpJ1UP0lKM/+NdtSarroVKu069AlsRPKkFBz9" crossorigin="anonymous"></script>
|
position: fixed;
|
||||||
<script>$(document).ready(function() { $('body').bootstrapMaterialDesign(); });</script>
|
|
||||||
|
|
||||||
<script>
|
top: 0;
|
||||||
//const exports = {};
|
bottom: 0;
|
||||||
</script>
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
|
||||||
|
background-color: gray;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fulloverlay .container {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
top: 30%
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-js {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="style">
|
||||||
|
<link rel="stylesheet" href="css/loader/loader.css">
|
||||||
|
</div>
|
||||||
<div id="scripts">
|
<div id="scripts">
|
||||||
<script type="application/javascript" src="js/load.js" defer></script>
|
<script type="application/javascript" src="js/load.js" defer></script>
|
||||||
</div>
|
</div>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
|
||||||
if(true) {
|
|
||||||
?>
|
|
||||||
<!-- No javascript error -->
|
<!-- No javascript error -->
|
||||||
<div style="display: block; position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; background-color: gray; z-index: 1000; text-align: center;" class="no-js">
|
<div class="fulloverlay no-js">
|
||||||
<div style="position: relative; display: inline-block; top: 30%">
|
<div class="container">
|
||||||
<img src="img/script.svg" height="128px">
|
<img src="img/script.svg" height="128px">
|
||||||
<h1>Please enable JavaScript</h1>
|
<h1>Please enable JavaScript</h1>
|
||||||
<h3>TeaSpeak web could not run without it!</h3>
|
<h3>TeaSpeak web could not run without it!</h3>
|
||||||
|
@ -139,7 +127,6 @@
|
||||||
while (elements.length > 0) //Removing these elements (even self)
|
while (elements.length > 0) //Removing these elements (even self)
|
||||||
elements.item(0).remove();
|
elements.item(0).remove();
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<!-- Loading screen -->
|
<!-- Loading screen -->
|
||||||
<div class="loader">
|
<div class="loader">
|
||||||
|
@ -159,8 +146,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Critical load error -->
|
<!-- Critical load error -->
|
||||||
<div style="display: none; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: gray; z-index: 1000; text-align: center;" id="critical-load">
|
<div class="fulloverlay" id="critical-load">
|
||||||
<div style="position: relative; display: inline-block; top: 30%">
|
<div class="container">
|
||||||
<img src="img/script.svg" height="128px">
|
<img src="img/script.svg" height="128px">
|
||||||
<h1 style="color: red">Got some trouble while loading important files!</h1>
|
<h1 style="color: red">Got some trouble while loading important files!</h1>
|
||||||
<h3 class="detail"></h3>
|
<h3 class="detail"></h3>
|
||||||
|
@ -176,23 +163,26 @@
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($WEB_CLIENT) {
|
$footer_style = "display: none;";
|
||||||
$TAG = "<footer>
|
$footer_forum = '';
|
||||||
<div class=\"container\" style=\"display: flex; flex-direction: row; align-content: space-between;\">
|
|
||||||
<div style=\"align-self: center; position: fixed; left: 5px;\">Open source on <a href=\"https://github.com/TeaSpeak/TeaSpeak-Web\" style=\"display: inline-block; position: relative\">github.com</a></div>
|
if($WEB_CLIENT) {
|
||||||
<div style=\"align-self: center;\">TeaSpeak Web client (" . $version . ") by WolverinDEV</div>
|
$footer_style = "display: block;";
|
||||||
<div style=\"align-self: center; position: fixed; right: 5px;\">";
|
|
||||||
|
|
||||||
if (logged_in()) {
|
if (logged_in()) {
|
||||||
$TAG = $TAG . "<a href=\"" . authPath() . "auth.php?type=logout\">logout</a>";
|
$footer_forum = "<a href=\"" . authPath() . "auth.php?type=logout\">logout</a>";
|
||||||
} else {
|
} else {
|
||||||
$TAG = $TAG . "<a href=\"" . authPath() . "login.php\">Login</a> via the TeaSpeak forum.";
|
$footer_forum = "<a href=\"" . authPath() . "login.php\">Login</a> via the TeaSpeak forum.";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $TAG . "</div>
|
|
||||||
</div>
|
|
||||||
</footer>";
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<footer style="<?php echo $footer_style; ?>">
|
||||||
|
<div class="container" style="display: flex; flex-direction: row; align-content: space-between;">
|
||||||
|
<div style="align-self: center; position: fixed; left: 5px;">Open source on <a href="https://github.com/TeaSpeak/TeaSpeak-Web" style="display: inline-block; position: relative">github.com</a></div>
|
||||||
|
<div style="align-self: center;">TeaSpeak Web client (<?php echo $version; ?>) by WolverinDEV</div>
|
||||||
|
<div style="align-self: center; position: fixed; right: 5px;"><?php echo $footer_forum; ?></div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
</html>
|
</html>
|
|
@ -1,3 +1,14 @@
|
||||||
|
namespace app {
|
||||||
|
export enum Type {
|
||||||
|
UNKNOWN,
|
||||||
|
CLIENT_RELEASE,
|
||||||
|
CLIENT_DEBUG,
|
||||||
|
WEB_DEBUG,
|
||||||
|
WEB_RELEASE
|
||||||
|
}
|
||||||
|
export let type: Type = Type.UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
namespace loader {
|
namespace loader {
|
||||||
type Task = {
|
type Task = {
|
||||||
name: string,
|
name: string,
|
||||||
|
@ -14,6 +25,10 @@ namespace loader {
|
||||||
setting up the loading process
|
setting up the loading process
|
||||||
*/
|
*/
|
||||||
SETUP,
|
SETUP,
|
||||||
|
/*
|
||||||
|
loading all style sheet files
|
||||||
|
*/
|
||||||
|
STYLE,
|
||||||
/*
|
/*
|
||||||
loading all javascript files
|
loading all javascript files
|
||||||
*/
|
*/
|
||||||
|
@ -113,7 +128,7 @@ namespace loader {
|
||||||
console.debug("[loader] finished loader.");
|
console.debug("[loader] finished loader.");
|
||||||
}
|
}
|
||||||
|
|
||||||
type Script = string | string[];
|
type SourcePath = string | string[];
|
||||||
|
|
||||||
function script_name(path: string | string[]) {
|
function script_name(path: string | string[]) {
|
||||||
if(Array.isArray(path)) {
|
if(Array.isArray(path)) {
|
||||||
|
@ -133,7 +148,7 @@ namespace loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function load_script(path: Script) : Promise<void> {
|
export async function load_script(path: SourcePath) : Promise<void> {
|
||||||
if(Array.isArray(path)) { //We have some fallback
|
if(Array.isArray(path)) { //We have some fallback
|
||||||
return load_script(path[0]).catch(error => {
|
return load_script(path[0]).catch(error => {
|
||||||
if(error instanceof SyntaxError)
|
if(error instanceof SyntaxError)
|
||||||
|
@ -161,28 +176,35 @@ namespace loader {
|
||||||
};
|
};
|
||||||
window.addEventListener('error', error_handler as any);
|
window.addEventListener('error', error_handler as any);
|
||||||
|
|
||||||
|
const timeout_handle = setTimeout(() => {
|
||||||
|
reject("timeout");
|
||||||
|
}, 5000);
|
||||||
tag.type = "application/javascript";
|
tag.type = "application/javascript";
|
||||||
tag.async = true;
|
tag.async = true;
|
||||||
|
tag.defer = true;
|
||||||
tag.onerror = error => {
|
tag.onerror = error => {
|
||||||
|
clearTimeout(timeout_handle);
|
||||||
window.removeEventListener('error', error_handler as any);
|
window.removeEventListener('error', error_handler as any);
|
||||||
tag.remove();
|
tag.remove();
|
||||||
reject(error);
|
reject(error);
|
||||||
};
|
};
|
||||||
tag.onload = () => {
|
tag.onload = () => {
|
||||||
|
clearTimeout(timeout_handle);
|
||||||
window.removeEventListener('error', error_handler as any);
|
window.removeEventListener('error', error_handler as any);
|
||||||
console.debug("Script %o loaded", path);
|
console.debug("Script %o loaded", path);
|
||||||
setTimeout(resolve, 100);
|
setTimeout(resolve, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById("scripts").appendChild(tag);
|
document.getElementById("scripts").appendChild(tag);
|
||||||
tag.src = path;
|
tag.src = path;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function load_scripts(paths: Script[]) : Promise<void> {
|
export async function load_scripts(paths: SourcePath[]) : Promise<void> {
|
||||||
const promises: Promise<void>[] = [];
|
const promises: Promise<void>[] = [];
|
||||||
const errors: {
|
const errors: {
|
||||||
script: Script,
|
script: SourcePath,
|
||||||
error: any
|
error: any
|
||||||
}[] = [];
|
}[] = [];
|
||||||
|
|
||||||
|
@ -206,6 +228,111 @@ namespace loader {
|
||||||
throw "failed to load script " + script_name(errors[0].script);
|
throw "failed to load script " + script_name(errors[0].script);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function load_style(path: SourcePath) : Promise<void> {
|
||||||
|
if(Array.isArray(path)) { //We have some fallback
|
||||||
|
return load_script(path[0]).catch(error => {
|
||||||
|
if(error instanceof SyntaxError)
|
||||||
|
return Promise.reject(error.source);
|
||||||
|
|
||||||
|
if(path.length > 1)
|
||||||
|
return load_script(path.slice(1));
|
||||||
|
|
||||||
|
return Promise.reject(error);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return new Promise<void>((resolve, reject) => {
|
||||||
|
const tag: HTMLLinkElement = document.createElement("link");
|
||||||
|
|
||||||
|
let error = false;
|
||||||
|
const error_handler = (event: ErrorEvent) => {
|
||||||
|
console.log("msg: %o, url: %o, line: %o, col: %o, error: %o", event.message, event.filename, event.lineno, event.colno, event.error);
|
||||||
|
if(event.filename == tag.href) { //FIXME!
|
||||||
|
window.removeEventListener('error', error_handler as any);
|
||||||
|
|
||||||
|
reject(new SyntaxError(event.error));
|
||||||
|
event.preventDefault();
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
window.addEventListener('error', error_handler as any);
|
||||||
|
|
||||||
|
const timeout_handle = setTimeout(() => {
|
||||||
|
reject("timeout");
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
tag.type = "text/css";
|
||||||
|
tag.rel="stylesheet";
|
||||||
|
|
||||||
|
tag.onerror = error => {
|
||||||
|
clearTimeout(timeout_handle);
|
||||||
|
window.removeEventListener('error', error_handler as any);
|
||||||
|
tag.remove();
|
||||||
|
console.error("File load error for file %s: %o", path, error);
|
||||||
|
reject("failed to load file " + path);
|
||||||
|
};
|
||||||
|
tag.onload = () => {
|
||||||
|
{
|
||||||
|
const css: CSSStyleSheet = tag.sheet as CSSStyleSheet;
|
||||||
|
const rules = css.cssRules;
|
||||||
|
const rules_remove: number[] = [];
|
||||||
|
const rules_add: string[] = [];
|
||||||
|
|
||||||
|
for(let index = 0; index < rules.length; index++) {
|
||||||
|
const rule = rules.item(index);
|
||||||
|
let rule_text = rule.cssText;
|
||||||
|
|
||||||
|
if(rule.cssText.indexOf("%%base_path%%") != -1) {
|
||||||
|
rules_remove.push(index);
|
||||||
|
rules_add.push(rule_text.replace("%%base_path%%", document.location.href));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(const index of rules_remove.sort((a, b) => b > a ? 1 : 0))
|
||||||
|
css.removeRule(index);
|
||||||
|
for(const rule of rules_add)
|
||||||
|
css.insertRule(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
clearTimeout(timeout_handle);
|
||||||
|
window.removeEventListener('error', error_handler as any);
|
||||||
|
console.debug("Style sheet %o loaded", path);
|
||||||
|
setTimeout(resolve, 100);
|
||||||
|
};
|
||||||
|
|
||||||
|
document.getElementById("style").appendChild(tag);
|
||||||
|
tag.href = path;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function load_styles(paths: SourcePath[]) : Promise<void> {
|
||||||
|
const promises: Promise<void>[] = [];
|
||||||
|
const errors: {
|
||||||
|
sheet: SourcePath,
|
||||||
|
error: any
|
||||||
|
}[] = [];
|
||||||
|
|
||||||
|
for(const sheet of paths)
|
||||||
|
promises.push(load_style(sheet).catch(error => {
|
||||||
|
errors.push({
|
||||||
|
sheet: sheet,
|
||||||
|
error: error
|
||||||
|
});
|
||||||
|
return Promise.resolve();
|
||||||
|
}));
|
||||||
|
|
||||||
|
await Promise.all([...promises]);
|
||||||
|
|
||||||
|
if(errors.length > 0) {
|
||||||
|
console.error("Failed to load the following style sheet:");
|
||||||
|
for(const sheet of errors)
|
||||||
|
console.log(" - %o: %o", sheet.sheet, sheet.error);
|
||||||
|
|
||||||
|
displayCriticalError("Failed to load style sheet " + script_name(errors[0].sheet) + " <br>" + "View the browser console for more information!");
|
||||||
|
throw "failed to load style sheet " + script_name(errors[0].sheet);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* define that here */
|
/* define that here */
|
||||||
|
@ -247,6 +374,28 @@ function displayCriticalError(message: string) {
|
||||||
|
|
||||||
/* all javascript loaders */
|
/* all javascript loaders */
|
||||||
const loader_javascript = {
|
const loader_javascript = {
|
||||||
|
detect_type: async () => {
|
||||||
|
/* test if js/proto.js is available. If so we're in debug mode */
|
||||||
|
const request = new XMLHttpRequest();
|
||||||
|
request.open('GET', 'js/proto.js', true);
|
||||||
|
|
||||||
|
await new Promise((resolve, reject) => {
|
||||||
|
request.onreadystatechange = () => {
|
||||||
|
if (request.readyState === 4){
|
||||||
|
if (request.status === 404) {
|
||||||
|
app.type = app.Type.WEB_RELEASE;
|
||||||
|
} else {
|
||||||
|
app.type = app.Type.WEB_DEBUG;
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
request.onerror = () => {
|
||||||
|
reject("Failed to detect app type");
|
||||||
|
};
|
||||||
|
request.send();
|
||||||
|
});
|
||||||
|
},
|
||||||
load_scripts: async () => {
|
load_scripts: async () => {
|
||||||
/*
|
/*
|
||||||
if(window.require !== undefined) {
|
if(window.require !== undefined) {
|
||||||
|
@ -261,8 +410,21 @@ const loader_javascript = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(!window.require) {
|
if(!window.require) {
|
||||||
//await loader.load_script(["vendor/jquery/jquery.min.js"]);
|
await loader.load_script(["vendor/jquery/jquery.min.js"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* bootstrap material design and libs */
|
||||||
|
await loader.load_script(["vendor/popper/popper.js"]);
|
||||||
|
|
||||||
|
//depends on popper
|
||||||
|
await loader.load_script(["vendor/bootstrap-material/bootstrap-material-design.js"]);
|
||||||
|
|
||||||
|
loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
|
||||||
|
name: "materialize body",
|
||||||
|
priority: 10,
|
||||||
|
function: async () => { $(document).ready(function() { $('body').bootstrapMaterialDesign(); }); }
|
||||||
|
});
|
||||||
|
|
||||||
await loader.load_script("vendor/jsrender/jsrender.min.js");
|
await loader.load_script("vendor/jsrender/jsrender.min.js");
|
||||||
await loader.load_scripts([
|
await loader.load_scripts([
|
||||||
["vendor/bbcode/xbbcode.js"],
|
["vendor/bbcode/xbbcode.js"],
|
||||||
|
@ -270,21 +432,18 @@ const loader_javascript = {
|
||||||
["https://webrtc.github.io/adapter/adapter-latest.js"]
|
["https://webrtc.github.io/adapter/adapter-latest.js"]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
try {
|
if(app.type == app.Type.WEB_RELEASE || app.type == app.Type.CLIENT_RELEASE) {
|
||||||
await loader.load_script("js/proto.js");
|
|
||||||
//we're loading for debug
|
|
||||||
|
|
||||||
loader.register_task(loader.Stage.JAVASCRIPT, {
|
|
||||||
name: "scripts debug",
|
|
||||||
priority: 20,
|
|
||||||
function: loader_javascript.load_scripts_debug
|
|
||||||
});
|
|
||||||
} catch(error) {
|
|
||||||
loader.register_task(loader.Stage.JAVASCRIPT, {
|
loader.register_task(loader.Stage.JAVASCRIPT, {
|
||||||
name: "scripts release",
|
name: "scripts release",
|
||||||
priority: 20,
|
priority: 20,
|
||||||
function: loader_javascript.loadRelease
|
function: loader_javascript.loadRelease
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
loader.register_task(loader.Stage.JAVASCRIPT, {
|
||||||
|
name: "scripts debug",
|
||||||
|
priority: 20,
|
||||||
|
function: loader_javascript.load_scripts_debug
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
load_scripts_debug: async () => {
|
load_scripts_debug: async () => {
|
||||||
|
@ -297,10 +456,12 @@ const loader_javascript = {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* load the main app */
|
||||||
await loader.load_scripts([
|
await loader.load_scripts([
|
||||||
["wasm/TeaWeb-Identity.js"],
|
["wasm/TeaWeb-Identity.js"],
|
||||||
|
|
||||||
//Load general API's
|
//Load general API's
|
||||||
|
"js/proto.js",
|
||||||
"js/i18n/localize.js",
|
"js/i18n/localize.js",
|
||||||
"js/log.js",
|
"js/log.js",
|
||||||
|
|
||||||
|
@ -328,7 +489,6 @@ const loader_javascript = {
|
||||||
"js/ui/modal/ModalSettings.js",
|
"js/ui/modal/ModalSettings.js",
|
||||||
"js/ui/modal/ModalCreateChannel.js",
|
"js/ui/modal/ModalCreateChannel.js",
|
||||||
"js/ui/modal/ModalServerEdit.js",
|
"js/ui/modal/ModalServerEdit.js",
|
||||||
"js/ui/modal/ModalConnect.js",
|
|
||||||
"js/ui/modal/ModalChangeVolume.js",
|
"js/ui/modal/ModalChangeVolume.js",
|
||||||
"js/ui/modal/ModalBanClient.js",
|
"js/ui/modal/ModalBanClient.js",
|
||||||
"js/ui/modal/ModalBanCreate.js",
|
"js/ui/modal/ModalBanCreate.js",
|
||||||
|
@ -372,10 +532,9 @@ const loader_javascript = {
|
||||||
"js/client.js",
|
"js/client.js",
|
||||||
"js/chat.js",
|
"js/chat.js",
|
||||||
|
|
||||||
"js/PPTListener.js"
|
"js/PPTListener.js",
|
||||||
]);
|
|
||||||
|
|
||||||
await loader.load_scripts([
|
|
||||||
"js/codec/CodecWrapperWorker.js",
|
"js/codec/CodecWrapperWorker.js",
|
||||||
"js/profiles/identities/NameIdentity.js", //Depends on Identity
|
"js/profiles/identities/NameIdentity.js", //Depends on Identity
|
||||||
"js/profiles/identities/TeaForumIdentity.js", //Depends on Identity
|
"js/profiles/identities/TeaForumIdentity.js", //Depends on Identity
|
||||||
|
@ -450,6 +609,59 @@ const loader_webassembly = {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const loader_style = {
|
||||||
|
load_style: async () => {
|
||||||
|
await loader.load_styles([
|
||||||
|
"vendor/bbcode/xbbcode.css"
|
||||||
|
]);
|
||||||
|
|
||||||
|
if(app.type == app.Type.WEB_DEBUG || app.type == app.Type.CLIENT_DEBUG) {
|
||||||
|
await loader_style.load_style_debug();
|
||||||
|
} else {
|
||||||
|
await loader_style.load_style_release();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the material design */
|
||||||
|
await loader.load_style("css/theme/bootstrap-material-design.css");
|
||||||
|
},
|
||||||
|
|
||||||
|
load_style_debug: async () => {
|
||||||
|
await loader.load_styles([
|
||||||
|
"css/static/main.css",
|
||||||
|
"css/static/helptag.css",
|
||||||
|
"css/static/scroll.css",
|
||||||
|
"css/static/ts/tab.css",
|
||||||
|
"css/static/ts/chat.css",
|
||||||
|
"css/static/ts/client.css",
|
||||||
|
"css/static/ts/icons.css",
|
||||||
|
"css/static/general.css",
|
||||||
|
"css/static/modals.css",
|
||||||
|
"css/static/modal-bookmarks.css",
|
||||||
|
"css/static/modal-connect.css",
|
||||||
|
"css/static/modal-channel.css",
|
||||||
|
"css/static/modal-query.css",
|
||||||
|
"css/static/modal-playlist.css",
|
||||||
|
"css/static/modal-banlist.css",
|
||||||
|
"css/static/modal-bancreate.css",
|
||||||
|
"css/static/modal-settings.css",
|
||||||
|
"css/static/modal-poke.css",
|
||||||
|
"css/static/modal-server.css",
|
||||||
|
"css/static/modal-permissions.css",
|
||||||
|
"css/static/music/info_plate.css",
|
||||||
|
"css/static/frame/SelectInfo.css",
|
||||||
|
"css/static/control_bar.css",
|
||||||
|
"css/static/context_menu.css",
|
||||||
|
"css/static/htmltags.css"
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
|
||||||
|
load_style_release: async () => {
|
||||||
|
await loader.load_styles([
|
||||||
|
"css/static/base.css",
|
||||||
|
"css/static/main.css",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function load_templates() {
|
async function load_templates() {
|
||||||
try {
|
try {
|
||||||
|
@ -527,9 +739,7 @@ function fadeoutLoader(duration = undefined, minAge = undefined, ignoreAge = und
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(typeof Module === "undefined")
|
window["Module"] = window["Module"] || {};
|
||||||
this["Module"] = {};
|
|
||||||
|
|
||||||
navigator.browserSpecs = (function(){
|
navigator.browserSpecs = (function(){
|
||||||
let ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
let ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
||||||
if(/trident/i.test(M[1])){
|
if(/trident/i.test(M[1])){
|
||||||
|
@ -595,6 +805,13 @@ loader.register_task(loader.Stage.INITIALIZING, {
|
||||||
priority: 10
|
priority: 10
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
loader.register_task(loader.Stage.INITIALIZING, {
|
||||||
|
name: "app type test",
|
||||||
|
function: loader_javascript.detect_type,
|
||||||
|
priority: 20
|
||||||
|
});
|
||||||
|
|
||||||
loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
|
loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
|
||||||
name: "javascript webassembly",
|
name: "javascript webassembly",
|
||||||
function: loader_webassembly.awaiter,
|
function: loader_webassembly.awaiter,
|
||||||
|
@ -608,6 +825,12 @@ 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: load_templates,
|
function: load_templates,
|
||||||
|
|
6537
vendor/bootstrap-material/bootstrap-material-design.js
vendored
Normal file
6537
vendor/bootstrap-material/bootstrap-material-design.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
2442
vendor/popper/popper.js
vendored
Normal file
2442
vendor/popper/popper.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue