diff --git a/ChangeLog.md b/ChangeLog.md index 9bd931ae..9f1ea2d8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,7 +1,27 @@ # Changelog: + * **XX.XX.XX** - Removed icon size restriction for SVGs - Fixed permission editor icon select for not granted icon permissions + - Fixed "disconnect" button not showing up after beeing connected + - Improved handling of `disableMultiSession` settings (Connect in a new tab does not show up anymore) + - Implemented avatar upload + - Sorting server group icons within client channel tree + - Fixed buggy away message position + - Logging the servers welcome message [#54](https://github.com/TeaSpeak/TeaWeb/issues/54) + - Showing servers hostbutton + - Fixed microphone and sound action sounds [#67](https://github.com/TeaSpeak/TeaWeb/issues/67) + - Added option to mute clients [#64](https://github.com/TeaSpeak/TeaWeb/issues/64) + - Improved debug loader (no dependency faults anymore) + - Saving private conversations and showing the messages again after client restart + - Fixed some general memory leaks + - Implemented the hostmessage functions + - Fixed bookmark server password + + Big UI Improvement: + - New "dark theme" design + - All elements are responsive to the font-size (Supporting now large & small screens (No mobile support yet)) + - Implemented an active ping calculation * **22.06.19** - Fixed channel create not working issue diff --git a/client/css/static/main.scss b/client/css/static/main.scss index 2ab1d888..47f6a545 100644 --- a/client/css/static/main.scss +++ b/client/css/static/main.scss @@ -22,4 +22,8 @@ html, body { display: flex; flex-direction: column; resize: both; } +} + +footer { + display: none!important; } \ No newline at end of file diff --git a/client/js/.keepalive b/client/js/.keepalive new file mode 100644 index 00000000..e69de29b diff --git a/client/js/teaforo.ts b/client/js/teaforo.ts deleted file mode 100644 index e7ea53aa..00000000 --- a/client/js/teaforo.ts +++ /dev/null @@ -1,33 +0,0 @@ -namespace forum { - const ipc = require("electron").ipcRenderer; - let callback_listener: (() => any)[] = []; - - ipc.on('teaforo-update', (event, data) => { - console.log("Got data update: %o", data); - profiles.identities.set_static_identity(data ? new profiles.identities.TeaForumIdentity(data.application_data, data.application_data_sign) : undefined); - try { - for(let listener of callback_listener) - setImmediate(listener); - } catch(e) { - console.log(e); - } - - callback_listener = []; - }); - - export function register_callback(callback: () => any) { - callback_listener.push(callback); - } - - export function open() { - ipc.send("teaforo-login"); - } - - export function logout() { - ipc.send("teaforo-logout"); - } - - export function sync_main() { - ipc.send("teaforo-update"); - } -} \ No newline at end of file diff --git a/files.php b/files.php index 8a4989db..92983355 100644 --- a/files.php +++ b/files.php @@ -34,7 +34,7 @@ "path" => "js/", "local-path" => "./shared/js/", - "req-parm" => ["-js-map"] + "req-parm" => ["--mappings"] ], [ /* shared generated worker codec */ "type" => "js", @@ -52,6 +52,15 @@ "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$/", @@ -137,7 +146,7 @@ $APP_FILE_LIST_SHARED_VENDORS = [ [ "type" => "js", - "search-pattern" => "/.*\.js$/", + "search-pattern" => "/.*(\.min)?\.js$/", "build-target" => "dev|rel", "path" => "vendor/", diff --git a/shared/audio/speech/mapping.json b/shared/audio/speech/mapping.json index 9c37451f..2756d403 100644 --- a/shared/audio/speech/mapping.json +++ b/shared/audio/speech/mapping.json @@ -1 +1 @@ -[{"file": "sound.test.wav", "key": "sound.test"}, {"file": "sound.egg.wav", "key": "sound.egg"}, {"file": "away_activated.wav", "key": "away_activated"}, {"file": "away_deactivated.wav", "key": "away_deactivated"}, {"file": "connection.connected.wav", "key": "connection.connected"}, {"file": "connection.disconnected.wav", "key": "connection.disconnected"}, {"file": "connection.disconnected.timeout.wav", "key": "connection.disconnected.timeout"}, {"file": "connection.refused.wav", "key": "connection.refused"}, {"file": "connection.banned.wav", "key": "connection.banned"}, {"file": "server.edited.wav", "key": "server.edited"}, {"file": "server.edited.self.wav", "key": "server.edited.self"}, {"file": "server.kicked.wav", "key": "server.kicked"}, {"file": "channel.kicked.wav", "key": "channel.kicked"}, {"file": "channel.moved.wav", "key": "channel.moved"}, {"file": "channel.joined.wav", "key": "channel.joined"}, {"file": "channel.created.wav", "key": "channel.created"}, {"file": "channel.edited.wav", "key": "channel.edited"}, {"file": "channel.edited.self.wav", "key": "channel.edited.self"}, {"file": "channel.deleted.wav", "key": "channel.deleted"}, {"file": "user.moved.wav", "key": "user.moved"}, {"file": "user.moved.self.wav", "key": "user.moved.self"}, {"file": "user.poked.self.wav", "key": "user.poked.self"}, {"file": "user.banned.wav", "key": "user.banned"}, {"file": "user.joined.wav", "key": "user.joined"}, {"file": "user.joined.moved.wav", "key": "user.joined.moved"}, {"file": "user.joined.kicked.wav", "key": "user.joined.kicked"}, {"file": "user.joined.connect.wav", "key": "user.joined.connect"}, {"file": "user.left.wav", "key": "user.left"}, {"file": "user.left.kicked.channel.wav", "key": "user.left.kicked.channel"}, {"file": "user.left.kicked.server.wav", "key": "user.left.kicked.server"}, {"file": "user.left.moved.wav", "key": "user.left.moved"}, {"file": "user.left.disconnect.wav", "key": "user.left.disconnect"}, {"file": "user.left.banned.wav", "key": "user.left.banned"}, {"file": "error.insufficient_permissions.wav", "key": "error.insufficient_permissions"}, {"file": "group.server.assigned.wav", "key": "group.server.assigned"}, {"file": "group.server.revoked.wav", "key": "group.server.revoked"}, {"file": "group.channel.changed.wav", "key": "group.channel.changed"}, {"file": "group.server.assigned.self.wav", "key": "group.server.assigned.self"}, {"file": "group.server.revoked.self.wav", "key": "group.server.revoked.self"}, {"file": "group.channel.changed.self.wav", "key": "group.channel.changed.self"}] \ No newline at end of file +[{"file": "sound.test.wav", "key": "sound.test"}, {"file": "sound.egg.wav", "key": "sound.egg"}, {"file": "away_activated.wav", "key": "away_activated"}, {"file": "away_deactivated.wav", "key": "away_deactivated"}, {"file": "connection.connected.wav", "key": "connection.connected"}, {"file": "connection.disconnected.wav", "key": "connection.disconnected"}, {"file": "connection.disconnected.timeout.wav", "key": "connection.disconnected.timeout"}, {"file": "connection.refused.wav", "key": "connection.refused"}, {"file": "connection.banned.wav", "key": "connection.banned"}, {"file": "server.edited.wav", "key": "server.edited"}, {"file": "server.edited.self.wav", "key": "server.edited.self"}, {"file": "server.kicked.wav", "key": "server.kicked"}, {"file": "channel.kicked.wav", "key": "channel.kicked"}, {"file": "channel.moved.wav", "key": "channel.moved"}, {"file": "channel.joined.wav", "key": "channel.joined"}, {"file": "channel.created.wav", "key": "channel.created"}, {"file": "channel.edited.wav", "key": "channel.edited"}, {"file": "channel.edited.self.wav", "key": "channel.edited.self"}, {"file": "channel.deleted.wav", "key": "channel.deleted"}, {"file": "user.moved.wav", "key": "user.moved"}, {"file": "user.moved.self.wav", "key": "user.moved.self"}, {"file": "user.poked.self.wav", "key": "user.poked.self"}, {"file": "user.banned.wav", "key": "user.banned"}, {"file": "user.joined.wav", "key": "user.joined"}, {"file": "user.joined.moved.wav", "key": "user.joined.moved"}, {"file": "user.joined.kicked.wav", "key": "user.joined.kicked"}, {"file": "user.joined.connect.wav", "key": "user.joined.connect"}, {"file": "user.left.wav", "key": "user.left"}, {"file": "user.left.kicked.channel.wav", "key": "user.left.kicked.channel"}, {"file": "user.left.kicked.server.wav", "key": "user.left.kicked.server"}, {"file": "user.left.moved.wav", "key": "user.left.moved"}, {"file": "user.left.disconnect.wav", "key": "user.left.disconnect"}, {"file": "user.left.banned.wav", "key": "user.left.banned"}, {"file": "error.insufficient_permissions.wav", "key": "error.insufficient_permissions"}, {"file": "group.server.assigned.wav", "key": "group.server.assigned"}, {"file": "group.server.revoked.wav", "key": "group.server.revoked"}, {"file": "group.channel.changed.wav", "key": "group.channel.changed"}, {"file": "group.server.assigned.self.wav", "key": "group.server.assigned.self"}, {"file": "group.server.revoked.self.wav", "key": "group.server.revoked.self"}, {"file": "group.channel.changed.self.wav", "key": "group.channel.changed.self"}, {"key": "microphone.muted", "file": "microphone.muted.wav"}, {"key": "microphone.activated", "file": "microphone.activated.wav"}, {"key": "sound.muted", "file": "sound.muted.wav"}, {"key": "sound.activated", "file": "sound.activated.wav"}, {"file": "user.left.timeout.wav", "key": "user.left.timeout"}] \ No newline at end of file diff --git a/shared/audio/speech/microphone.activated.wav b/shared/audio/speech/microphone.activated.wav new file mode 100644 index 00000000..c80fe4cb Binary files /dev/null and b/shared/audio/speech/microphone.activated.wav differ diff --git a/shared/audio/speech/microphone.muted.wav b/shared/audio/speech/microphone.muted.wav new file mode 100644 index 00000000..7492e98f Binary files /dev/null and b/shared/audio/speech/microphone.muted.wav differ diff --git a/shared/audio/speech/sound.activated.wav b/shared/audio/speech/sound.activated.wav new file mode 100644 index 00000000..fc4926ca Binary files /dev/null and b/shared/audio/speech/sound.activated.wav differ diff --git a/shared/audio/speech/sound.muted.wav b/shared/audio/speech/sound.muted.wav new file mode 100644 index 00000000..931c5ade Binary files /dev/null and b/shared/audio/speech/sound.muted.wav differ diff --git a/shared/audio/speech/user.left.timeout.wav b/shared/audio/speech/user.left.timeout.wav new file mode 100644 index 00000000..6cca26e0 Binary files /dev/null and b/shared/audio/speech/user.left.timeout.wav differ diff --git a/shared/audio/speech_sentences.csv b/shared/audio/speech_sentences.csv index b831093c..31353999 100644 --- a/shared/audio/speech_sentences.csv +++ b/shared/audio/speech_sentences.csv @@ -6,6 +6,14 @@ sound.egg;WolverinDEV is the best and I love TeaSpeak! away_activated;See you soon away_deactivated;Welcome back +#Microphone +microphone.muted;Microphone muted +microphone.activated;Microphone activated + +#Sound +sound.muted;Sound muted +sound.activated;Sound activated + #Connection connection.connected;Connected connection.disconnected;Disconnected @@ -44,6 +52,7 @@ user.left.kicked.server;User in your channel got kicked from the server user.left.moved;User was moved out of your channel user.left.disconnect;User disconnected from your channel user.left.banned;User in your channel was banned from the server +user.left.timeout;User in your channel timed out #Error error.insufficient_permissions;insufficient permissions diff --git a/shared/backend/connection.d.ts b/shared/backend/connection.d.ts index e48cd0f2..e816b7df 100644 --- a/shared/backend/connection.d.ts +++ b/shared/backend/connection.d.ts @@ -1,3 +1,4 @@ declare namespace connection { export function spawn_server_connection(handle: ConnectionHandler) : AbstractServerConnection; + export function destroy_server_connection(handle: AbstractServerConnection); } \ No newline at end of file diff --git a/shared/css/static/channel-tree.scss b/shared/css/static/channel-tree.scss index 9623c0b9..f5767091 100644 --- a/shared/css/static/channel-tree.scss +++ b/shared/css/static/channel-tree.scss @@ -1,4 +1,15 @@ @import "properties"; +@import "mixin"; + +.channel-tree-container { + height: 100%; + + flex-grow: 1; + flex-shrink: 1; + + overflow: hidden; + overflow-y: auto; +} /* the channel tree */ .channel-tree { @@ -71,6 +82,11 @@ align-self: center; color: $channel_tree_entry_text_color; + + min-width: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .icon_property { @@ -84,6 +100,8 @@ flex-direction: column; .container-channel { + position: relative; + display: flex; flex-direction: row; justify-content: stretch; @@ -94,6 +112,39 @@ align-items: center; cursor: pointer; + .marker-text-unread { + position: absolute; + left: 0; + top: 0; + bottom: 0; + + width: 1px; + background-color: #a814147F; + + opacity: 1; + + &:before { + content: ''; + position: absolute; + + left: 0; + top: 0; + bottom: 0; + + width: 24px; + + background: -moz-linear-gradient(left, rgba(168,20,20,.18) 0%, rgba(168,20,20,0) 100%); /* FF3.6-15 */ + background: -webkit-linear-gradient(left, rgba(168,20,20,.18) 0%,rgba(168,20,20,0) 100%); /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to right, rgba(168,20,20,.18) 0%,rgba(168,20,20,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + } + + &.hidden { + opacity: 0; + } + + @include transition(opacity $button_hover_animation_time); + } + .channel-type { flex-grow: 0; flex-shrink: 0; @@ -125,6 +176,17 @@ .channel-name { align-self: center; color: $channel_tree_entry_text_color; + + min-width: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + &.align-repetitive { + .channel-name { + text-overflow: clip; + } } } @@ -174,16 +236,20 @@ } .client-name { + line-height: 16px; + + flex-grow: 0; + flex-shrink: 1; + + padding-right: .25em; + color: $channel_tree_entry_text_color; + &.client-name-own { font-weight: bold; } + } - line-height: 16px; - - flex-grow: 1; - flex-shrink: 1; - - min-width: 75px; + .client-away-message { color: $channel_tree_entry_text_color; } @@ -191,7 +257,8 @@ margin-right: 0; /* override from previous thing */ position: absolute; - right: 5px; + right: 0; + padding-right: 5px; display: flex; flex-direction: row; @@ -211,14 +278,30 @@ } &.selected { + &:focus-within { + .container-icons { + background-color: $channel_tree_entry_selected; + padding-left: 5px; + z-index: 1001; /* show before client name */ + + height: 18px; + } + } + .client-name { &:focus { + position: absolute; color: black; padding-top: 1px; padding-bottom: 1px; z-index: 1000; + + margin-right: -10px; + margin-left: 18px; + + width: 100%; } } } diff --git a/shared/css/static/connection_handlers.scss b/shared/css/static/connection_handlers.scss index 409f99ca..0995b588 100644 --- a/shared/css/static/connection_handlers.scss +++ b/shared/css/static/connection_handlers.scss @@ -1,3 +1,5 @@ +@import "mixin"; + .container-connection-handlers { $animation_length: .25s; @@ -14,10 +16,7 @@ background-color: transparent; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + @include user-select(none); position: relative; @@ -32,6 +31,8 @@ overflow-x: auto; overflow-y: visible; + max-width: 100%; + .connection-container { padding-top: 4px; position: relative; @@ -57,25 +58,13 @@ color: #a8a8a8; align-self: center; - margin-right: -5px; /* 5px padding which have to be overcommed */ + margin-right: 20px; position: relative; - max-width: 16em; - overflow: visible; text-overflow: clip; white-space: nowrap; - - &:before { - content: ''; - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - background: linear-gradient(to right, transparent, #1e1e1e calc(100% - 20px)); - } } .button-close { @@ -89,6 +78,23 @@ } } + &.cutoff-name { + .server-name { + max-width: 10em; + margin-right: -5px; /* 5px padding which have to be overcommed */ + + &:before { + content: ''; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + background: linear-gradient(to right, transparent, #1e1e1e calc(100% - 20px)); + } + } + } + &:hover { background-color: #242425; } diff --git a/shared/css/static/context_menu.scss b/shared/css/static/context_menu.scss index 33ea6153..8a00ff87 100644 --- a/shared/css/static/context_menu.scss +++ b/shared/css/static/context_menu.scss @@ -86,65 +86,66 @@ position: absolute; margin-left: 3px; } + } +} - .checkbox { - margin-top: 1px; - margin-left: 1px; - display: block; - position: relative; - padding-left: 14px; - margin-bottom: 12px; - cursor: pointer; - font-size: 22px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; +/* we call it "ccheckbox" else it will be messed up the the global checkbox */ +.ccheckbox { + margin-top: 1px; + margin-left: 1px; + display: block; + position: relative; + padding-left: 14px; + margin-bottom: 12px; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; - /* Hide the browser's default checkbox */ - input { - position: absolute; - opacity: 0; - cursor: pointer; - display: none; - } + /* Hide the browser's default checkbox */ + input { + position: absolute; + opacity: 0; + cursor: pointer; + display: none; + } - .checkmark { - position: absolute; - top: 0; - left: 0; - height: 11px; - width: 11px; - background-color: #eee; + .checkmark { + position: absolute; + top: 0; + left: 0; + height: 11px; + width: 11px; + background-color: #eee; - &:after { - content: ""; - position: absolute; - display: none; + &:after { + content: ""; + position: absolute; + display: none; - left: 4px; - top: 1px; - width: 3px; - height: 7px; - border: solid white; - border-width: 0 2px 2px 0; - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); - } - } - - &:hover input ~ .checkmark { - background-color: #ccc; - } - - input:checked ~ .checkmark { - background-color: #2196F3; - } - - input:checked ~ .checkmark:after { - display: block; - } + left: 4px; + top: 1px; + width: 3px; + height: 7px; + border: solid white; + border-width: 0 2px 2px 0; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); } } + + &:hover input ~ .checkmark { + background-color: #ccc; + } + + input:checked ~ .checkmark { + background-color: #2196F3; + } + + input:checked ~ .checkmark:after { + display: block; + } } \ No newline at end of file diff --git a/shared/css/static/control_bar.scss b/shared/css/static/control_bar.scss index 9a005fbb..fbaca182 100644 --- a/shared/css/static/control_bar.scss +++ b/shared/css/static/control_bar.scss @@ -1,13 +1,14 @@ +@import "properties"; +@import "mixin"; + $border_color_activated: rgba(255, 255, 255, .75); +/* max height is 2em */ .control_bar { display: flex; flex-direction: row; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + @include user-select(none); height: 100%; align-items: center; @@ -25,8 +26,8 @@ $border_color_activated: rgba(255, 255, 255, .75); .button, .dropdown-arrow { text-align: center; - border: 1px solid rgba(0, 0, 0, 0); - border-radius: 3px; + border: .05em solid rgba(0, 0, 0, 0); + border-radius: $border_radius_small; background-color: #454545; @@ -56,6 +57,8 @@ $border_color_activated: rgba(255, 255, 255, .75); } } + @include transition(background-color $button_hover_animation_time ease-in-out, border-color $button_hover_animation_time ease-in-out); + > .icon_x24 { vertical-align: middle; } @@ -69,9 +72,25 @@ $border_color_activated: rgba(255, 255, 255, .75); margin-left: 5px; &:not(.icon_x24) { - min-width: 28px; - max-width: 28px; - height: 28px; + min-width: 2em; + max-width: 2em; + height: 2em; + } + + .icon_em { + vertical-align: text-top; + } + + &.button-hostbutton { + img { + min-width: 1.5em; + max-width: 1.5em; + + height: 1.5em; + width: 1.5em; + } + + padding: .25em; } } @@ -80,8 +99,7 @@ $border_color_activated: rgba(255, 255, 255, .75); position: relative; .buttons { - margin-top: 1px; - height: 28px; + height: 2em; align-items: center; @@ -89,14 +107,14 @@ $border_color_activated: rgba(255, 255, 255, .75); flex-direction: row; .dropdown-arrow { - height: 28px; + height: 2em; display: inline-flex; justify-content: space-around; - width: 18px; + width: 1.5em; cursor: pointer; - border-radius: 0 3px 3px 0; + border-radius: 0 $border_radius_small $border_radius_small 0; align-items: center; border-left: 0; } @@ -131,8 +149,8 @@ $border_color_activated: rgba(255, 255, 255, .75); background-color: #2d3032; align-items: center; - border: 1px solid #2c2525; - border-radius: 0 5px 5px 5px; + border: .05em solid #2c2525; + border-radius: 0 $border_radius_middle $border_radius_middle $border_radius_middle; width: 230px; @@ -143,7 +161,7 @@ $border_color_activated: rgba(255, 255, 255, .75); right: 0; } - .icon { + .icon, .icon-container, .icon_em { vertical-align: middle; margin-right: 5px; } @@ -159,16 +177,16 @@ $border_color_activated: rgba(255, 255, 255, .75); } & > div:first-of-type { - border-radius: 2px 2px 0 0; + border-radius: .1em .1em 0 0; } & > div:last-of-type { - border-radius: 0 0 2px 2px; + border-radius: 0 0 .1em .1em; } &.display_left { margin-left: -179px; - border-radius: 5px 0 5px 5px; + border-radius: $border_radius_middle 0 $border_radius_middle $border_radius_middle; } } @@ -263,4 +281,8 @@ $border_color_activated: rgba(255, 255, 255, .75); } } } + + .icon_em { + font-size: 1.5em; + } } \ No newline at end of file diff --git a/shared/css/static/frame-chat.scss b/shared/css/static/frame-chat.scss index c1b3bc67..f91e468a 100644 --- a/shared/css/static/frame-chat.scss +++ b/shared/css/static/frame-chat.scss @@ -1,3 +1,10 @@ +@import "./mixin"; +@import "./properties"; + +//$color_client_normal: #bebebe; +$color_client_normal: #cccccc; +$client_info_avatar_size: 10em; + .container-chat-frame { flex-grow: 1; flex-shrink: 1; @@ -6,6 +13,8 @@ flex-direction: column; justify-content: stretch; + min-height: 200px; + .container-info { user-select: none; @@ -78,7 +87,7 @@ color: #dab8b4; font-size: .66em; - height: .9em; + height: 1.3em; min-width: .9em; padding-right: 2px; @@ -92,17 +101,40 @@ display: inline-block; - border-radius: 3px; - padding-right: 5px; - padding-left: 5px; + border-radius: .18em; + padding-right: .31em; + padding-left: .31em; > div { display: inline-block; } - .icon-container { - margin-right: 5px; + .icon-container, .icon { vertical-align: middle; + margin-right: .25em; + } + + &.value-ping { + //very-good good medium poor very-poor + &.very-good { + color: #3f7538; + } + &.good { + color: #365632; + } + &.medium { + color: #777f2c; + } + &.poor { + color: #7f5122; + } + &.very-poor { + color: #7f2222; + } + } + + &.chat-counter { + cursor: pointer; } } @@ -113,11 +145,40 @@ vertical-align: top; margin-top: -.2em; } + + .button { + color: #5a5a5a; + background-color: #373737; + + display: inline-block; + + &:not(.value) { + border-radius: .18em; + padding-right: .31em; + padding-left: .31em; + + margin-top: 1.5em; /* because we've no title */ + } + + cursor: pointer; + + &:hover { + background-color: #4e4e4e; /* TODO: Evaluate color */ + } + @include transition(background-color $button_hover_animation_time ease-in-out); + } + + &.mode-client_info { + min-width: 50%; + margin-right: calc(#{$client_info_avatar_size} / 2); + } } } } .container-chat { + width: 100%; + flex-grow: 1; flex-shrink: 1; @@ -125,9 +186,14 @@ border-bottom-right-radius: 5px; min-width: 350px; - min-height: 200px; + min-height: 16em; + + display: flex; + flex-direction: column; .container-private-conversations { + height: 100%; + flex-grow: 1; flex-shrink: 1; @@ -164,8 +230,9 @@ } } - //Avatar within cat 40x40 .conversation-entry { + position: relative; + display: flex; flex-direction: row; justify-content: stretch; @@ -185,8 +252,8 @@ .avatar { overflow: hidden; - width: 30px; - height: 30px; + width: 2em; + height: 2em; border-radius: 50%; } @@ -237,7 +304,7 @@ } .client-name { - color: #bebebe; + color: $color_client_normal; font-weight: bold; margin-bottom: -.4em; @@ -251,6 +318,42 @@ } } + .button-close { + font-size: 2em; + + position: absolute; + right: 0; + top: 0; + bottom: 0; + + opacity: 0.3; + + width: .5em; + height: .5em; + + &:hover { + opacity: 1; + } + @include transition(opacity $button_hover_animation_time ease-in-out); + + &:before, &:after { + position: absolute; + left: .25em; + content: ' '; + height: .5em; + width: .05em; + background-color: #5a5a5a; + } + + &:before { + transform: rotate(45deg); + } + + &:after { + transform: rotate(-45deg); + } + } + &:hover { background-color: #393939; } @@ -258,6 +361,7 @@ &.selected { background-color: #2c2c2c; } + @include transition(background-color $button_hover_animation_time ease-in-out); } } @@ -269,16 +373,134 @@ flex-direction: column; justify-content: stretch; - .messages { + .spacer { + min-height: 0; flex-grow: 1; flex-shrink: 1; + } + + .messages { + @include user-select(none); + + display: block; + position: relative; + + flex-grow: 0; + flex-shrink: 1; min-height: 100px; + + overflow-y: auto; + overflow-x: hidden; + + .message-entry { + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-avatar { + flex-grow: 0; + flex-shrink: 0; + + position: relative; + + display: inline-block; + margin: .5em 1em .5em .5em; + + .avatar { + overflow: hidden; + + width: 2.5em; + height: 2.5em; + + border-radius: 50%; + } + } + + .container-message { + flex-grow: 1; + flex-shrink: 1; + + min-width: 2em; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; + + .info { + display: block; + + white-space : nowrap; + overflow : hidden; + text-overflow: ellipsis; + + margin-top: .5em; + + .client-name, .client-name .htmltag-client { + display: inline; + + font-weight: bold; + color: $color_client_normal; + } + + .timestamp { + display: inline; + + font-size: 0.66em; + color: #5d5b5b; + } + } + + .message { + color: #b5b5b5; + line-height: 1.1em; + word-wrap: break-word; + } + } + } + + .spacer-entry { + text-align: center; + //padding: .5em 1em; + color: #565353; + + &.type-new { + color: darkred; /* TODO: Evaluate color */ + } + + &.type-disconnect { + color: red; /* TODO: Evaluate color */ + } + + &.type-reconnect { + color: green; /* TODO: Evaluate color */ + } + + &.type-closed { + color: yellow; /* TODO: Evaluate color */ + } + + &.type-date { + color: #565353; + background-color: #353535; + + z-index: 2; /* over the avatar */ + position: sticky; + top: 0; + } + } + + @include chat-scrollbar(); } .chatbox { flex-grow: 0; - flex-shrink: 1; + flex-shrink: 0; display: flex; justify-content: stretch; @@ -298,14 +520,12 @@ } .container-chatbox { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - + @include user-select(none); + flex-grow: 1; - flex-shrink: 1; + flex-shrink: 0; min-height: calc(1.5em + 10px); + height: min-content; display: flex; flex-direction: row; @@ -327,11 +547,17 @@ cursor: pointer; + display: flex; + flex-direction: row; + justify-content: space-around; + &:hover { background-color: #393939; } + @include transition(background-color $button_hover_animation_time ease-in-out); .container-icon { + position: absolute; display: flex; width: calc(1.5em - 4px); @@ -342,6 +568,40 @@ width: 100%; } } + + .lsx-emojipicker-appender { + position: relative; + + width: calc(1.5em - 4px); + height: calc(1.5em - 4px); + + .lsx-emojipicker-container { + &:after { + right: calc(0.75em + 2px) !important + } + + .lsx-emojipicker-tabs { + height: 38px; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + li { + height: 36px; + width: 36px; + + display: flex; + flex-direction: column; + justify-content: space-around; + + img { + margin: 0; + } + } + } + } + } } } @@ -353,24 +613,25 @@ width: 100%; background-color: #464646; + border: 2px none #353535; /* background color (like no border) */ + padding: 0 5px; overflow: hidden; border-radius: 5px; - textarea { - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; + .textarea { + @include user-select(text); width: 100%; - resize: vertical; + resize: none; min-height: 1.5em; max-height: 6em; height: 1.5em; + overflow: auto; + background-color: transparent; padding: 0; margin: 0; @@ -378,32 +639,621 @@ outline: none; color: #a9a9a9; + + @include chat-scrollbar-vertical(); + } - textarea::-webkit-input-placeholder { + @include placeholder(textarea) { color: #363535; font-style: oblique; } - textarea:-moz-placeholder { - color: #363535; - font-style: oblique; + + &:hover { + margin: -2px; + border: 2px solid #474747; } - textarea::-moz-placeholder { - color: #363535; - font-style: oblique; + + &:focus-within { + margin: -2px; + border: 2px solid #585858; } - textarea:-ms-input-placeholder { - color: #363535; - font-style: oblique; + + @include transition(border-color $button_hover_animation_time ease-in-out); + } + } + + .container-channel-chat { + width: 100%; + + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + /* 1.5em + 10px := chatbox; 2em chat */ + min-height: calc(1.5em + 10px + 2em); + + > .spacer { + min-height: 0; + flex-grow: 1; + flex-shrink: 1; + } + + > .container-chat { + @include user-select(none); + + padding: 5px; + + display: flex; + flex-direction: column; + justify-content: stretch; + + position: relative; + + flex-grow: 1; + flex-shrink: 1; + + width: 100%; + min-height: 2em; + + .container-channel-chat-messages { + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + min-height: 2em; } - textarea::-ms-input-placeholder { - color: #363535; - font-style: oblique; + + .container-messages { + flex-grow: 1; + flex-shrink: 1; + + display: block; + + position: relative; + + overflow-y: auto; + overflow-x: hidden; + + min-height: 2em; + + .message-entry { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-avatar { + flex-grow: 0; + flex-shrink: 0; + + position: relative; + + display: inline-block; + margin: 1em 1em .5em .5em; + + .avatar { + overflow: hidden; + + width: 2.5em; + height: 2.5em; + + border-radius: 50%; + } + } + + .container-message { + flex-grow: 0; + flex-shrink: 1; + + min-width: 2em; + + position: relative; + + display: inline-flex; + flex-direction: column; + justify-content: flex-start; + + @include user-select(text); + + background: #303030; + border-radius: 6px 6px 6px 6px; + + margin-top: .5em; + padding: .5em; + + .info { + display: block; + + white-space : nowrap; + overflow : hidden; + text-overflow: ellipsis; + + .client-name, .client-name .htmltag-client { + display: inline; + + font-weight: bold; + color: $color_client_normal; + } + + .timestamp { + display: inline; + + font-size: 0.66em; + color: #5d5b5b; + } + + .button-delete { + width: 1.1em; + cursor: pointer; + + display: inline-block; + align-self: auto; + + opacity: .25; + + > img { + vertical-align: text-top; + } + + &:hover { + opacity: 1; + } + + @include transform(opacity $button_hover_animation_time ease-in-out); + } + } + + .message { + color: #b5b5b5; + line-height: 1.1em; + + word-wrap: break-word; + } + + &:before { + position: absolute; + + content: ' '; + + width: 1em; + height: 1em; + + margin-left: calc(-.5em - 1em); + border-top: .5em solid transparent; + border-right: .75em solid #303030; + border-bottom: .5em solid transparent; + + top: 1.25em; + } + } + } + + .spacer-entry { + text-align: center; + //padding: .5em 1em; + color: #565353; + + &.type-new { + color: darkred; /* TODO: Evaluate color */ + } + + &.type-old { + opacity: 0; + cursor: pointer; + pointer-events: none; + + height: 0; + @include transition(opacity .25s ease-in-out); + &.shown { + height: unset; + + cursor: pointer; + pointer-events: all; + + opacity: 1; + @include transition(opacity .25s ease-in-out); + } + } + } + + @include chat-scrollbar(); } - textarea::placeholder { - color: #363535; - font-style: oblique; + + .new-message { + flex-grow: 0; + flex-shrink: 0; + + position: absolute; + bottom: 0; + right: 0; + left: 0; + + display: block; + text-align: center; + + width: 100%; + color: #8b8b8b; + + background: #353535; /* if we dont support gradients */ + background: linear-gradient(#35353500 10%, #353535 70%); + pointer-events: none; + + opacity: 0; + @include transition(opacity .25s ease-in-out); + &.shown { + cursor: pointer; + pointer-events: all; + + opacity: 1; + @include transition(opacity .25s ease-in-out); + } } + + .no-permissions, .private-conversation { + flex-grow: 0; + flex-shrink: 0; + + position: absolute; + top: 0; + bottom: 0; + right: 0; + left: 0; + + text-align: center; + + width: 100%; + color: #5a5a5a; + background: #353535; + + + display: flex; + flex-direction: column; + justify-content: center; + + > div { + display: inline-block; + } + } + } + + > .container-chatbox { + flex-grow: 0; + flex-shrink: 0; + + min-height: 2em; + } + } + + .container-client-info { + position: relative; + + height: 100%; + + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + padding-right: 5px; + padding-left: 5px; + + .heading { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .container-avatar { + flex-grow: 0; + flex-shrink: 0; + + position: relative; + + display: inline-block; + margin: calc(#{$client_info_avatar_size} / -2) .75em .5em .5em; + + align-self: center; + + .avatar { + overflow: hidden; + + width: $client_info_avatar_size; + height: $client_info_avatar_size; + + border-radius: 50%; + } + } + + .container-avatar-edit { + position: absolute; + + display: inline-block; + + left: 0; + right: 0; + top: 0; + bottom: 0; + + z-index: 2; + + text-align: center; + + > img { + cursor: pointer; + + width: $client_info_avatar_size; + height: $client_info_avatar_size; + + padding: calc(#{$client_info_avatar_size} / 6); + + overflow: hidden; + opacity: 0; + + &:hover { + opacity: .75; + } + @include transition(opacity $button_hover_animation_time ease-in-out); + } + } + + .client-name { + display: flex; + flex-direction: row; + justify-content: center; + + .htmltag-client { + text-align: center; + font-size: 1.5em; + color: $color_client_normal; + font-weight: bold; + } + } + + .container-description { + padding-right: calc(#{$client_info_avatar_size} / 2); + padding-left: calc(#{$client_info_avatar_size} / 2); + text-align: center; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .client-description { + color: #6f6f6f; + + max-width: 100%; + flex-shrink: 1; + flex-grow: 1; + overflow-wrap: break-word; + } + } + } + + .general-info { + padding-top: 1em; + + overflow-x: hidden; + overflow-y: auto; + + display: flex; + flex-direction: row; + justify-content: stretch; + + flex-grow: 1; + flex-shrink: 1; + + .block { + display: inline-block; + height: 100%; + + flex-grow: 1; + flex-shrink: 1; + + min-width: 6em; + + &.block-right { + text-align: right; + + .container-property { + flex-direction: row-reverse; + + .icon_em { + margin-left: .2em; + } + + .value { + justify-content: flex-end; + } + } + } + &.block-left { + text-align: left; + + .container-property { + .icon_em { + margin-right: .2em; + } + + .value { + justify-content: flex-start; + } + } + } + + .container-property { + display: flex; + flex-direction: row; + justify-content: stretch; + + > .icon_em { + margin-top: .1em; + margin-bottom: .1em; + + font-size: 2em; + + flex-shrink: 0; + flex-grow: 0; + } + + &.list { + > .icon_em { + margin-top: 0; /* for lists the .1em patting on the top looks odd */ + } + } + + .property { + line-height: 1.1em; + + flex-shrink: 1; + flex-grow: 1; + + min-width: 4em; /* 2em for the icon the last 4 for the text */ + + display: flex; + flex-direction: column; + justify-content: flex-start; + + .title, .value { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + + .title { + color: #636363; + font-weight: bold; + text-transform: uppercase; + } + + .value { + color: #d9d9d9; + + display: flex; + flex-direction: row; + + .country { + margin-right: .2em; + align-self: center; + } + + .group-container { + display: flex; + + justify-content: flex-start; + flex-direction: row-reverse; + + .icon-container, .icon_empty, .icon { + margin-left: .5em; + align-self: center; + + & > img { + top: 0; + left: 0; + right: 0; + bottom: 0; + } + } + } + + .status-entry { + > .icon_em { + vertical-align: middle; + } + + .away-message { + margin-left: .25em; + } + } + + &.client-teaforo-account { + a, a:visited { + color: #d9d9d9; + } + } + } + } + + &.list { + .property { + .value { + flex-direction: column; + } + } + } + + &:not(first-of-type) { + margin-top: 1em; + } + } + } + } + + + + .button-close { + font-size: 4em; + + cursor: pointer; + + position: absolute; + right: 0; + top: 0; + bottom: 0; + + opacity: 0.3; + + width: .5em; + height: .5em; + + margin-right: .1em; + margin-top: .1em; + + &:hover { + opacity: 1; + } + @include transition(opacity $button_hover_animation_time ease-in-out); + + &:before, &:after { + position: absolute; + left: .25em; + content: ' '; + height: .5em; + width: .05em; + background-color: #5a5a5a; + } + + &:before { + transform: rotate(45deg); + } + + &:after { + transform: rotate(-45deg); + } + } + } + + .container-private-conversations, .container-channel-chat { + .container-message .emoji { + height: 1em; + width: 1em; + + margin-left: .1em; + margin-right: .1em; + + vertical-align: text-top; } } } diff --git a/shared/css/static/frame/SelectInfo.scss b/shared/css/static/frame/SelectInfo.scss index a5481c4c..3c0f068d 100644 --- a/shared/css/static/frame/SelectInfo.scss +++ b/shared/css/static/frame/SelectInfo.scss @@ -41,10 +41,6 @@ flex-direction: column; padding-right: 0; padding-left: 0; - - .hostbanner { - overflow: hidden; - } } } @@ -84,42 +80,6 @@ display: none; margin-bottom: 5px; } - - .hostbanner { - position: relative; - flex-grow: 1; - flex-shrink: 1; - - .meta-image { - display: none; - } - - - .image-container { - display: flex; - flex-direction: row; - justify-content: center; - height: 100%; - - div { - background-position: center; - - &.hostbanner-mode-0 { } - - &.hostbanner-mode-1 { - width: 100%; - height: auto; - } - - &.hostbanner-mode-2 { - background-size: cover!important; - background-position: top center !important; - width:100%; - height:100% - } - } - } - } } .container-select-info { diff --git a/shared/css/static/general.scss b/shared/css/static/general.scss index f51559c5..feae51d2 100644 --- a/shared/css/static/general.scss +++ b/shared/css/static/general.scss @@ -1,24 +1,11 @@ -*, -*::before, -*::after { - box-sizing: border-box; -} - -.align_row { - display: flex; - flex-direction: row; -} - -.align_column { - display: flex; - flex-direction: column; -} +@import "mixin"; +/* Avatar/Icon loading animations */ .icon_loading { border: 2px solid #f3f3f3; /* Light grey */ border-top: 2px solid #3498db; /* Blue */ border-radius: 50%; - animation: spin 2s linear infinite; + animation: loading_spin 2s linear infinite; width: 14px !important; height: 14px !important; @@ -28,13 +15,13 @@ border: 2px solid #f3f3f3; /* Light grey */ border-top: 2px solid #3498db; /* Blue */ border-radius: 50%; - animation: spin 2s linear infinite; + animation: loading_spin 2s linear infinite; width: 14px !important; height: 14px !important; } -@keyframes spin { +@keyframes loading_spin { 0% { transform: rotate(0deg); } @@ -48,213 +35,200 @@ user-zoom: fixed; } -.select_info { - font-family: Arial; - font-size: 12px; - /*white-space: pre;*/ - line-height: 1; - height: 100%; - display: flex; - flex-direction: column; +/* Some general style settings (from bootstrap) */ +:root { + --blue: #2196f3; + --indigo: #3f51b5; + --purple: #9c27b0; + --pink: #e91e63; + --red: #f44336; + --orange: #ff9800; + --yellow: #ffeb3b; + --green: #4caf50; + --teal: #009688; + --cyan: #00bcd4; + --white: #fff; + --gray: #6c757d; + --gray-dark: #343a40; + --primary: #009688; + --secondary: #6c757d; + --success: #4caf50; + --info: #03a9f4; + --warning: #ff5722; + --danger: #f44336; + --light: #f5f5f5; + --dark: #424242; + --breakpoint-xs: 0; + --breakpoint-sm: 576px; + --breakpoint-md: 768px; + --breakpoint-lg: 992px; + --breakpoint-xl: 1200px; + --font-family-sans-serif: "Roboto", "Helvetica", "Arial", sans-serif; + --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } -/* The Modal (background) */ -.modal_disabled { - display: none; /* Hidden by default */ - position: fixed; /* Stay in place */ - z-index: 1; /* Sit on top */ - left: 0; - top: 0; - width: 100%; /* Full width */ - height: 100%; /* Full height */ - overflow: auto; /* Enable scroll if needed */ - background-color: rgb(0, 0, 0); /* Fallback color */ - background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ - - /* Modal Header */ - .modal-header { - padding: 2px 16px; - min-height: 30px; - vertical-align: middle; - display: flex; - align-items: center; - - border: grey solid; - border-width: 0 0 1px 0; - - background-color: lightgreen; - } - - /* Modal Body */ - .modal-body:not(:empty) { - display: flex; - padding: 2px 16px; - flex-grow: 1; - flex-direction: column; - justify-content: stretch; - } - - /* Modal Footer */ - .modal-footer:not(:empty) { - padding: 2px 16px; - } - - /* The Close Button */ - .close { - color: #aaa; - float: right; - font-size: 28px; - font-weight: bold; - position: absolute; - top: 0px; - right: 4px; - } - - .close:hover, - .close:focus { - color: black; - text-decoration: none; - cursor: pointer; - } - - /* Modal Content */ - .modal-content:not(:empty) { - position: absolute; - display: inline-flex; - flex-direction: column; - justify-content: stretch; - background-color: #fefefe; - margin: auto; - padding: 0; - border: 2px solid #888; - width: auto; - max-width: 90%; - box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.2), 2px 6px 20px 0 rgba(0, 0, 0, 0.19); - animation-name: modalFlyIn; - animation-duration: 0.4s; - top: 10%; - max-height: 80%; - - left: 0; - right: 0; - } -} - -/* Add Animation */ -@keyframes modalFlyIn { - from { - top: 0%; - opacity: 0 - } - to { - top: 10%; - opacity: 1 - } -} - -.channel_perm_tbl input { - width: 30px; -} - -.channel_perm_tbl .key { - width: 120px; -} - -.channel_general_properties .value { - width: 100%; +*, :before, :after { + box-sizing: border-box; + outline: none; } html { + font-family: sans-serif; + line-height: 1.15; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -ms-overflow-style: scrollbar; + -webkit-tap-highlight-color: transparent; background-color: gray; } +body { + height: 100vh; + width: 100vw; + top: 0; + left: 0; + right: 0; + padding: 0; + margin: 0; + + + font-family: Roboto, Helvetica, Arial, sans-serif; + font-size: 1rem; + line-height: 1.5; + color: #212529; + text-align: left; + background-color: #fafafa; + + font-weight: 400; +} + +button, input, optgroup, select, textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + fieldset { border: unset; display: unset; } -.modal-head-error { - background: darkred; - - font-family: Arial; - font-size: 15px; - font-weight: bold; - - vertical-align: middle; -} - -.modal-button-group { - -} - -.modal-button-group button { - width: 100px; - margin-right: 5px; - margin-left: 5px; -} - -.modal-button-group button:last-of-type { - margin-right: 0px; -} - -.invalid_input { - border-color: red; -} - -.GroupBox { - border: gray solid; - border-width: 2px; - border-radius: 0px 6px 6px 6px; -} - code { background-color: lightgray; padding: 2px; } -.icon-playlist-manage { - &.icon { - width: 16px; - height: 16px; - - background-position: -5px -5px; - background-size: 25px; - } - - &.icon_x32 { - width: 32px; - height: 32px; - - background-position: -11px -9px; - background-size: 50px; - } - - &.icon_x24 { - width: 24px; - height: 24px; - - background-position: -11px -9px; - background-size: 50px; - } - - display: inline-block; - background: url('../../img/music/playlist.svg') no-repeat; -} - -x-content { - flex-grow: 1; - flex-shrink: 1; - display: flex; - flex-direction: column; - height: auto; -} - -[class*=" bmd-label"], [class^=bmd-label] { - color: rgba(0, 0, 0, .6) !important; -} /* bootstrap materialize fix */ .form-row { margin-left: 0 !important; margin-right: 0 !important; +} + +/* New design */ +a[href] { + color: #4d7bff; + text-decoration: none; + + &:hover { + color: #8aa8ff; + } + + &:visited { + color: #2752cd; + } +} + +/* code hightliting */ +.tag-hljs-inline-code, .tag-hljs-code { + display: block; + margin: 3px; + + font-size: 80%; + border-radius: .2em; + font-family: Monaco, Menlo, Consolas, "Roboto Mono", "Andale Mono", "Ubuntu Mono", monospace; + box-decoration-break: clone; + + &.tag-hljs-inline-code { + display: inline-block; + + > .hljs { + padding: 0 .25em!important; + } + + white-space: pre-wrap; + margin: 0 0 -0.1em; + vertical-align: bottom; + } + &.tag-hljs-code { + word-wrap: normal; + } + + code { + @include chat-scrollbar-horizontal(); + } +} + +/* fix tailing new line after code blocks */ +.message > { + .tag-hljs-code + br { + display: none; + } +} + +/* tooltip */ +#global-tooltip { + color: #999999; + background-color: #232222; + + position: fixed; + z-index: 1000000; + + pointer-events: none; + + padding: .25em; + transform: translate(-50%, -100%); /* translate up, center */ + + text-align: center; + border-right: 3px; + + display: flex; + flex-direction: column; + justify-content: space-around; + + opacity: 0; + @include transition(opacity .5s ease-in-out); + + &:after { + content: ''; + position: absolute; + + width: 0; + height: 0; + + left: calc(50% - .5em); + bottom: -.4em; + + border-style: solid; + border-width: .5em .5em 0 .5em; + border-color: #232222 transparent transparent transparent; + } + + &.shown { + opacity: 1; + } +} + +/* colored letters */ +a.rainbow-letter { + background-image: url('data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAV/klEQVR4nM1dbY7j1hFsauSsk2CBAPkXBPkZ5Ca+QY6V+wS5SA5g569jrGN7d0diMCNRahar+uNRY7sDmeR7j++rqqublHYyffWPv39jNr+3V5tte8QyVZ4d120ms9fPYpM74vlUKF8+h2Idtjsk5f7aknGij1qjBceVzQSKKnTb44ejmf3pMtRs/GhQ5yFT97B2fC10kaSd7y1rW+lzj7H+I0BZO9U2unezjfvAf/m8P5hNH+IpVKaJ00X/tk17tRa2zq6hkzzC2IqYMm1Xyu8bWlT1WCHK5fzDoQ5wpw0uVW2Nnqtaiy9nhFd9jVjVkysWuUjJ+6MFsSiN10IdDr3pVKYaqUI870gFEHTVLjLVtguwqot2EetbfUceXZN62f5Q83JWVlWHDkm26+3I+V6CjBqushMgy14feUvUNiGLU4BoaiPqYKW6jgqw+7p1lfu9RUlbxaPZvZWx6GS7SV+h/lAHvKsOWSioq4AvY+vKPL+bYI4kaVPwYe0s3YEiy7vgw4YdttOOprnH83V9pm7VMPBo+VerHInrUd6AY73aYExPwYe2SQjISNDx/Gi5WgW6Up8lypFlIFXL1T2ZC8lJvxH4xRDw6Hq+VVUVUGGA7Rvrp2tV8CMdbRMoyu7VeRV8+ATvAfaQoNv2ch3F/cywXUcdKhatspIzlL2/kt2z8xEiWPoeYJQE2VJVGrRWA2UR0I8CvuK1FRVQ99P6itcrj1Z12A7KyXuADrCqHpdYinhyzZW1Zn1VrRrXKyqQEaJMgkeBT/pthABGDrb8KoHqKlANAdl5tT81M6zP6qJ+Q+nvyLmqUwkTtIEQEAGPZWxJXeD74OOasj1U12gVyceZZrRn3l/yenau2nRVAdoETwEZcBkJsu2KjBOhQoZO/oDWlfisDtux883EokUrMLGMtRGfo57+7KatztkKJtIH1rHraXWsjKhG3/ZWAwkt8n5cqTkyDHm/EfCMXEfyPpAfHDUIFpzjChjo7FoBj+ObJAJaB9gKEbJQwMDPVECSIPP6ild37iFtj3zZ2VZ1QDcAFesVrDUVmDd3Pcb7fZ94ngVG5f2p9O8BPyNDrgAViyDJQMc2CJ0J2LQKKNpmWqZmrCwiAZuHVeoUKNF1Rgosi8aZKQGUJFfyhGilEVHYuL5mur0jVBSzlELr8zmZeRa/I/BL3o9g+/PM60fAzwnQkfwRQlSh82V3KKMAgj2OerkyJvPqXJGBmgJ+BPz9BOhaJxSMlHs/ttU51vjNZnfvAV/1z0hgCRFWk1MAYZtR8PcRIBJPv3SkcJUEbFsiReAqwHqO4n8k+xUQ1diZ94fSX/H4EfADwAkB1NIMgJ7g7m7sr9arUHCvU96Ps4tAr1gUzyOShON1PL5KEFaPZTj29UjeA+DMKrE/Wm1GAiv6tW7Nykdmm2XzmANgeZr4KQXYS4AM8F4IqFpF9lm0ZqZCg7m6XAWY/LN9YBZJuIrp5aSvAqQFbV7sXLy/4PW+TBCg4j8ILgN7VDWwz5oKYGsWAjIisL6NkIEpALalS1Pgnd1xRAlYHS74sQrAVveovrDPWAUwSO2ZSSWut3KDyMsXq4KfqUAEuqhrECCS8wl6fitbgJ9u//V7qRSgOrNM0qNsnxoOzEhQAf8RXt8jQCbnWM98bnKr22PMr+fVyEbAz54vIkKg1DP5z9psBs48uwt+FBIsOXf14lWwAjRTAFz1YUAVIkjvdV4LcF1MAXzvbEYqtrN2WZvVQNlnFPyMDLjYWAFmt5wuYOyePSHh4HZFbe98+6/K+lmSWJ1NFNujJPB23yPBP8PkO2pgpA7Oj2vg9xDBb9novb4PZWt451tGsFzfj0wBOqNmRMB6ah3wu/kALjS6Zufbx8AKETArn0Wd2uJzIT+IPH89Bht9mylsCYLnOHIU11UucOs080wEeE8OgE8GOB6rc0fxbeCjFIFF4wMckf7mwgDubD0k4LnBCjKaKiKoBPDWaRdspQRVrx8EHgigAI48nJ1jXYc0CHp2fR9rduNEe4F7wozJegq8Hzz6eGC7wO/xfrbw6/Xgi6CRMFCR/wx0Bs+8GhN1gu1btCojQLMymvipQSPwFehYrvpViyyqQECAiuxXwPdqUJV/X+ZJoNOuBX4MOjgjtaLokU95PpV+Bi4eO0SIFKADPCMo/y4gi/8ZyHidkciAEAz4g1MPP6Zt+o+UUO1HN96niR8DmZGgmwyqsdjC2Tk5NhSgI/WsXbZLizHgl36YGtzLmAqYmCWbtT/PgN9IP1uSAr/j+dH7f0vOsR7L1wSIJL+bDBoAr/rzQLOVnR3A6jgDfPNm7Wrv1EqNgC7jvgJYnTPg98g/LhTnZsFRK8CepwIGPFMBC3IBDzau4gwhwRPB6BdF2f75WVY/m86r4Kt8oEIEBnZ0zshg6/bJ7wGqqpDlBUwV2OoPwfn5/ucMNuBPEArmdA/ZajbyLv4m8GpT0ZO7RGAEMOcLLAQgqBVvF8RoKAB6eFQege7vY9l/tCpPAhNEuPSdkUDZ5HpMwUfgGegdBZgT4B8Euj8Xr4KtWKaOBsArz8cQUNUztLODaE4JwKhoBOww9iPoEQnwvEKALvAV0ElZ8z3ASJkiRfSZ3A5VCIB2bqtA9VGQPrpViJB5fwR8BjpeF8G3LQFm44SoAI9plwoJ5yIRCrNfmVeU6UoAoyTAGXnZDwlQBb1CAlQCcyRAMrBzVVbZNk2AStLnge7kBcv5wd1fIcDkSIN5A9oJ+ucEiDTEx3//fyJx69IDe0quR57/cWssOUdQG+BbHAKsQYjKUamC+qgwIMUZ2l4Sw7kYClTidwMfgT0REpwI8NXkrwv6IOBYF7wKZpa9H2BhQK2mEgYYuc4EeGXzLRfwD5NnsgoE3R830u/BZwRg4FeAHwW9ATha4dtAJe+sjrXxbdnK/DUGwWXXojDgyYBqMF+DwJoEOGoIvgnQUQFQ/hXweI3bwMCtSH50HtQn/zjUb3JGAg+wuleFAazD4xnKPFwnd32Sq57tRPfeBPg3AnhQn4EACvzqI98er4/OszpX3gwBqp1KDKMytmK2K/jU4OE6O+CZkr20f7qeXTQAsTGg1JMjwGuDBehncR7F/4wAagtwiywoU21UPZQXFcCKxFDgG6yIPSUoMmCugOD7sBAlh2fqoIsdEHwDwJ8JEZAAFdnH5bGlG5yPeH1WrkOAknJmrG2kDGxVKugpZWDv/88FAlw+Z1ABg8e+GwEQ/GcgwkkAHz3ndyQ/OlfwVAnh6smLoMWUCrCeWY7g2ylSVI/4mVw653ceYdwS4Xz7rGf05D63eP/5+lnOUQE6Md8SwB8JfFbu6o8cnOSuMjlU30wRTOwK20H8BdEsSMBDwen1f/dniYMD/7X1AvgnIMFCgOiRj30MlqGucZuja9amWufsgf86eDGlBoupHMEIAbCMEYIR4OmK0JOL7Pcxz9dnAk+A4/VzA/7l85EQgCV8UZzHc7U8PO+WKUvaJn8ihlklR6i+TGLkiM4ZGSI1eAYS3H9P8GyfXmvNg3+6gv7T9fMJpB9jfgV4XM6Ip6M9qs2YAlTDhXosY3UqTLA2SkcZCY4uYC8wX0jwEgg+X98b/GYhwI9m9r/r8SMBP5L6aIpqSWx51fKuiX4GCBCBNHqvmkPHXRQZls8LzO883PbRvns9fvnyn+/N7L9XAnjwTwOgV6ef2aPAD+y47/Y9+UP13q7bROHiBcnfmtnvzex31xzgOzu+gP/NlQSfRIxX3XemO2pvSIQ3SAIfbW81vz+a2V/sr//81y+3tF+B/coI8KC5KBFYkrhPV6n/2uzf9pX97TXj+/rl/039qv8nl+0pzcdzNoFH2dtJQBACfmXKkIV/f46qf3Zv8T5ewf/W7PDt5ZaP9qW9sz9fk4Dvr48A/tlvhphgghRv8Rxnje9n+vbLKkDHgaI4zECfXSxfXux8vGb431+c/d319h9fU8MvbbI/mNkXZvYDvATAFwAsI1QJabSAzqZ0XtFXbd6bBILteT6t5HMGe6u83X9B49/q/XRF+wezw/Nd/pbqd5fngeuj4hfujdAzeQWILwLYhNjk1YLxUTgjQrRxzFi7qUCAPf1X2mR7knn7DFic4Yucz0CAq7o/ufi3NDu+vjL6zbXUvyD+HHwNyL79wYniAtRi/Xn0HiVrx4yHkeMur+20q5BfyTzzenwNi7/OeQYCfLyr+uHsXwmtU4SDHWx69X5zXzo9kW+D2BcCODkDQlhACvV63LervGaPNn9LlhoBsv6j+koorEi8CWdDycevcT+Dkp/gFz/k1uP1RyQX8z9AeXa/Qjq57xyQBH6i7B+/sMVHGxN9qVYxfc82BDxCyllZdJ7JvAkHY56/fD6Tr3RfwJ+33wzMcPul7gk2HYnw5FojEw+ECErKKgRQZZEiKEDWKhArQBVoNVd1Hh3VHjEnQwLgr3Y+OyU4rb3/AKKLPLrA7ZXA4JeDJ3etfhF6GCABhgNzZQggaxvZtq0mwN54rs4jb8frDvhM/p/XIfsAfuyn6btbYHta5QCL+R4O7g71jwIiErCFs81Rv52Ifmij3h2sSdRTgM511dst2RsG/Ex+j4cEgIR9Oq9hm2DLkFfnG8yeKgbhAH+PuL27TgJFALVpqAgM+OxHOj4HyMDN2lTCVkR4BbryfAT/DMA/r0nCwGe/GmSRfFr9oQo0Hw5OAPwZgFILZJvANg69mhHCCmpwvz6u+ojAVuAyoNnc1XnX+zP5J4/p07xN43BZOOTysVsAwLtMgO+BnwgBznAdqQAD3h+xXAOdvwcYARzngzuK9ZHHZ8AzEigCQD6Ggm3g/UaGmh2MFzWY4LnBm++VfWahBCws4AapzWP9KkAW26rEOgfYe85Aj9YTAZ+BjwRg9fPa+/GffWEOgMPiE/x0uwuTQn+ONMMcwStBpAKRAjAyGLRVxFibVoCqx1c9PwOfveRBEjCgo3+bR8BXCoBL8BCttxL/XpEHn/WGJEBtqRDAz2wi5wgEkgDL7u05ARQZOqDjbuI17rQFj3sjCjBvY38UBhgHkQh32Fk+4Dffg+7Lz7AZVRLg5jESZGTA84vlBIjqFeA43xHvZ8DPAeAkgCvw2ROAwRQxBKyfCjzQHTLg0QMXEYFtXkSCKDlct4kJUAU9Aj8CnhFAqUD0IX1WvN5bNDWM1HbLB1Q4MAc2ux7ZKJYvsNxAkYE9BUyEAF3Q3wL8SAWKZMDUzAgZmGXgz6s+kVr4J+zwfaMnAsp/pgQmZqS9u0KG7XuAKhFUWRX4igIoAkT7FMR9Rgpv1anrpPAMRDiTR8do49izh/+ov6+U5QTe1uVrAnS9P1MAVs6AizwfCaBIch1nmtc+ybwfwR/hrbl+7z12gccRqzOwQAkQfEWIaYAA6pzNO1tLJP0Z+OqR0c0/Any9BeslI8A9AphTgLM4qo3LvL9CBEvAz0JA1+tHgFdEyOI/O4cxo8e+KBwwy6Y9uaWuSeDVAEkwJ2W4Md587pARoR4S6gSIgM9At+QhO/N+bBe5JAG3m/x1/G89Jo6CJMCyCHymBuxLqY4CbMuO9MkkO46QQIEekaDyjmTOvZ+RomKK/0iAdd84kiIBAxrrO1SMiIBkuZt+DMxUIAPeCgAqImTlRP5x+xX4HSVgy878jffOvN6AFCbIoKwSCnCGBmXRewC2wRnwrGyPArC2ZJzI27NHP28znKtlRVFVk4CFBgtAr6iA7zsignpCUO8BHun9FihBVQFYmcEcYZuzpI89AeB5tsS156NlI6IamCPGROrUGKwNi/n8PE8CO7vR+UQqwMrEGCrejySC0RbgJ1cBNJT7xVQYMKEC+CTg21cSQlvNXhMg2gm2MwavujMPVnVROzWuWxaL95kvKiNDSBVA24aCORhZkUO19aPi46EvZ7OLQkCFDJnXWy97fwTgzPuVt7OcgC3Zmx9ePWFrq9Jtj/xnv1lkVL7YkW44HrskGAW/EhaunynwfgZyRf7VsvGjiMO2fjujyJT8qxdATA2Et9DZzYQAuHoT53uJUAGb9QtLYLKPW54pAVq2fb5++xh4b2NDJGAWeXhkeViIQ0CHBL6O5QJnqK8SBW1ef+HjDcGvJn7KIgXAo8F0fdl2/D1kYH2xDVM5wLqOhwDUthGPNwd65ZGw83HLUO8AVOKnCFH1L0UCvr04FlJlDxHi2K7br8tyAmSK8KiPuX7ZeG4ZatuybL/yCIhDKu9HH1H5fhwKuD7k5jN/ZpH0q6eALuhsdx7xMZi7QEbJvMoJujYLeLBMqQCOP4ck6Mx0AV/lBdFscCbqy6Aq4KzsrUhRADcixV5TCqDlfr2tfA4jRJib4MdqwL8LYBoXgfPGwCvv99dZWBhJBlH6zZ3j0WDKOD4PBQz00bAwZsfVSnHVUd2jwFc7B+XM+1WZFQgRGYJuUMaOUd+MQOs72GjVHivlfrz1Zh9DQDKwWVlVKXCt2T3JlmTL3mOZAvCt3Y7P4YmeDCIisN4iuef36CQwUwBL3v2rtla4B9Yfef+ICkTGfLEj/1keoNtFNFFg45NANHucwaW+/hRQVYWqoijQbX3tX/lmgLIEkZFBgTQCPgLKVIBBux6L0any/KFeBSvbEoK/CRy5jry4Cjq7r+Dh6ulAPSVULALfoNzc1CtPAjoUoFZUSJAlkDPsyHrjx14EZR6d1VnSJ2wYs47MszbRfRn4ka9GCoD9befBRlU9VK8n2FyVA1gAIF5HIEflqh/cPeL9VaD3ZP9okT+hr6pxYsDZGFWaVa+53ix1eQjA8lHwM0LYekzltdEH27F+Rojgp5ZFa+R0FDoiaDTNqqRgM9+2O/zs4FsynjsfyeZHPZ2d41QtmC67D/uMtndtKqOJzrM63u4oZ1cJDRnIbIWZ9Cfer4wlgo/2dtbGwLeYjeT4+7KQSruLHW51jwS/6vHK3RIJV5xWhn11iRF5P7tWfYhoJ/vlweyRSjBdQ0AGLK5ASTfew67xngd4/2jbzCqy7q+romgh6GpVeBwhwbbs0AI8onBVFfBeshuZ92fblJVlVgW+AjCW9Qmh9OsxJNgmgWymkVdnyqHa42qTn3lhmVqiurfSdwZM5LUKWNU36y8nAbOe5GObdQ7QCQPsPpz9Dq/PwIvqWELYtUyaI0/ORFNtSWzKk3GFVYUwkgPgDKvg42oqwOOuNZb/c1s0/czzo2UG/hD0WQ0JrGyrEHkOYAH4VryPnbtjZUkGZartW5GkwuFIHCsqUA8FjyJBlgNEK1MrUaFAWdH7o/IO6FnbzrRVfTcX6Fk3DJggASrAHvAzSrOypvePePajcwEGeiVXYPeOq4AJXTTq4VndPQnEWXVkHlcR9ZmvTlpF5kdUoWsqD1Cyn5EmU5I8H8CyOgnqIQBXizPMyBFMPxOzyjIzT+8QYr9M6367PqUt2jVWrp4CzN7vlvlo5oPeXwVxr8SPGvN0ZqpN1etroWDk+HrP+5cvg/5js72/jaKkPZN8toJAAzupDJ53LFIQnHY0xrIE1UYBytr7sXy/ag5LOa/3NZWju8/sw/8BT1vrMTgvQV8AAAAASUVORK5CYII='); + background-size: 100% 100%; + + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + + font-weight: bold; + border-bottom: 1px solid #ab4788; + line-height: 1em; } \ No newline at end of file diff --git a/shared/css/static/hostbanner.scss b/shared/css/static/hostbanner.scss new file mode 100644 index 00000000..ebedfe4b --- /dev/null +++ b/shared/css/static/hostbanner.scss @@ -0,0 +1,78 @@ +@import "./mixin.scss"; + +#hostbanner { + .container-hostbanner { + position: relative; + + overflow: hidden; + height: 1000px; /* allocate some height to be truncated by the flex :) */ + + display: flex; + flex-direction: column; + justify-content: stretch; + + cursor: pointer; + + &:not(.no-background) { + background-color: #2e2e2e; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + -moz-box-shadow: inset 0 0 5px #00000040; + -webkit-box-shadow: inset 0 0 5px #00000040; + box-shadow: inset 0 0 5px #00000040; + padding-bottom: 5px; + } + + &.disabled { + padding-bottom: 0; + height: 0; + } + + @include transition(height 0.5s ease-in-out); + + .hostbanner-image-container { + height: 100%; + width: 100%; + + flex-grow: 1; + flex-shrink: 1; + + text-align: center; + + &.hostbanner-mode-0 { + /* do not adjust */ + display: block; + } + + &.hostbanner-mode-1 { + /* do adjust and ignore ration */ + display: flex; + + height: 100%; + width: 100%; + + > img { + width: 100%; + height: 100%; + } + } + + &.hostbanner-mode-2 { + display: flex; + flex-direction: row; + justify-content: space-around; + + > img { + object-fit: contain; + max-height: 100%; + + /* "Normal" third more */ + //max-width: 100%; + + /* better adoptable mode */ + width: min-content; + } + } + } + } +} \ No newline at end of file diff --git a/shared/css/static/main-layout.scss b/shared/css/static/main-layout.scss index cc42d86e..d53bdf57 100644 --- a/shared/css/static/main-layout.scss +++ b/shared/css/static/main-layout.scss @@ -8,6 +8,10 @@ $animation_length: .5s; min-height: 330px; .container-app-main { + height: 100%; + width: 100%; + + min-height: 500px; margin-top: 5px; position: relative; @@ -15,14 +19,14 @@ $animation_length: .5s; flex-direction: column; justify-content: stretch; - height: 100%; - width: 100%; .container-channel-chat { - min-height: 200px; - min-width: 100px; + height: 80%; /* "default" settings */ width: 100%; + min-height: 25em; + min-width: 100px; + display: flex; flex-direction: row; justify-content: stretch; @@ -34,25 +38,44 @@ $animation_length: .5s; border-radius: 5px; } - .container-channel-tree { + > .container-channel-tree { + width: 50%; /* "default" settings */ + height: 100%; + background: #353535; min-width: 200px; display: flex; + flex-direction: column; justify-content: stretch; - height: 100%; + min-height: 100px; - padding-top: 5px; - /* - overflow: auto; - overflow-x: visible; - */ overflow: hidden; - overflow-y: auto; + + > .hostbanner { + flex-grow: 0; + flex-shrink: 0; + + max-height: 9em; /* same size as the info pannel */ + + display: flex; + flex-direction: column; + justify-content: stretch; + } + + > .channel-tree { + padding-top: 5px; + + flex-grow: 1; + flex-shrink: 1; + } } - .container-chat { + > .container-chat { + width: 50%; /* "default" settings */ + height: 100%; + background: #353535; min-width: 350px; @@ -62,16 +85,66 @@ $animation_length: .5s; } } - .container-server-log { - min-height: 0; - height: 250px; + + > .container-bottom { + height: 20%; + + min-height: 1.5em; width: 100%; - border-radius: 5px; - padding-right: 5px; - padding-left: 5px; + display: flex; + flex-direction: column; + justify-content: stretch; - background: #353535; + > .container-server-log { + display: flex; + flex-direction: column; + justify-content: stretch; + + flex-shrink: 1; + flex-grow: 1; + + min-height: 0; + width: 100%; + + border-radius: 5px 5px 0 0; + + padding-right: 5px; + padding-left: 5px; + + background: #353535; + } + + > .container-footer { + flex-shrink: 0; + flex-grow: 0; + + height: 1.5em; + + background: #252525; + color: #353535; + + border-radius: 0 0 5px 5px; + padding-right: 5px; + padding-left: 5px; + padding-top: 2px; + + -webkit-box-shadow: inset 0px 2px 5px 0px rgba(0,0,0,0.125); + -moz-box-shadow: inset 0px 2px 5px 0px rgba(0,0,0,0.125); + box-shadow: inset 0px 2px 5px 0px rgba(0,0,0,0.125); + + display: flex; + flex-direction: row; + justify-content: space-between; + + > * { + align-self: center; + } + + a[href], a[href]:visited { + color: #353535!important; + } + } } } @@ -82,7 +155,7 @@ $animation_length: .5s; border-radius: 5px; - height: 30px; + height: 2em; width: 100%; background-color: #454545; @@ -121,39 +194,6 @@ $animation_length: .5s; } @media only screen and (max-width: $small_device) { - .app { - .container-app-main { - .container-info { - display: none; - position: absolute; - - width: 100% !important; /* override the seperator property */ - height: 100%; - - z-index: 1000; - - &.shown { - display: block; - } - - .select_info { - > .close { - display: block; - } - } - } - - .container-channel-chat + .container-seperator { - display: none; - animation: fadeout $animation_length linear; - } - - .container-channel-chat { - width: 100% !important; /* override the seperator property */ - } - } - } - .hide-small { display: none; opacity: 0; diff --git a/shared/css/static/menu-bar.scss b/shared/css/static/menu-bar.scss new file mode 100644 index 00000000..e9d8cbcc --- /dev/null +++ b/shared/css/static/menu-bar.scss @@ -0,0 +1,125 @@ +@import "mixin"; + +.top-menu-bar { + @include user-select(none); + + height: 1.5em; + width: 100%; + + background: #fafafa; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + position: fixed; + top: 0; + z-index: 201; + + font-family: Arial, serif; + + .container-menu-item { + position: relative; + + .menu-item { + cursor: pointer; + + padding-left: .4em; + padding-right: .4em; + + height: 100%; + + display: flex; + flex-direction: row; + width: max-content; + + > * { + vertical-align: middle; + } + + .container-icon { + height: 1.2em; + width: 1.2em; + padding: .1em; + font-size: 1em; + + margin-right: .2em; + display: inline-block; + } + + .container-label { + display: inline-block; + align-self: center; + } + } + + &:hover:not(.disabled) { + background-color: #00000044; + } + + &.disabled { + background-color: #00000022; + } + + .sub-menu { + z-index: 1000; + display: none; + + background: white; + position: absolute; + + top: 100%; + border: 1px solid black; + + > .container-menu-item { + padding-right: .5em; + } + } + + &.type-side { + &.sub-entries:after { + position: absolute; + + display: block; + content: '>'; + + top: 0; + bottom: 0; + + right: .4em; + } + + > .sub-menu { + top: -1px; /* border */ + left: 100%; + } + + &:hover { + > .sub-menu { + display: block; + } + } + } + + &.active { + background-color: #00000044; + + > .sub-menu { + display: block; + } + } + } + + > .container-menu-item { + > .menu-item { + .container-icon { + display: none; + } + } + } + + hr { + margin-top: .125em; + margin-bottom: .125em; + } +} \ No newline at end of file diff --git a/shared/css/static/mixin.scss b/shared/css/static/mixin.scss new file mode 100644 index 00000000..55bd184e --- /dev/null +++ b/shared/css/static/mixin.scss @@ -0,0 +1,145 @@ +/* Some general browser helpers */ + +@mixin transition($transition...) { + -moz-transition: $transition; + -o-transition: $transition; + -webkit-transition: $transition; + transition: $transition; +} +@mixin transition-property($property...) { + -moz-transition-property: $property; + -o-transition-property: $property; + -webkit-transition-property: $property; + transition-property: $property; +} +@mixin transition-duration($duration...) { + -moz-transition-property: $duration; + -o-transition-property: $duration; + -webkit-transition-property: $duration; + transition-property: $duration; +} +@mixin transition-timing-function($timing...) { + -moz-transition-timing-function: $timing; + -o-transition-timing-function: $timing; + -webkit-transition-timing-function: $timing; + transition-timing-function: $timing; +} +@mixin transition-delay($delay...) { + -moz-transition-delay: $delay; + -o-transition-delay: $delay; + -webkit-transition-delay: $delay; + transition-delay: $delay; +} + +@mixin transform($transform...) { + -webkit-transform: $transform; + -o-transform: $transform; + -ms-transform: $transform; + transform: $transform; +} + +@mixin placeholder($element) { + #{$element}::-webkit-input-placeholder { + @content; + } + #{$element}:-moz-placeholder { + @content; + } + #{$element}::-moz-placeholder { + @content; + } + #{$element}:-ms-input-placeholder { + @content; + } + #{$element}::-ms-input-placeholder { + @content; + } + #{$element}::placeholder { + @content; + } +} + +@mixin user-select($mode) { + -webkit-user-select: $mode; + -moz-user-select: $mode; + -ms-user-select: $mode; + user-select: $mode; +} + +@mixin chat-scrollbar() { + & { + /* for moz */ + scrollbar-color: #353535 #555; + } + + &::-webkit-scrollbar-track { + //-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + border-radius: .25em; + background-color: transparent; + } + + &::-webkit-scrollbar { + width: .5em; + background-color: transparent; + } + + &::-webkit-scrollbar-thumb { + border-radius: .25em; + //-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #555; + } +} + +@mixin chat-scrollbar-vertical() { + & { + /* for moz */ + scrollbar-color: #353535 #555; + scrollbarWidth: .5em; + } + + &::-webkit-scrollbar-track { + //-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + border-radius: .25em; + background-color: transparent; + cursor: pointer; + } + + &::-webkit-scrollbar { + width: .5em; + background-color: transparent; + cursor: pointer; + } + + &::-webkit-scrollbar-thumb { + border-radius: .25em; + //-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #555; + } +} + +@mixin chat-scrollbar-horizontal() { + & { + /* for moz */ + scrollbar-color: #353535 #555; + scrollbarWidth: .5em; + } + + &::-webkit-scrollbar-track { + //-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + border-radius: .25em; + background-color: transparent; + cursor: pointer; + } + + &::-webkit-scrollbar { + height: .5em; + background-color: transparent; + cursor: pointer; + } + + &::-webkit-scrollbar-thumb { + border-radius: .25em; + //-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #555; + } +} \ No newline at end of file diff --git a/shared/css/static/modal-about.scss b/shared/css/static/modal-about.scss new file mode 100644 index 00000000..f0ce35e6 --- /dev/null +++ b/shared/css/static/modal-about.scss @@ -0,0 +1,53 @@ +.modal-about { + display: flex!important; + flex-direction: row!important; + + text-align: center; + color: #999999; + + .container-right { + text-align: left; + padding-left: 2em; + + h1 { + font-size: 1.5em; + margin-block-start: 0.35em; + margin-block-end: 0.35em; + } + + h2 { + font-size: 1.25em; + margin-block-start: 0.10em; + margin-block-end: 0.10em; + } + + p { + margin-block-start: .25em; + margin-block-end: .25em; + } + } + + .version { + width: 100%; + display: flex; + flex-direction: row; + justify-content: stretch; + + a { + width: 50%; + + flex-grow: 1; + flex-shrink: 1; + + text-align: right; + } + .value { + padding-left: .25em; + + text-align: left; + + flex-grow: 1; + flex-shrink: 1; + } + } +} \ No newline at end of file diff --git a/shared/css/static/modal-avatar.scss b/shared/css/static/modal-avatar.scss index e7162e34..cc9ce10f 100644 --- a/shared/css/static/modal-avatar.scss +++ b/shared/css/static/modal-avatar.scss @@ -172,4 +172,127 @@ } } } +} + +.modal-avatar-upload { + display: flex; + flex-direction: column; + justify-content: stretch; + + .container-upload { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: space-between; + + .bmd-form-group { + padding-top: 0; + } + + input[type="file"] { + display: none; + } + } + + .container-preview { + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .title { + font-size: 1.2em; + font-weight: bold; + + border-bottom: 1px solid gray; + } + + .previews { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: space-evenly; + + align-self: center; + + .preview { + flex-shrink: 1; + flex-grow: 1; + + width: 11rem; + min-width: 11rem; + max-width: 11rem; + + height: 13rem; + min-height: 13rem; + max-height: 13rem; + + text-align: center; + + display: flex; + flex-direction: column; + justify-content: flex-end; + + .container-avatar { + display: flex; + flex-direction: row; + justify-content: space-around; + + .avatar { + position: relative; + + height: 1em; + width: 1em; + + overflow: hidden; + border-radius: 50%; + + > img { + position: absolute; + + top: 0; + left: 0; + + height: 100%; + width: 100%; + } + } + } + + > a { + margin-top: 1em; + } + + &.preview-client-info { + .container-avatar { + font-size: 10rem; + } + } + + &.preview-chat { + .container-avatar { + font-size: 2.5rem; + } + } + + &.preview-chat-entry { + .container-avatar { + font-size: 2rem; + } + } + } + } + } +} + +@media all and (max-width: 40rem) { + .modal-avatar-upload .container-preview .previews { + flex-direction: column; + } } \ No newline at end of file diff --git a/shared/css/static/modal-channel.scss b/shared/css/static/modal-channel.scss index 769ebfac..d3629b14 100644 --- a/shared/css/static/modal-channel.scss +++ b/shared/css/static/modal-channel.scss @@ -1,255 +1,815 @@ $required_notab_height: 800px; -.container-channel-edit-general, .tab-channel-edit-general { - flex-shrink: 0; - - .container-name-icon { - display: flex; - flex-direction: row; - justify-content: stretch; - - .container-name { - flex-grow: 1; - flex-shrink: 1; - } - - .container-icon { - flex-grow: 0; - flex-shrink: 0; - } - } - - .container-icon { - width: 30px; - - margin-left: 10px; - - .button-select-icon { - left: 0; - right: 0; - top: 0; - bottom: 0; - - position: absolute; - - .icon-node { - cursor: pointer; - - height: 100%; - width: 100%; - - &:hover { - background-color: #00000011; - } - - > div { - vertical-align: middle; - text-align: center; - } - } - } - } -} - -.tab-tag-channel-edit-general { - display: none!important; -} - -.tab-channel-edit-general { - padding: 5px; - display: none; -} - -.container-channel-edit-general { - display: flex; - flex-shrink: 0; -} - -@media (max-height: $required_notab_height) { - .tab-tag-channel-edit-general { - display: inline-block!important; - } - - .tab-channel-edit-general { - display: flex; - } - - .container-channel-edit-general { - display: none; - } -} - - -.container-channel-settings-standard { - min-height: 300px; - - flex-grow: 1; - display: flex; - flex-direction: row; - justify-content: stretch; - - .container-divider { - border-left:1px solid #000; - height: auto; - - flex-grow: 0; - flex-shrink: 0; - } - - .container-left, .container-right { - display: flex; - justify-content: space-around; - align-self: center; - - flex-grow: 1; - flex-shrink: 1; - - width: 50%; - } - - .container-right { - flex-direction: column; - align-content: stretch; - vertical-align: center; - - margin: 20px 50px 20px 50px; - } - - .container-channel-type { - padding: 5px; - - border: lightgrey 2px solid; - border-radius: 2px; - text-align: left; - } -} - -.container-channel-settings-audio { - flex-grow: 1; - display: flex; - flex-direction: row; - justify-content: stretch; - - .container-divider { - border-left:1px solid #000; - height: auto; - - flex-grow: 0; - flex-shrink: 0; - } - - .container-presets, .container-custom { - display: flex; - justify-content: space-around; - text-align: left; - align-self: center; - - flex-grow: 1; - flex-shrink: 1; - - width: 50%; - } - - .container-custom { - margin: 20px 50px 20px 50px; - justify-content: stretch; - - > .group_box { - flex-grow: 1; - flex-shrink: 1; - } - } -} - -.container-channel-settings-permission { - flex-grow: 1; - - display: flex; - justify-content: space-evenly; - - align-items: center; - - - .container-left, .container-right { - margin-top: 20px; - margin-bottom: 20px; - - display: flex; - justify-content: space-around; - align-self: center; - - flex-grow: 1; - flex-shrink: 1; - - width: 50%; - - > .group_box { - flex-grow: 1; - flex-shrink: 1; - } - - .form-placeholder { - display: block; - visibility: hidden; - } - } - - .container-left { - margin-left: 10%; - margin-right: 10px; - } - - .container-right { - margin-right: 10%; - margin-left: 10px; - } -} - -.container-channel-settings-advanced { - flex-grow: 1; +@import "mixin"; +@import "properties"; +.modal-body.modal-channel { display: flex; flex-direction: column; - align-items: center; + justify-content: stretch; - .container-max-users, .container-other { + max-height: calc(100vh - 10em); + padding: 1em!important; + + input, textarea, select { width: 100%; } - .container-max-users { - margin-top: 20px; + select { + margin-left: 0!important; + height: 2.5em!important; + } + textarea { + padding: .5em; + } + + .container-general { display: flex; - flex-direction: row; + flex-direction: column; justify-content: stretch; - .group_box:not(:first-of-type) { - margin-left: 40px; + flex-shrink: 0; + + > div:not(:first-of-type) { + flex-grow: 0; + flex-shrink: 0; + + margin-top: 1em; } - > .group_box { - flex-grow: 1; - flex-shrink: 1; - } - - fieldset { - padding-top: 1rem; - } - - .form-row { - margin-left: 20px; + .container-name-icon { + flex-grow: 0; + flex-shrink: 0; display: flex; flex-direction: row; justify-content: stretch; - .bmd-form-group { - padding-top: 0; + .container-icon-select { + position: relative; + + height: 2.5em; + border-radius: .2em; + + margin-left: 1em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + cursor: pointer; + background-color: #121213; + border: 1px solid #0d0d0d; + + .icon-preview { + height: 100%; + width: 3em; + + border: none; + border-right: 1px solid #0d0d0d; + + display: flex; + flex-direction: column; + justify-content: space-around; + + > div { + align-self: center; + } + + @include transition(border-color $button_hover_animation_time ease-in-out); + } + + .container-dropdown { + position: relative; + cursor: pointer; + + display: flex; + flex-direction: column; + justify-content: space-around; + + height: 100%; + width: 1.5em; + + .button { + text-align: center; + + .arrow { + border-color: #999999; + } + } + + .dropdown { + display: none; + position: absolute; + width: max-content; + + top: calc(2.5em - 1px); + + flex-direction: column; + justify-content: flex-start; + + background-color: #121213; + border: 1px solid #0d0d0d; + border-radius: .2em 0 .2em .2em; + + right: -1px; + + .entry { + padding: .5em; + + &:not(:last-of-type) { + border: none; + border-bottom: 1px solid #0d0d0d; + } + + &:hover { + background-color: #17171a; + } + } + } + + &:hover { + border-bottom-right-radius: 0; + .dropdown { + display: flex; + } + } + } + + &:hover { + background-color: #17171a; + border-color: hsla(0, 0%, 20%, 1); + + .icon-preview { + border-color: hsla(0, 0%, 20%, 1); + } + } + + @include transition(border-color $button_hover_animation_time ease-in-out); + } + } + + .container-description { + position: relative; + + flex-grow: 1!important; + flex-shrink: 1!important; + + min-height: 5em; + max-height: 22.5em; + + border-radius: .2em; + border: 1px solid #111112; + + overflow: hidden; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .toolbar { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + width: 100%; + height: 2.5em; + + background-color: #17171a; + font-size: .8em; + + padding: .25em; + + .button { + cursor: pointer; + + padding: .5em; + &:not(:first-child) { + margin-left: .25em; + } + + border-radius: .2em; + border: 1px solid #111112; + + background-color: #121213; + + height: 2em; + width: 2em; + + display: flex; + flex-direction: column; + justify-content: center; + + text-align: center; + align-self: center; + + &.button-bold { + font-weight: bold; + } + + &.button-italic { + font-style: italic; + } + + &.button-underline { + text-decoration: underline; + } + + &.button-color { + input { + position: absolute; + width: 0; + height: 0; + opacity: 0; + } + } + + &:hover { + background-color: #0f0f0f; + @include transition(background-color $button_hover_animation_time); + } + } } - label { - width: 100px; + > .input-boxed { + flex-shrink: 1; + flex-grow: 1; + + min-height: 2.5em; + height: 5em; + max-height: 20em; + + border: none; + border-radius: 0; + border-top: 1px solid #111112; + + + overflow-x: hidden;; + overflow-y: auto; + + resize: vertical; + + @include chat-scrollbar-vertical(); + } + + &:focus-within { + background-color: #131b22; + //border-color: #284262; } } } + + .mode-container { + flex-grow: 1; + flex-shrink: 1; + + min-height: min-content; + + display: flex; + position: relative; + @include transition(.25s ease-in-out); + } + + .container-advanced, .container-simple { + flex-grow: 1; + flex-shrink: 1; + + margin-top: 1em; + min-width: 20em; + + width: 50em; + + &.hidden { + position: absolute; + top: 0; + } + &.container-simple.hidden { + transform: translate(-100%, -100%); + } + + &.container-advanced.hidden { + transform: translate(100%, 100%); + } + @include transition(.25s ease-in-out); + + .header { + text-align: center; + color: #548abc; + } + + fieldset { + padding: 0; + width: 100%; + } + + label { + display: flex; + flex-direction: row; + justify-content: stretch; + + /* total height 2.5em */ + margin-top: .5em; + margin-bottom: .5em; + height: 1.5em; + + cursor: pointer; + + * { + align-self: center; + } + + a { + margin-left: .5em; + margin-right: .5em; + } + + .form-group { + margin: -.5em 0!important; + + padding: 0!important; + + input { + height: 1.5em!important; + } + } + } + + + /* radio buttons */ + $icon_width: 1.7em; /* equal to the label height */ + + .input-boxed { + position: relative; + + height: 1.7em; + margin-left: 2.5em; + + flex-grow: 1; + flex-shrink: 1; + + min-width: 4em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-tooltip { + + flex-shrink: 0; + flex-grow: 0; + + position: relative; + width: $icon_width; + + display: flex; + flex-direction: column; + justify-content: center; + + img { + height: 1em; + width: 1em; + + align-self: center; + font-size: 1.2em; + } + + .tooltip { + display: none; + } + } + } + + .container-type, .container-codec, .container-sort { + padding-top: .5em; + } + + .container-talk { + .input-boxed { + margin-left: 0!important; + height: 2.5em; + + .container-tooltip { + width: 2.5em!important; + } + } + } + } + + .container-advanced { + display: flex; + flex-direction: column; + justify-content: stretch; + + min-height: 5em; + + border-radius: .2em; + border: 1px solid #111112; + + background-color: #17171a; + + .categories { + height: 2.5em; + + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + border-bottom: 1px solid #1d1d1d; + + .entry { + padding: .5em; + + text-align: center; + + flex-grow: 1; + flex-shrink: 1; + + cursor: pointer; + + &:hover { + color: #b6c4d6; + } + + &.selected { + border-bottom: 3px solid #245184; + margin-bottom: -1px; + + color: #245184; + } + + @include transition(color $button_hover_animation_time, border-bottom-color $button_hover_animation_time); + } + } + + .bodies { + position: relative; + + flex-shrink: 1; + flex-grow: 1; + display: flex; + justify-content: stretch; + + min-height: 12em; + height: 20em; + + .body { + position: absolute; + + top: 0; + left: 0; + right: 0; + bottom: 0; + + padding: .5em; + + display: flex; + justify-content: stretch; + + overflow: auto; + @include chat-scrollbar-vertical(); + + &.hidden { + display: none; + } + + &.container-standard { + flex-direction: column; + overflow: visible; + + .container-top, .container-bottom { + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: row; + justify-content: stretch; + + min-height: 5em; + } + + .container-right, .container-left { + flex-shrink: 1; + flex-grow: 1; + + min-width: 3em; + width: 50%; + + display: flex; + flex-direction: column; + justify-content: start; + } + + .container-top { + border-bottom: 2px solid #111113; + .container-left, .container-right { + padding-bottom: .5em; + } + } + + .container-bottom { + .container-left, .container-right { + padding-top: .5em; + } + } + + .container-left { + border-right: 2px solid #111113; + padding-right: .5em; + } + + .container-right { + border: none; + padding-left: .5em; + } + + .container-perm-default { + display: flex; + flex-direction: row; + justify-content: space-between; + + > * { + margin-bottom: 0; + margin-top: 0; + align-self: center; + } + + .container-default-channel { + display: inline-flex; + flex-direction: row; + justify-content: flex-end; + } + } + } + + &.container-permissions { + flex-direction: row; + overflow: visible; + + .container-right, .container-left { + flex-shrink: 1; + flex-grow: 1; + + min-width: 3em; + width: 50%; + + display: flex; + flex-direction: column; + justify-content: start; + } + + .container-left { + padding-right: .5em; + border-right: 2px solid #111113; + } + + .container-right { + padding-left: .5em; + } + + + .container-permission { + display: flex; + flex-direction: row; + justify-content: stretch; + + margin-top: .5em; + margin-bottom: .5em; + + .name { + flex-grow: 0; + flex-shrink: 0; + width: 8em; + + align-self: center; + } + + .input-boxed { + align-self: center; + margin-left: 0!important; + } + } + } + + &.container-audio { + overflow: visible; + flex-direction: column; + + .container-top { + width: 100%; + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-right, .container-left { + border-bottom: 2px solid #111113; + padding-bottom: .5em; + } + + .container- { + border-right: 2px solid #111113; + } + } + + .container-bottom { + width: 100%; + + padding-top: .5em; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + text-align: center; + + .container-needed-bandwidth { + padding-left: .5em; + font-weight: bold; + } + + .hint { + color: #383838; + font-size: .8em; + } + } + + .container-right, .container-left { + flex-shrink: 1; + flex-grow: 1; + + width: 50%; + min-width: 3em; + height: unset; + + display: flex; + flex-direction: column; + justify-content: start; + } + + .container-left { + padding-right: .5em; + + border-right: 2px solid #111113; + } + + .container-right { + border: none; + padding-left: .5em; + } + } + + &.container-misc { + flex-direction: column; + overflow: visible; + + + .container-other { + display: flex; + flex-direction: column; + justify-content: flex-start; + + .container-phonetic, .container-delay, .container-encrypt { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + padding-top: .5em; + padding-bottom: .5em; + + > a { + flex-grow: 0; + flex-shrink: 0; + + width: 10em; + align-self: center; + } + + > button { + flex-grow: 0; + flex-shrink: 0; + + width: 5em; + + /* results in a height of 1.7em */ + height: 2em; + font-size: .85em; + + align-self: center; + margin-left: 1em; + } + + > input, .input-boxed { + flex-grow: 1; + flex-shrink: 1; + align-self: center; + margin-left: 0; + } + } + } + } + } + } + } + + .container-simple { + display: flex; + flex-direction: row; + justify-content: stretch; + + min-height: 5em; + border-radius: 0.2em; + border: 1px solid #111112; + background-color: #17171a; + padding: .5em; + + .container-left, .container-right { + flex-grow: 1; + flex-shrink: 1; + + width: 50%; + } + + .container-left { + padding-right: .5em; + border-right: 2px solid #111113; + } + + .container-right { + padding-left: .5em; + } + + .container-perm-default { + display: flex; + flex-direction: row; + justify-content: space-between; + + > * { + margin-bottom: 0; + margin-top: 0; + align-self: center; + } + + .container-default-channel { + display: inline-flex; + flex-direction: row; + justify-content: flex-end; + } + } + + .container-talk { + padding-top: .5em; + } + } + + .container-buttons { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + flex-shrink: 0; + flex-grow: 0; + + .spacer { + flex-grow: 1; + flex-shrink: 1; + } + + > *:not(.spacer) { + flex-grow: 0; + flex-shrink: 0; + } + + label { + cursor: pointer; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + > * { + align-self: center; + } + } + + button { + &:not(:last-of-type) { + margin-right: 1em; + } + } + + a { + padding-left: .25em; + } + } } \ No newline at end of file diff --git a/shared/css/static/modal-connect.scss b/shared/css/static/modal-connect.scss index 8ab6907e..55bd8693 100644 --- a/shared/css/static/modal-connect.scss +++ b/shared/css/static/modal-connect.scss @@ -1,73 +1,349 @@ +@import "mixin"; + .modal .modal-connect { + @include user-select(none); - /* - margin-top: 5px; + font-size: 1rem; + max-width: 100000px; /* max 100000px width, else we shrink the modal */ + padding: 0!important; /* override the default padding */ - > div:not(:first-of-type) { - margin-top: 5px; - } + display: flex; + flex-direction: column; + justify-content: stretch; - .profile-select-container { - display: flex; - flex-direction: row; - justify-content: space-between; + .container-connect-input { + flex-grow: 0; + flex-shrink: 0; - select { - width: 150px; + /* apply the default padding */ + padding: .75em 24px; + + border-left: 2px solid #0073d4; + + > .row { + display: flex; + flex-direction: row; + justify-content: stretch; + + > *:not(:last-of-type) { + margin-right: 3em; + } + } + + .container-address-password { + .container-address { + flex-grow: 1; + flex-shrink: 1; + } + + .container-password { + flex-grow: 0; + flex-shrink: 4; + + min-width: 21.5em; + } + } + + .container-profile-manage { + flex-grow: 0; + flex-shrink: 4; + + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-select-profile { + flex-grow: 1; + flex-shrink: 1; + + min-width: 14em; + + > .invalid-feedback { + width: max-content; /* allow overflow here */ + } + } + + .container-manage { + flex-grow: 0; + flex-shrink: 4; + + margin-left: 15px; + } + + .button-manage-profiles { + min-width: 7em; + margin-left: 0.5em; + } + } + + .container-nickname { + flex-grow: 1; + flex-shrink: 1; + } + + .container-buttons { + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: space-between; + + .container-buttons-connect { + display: flex; + flex-direction: row; + } + + .button-right { + min-width: 7em; + margin-left: 0.5em; + } + + .button-left { + min-width: 14em; + } + } + + .arrow { + border-color: #7a7a7a; + margin-left: .5em; } } - .profile-invalid { + .container-last-servers { + flex-grow: 0; + flex-shrink: 1; + display: flex; flex-direction: column; - justify-content: start; - - > div { - display: inline-flex; - flex-direction: row; - } - - color: red; - } - */ - - .container-address-password { - display: flex; - flex-direction: row; justify-content: stretch; - .container-address { - flex-grow: 1; - flex-shrink: 1; + max-height: 0; + opacity: 0; + overflow: hidden; + padding: 0; + + min-width: 0; + + + border: none; + border-left: 2px solid #7a7a7a; + + @include transition(max-height .5s ease-in-out, opacity .5s ease-in-out, padding .5s ease-in-out); + &.shown { + /* apply the default padding */ + padding: 0 24px 24px; + + max-height: 100%; + opacity: 1; + + @include transition(max-height .5s ease-in-out, opacity .5s ease-in-out, padding .5s ease-in-out) } - .container-password { - flex-grow: 0; - flex-shrink: 4; + hr { + height: 0; + width: calc(100% + 46px); + min-width: 0; - margin-left: 15px; + margin: 0 0 0 -23px; + + padding: 0; + + border: none; + border-top: 1px solid #090909; + + margin-bottom: .75em; + } + + color: #7a7a7a; + + /* general table class */ + .table { + width: 100em; + max-width: 100%; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .head { + display: flex; + flex-direction: row; + justify-content: stretch; + + flex-grow: 0; + flex-shrink: 0; + + border: none; + border-bottom: 1px solid #161618; + } + + + .body { + flex-grow: 0; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + overflow: auto; + + .row { + cursor: pointer; + + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + &:hover { + background-color: #202022; + } + + &.selected { + background-color: #131315; + } + } + + .body-empty { + height: 3em; + text-align: center; + display: flex; + flex-direction: column; + justify-content: space-around; + font-size: 1.25em; + color: #7979797F; + } + } + + .column { + flex-grow: 1; + flex-shrink: 1; + + overflow: hidden; + white-space: nowrap; + + padding-right: .25em; + padding-left: .25em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + &:not(:last-of-type) { + border-right: 1px solid #161618; + } + + > a { + max-width: 100%; + text-overflow: ellipsis; + overflow: hidden; + } + } + } + + /* connect table */ + .table { + margin-left: -1.5em; /* the delete row */ + + .head { + margin-left: 1.5em; /* the delete row */ + .column.delete { + display: none; + } + } + + .column { + align-self: center; + .country, .icon-container { + align-self: center; + margin-right: 0.1em; + } + + + @mixin fixed-column($name, $width) { + &.#{$name} { + flex-grow: 0; + flex-shrink: 0; + + width: $width; + } + } + + @include fixed-column(delete, 1.5em); + @include fixed-column(password, 5em); + @include fixed-column(country-name, 7em); + @include fixed-column(clients, 4em); + @include fixed-column(connections, 6.5em); + + &.delete { + opacity: 0; + border-right: none; + border-bottom: none; + + text-align: center; + @include transition(opacity .25 ease-in-out); + + &:hover { + opacity: 1; + @include transition(opacity .25 ease-in-out); + } + } + + &.address { + flex-grow: 1; + flex-shrink: 1; + + width: 40%; + } + + &.name { + flex-grow: 1; + flex-shrink: 1; + + width: 60%; + } + } } } +} - .container-profile-manage { - display: flex; - flex-direction: row; - justify-content: stretch; +@media all and (max-width: 55rem) { + .modal .modal-connect { + min-width: calc(21.25em + 24px * 2)!important; + width: 1000em; /* allocate space */ - .container-select-profile { - flex-grow: 1; - flex-shrink: 1; + .container-address-password { + .container-password { + min-width: unset!important; + margin-left: 1em!important; + } } - .container-manage { - flex-grow: 0; - flex-shrink: 4; + .container-buttons { + justify-content: flex-end!important; - margin-left: 15px; + .button-toggle-last-servers { + display: none; + } } - } - .invalid-feedback { - position: absolute; + .container-profile-name { + flex-direction: column!important; + } + + .container-connect-input { + > .row { + > div { + margin-right: 0!important; + } + } + } + + .container-last-servers { + display: none; + } } } \ No newline at end of file diff --git a/shared/css/static/modal-group-assignment.scss b/shared/css/static/modal-group-assignment.scss new file mode 100644 index 00000000..b97e7090 --- /dev/null +++ b/shared/css/static/modal-group-assignment.scss @@ -0,0 +1,149 @@ +@import "mixin"; +@import "properties"; + +.modal-server-group-assignments { + @include user-select(none); + + min-width: 25em; + max-height: calc(100vh - 10rem); + + display: flex; + flex-direction: column; + justify-content: stretch; + + .group-assignment-list { + flex-grow: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + color: #999999; + + a { + flex-shrink: 0; + flex-grow: 0; + + .htmltag-client { + display: inline; + color: #999999; + } + } + + .group-list { + flex-shrink: 1; + flex-grow: 1; + + border: none; + border-radius: $border_radius_middle; + padding: 3px; + overflow-y: auto; + + @include chat-scrollbar-vertical(); + + .group-entry { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + height: max-content; + } + + .icon-container { + align-self: center; + margin-right: 4px; + margin-left: 2px; + margin-top: -2px; + } + + a { + align-self: center; + } + + .checkbox { + align-self: center; + height: 8px; + + margin-top: 1px; + margin-left: 1px; + display: block; + position: relative; + padding-left: 18px; + margin-bottom: 12px; + cursor: pointer; + font-size: 22px; + + /* Hide the browser's default checkbox */ + input { + position: absolute; + opacity: 0; + cursor: pointer; + display: none; + } + + .checkmark { + position: absolute; + top: 0; + left: 0; + height: 16px; + width: 16px; + background-color: #eee; + margin-right: 4px; + + &:after { + content: ""; + position: absolute; + display: none; + + left: 5px; + top: 1px; + width: 6px; + height: 12px; + border: solid white; + border-width: 0 3px 3px 0; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + } + } + + &:hover:not(.disabled) input ~ .checkmark { + background-color: #ccc; + } + + input:checked ~ .checkmark { + background-color: #2196F3; + } + + input:checked ~ .checkmark:after { + display: block; + } + + &.disabled { + user-select: none; + pointer-events: none; + cursor: not-allowed; + + .checkmark { + background-color: #00000055; + &:after { + border-color: #00000055; + } + } + } + } + } + } + + .container-buttons { + flex-grow: 0; + flex-shrink: 0; + + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: space-between; + } +} \ No newline at end of file diff --git a/shared/css/static/modal-keyselect.scss b/shared/css/static/modal-keyselect.scss new file mode 100644 index 00000000..f37be98a --- /dev/null +++ b/shared/css/static/modal-keyselect.scss @@ -0,0 +1,50 @@ +.modal-body.modal-keyselect { + width: max-content!important; + + .body { + display: flex; + flex-direction: column; + justify-content: flex-start; + + .container-select { + margin-top: .5em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + a { + align-self: center; + margin-right: .5em; + } + + .container-key { + background-color: #272626; + border-radius: 0.15em; + -webkit-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + + min-width: 12em; + height: 2em; + padding: 0 .5em; + + display: flex; + flex-direction: row; + justify-content: center; + } + } + } + + .container-buttons { + display: flex; + flex-direction: row; + justify-content: flex-end; + + margin-top: 1em; + + button { + margin-left: 1em; + } + } +} \ No newline at end of file diff --git a/shared/css/static/modal-permissions.scss b/shared/css/static/modal-permissions.scss index 651636f6..9d8ef1b7 100644 --- a/shared/css/static/modal-permissions.scss +++ b/shared/css/static/modal-permissions.scss @@ -1,30 +1,464 @@ -permission-editor { +@import "mixin"; +@import "properties"; + +.modal-body.modal-permission-editor { + padding: 0!important; + + display: flex; + flex-direction: row; + justify-content: stretch; + + width: 1000000em; /* get us some width */ + + @include user-select(none); + + .container { + display: flex; + flex-direction: row; + justify-content: stretch; + + padding: 0!important; + + width: 100%; + max-height: 90vh; + height: 100000000px; /* enforce max height */ + } + + .header { + height: 4em; + background-color: #19191b; + color: #e1e1e1; + + display: flex; + flex-direction: row; + justify-content: stretch; + + > .entry { + flex-grow: 1; + flex-shrink: 1; + + text-align: center; + + height: 100%; + + display: flex; + flex-direction: column; + justify-content: space-around; + } + } + + .container > .left, .container > .right { + max-height: 100%; + + display: flex; + flex-direction: column; + justify-content: stretch; + + > .header { + flex-shrink: 0; + flex-grow: 0; + } + + > .body { + flex-shrink: 1; + flex-grow: 1; + } + } + + .container >.right { + z-index: 2; /* because the left container overlaps the right container once */ + + width: 75%; + min-width: 30em; + + background-color: #303036; + + .header { + > .entry { + position: relative; + overflow: hidden; + + cursor: pointer; + padding-bottom: 2px; + + a { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + &:hover { + border: none; + border-bottom: 2px solid #4e4e4e; + + padding-bottom: 0; + + &:before { + position: absolute; + content: ''; + + margin-right: -10em; + margin-left: -10em; + margin-bottom: -.2em; + bottom: 0; + + height: 100%; + width: calc(100% + 20em); + + box-shadow: inset 0px -1.2em 3em -20px #424242; + } + } + + &.selected { + border: none; + border-bottom: 2px solid #0073d4; + + padding-bottom: 0; + + &:before { + position: absolute; + content: ''; + + margin-right: -10em; + margin-left: -10em; + margin-bottom: -.2em; + bottom: 0; + + height: 100%; + width: calc(100% + 20em); + + box-shadow: inset 0px -1.2em 3em -20px #0073d4; + } + } + } + } + + .body { + display: flex; + flex-direction: column; + justify-content: stretch; + min-height: 16em; + + > .container { /* container permission editor */ + height: 100%; + width: 100%; + + flex-grow: 1; + flex-shrink: 1; + + min-width: 30em; + + .permission-editor { + display: flex; + flex-direction: column; + justify-content: stretch; + width: 100%; + padding: 5px; + } + } + } + } + + .container >.left { + width: 25%; + min-width: 10em; + + background-color: #222226; + + .header { + font-weight: bold; + + > .entry { + overflow: hidden; + + a { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + } + + > * { + font-size: 1.5em; + } + } + + .body { + display: flex; + flex-direction: column; + justify-content: stretch; + min-height: 16em; + + .container { + flex-grow: 1; + flex-shrink: 1; + + flex-direction: column; + } + } + + + /* server group left list layout */ + .container-view-server-groups, .container-view-channel-groups, .container-view-channel-permissions, .container-view-client-channel-permissions, .container-view-client-channel-permissions { + height: 100%; + width: 100%; + + .list-groups, .list-channel, .list-clients { + color: #999999; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + overflow: auto; + @include chat-scrollbar-vertical(); + @include chat-scrollbar-horizontal(); + + width: 100%; + + flex-grow: 1; + flex-shrink: 1; + + .entries { + display: flex; + flex-direction: column; + justify-content: flex-start; + + height: max-content; + + min-width: 100%; + width: max-content; + + .group, .channel, .client { + padding-left: .25em; + + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + cursor: pointer; + + width: 100%; + + &:hover { + background-color: #28282c; + } + + &.selected { + background-color: #111111; + + &.client { + background-color: #1a1b1e; + } + } + + @include transition(background-color .25s ease-in-out); + + .icon-container, .icon { + align-self: center; + margin-right: .25em; + } + } + } + } + + .container-buttons { + position: relative; + + display: flex; + flex-direction: row; + justify-content: stretch; + + flex-grow: 0; + flex-shrink: 0; + + height: 2.5em; + width: 100%; + + .button { + display: flex; + flex-direction: row; + justify-content: space-around; + + flex-grow: 1; + flex-shrink: 1; + + cursor: pointer; + + background-color: #1b1b1b; + + &:hover { + background-color: #262626; + } + + &:disabled { + background-color: hsla(0, 0%, 9%, 1); + } + @include transition(background-color .25s ease-in-out); + + img { + width: 2.2em; + height: 2.2em; + + align-self: center; + } + } + } + } + + .container-view-server-groups { + position: relative; + + overflow: hidden; + + $animation_length: .3s; + .container-group-list { + flex-grow: 1; + flex-shrink: 1; + + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + + display: flex; + flex-direction: column; + justify-content: stretch; + + &.hidden { + @include transform(translateX(-100%)); + } + @include transition($animation_length ease-in-out); + } + + .container-client-list { + flex-grow: 1; + flex-shrink: 1; + + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .container-current-group { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + background-color: #101012; + color: #999999; + padding-left: .25em; + + + height: 1.5em; + font-size: 1.125em; + + > .icon-container { + display: flex; + flex-direction: column; + justify-content: space-around; + + height: 100%; + margin-right: .25em; + } + + .name { + flex-grow: 1; + flex-shrink: 1; + + height: 1.5em; + } + } + + &.hidden { + @include transform(translateX(100%)); + } + @include transition($animation_length ease-in-out); + } + } + + .container-view-client-permissions, .container-view-client-channel-permissions { + .client-info { + width: 100%; + padding: .25em; + } + + hr { + border: none; + border-top: 2px solid #1e1e1e; + } + } + + .container-view-client-channel-permissions { + display: flex; + flex-direction: column; + justify-content: stretch; + + } + } + + .container-seperator { + width: 3px; + height: unset!important; + background-color: #222224!important; + } +} + +/* canvas permission editor */ +//TODO: Some styling needed +.container-permissions-canvas { display: flex; flex-direction: column; - - flex-grow: 1; - flex-shrink: 1; - - min-height: 0; -} - - -.container-permissions { - flex-grow: 1; - flex-shrink: 1; - - display: flex; - height: 100%; -} - -.permission-explorer { + justify-content: stretch; width: 100%; + .container-permissions { + padding: .5em; + overflow-x: auto; + overflow-y: hidden; + } + + .permission-explorer { + min-width: 750px; + } + + .switch { + width: 5em; + } + + .column-name { + align-self: center; + padding-left: 1em; + } + + .entry-editor-container { + @include chat-scrollbar-vertical(); + } +} + +/* html permission editor */ +.container-permissions-html { + flex-grow: 1; + flex-shrink: 1; + display: flex; flex-direction: column; justify-content: stretch; - user-select: none; + min-height: 10em; + width: 100%; .container-filter, .container-footer { flex-grow: 0; @@ -32,338 +466,248 @@ permission-editor { display: flex; flex-direction: row; - justify-content: stretch; - - .container-input { - flex-grow: 1; - flex-shrink: 1; - - margin-right: 10px; - } } - .container-permission-list { - flex-grow: 1; - flex-shrink: 1; + .container-filter { + justify-content: stretch; - display: flex; - flex-direction: column; - - .header { - border: solid 1px lightgray; - - display: flex; - flex-direction: row; - - .column-granted { - width: 75px + 15px !important; /* because of the scroll bar */ - } - - .column-name { - padding-left: 4px; - } - } - - /* legacy */ - .entries { - flex-grow: 1; - - overflow-y: scroll; - overflow-x: hidden; - - padding-left: 3px; /* because of the arrow */ - padding-right: 3px; /* because of the scroll bar */ - } - - .entry { + .button-toggle-clients { flex-grow: 0; flex-shrink: 0; - width: 100%; + width: 16em; + height: 2.5em; + + margin-right: 1em; + + align-self: flex-end; + margin-bottom: 1rem; + } + + .container-input { + flex-grow: 5; + flex-shrink: 1; + } + + .container-granted-switch { + margin-left: 1em; + position: relative; display: flex; flex-direction: row; - justify-content: stretch; + justify-content: flex-start; - .column-name { - flex-grow: 1; - flex-shrink: 1; - } + flex-shrink: 1; + flex-grow: 1; + color: #999999; + min-width: 8em; - .column-value, .column-granted { - flex-grow: 0; - flex-shrink: 0; - - width: 75px; - text-align: center; - align-self: center; - + > label { display: flex; flex-direction: row; - justify-content: space-around; + justify-content: flex-start; - input[type=number] { - width: 68px; - } - } + position: absolute; + bottom: 0; + left: 0; - .column-skip, .column-negate { - flex-grow: 0; - flex-shrink: 0; + pointer-events: all; + cursor: pointer; - width: 75px; - - text-align: center; - align-self: center; - - display: flex; - flex-direction: row; - justify-content: space-around; - } - - &.value-unset { - .column-value, .column-skip, .column-negate { - .checkbox, input { - visibility: hidden; - } - } - } - - &.grant-unset { - .column-granted { - .checkbox, input { - visibility: hidden; - } - } - } - - .checkbox { - display: flex; - flex-direction: row; - justify-content: center; - margin-bottom: 0!important; - } - - .form-group { - margin-bottom: 0px; - } - - &.group { - display: flex; - flex-direction: column; - - .group-entries { - padding-left: 30px; - } - } - - .bmd-form-group { - padding-top: 0; - } - - &.permission { - height: 33px; - - &:hover { - background: #00000011; - - - .checkbox { - .checkmark { - background-color: #bbb; - } - - &:hover input ~ .checkmark { - background-color: #aaa; - } - - input:checked ~ .checkmark { - background-color: #2196F3; - } - } + > * { + align-self: flex-end; } - .checkbox { - height: 16px; - width: 16px; - - display: block; - position: relative; - cursor: pointer; - font-size: 22px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - /* Hide the browser's default checkbox */ - input { - position: absolute; - opacity: 0; - cursor: pointer; - - left: 0; - top: 0; - } - - .checkmark { - position: absolute; - top: 0; - left: 0; - height: 16px; - width: 16px; - background-color: #eee; - - &:after { - content: ""; - position: absolute; - display: none; - - left: 6px; - top: 2px; - width: 5px; - height: 10px; - border: solid white; - border-width: 0 3px 3px 0; - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); - } - } - - &:hover input ~ .checkmark { - background-color: #ccc; - } - - input:checked ~ .checkmark { - background-color: #2196F3; - } - - input:checked ~ .checkmark:after { - display: block; - } + a { + padding-left: .25em; + font-size: 1.45em; } } } - - .arrow { - cursor: pointer; - margin-right: 5px; - } - } - - .entry-editor-container { - display: flex; - flex-direction: column; - justify-content: stretch; - overflow-y: auto; - - min-height: 100px; - min-width: 100px; - } - - .container-footer { - margin-top: 10px; - - justify-content: flex-end; } .container-mode { - display: flex; - flex-grow: 1; flex-shrink: 1; - min-height: 0; + min-height: 5em; - &.container-mode-unset { - background-color: lightgray; - } + &.container-mode-permissions { + .container-permission-list { + width: 100%; + color: #999999; - &.container-mode-no-permissions { - background-color: lightgray; - text-align: center; + display: flex; + flex-direction: column; + justify-content: stretch; - justify-content: space-around; - display: flex; - flex-direction: column; - } - } -} - -.tab-client, .tab-client-channel { - .client-select { - padding-bottom: 20px; /* for the error message */ - - .invalid-feedback { - position: absolute; - } - } -} - -.tab-client-channel { - .container-client-channel { - display: flex; - flex-direction: column; - justify-content: stretch; - - .list-channel { - flex-grow: 1; - flex-shrink: 1; - - width: 100%; - } - } -} - -.layout-group-server { - .list-group-server { } - - .permission-explorer { - flex-grow: 70; - } - - .container-clients { - display: flex; - flex-direction: column; - justify-content: stretch; - - width: 175px; - min-width: 125px; - - - .container-filter { - flex-grow: 0; - flex-shrink: 0; - } - - .container-list-clients { - flex-grow: 1; - flex-shrink: 1; - - overflow-x: auto; - overflow-y: auto; - - border: grey solid 1px; - position: relative; - - width: 100%; - - .list-clients { - width: fit-content; + min-height: 5em; .entry { - white-space : nowrap; - cursor: pointer; - padding: 2px; width: 100%; - &.selected { - background: blue; - color: whitesmoke; + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 2em; + border: none; + border-bottom: 1px solid #1e2025; + + color: #535455; + + @mixin fixed-column($name, $width) { + .column-#{$name} { + display: flex; + flex-direction: row; + justify-content: stretch; + + flex-grow: 0; + flex-shrink: 0; + + width: $width; + + align-items: center; + + padding-left: 1em; + + border: none; + border-right: 1px solid #1e2025; + } + } + + @include fixed-column(name, 6em); + @include fixed-column(value, 6em); + @include fixed-column(skip, 5em); + @include fixed-column(negate, 5em); + @include fixed-column(granted, 6em); + + .column-name { + flex-grow: 1; + flex-shrink: 1; + + .arrow { + cursor: pointer; + border-color: #e1e1e1; + } + + .group-name { + margin-left: .5em; + } + } + + .column-granted { + border-right: none; + } + + + &.active { + color: #e1e1e1; + } + + &.group { + color: #e1e1e1; + font-weight: bold; + } + + input { + color: #e1e1e1; + + outline: none; + background: transparent; + border: none; + + height: 1.5em; + width: 5em; /* the column width minus one */ + + /* fix the column padding */ + padding-left: 1em; + margin-left: -.5em; /* have a bit of space on both sides */ + + border-bottom: 2px solid transparent; + + &:focus { + border-bottom-color: #3f7dbf; + } + @include transition(border-bottom-color $button_hover_animation_time ease-in-out); + } + } + + .body { + flex-grow: 1; + flex-shrink: 1; + + min-height: 6em; /* TODO: Width */ + + display: flex; + flex-direction: column; + justify-content: stretch; + + overflow-y: scroll; + overflow-x: auto; + + @include chat-scrollbar-vertical(); + @include chat-scrollbar-horizontal(); + + .entry { + &.even { + background-color: #25252a; + } + &:hover { + background-color: #343a47; + } + /* We cant use this effect here because the odd/even effect would be a bit crazy then */ + //@include transition(background-color $button_hover_animation_time ease-in-out); + } + } + + .header { + background-color: unset; + + color: #e1e1e1; + font-weight: bold; + + .column-granted { + margin-right: .5em; /* scroll bar */ + -moz-margin-end: 12px; /* moz scroll bar */ } } } } + + &.container-mode-no-permissions { + display: flex; + flex-direction: column; + justify-content: space-around; + + text-align: center; + font-size: 2em; + + color: #222226; + } + } + + .container-footer { + justify-content: flex-end; + margin-top: .5em; + } +} + +.modal-group-add { + display: flex; + flex-direction: column; + justify-content: flex-start; + + .buttons { + display: flex; + flex-direction: row; + justify-content: space-between; + + button { + min-width: 6em; + } } } \ No newline at end of file diff --git a/shared/css/static/modal-server.scss b/shared/css/static/modal-server.scss index a5be004d..62a68329 100644 --- a/shared/css/static/modal-server.scss +++ b/shared/css/static/modal-server.scss @@ -1,156 +1,1149 @@ -$required_notab_height: 950px; +@import "mixin"; +@import "properties"; -.container-server-settings-general, .tab-server-settings-general { +.modal-body.modal-server-edit { + display: flex; flex-direction: column; + justify-content: stretch; - .container-server-settings-slots { - display: flex; - flex-direction: row; - justify-content: stretch; + max-height: calc(100vh - 10em); + padding: 1em!important; - margin-right: 0; + min-width: 35em!important; + width: 60em; /* recommend width */ + + @include user-select(none); + + input, textarea, select { + width: 100%; + } + + select { margin-left: 0; - - .form-group:not(:first-of-type) { - margin-left: 10px; - - flex-grow: 30; - flex-shrink: 30; - } - - .form-group:first-of-type { - flex-grow: 70; - flex-shrink: 70; - } + height: 2.5em; } - .container-name-icon { + textarea { + padding: .5em; + } + + label { display: flex; flex-direction: row; justify-content: stretch; - .container-name { - flex-grow: 1; - flex-shrink: 1; + /* total height 2.5em */ + margin-top: .5em; + margin-bottom: .5em; + height: 1.5em; + + cursor: pointer; + + * { + align-self: center; } - .container-icon { - flex-grow: 0; - flex-shrink: 0; + a { + margin-left: .5em; + margin-right: .5em; } - } - .container-icon { - width: 30px; + .form-group { + margin: -.5em 0!important; - margin-left: 10px; + padding: 0!important; - .button-select-icon { - left: 0; - right: 0; - top: 0; - bottom: 0; - - position: absolute; - - .icon-node { - cursor: pointer; - - height: 100%; - width: 100%; - - &:hover { - background-color: #00000011; - } - - > div { - vertical-align: middle; - text-align: center; - } + input { + height: 1.5em!important; } } } -} -.tab-server-settings-general { - padding: 5px; - display: none; -} + /* radio buttons */ + $icon_width: 1.7em; /* equal to the label height */ -.tab-tag-server-settings-general { - display: none!important; -} + @mixin tooltip-size($lines, $line_length) { + $tooltip_height: $lines * 1.6; + $tooltip_width: $line_length + 1; + .tooltip { + top: -($tooltip_height + .6em); + left: ($icon_width - $tooltip_width) / 2; -.container-server-settings-general { - display: flex; - flex-shrink: 0; -} + height: $tooltip_height * 1em; + width: $tooltip_width * 1em; + + + &:before { + left: $tooltip_width / 2 - .5em; + } + } + } + + .input-boxed { + position: relative; + + flex-grow: 1; + flex-shrink: 1; + + min-width: 4em; -@media (max-height: $required_notab_height) { - .tab-server-settings-general { display: flex; + flex-direction: row; + justify-content: stretch; + + .container-tooltip { + flex-shrink: 0; + flex-grow: 0; + + position: relative; + width: $icon_width; + + display: flex; + flex-direction: column; + justify-content: center; + + img { + height: 1em; + width: 1em; + + align-self: center; + font-size: 1.2em; + } + + .tooltip { + /* only a container for the actual JS generated tooltip */ + display: none; + } + } } - .tab-tag-server-settings-general { - display: inline-block!important; - } + .container-general { + display: flex; + flex-direction: column; + justify-content: stretch; - .container-server-settings-general { - display: none; - } -} + flex-shrink: 0; + flex-grow: 0; -.container-server-settings-host { - padding: 5px; + > div:not(:first-of-type) { + flex-grow: 0; + flex-shrink: 0; - .properties-hostbanner, .properties-hostbutton { - .form-row { - margin-left: 5px; - margin-right: 5px; + margin-top: 1em; + } + + .container-name-icon { + flex-grow: 0; + flex-shrink: 0; display: flex; flex-direction: row; justify-content: stretch; - > .form-group { - flex-grow: 1; - flex-shrink: 1; + .container-icon-select { + position: relative; + + height: 2.5em; + border-radius: .2em; + + margin-left: 1em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + cursor: pointer; + background-color: #121213; + border: 1px solid #0d0d0d; + + .icon-preview { + height: 100%; + width: 3em; + + border: none; + border-right: 1px solid #0d0d0d; + + display: flex; + flex-direction: column; + justify-content: space-around; + + > div { + align-self: center; + } + + @include transition(border-color $button_hover_animation_time ease-in-out); + } + + .container-dropdown { + position: relative; + cursor: pointer; + + display: flex; + flex-direction: column; + justify-content: space-around; + + height: 100%; + width: 1.5em; + + .button { + text-align: center; + + .arrow { + border-color: #999999; + } + } + + .dropdown { + display: none; + position: absolute; + width: max-content; + + top: calc(2.5em - 1px); + + flex-direction: column; + justify-content: flex-start; + + background-color: #121213; + border: 1px solid #0d0d0d; + border-radius: .2em 0 .2em .2em; + + right: -1px; + + z-index: 2; + + .entry { + padding: .5em; + + &:not(:last-of-type) { + border: none; + border-bottom: 1px solid #0d0d0d; + } + + &:hover { + background-color: #17171a; + } + } + } + + &:hover { + border-bottom-right-radius: 0; + .dropdown { + display: flex; + } + } + } + + &:hover { + background-color: #17171a; + border-color: hsla(0, 0%, 20%, 1); + + .icon-preview { + border-color: hsla(0, 0%, 20%, 1); + } + } + + @include transition(border-color $button_hover_animation_time ease-in-out); + } + } + + .container-slots { + display: flex; + flex-direction: row; + justify-content: stretch; + + > div { + width: 50%; + + &:not(:first-child) { + margin-left: 1em; + } + } + } + + .container-welcome-message { + position: relative; + + flex-grow: 1!important; + flex-shrink: 1!important; + + min-height: 5em; + max-height: 22.5em; + + border-radius: .2em; + border: 1px solid #111112; + + overflow: hidden; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .toolbar { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + width: 100%; + height: 2.5em; + + background-color: #17171a; + font-size: .8em; + + padding: .25em; + + .button { + cursor: pointer; + + padding: .5em; + &:not(:first-child) { + margin-left: .25em; + } + + border-radius: .2em; + border: 1px solid #111112; + + background-color: #121213; + + height: 2em; + width: 2em; + + display: flex; + flex-direction: column; + justify-content: center; + + text-align: center; + align-self: center; + + &.button-bold { + font-weight: bold; + } + + &.button-italic { + font-style: italic; + } + + &.button-underline { + text-decoration: underline; + } + + &.button-color { + input { + position: absolute; + width: 0; + height: 0; + opacity: 0; + } + } + + &:hover { + background-color: #0f0f0f; + @include transition(background-color $button_hover_animation_time); + } + } } - > .form-group:not(:first-of-type) { - margin-left: 10px; + > .input-boxed { + flex-shrink: 1; + flex-grow: 1; + + min-height: 2.5em; + height: 5em; + max-height: 20em; + + border: none; + border-radius: 0; + border-top: 1px solid #111112; + + + overflow-x: hidden;; + overflow-y: auto; + + resize: vertical; + + @include chat-scrollbar-vertical(); + } + + &:focus-within { + background-color: #131b22; + //border-color: #284262; } } } - .virtualserver_hostbanner_gfx_interval { - height: calc(2.4375rem + 2px); - } -} + .container-categories { + margin-top: 1em; -.container-server-settings-file-transfer, .container-server-settings-anti-flood, .container-server-settings-security { - padding: 5px; -} - -.container-server-settings-misc { - padding: 5px; - - .container-complains { display: flex; - flex-direction: row; + flex-direction: column; justify-content: stretch; - > div { - flex-grow: 1; - flex-shrink: 1; + min-height: 14em; + + border-radius: .2em; + border: 1px solid #111112; + + background-color: #17171a; + + fieldset { + padding: 0; + width: 100%; } - > div:not(:first-of-type) { - padding-left: 10px; + label { + display: flex; + flex-direction: row; + justify-content: stretch; + + /* total height 2.5em */ + margin-top: .5em; + margin-bottom: .5em; + height: 1.5em; + + cursor: pointer; + + * { + align-self: center; + } + + a { + margin-left: .5em; + margin-right: .5em; + } + + .form-group { + margin: -.5em 0!important; + + padding: 0!important; + + input { + height: 1.5em!important; + } + } + } + + .input-boxed:not(textarea), input, select { + height: 1.7em; + } + + textarea { + height: 3.4em; /* double the input height */ + max-height: 17em; + min-height: 1.7em; + } + + .categories { + height: 2.5em; + + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + border-bottom: 1px solid #1d1d1d; + + .entry { + padding: .5em; + + text-align: center; + + flex-grow: 1; + flex-shrink: 1; + + cursor: pointer; + + &:hover { + color: #b6c4d6; + } + + &.selected { + border-bottom: 3px solid #245184; + margin-bottom: -1px; + + color: #245184; + } + + @include transition(color $button_hover_animation_time, border-bottom-color $button_hover_animation_time); + } + } + + .bodies { + position: relative; + + flex-shrink: 1; + flex-grow: 1; + display: flex; + justify-content: stretch; + + min-height: 10em; + height: 30em; + + .body { + position: absolute; + + top: 0; + left: 0; + right: 0; + bottom: 0; + + padding: .5em; + + display: flex; + justify-content: stretch; + + overflow: auto; /* else the tooltip will trigger the scrollbar */ + @include chat-scrollbar-vertical(); + + &.hidden { + display: none; + } + + .header { + flex-shrink: 0; + flex-grow: 0; + + text-align: center; + color: #548abc; + } + + .content { + flex-grow: 1; + flex-shrink: 1; + } + + &.container-host { + flex-direction: column; + + .container-top, .container-bottom { + flex-grow: 1; + flex-shrink: 1; + min-height: min-content; + + display: flex; + flex-direction: row; + justify-content: stretch; + } + + .container-left, .container-right { + flex-grow: 1; + flex-shrink: 1; + + min-width: 8em; + width: 50%; + } + + .container-top { + flex-direction: column; + flex-grow: 0; + + padding-bottom: .5em; + + border-bottom: 2px solid #111113; + } + + .container-bottom .container-left { + padding-top: .5em; + padding-right: .5em; + + border-right: 2px solid #111113; + } + + .container-bottom .container-right { + padding-top: .5em; + padding-left: .5em; + } + + .container-host-message { + .container-message, .container-mode { + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-title { + width: 8em; + flex-grow: 0; + flex-shrink: 0; + + height: 1.7em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + a { + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + } + } + + textarea, select { + flex-grow: 1; + flex-shrink: 1; + } + + textarea { + resize: vertical; + } + } + } + + .container-host-banner { + .container-url, .container-gfx-url, .container-refresh, .container-resize { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 1.7em; + + a { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + width: 6em; + } + + &.container-refresh, &.container-resize { + a { + width: 9em; + } + } + } + + .container-gfx-preview { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-title { + width: 8em; + flex-grow: 0; + flex-shrink: 0; + + height: 1.7em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + a { + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + } + } + + .container-image { + flex-grow: 1; + flex-shrink: 1; + + min-width: 0; + max-height: 6em; + + display: flex; + flex-direction: column; + justify-content: center; + + > img { + flex-grow: 0; + flex-shrink: 0; + + max-height: 100%; + max-width: 100%; + + object-fit: contain; + } + } + } + } + + .container-host-button { + .container-url, .container-gfx-url, .container-tooltip-button { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 1.7em; + + > a { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + width: 6em; + } + } + + .container-gfx-preview { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: space-between; + + .container-title { + width: 8em; + flex-grow: 0; + flex-shrink: 0; + + height: 1.7em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + a { + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + } + } + + .container-image { + flex-grow: 0; + flex-shrink: 0; + + height: 2em; + width: 2em; + + display: flex; + flex-direction: column; + justify-content: center; + + > img { + flex-grow: 0; + flex-shrink: 0; + + height: 100%; + width: 100%; + } + } + } + } + } + + &.container-network { + flex-direction: column; + + .container-top, .container-bottom { + flex-grow: 1; + flex-shrink: 1; + min-height: min-content; + + display: flex; + flex-direction: row; + justify-content: stretch; + } + + .container-left, .container-right { + flex-grow: 1; + flex-shrink: 1; + + min-width: 8em; + width: 50%; + } + + .container-top { + flex-direction: column; + flex-grow: 0; + + padding-bottom: .5em; + + border-bottom: 2px solid #111113; + } + + .container-bottom .container-left { + padding-top: .5em; + padding-right: .5em; + + border-right: 2px solid #111113; + } + + .container-bottom .container-right { + padding-top: .5em; + padding-left: .5em; + } + + .container-binding { + .container-host, .container-port { + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + a { + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + flex-grow: 0; + flex-shrink: 0; + + width: 6em; + } + } + + .container-weblist { + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + } + } + + .container-download, .container-upload { + .container-bandwidth, .container-quota, .container-used-quota { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + a { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + width: 12em; + + &.unit { + width: 4em; + text-align: right; + } + } + + .value { + flex-grow: 1; + flex-shrink: 1; + } + } + } + } + + &.container-security { + flex-direction: column; + + .container-top, .container-bottom { + flex-grow: 0; + flex-shrink: 0; + + min-height: min-content; + + display: flex; + flex-direction: column; + justify-content: stretch; + } + + .container-top { + border-bottom: 2px solid #111113; + + padding-bottom: .5em; + } + + .container-bottom { + padding-top: .5em; + } + + .container-antiflood { + .container-reduce, .container-block-commands, .container-block-ip { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 1.7em; + + a { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + width: 17em; + } + } + } + + .container-security { + .container-encryption, .container-security-level, .container-security-level-description { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 1.7em; + + a { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + width: 17em; + } + + &.container-refresh, &.container-resize { + a { + width: 9em; + } + } + } + + .container-description { + display: flex; + flex-direction: column; + justify-content: flex-start; + + a { + flex-grow: 0; + flex-shrink: 0; + + font-size: .85em; + color: #3c3c3c; + } + } + } + } + + &.container-messages { + flex-direction: column; + + .container-top, .container-bottom { + flex-grow: 0; + flex-shrink: 0; + + min-height: min-content; + + display: flex; + flex-direction: column; + justify-content: stretch; + } + + .container-top { + border-bottom: 2px solid #111113; + + padding-bottom: .5em; + } + + .container-bottom { + padding-top: .5em; + } + + .container-channel { + .container-description, .container-topic { + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-title { + width: 8em; + flex-grow: 0; + flex-shrink: 0; + + height: 1.7em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + a { + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + } + } + + textarea, select { + flex-grow: 1; + flex-shrink: 1; + } + + textarea { + resize: vertical; + } + } + } + + .container-client { + .container-description { + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + + a { + width: 8em; + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + } + + &.container-misc { + flex-direction: column; + + .container-top, .container-bottom { + flex-grow: 1; + flex-shrink: 1; + min-height: min-content; + + display: flex; + flex-direction: row; + justify-content: stretch; + } + + .container-left, .container-right { + flex-grow: 1; + flex-shrink: 1; + + min-width: 8em; + width: 50%; + } + + .container-top { + flex-direction: column; + flex-grow: 0; + + padding-bottom: .5em; + + border-bottom: 2px solid #111113; + } + + .container-bottom .container-left { + padding-top: .5em; + padding-right: .5em; + + border-right: 2px solid #111113; + } + + .container-bottom .container-right { + padding-top: .5em; + padding-left: .5em; + } + + .container-default-groups { + .container-default-group { + padding-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + a { + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + flex-grow: 0; + flex-shrink: 0; + + width: 12em; + } + + select { + flex-grow: 1; + flex-shrink: 1; + } + } + } + + .container-complains { + .container-ban-threshold, .container-ban-time, .container-cooldown { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + a { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + width: 12em; + } + } + } + + .container-others { + .container-silence, .container-dim, .container-gfx-url { + margin-top: 1em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + > a { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + overflow: hidden; + text-overflow: ellipsis; + + width: 12em; + } + } + } + } + } } } -} -.container-server-settings-messages { - padding: 5px; + .container-buttons { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: flex-end; + + margin-top: 1em; + + button { + margin-left: 1em; + } + } } \ No newline at end of file diff --git a/shared/css/static/modal-settings.scss b/shared/css/static/modal-settings.scss index 280d9f1c..c8f25d37 100644 --- a/shared/css/static/modal-settings.scss +++ b/shared/css/static/modal-settings.scss @@ -1,963 +1,1413 @@ -$small_device: 800px; /* tested out via audio tab */ +@import "properties"; +@import "mixin"; +$color_list_border: #161616; +$color_list_background: #28292b; +$color_list_hover: #2c2d2f; +$color_list_selected: #1a1a1b; + +.modal-body.modal-settings { + padding: 0!important; -.modal .settings_audio { display: flex; flex-direction: column; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + justify-content: stretch; - margin: 3px; + @include user-select(none); + width: 10000em; /* allocate some space */ - > div { - margin: 2px; - } + .inner-container { + flex-grow: 1; + flex-shrink: 1; - a { - align-self: center; - } + height: 50em; + max-height: calc(100vh - 10em); - .settings-device-error { - display: none; - } - - .group_box { display: flex; - flex-direction: column; - flex-shrink: 0; - - &.sound { - flex-shrink: 1; - - .content { - display: block; - flex-direction: column; - } - } - } - - .settings-device { - display: flex; - flex-direction: row; - justify-items: stretch; - - .settings-device-select { - flex-grow: 1; - flex-shrink: 1; - - display: flex; - flex-direction: row; - justify-content: stretch; - - margin-right: 5px; - - > div { - flex-grow: 1; - flex-shrink: 1; - } - - select { - flex-grow: 1; - margin-left: 5px; - width: 100%; - } - } - } - - .settings-speaker .container-master-volume { - display: flex; - flex-direction: row; + flex-direction: row !important; justify-content: stretch; - .key { - flex-grow: 0; - max-width: 150px; - margin-right: 5px; - } - - .value { - flex-grow: 1; - flex-shrink: 1; - + > .left, > .right { display: flex; - flex-direction: row; + flex-direction: column; justify-content: stretch; - a { + padding: .5em; + + overflow: auto; + + @include chat-scrollbar-horizontal(); + @include chat-scrollbar-vertical(); + } + + .container-seperator { + height: unset !important; + background-color: #222224!important; + } + + > .left { + width: 25%; + min-width: 10em; + + height: 100%; + + justify-content: flex-start; + + background-color: #212125; + + .entry { flex-grow: 0; flex-shrink: 0; - margin-left: 5px; - } - - /* added by materialize */ - span { - min-width: 100px; - - flex-grow: 1; - flex-shrink: 1; - - padding: 0; - } - - input { - width: 100%; - } - } - } - - .settings-vad-container { - display: flex; - margin-top: 5px; - min-height: 150px; - flex-direction: column; - width: 100%; - - > div { - width: 100%; - - flex-grow: 1; - flex-shrink: 1; - } - - /* for "normal" devices */ - @media (min-width: $small_device) { - flex-direction: row; - - > div { - width: unset; - } - } - - .group_box { - min-width: 250px; - } - - .content { - display: flex; - flex-direction: column; - justify-content: space-around; - } - - fieldset { - input { - vertical-align: text-bottom; - } - } - - .settings-vad { - display: flex; - flex-direction: column; - } - - .settings-vad-impl { - .setting-vad-ppt { - @media (min-width: $small_device) { - margin-bottom: -35px; - } - } - - display: flex; - justify-content: space-around; - padding: 5px; - - > div { - align-self: center; - } - - .settings-vad-impl-entry { - display: none; - } - - .setting-vad-vad { - .vad_vad_bar { - position: relative; - width: 100%; - height: 20px; - - background-image: linear-gradient(to right, green, yellow, red); - background-repeat: no-repeat; - background-size: 100%; - background-position: 0 100%; - - display: flex; - flex-direction: column; - - .bmd-form-group { - display: flex; - padding: 0px; - } - - .container-hider { - position: absolute; - height: 100%; - width: 100%; - - display: flex; - flex-direction: row-reverse; - - .hider { - width: 50%; - height: 100%; - - background-color: grey; - } - } - } - - /* The slider itself */ - .vad_vad_slider { - margin: 0; - background-color: gray; - -webkit-appearance: none; /* Override default CSS styles */ - appearance: none; - width: 100%; - height: 100%; - outline: none; - opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */ - -webkit-transition: .2s; /* 0.2 seconds transition on hover */ - transition: opacity .2s; - } - - /* The slider handle (use -webkit- (Chrome, Opera, Safari, Edge) and -moz- (Firefox) to override default look) */ - .vad_vad_slider::-webkit-slider-thumb { - -webkit-appearance: none; /* Override default look */ - appearance: none; - width: 2px; /* Set a specific slider handle width */ - height: 20px; /* Slider handle height */ - background: #000000FF; /* Green background */ - cursor: pointer; /* Cursor on hover */ - } - - .vad_vad_slider::-moz-range-thumb { - width: 2px; /* Set a specific slider handle width */ - height: 100%; /* Slider handle height */ - background: #000000FF; /* Green background */ - cursor: pointer; /* Cursor on hover */ - } - } - } - - .property { - display: flex; - flex-direction: row; - - .key { - width: 120px; - margin-right: 5px; - } - - &.ppt-key { - .key { - align-self: center; - } - - button { - min-width: 100px; - } - } - - &.ppt-delay { - margin-top: 5px; - - .value { - display: inline-block; - position: relative; - - &:after { - position: absolute; - top: 1px; - right: .5em; - transition: all .05s ease-in-out; - } - - &:hover::after { - right: 1.5em; - } - - &::after { - content: 'ms'; - } - } - } - } - } - - .sound-settings { - display: flex; - flex-direction: column; - justify-content: stretch; - - .property { - width: 100%; - flex-shrink: 0; - flex-grow: 0; - - display: flex; - flex-direction: row; - justify-content: stretch; - - .key { - /* - width: 250px; - - &.muted-sounds { - width: 230px; - } - */ - margin-right: 10px; - } - - .value { display: flex; flex-direction: row; justify-content: stretch; - flex-shrink: 1; - flex-grow: 1; + padding: .5em; - &.master-volume { - input { - width: 100%; - } + border-radius: $border_radius_middle; - a { - margin-left: 5px; - width: 50px; - text-align: right; - } + color: #e0e0e0; + + &.group { + font-size: 1.3em; + text-transform: uppercase; + + color: #565656; } - .bmd-form-group { - padding: 0; - - label { - margin: 0; - top: -7px; - } - - .bmd-switch-track { - top: 0; - } - } - } - } - - .sound-list { - margin-top: 5px; - - display: flex; - flex-grow: 1; - flex-direction: column; - justify-content: stretch; - - .column { - &.sound-name { - width: calc(100% - 150px); - } - - &.sound-activated { - width: 150px; - flex-grow: 0; - - .bmd-form-group { - padding: 0; - - label { - margin: 0 0 0 75px; - top: -7px; - } - - .bmd-switch-track { - top: 0; - } - } - } - } - - .sound-list-header { - flex-grow: 0; - flex-shrink: 0; - display: flex; - flex-direction: row; - align-items: center; - - .column { - border: 1px solid lightgray; - text-align: center; - } - } - - .sound-list-entries-container { - flex-grow: 1; - display: flex; - flex-direction: column; - justify-content: start; - overflow-y: auto; - - min-height: 400px; - max-height: 400px; - - .entry { - display: flex; - flex-direction: row; - - .column { - margin-left: 2px; - } - + &:not(.group) { cursor: pointer; + &:hover { + background-color: #2c2d2f; + } + &.selected { - background-color: blue; - } - - &:hover { - background-color: #00000022; - } - - .button-playback:hover { - background-color: #00000022; + background-color: #1a1a1b; } } + } + } - &.scrollbar { - .column { - &.sound-name { - width: calc(100% - 150px + 60px) + > .right { + width: 75%; + min-width: 12em; + + position: relative; + + background-color: #2f2f35; + + > .container { + position: absolute; + top: 0; + bottom: 0; + right: 0; + left: 0; + + display: flex; + flex-direction: column; + justify-content: stretch; + + min-height: min-content; + min-width: 30em; + + @include chat-scrollbar-horizontal(); + + &.general-chat, &.general-application, &.audio-sounds { + label { + display: flex; + flex-direction: row; + justify-content: flex-start; + + > * { + align-self: center; + } + + a { + margin-left: .5em; } } } - } - } - /* - .sound-list-filter { - margin-top: 3px; + &.general-application { + .container-font-size { + display: flex; + flex-direction: row; + justify-content: stretch; - display: flex; - flex-direction: row; - justify-content: stretch; + a { + align-self: center; + margin-right: 1em; + } - input { - flex-grow: 1; - flex-shrink: 1; - } - - a { - margin-right: 8px; - } - } - */ - } -} - -.modal .container-tabname-translations { - display: flex; - flex-direction: row; - - .country { - align-self: center; - margin-left: 3px; - } -} - -.modal .settings-translations { - margin: 5px; - - .setting-list { - user-select: none; - - display: flex; - flex-direction: column; - - .list { - display: flex; - flex-direction: column; - justify-content: start; - - overflow-y: auto; - - border: solid 1px lightgray; - padding: 2px; - background: #33333318; - - height: 50%; - min-height: 50%; - max-height: 50%; - - .entry { - display: flex; - flex-direction: row; - justify-content: stretch; - - .default { - } - - .name { - flex-grow: 1; - flex-shrink: 1; - } - - &.translation:not(.default) { - padding-left: 15px; - } - - &.translation { - cursor: pointer; - } - - &.repository { - .name { - font-weight: bold; + select { + height: 1.7em; + width: 12em; + } } } - &.selected { - background: #0000FF77; - } - - - .button { - cursor: pointer; - - &:hover { - background-color: #00000010; - } - } - - .country { - align-self: center; - margin-right: 5px; - margin-left: 5px; - } - } - } - - .management { - width: 100%; - - display: flex; - flex-direction: row; - justify-content: stretch; - - margin-top: 5px; - float: right; - - .space { - flex-grow: 1; - } - } - - .restart-note { - width: 100%; - - display: flex; - flex-direction: row; - justify-content: space-between; - - margin-top: 5px; - - p { - margin: 0; - } - } - } -} - -/* The info modal for the translations */ -.entry-info-container { - display: flex; - flex-direction: column; - - .property { - display: flex; - flex-direction: row; - justify-content: stretch; - - .key { - width: 100px; - } - - .value { - display: flex; - flex-direction: row; - flex-grow: 1; - } - - &.property-repository { - p { - margin: 0; - } - - .button { - cursor: pointer; - - display: flex; - flex-direction: column; - justify-content: center; - - margin-right: 5px; - - &:hover { - background: #00000011; - } - } - } - - &.property-contributors { - .value { - display: flex; - flex-direction: column; - } - - .contributor { - display: block; - } - } - } -} - -.modal .settings-general { - padding: 5px; - - .not-connected { - /* display: none; */ - } - - .connected { - display: flex; - flex-direction: column; - justify-content: stretch; - - .connected-info { - color: green; - } - - .property { - display: flex; - flex-direction: row; - justify-content: stretch; - - .key { - flex-grow: 0; - flex-shrink: 0; - width: 140px; - } - - &.premium { - .premium { - color: green; - } - - .non-premium { - color: red; - } - } - } - - .container-info-action { - display: flex; - flex-direction: row; - justify-content: stretch; - - .divider { - flex-grow: 0; - flex-shrink: 0; - width: 2px; - - background: lightgray; - } - - .container-info, .container-actions { - flex-grow: 1; - flex-shrink: 1; - width: 50%; - - display: flex; - flex-direction: column; - justify-content: stretch; - } - - .container-actions { - display: flex; - flex-direction: column; - justify-content: center; - - button { - width: 150px; - - align-self: center; - } - } - } - } -} - -.modal .settings-profiles { - margin: 5px; - - > div:not(:first-of-type) { - margin-top: 5px; - } - - .profile-status-container { - display: flex; - flex-direction: row; - - justify-content: space-between; - } - - .error-message { - color: red; - } - - .profile-list { - user-select: none; - - display: flex; - flex-direction: column; - - .list { - display: flex; - flex-direction: column; - justify-content: start; - - overflow-y: auto; - - border: solid 1px lightgray; - padding: 2px; - background: #33333318; - - height: 50%; - min-height: 50%; - max-height: 50%; - - .entry { - display: flex; - flex-direction: row; - justify-content: stretch; - cursor: pointer; - - &.default { - .name { - font-weight: bold; - } - } - - .name { - flex-grow: 1; - flex-shrink: 1; - } - - &.selected { - background: #0000FF77; - } - - - .button { - cursor: pointer; - - &:hover { - background-color: #00000010; - } - } - } - } - - .management { - width: 100%; - - display: flex; - flex-direction: row; - justify-content: stretch; - - margin-top: 5px; - float: right; - - .space { - flex-grow: 1; - } - - button:not(:first-of-type) { - margin-left: 5px; - } - } - } - - .general-settings { - display: flex; - flex-direction: column; - justify-content: start; - - .setting { - &:not(:first-of-type) { - margin-top: 5px; - } - - display: flex; - flex-direction: row; - justify-content: stretch; - - .key { - flex-grow: 0; - flex-shrink: 0; - width: 200px; - } - - input, div { - flex-grow: 1; - flex-shrink: 1; - } - } - } - - .identity-settings { - display: none; - - &.active { - display: block; - } - - &.identity-settings-teaforo { - /* - .connected, .disconnected { - display: none - } - */ - } - - &.identity-settings-teamspeak { - .level { - padding-right: 5px; - padding-left: 5px; - - display: flex; - flex-direction: row; - justify-content: stretch; - - .container-input { - flex-grow: 1; - flex-shrink: 1; - + &.general-language { display: flex; + flex-direction: column; + justify-content: stretch; + + .container-selected { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + a, div { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + a { + align-self: center; + padding-right: .75em; + } + + div { + display: flex; + flex-direction: row; + justify-content: flex-start; + + > .country { + align-self: center; + margin-right: .3em; + } + } + } + + .container-list { + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + min-height: 6em; + + background-color: $color_list_background; + border: 1px $color_list_border solid; + + border-radius: $border_radius_large; + + .entries { + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + overflow-x: hidden; + overflow-y: auto; + + padding-top: .5em; + padding-bottom: .5em; + + @include chat-scrollbar-vertical(); + + .entry { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + height: 1.5em; + + padding-left: .5em; + padding-right: .5em; + + cursor: pointer; + + &.translation { + padding-left: 1.5em; + } + + .country { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + margin-right: .25em; + margin-bottom: .1em; + } + + .name { + flex-grow: 1; + flex-shrink: 1; + + + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + .button { + display: flex; + flex-direction: column; + justify-content: space-around; + + width: 1.2em; + height: 1.2em; + + cursor: pointer; + + align-self: center; + + border-radius: $border_radius_middle; + + > div { + align-self: center; + } + + &:hover { + background-color: #3c3d40; + } + + > *:not(.spacer) { + flex-grow: 0; + flex-shrink: 1; + } + + .spacer { + flex-grow: 1; + flex-shrink: 1; + + width: 0; + } + + @include transition(background-color $button_hover_animation_time); + } + + &:hover { + background-color: $color_list_hover; + } + + &.selected { + background-color: $color_list_selected; + } + } + } + + .buttons { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: space-between; + + background-color: #242527; + + padding: .5em; + + border: none; + border-top: 1px solid #161616; + } + } + } + + &.audio-microphone, &.audio-speaker, &.audio-sounds, &.identity-forum { flex-direction: row; justify-content: stretch; - margin-right: 10px; - } - } + .left, .right, .fill { + flex-grow: 1; + flex-shrink: 1; + + width: calc(50% - .5em); /* the .5em for the padding/margin */ + &.fill { + width: calc(100% - 1em); + } + + display: flex; + flex-direction: column; + justify-content: stretch; + + .header { + height: 3em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + padding-bottom: .5em; + + a { + flex-grow: 1; + flex-shrink: 1; + + align-self: flex-end; + + font-weight: bold; + color: #e0e0e0; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .btn { + flex-shrink: 0; + flex-grow: 0; + + margin-left: 1em; + min-width: 8em; + } + } + } + + .container-activity-bar { + $bar_height: 1em; + + $thumb_width: .6em; + $thumb_height: 2em; + + position: relative; + align-self: center; + + overflow: hidden; + + display: flex; + flex-direction: column; + justify-content: space-around; + + height: $bar_height; + border-radius: $border_radius_large; + + cursor: pointer; + + .bar-hider { + position: absolute; + + top: 0; + right: 0; + bottom: 0; + + background-color: #242527; + + -webkit-box-shadow: inset 0px 0px 2px 0px rgba(0,0,0,0.75); + -moz-box-shadow: inset 0px 0px 2px 0px rgba(0,0,0,0.75); + box-shadow: inset 0px 0px 2px 0px rgba(0,0,0,0.75); + + border-bottom-right-radius: $border_radius_large; + border-top-right-radius: $border_radius_large; + } + + &[value] { + overflow: visible; /* for the thumb */ + + border-bottom-left-radius: $border_radius_large; + border-top-left-radius: $border_radius_large; + } + + .bar-error { + z-index: 2; + width: 100%; + text-align: center; + + line-height: 1em; + font-size: .8em; + color: #a10000; + + padding-left: .2em; + padding-right: .2em; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .thumb { + position: absolute; + + top: 0; + right: 0; + + height: $thumb_height; + width: $thumb_width; + + margin-left: -($thumb_width / 2); + margin-right: -($thumb_width / 2); + + margin-top: -($thumb_height - $bar_height) / 2; + margin-bottom: -($thumb_height - $bar_height) / 2; + + background-color: #808080; + + .tooltip { + display: none; + } + } + + -webkit-box-shadow: inset 0px 0px 2px 0px rgba(0,0,0,0.25); + -moz-box-shadow: inset 0px 0px 2px 0px rgba(0,0,0,0.25); + box-shadow: inset 0px 0px 2px 0px rgba(0,0,0,0.25); + + /* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#70407e+0,45407e+100 */ + background: rgb(112,64,126); /* Old browsers */ + background: -moz-linear-gradient(left, rgba(112,64,126,1) 0%, rgba(69,64,126,1) 100%); /* FF3.6-15 */ + background: -webkit-linear-gradient(left, rgba(112,64,126,1) 0%,rgba(69,64,126,1) 100%); /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to right, rgba(112,64,126,1) 0%,rgba(69,64,126,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#70407e', endColorstr='#45407e',GradientType=1 ); /* IE6-9 */ + } + + .left { + margin-right: 1em; + + .body { + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + border: 1px $color_list_border solid; + border-radius: $border_radius_large; + + background-color: $color_list_background; + + &.container-devices, .container-devices { + flex-grow: 1; + flex-shrink: 1; + + min-height: 3em; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + overflow-x: hidden; + overflow-y: auto; + + @include chat-scrollbar-vertical(); + + .device { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + cursor: pointer; + + height: 3em; + width: 100%; + + .container-selected { + /* the selected border */ + margin-top: 1px; + margin-bottom: 1px; + + flex-shrink: 0; + flex-grow: 0; + + padding: .5em; + + border: none; + border-right: 1px solid #242527; + + > .icon_em { + font-size: 2em; + opacity: 0; + } + } + + .container-name { + /* the selected border */ + margin-top: 1px; + margin-bottom: 1px; + + flex-shrink: 1; + flex-grow: 1; + + min-width: 4em; + + padding: .5em; + + display: flex; + flex-direction: column; + justify-content: space-around; + + border: none; + + .device-driver { + font-size: .8em; + line-height: 1em; + + color: #6a6a6a; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .device-name { + line-height: 1em; + + color: #999999; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + .container-activity { + /* the selected border */ + margin-top: 1px; + margin-bottom: 1px; + + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: column; + justify-content: space-around; + + padding: .5em; + + width: 10em; + + border: none; + border-left: 1px solid #242527; + + .container-activity-bar { + flex-grow: 0; + flex-shrink: 0; + + width: 8em; + } + } + + &:hover { + background-color: $color_list_hover; + } + + &.selected { + .container-selected { + > .icon_em { + opacity: 1; + } + + margin-top: 0; + margin-bottom: 0; + + border-bottom: 1px solid #242527; + border-top: 1px solid #242527; + } + .container-name, .container-activity { + margin-top: 0; + margin-bottom: 0; + + border-bottom: 1px solid #242527; + border-top: 1px solid #242527; + } + } + } + } + + .buttons { + flex-grow: 0; + flex-shrink: 0; + + height: 3.5em; + padding: .5em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + border: none; + border-top: 1px $color_list_border solid; + + .spacer { + flex-grow: 1; + flex-shrink: 1; + } + + :not(.spacer) { + flex-grow: 0; + flex-shrink: 0; + } + + .container-error { + color: #a10000; + align-self: center; + } + + button { + min-width: 8em; + height: 2.5em; + } + } + } + } + + .right, .fill { + padding-right: .5em; /* for the sliders etc*/ + justify-content: flex-start; + + .body { + flex-grow: 0; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + /* microphone */ + .container-volume { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + height: 3em; + width: 100%; + } + + /* microphone */ + .container-select-vad { + width: 100%; + + .fieldset { + padding: 0; + margin: 0; + + flex-shrink: 1; + flex-grow: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + > .container { + padding: 0; + + display: flex; + flex-direction: row; + justify-content: space-between; + + > label { + flex-shrink: 0; + min-width: 5em; + + cursor: pointer; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + height: 1.7em; + + .ratio-button { + align-self: center; + margin-right: .5em; + } + + a { + align-self: center; + line-height: 1.2em; + } + } + + button { + width: 100%; + + height: 2em; + font-size: .75em; + + align-self: center; + + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .container-button { + flex-shrink: 1; + margin-left: .5em; + + min-width: 3em; + width: 15em; + } + } + } + } + + /* microphone */ + .container-sensitivity { + width: 100%; + + display: flex; + flex-direction: row; + justify-content: stretch; + + .container-activity-bar { + flex-grow: 1; + flex-shrink: 1; + } + + + + .container-activity-bar .thumb { + @include transition(background-color $button_hover_animation_time ease-in-out); + } + + &.disabled { + pointer-events: none; + + .container-activity-bar { + .bar-hider { + width: 100%!important; + } + + .thumb { + background-color: #4d4d4d!important; + .tooltip { + opacity: 0!important; + } + } + } + } + } + + /* microphone */ + .container-advanced { + display: flex; + flex-direction: column; + justify-content: flex-start; + + .container-ppt-delay { + display: flex; + flex-direction: row; + justify-content: space-between; + + label { + cursor: pointer; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + margin-right: .5em; + + .checkbox { + margin-right: .5em; + } + + a { + line-height: 1.2em; + } + } + + .container-input { + display: flex; + flex-direction: row; + justify-content: stretch; + + cursor: text; + + border-radius: $border_radius_middle; + overflow: hidden; + + width: 5em; + + height: 1.8em; + font-size: 0.75em; + + + align-self: center; + + color: #464646; + background-color: #17171a; + + input { + flex-shrink: 1; + flex-grow: 1; + + min-width: 2em; + text-align: right; + + position: relative; + outline: none; + border: none; + + color: #464646; + padding: 0 .3em 0 .5em; + + background-color: transparent; + + -webkit-box-shadow: inset 0 0 2px 0 rgba(0,0,0,0.25); + -moz-box-shadow: inset 0 0 2px 0 rgba(0,0,0,0.25); + box-shadow: inset 0 0 2px 0 rgba(0,0,0,0.25); + + &::-webkit-inner-spin-button, + &::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; + } + } + + label { + flex-shrink: 0; + flex-grow: 0; + + align-self: center; + } + + &.disabled { + cursor: unset; + pointer-events: none; + + background-color: #222227; + } + } + } + } + + /* speaker */ + .container-volume-master { + .filler { + background-color: #2b8541; + } + } + + .container-volume-soundpack { + padding-top: .75em; + } + } + } - .property { - &:not(:first-of-type) { - margin-top: 5px; } - display: flex; - flex-direction: row; - justify-content: stretch; + &.identity-profiles { + flex-direction: row; + justify-content: stretch; + + .left, .right { + flex-grow: 1; + flex-shrink: 1; + + width: 50%; + min-width: 25em; + min-height: min-content; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .header { + height: 3em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + padding-bottom: .5em; + + a { + flex-grow: 1; + flex-shrink: 1; + + align-self: flex-end; + + font-weight: bold; + color: #e0e0e0; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .btn { + flex-shrink: 0; + flex-grow: 0; + + margin-left: 1em; + min-width: 8em; + } + } + } + + .left { + margin-right: 1em; + + .body { + flex-grow: 1; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: stretch; + + border: 1px $color_list_border solid; + border-radius: $border_radius_large; + + background-color: $color_list_background; + + .container-profiles { + flex-grow: 1; + flex-shrink: 1; + + min-height: 3em; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + overflow-x: hidden; + overflow-y: auto; + + @include chat-scrollbar-vertical(); + + .profile { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + cursor: pointer; + + height: 3em; + width: 100%; + + .container-avatar { + flex-shrink: 0; + flex-grow: 0; + + height: 3em; + width: 3em; + } + + .container-info { + flex-shrink: 1; + flex-grow: 1; + + margin-left: .5em; + min-width: 4em; + + display: flex; + flex-direction: column; + justify-content: center; + + .container-type { + width: 100%; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + text-transform: uppercase; + font-weight: bold; + + font-size: 0.8em; + + line-height: 1em; + + color: #6a6a6a; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + > *:not(:first-of-type) { + margin-left: .25em; + } + .icon-status { + margin-bottom: .2em; /* push it a bit higher than the center */ + } + + div { + align-self: center; + } + } + + .profile-name { + line-height: 1.2em; + + color: #999999; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + &:hover { + background-color: $color_list_hover; + } + + &.selected { + background-color: $color_list_selected; + } + } + } + + .buttons { + flex-grow: 0; + flex-shrink: 0; + + height: 3.5em; + padding: .5em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + border: none; + border-top: 1px $color_list_border solid; + + .spacer { + flex-grow: 1; + flex-shrink: 1; + } + + :not(.spacer) { + flex-grow: 0; + flex-shrink: 0; + } + + .container-error { + color: #a10000; + align-self: center; + } + + button { + min-width: 8em; + height: 2.5em; + } + } + } + } + + .right { + padding-right: .5em; /* for the sliders etc*/ + justify-content: flex-start; + + .body { + flex-grow: 0; + flex-shrink: 1; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + .container-teamspeak { + .container-invalid { + padding: 1em; + text-align: center; + } + .container-valid { + .container-level { + display: flex; + flex-direction: row; + justify-content: stretch; + + .form-group { + flex-grow: 1; + flex-shrink: 1; + min-width: 4em; + } + + button { + height: 2em; + + align-self: center; + margin-left: 1em; + } + } + } + + .buttons { + display: flex; + flex-direction: row; + justify-content: space-between; + + > div { + text-align: right; + + width: max-content; + margin-left: 1em; + } + + button { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + text-align: end; + + margin-top: 1em; + height: 2.5em; + } + } + } + + .container-teaforo { + .container-valid, .container-invalid { + padding: 1em; + text-align: center; + + button { + margin-top: .5em; + } + } + } + } + } - .key { - width: 200px; } - .value { - flex-grow: 1; - flex-shrink: 1; + &.identity-forum { + .container-login { + flex-grow: 0; + flex-shrink: 0; - input { - width: 100%; + max-width: 25em; + + .container-button { + display: flex; + flex-direction: row; + justify-content: flex-end; + + button { + min-width: 8em; + } + } + + .container-error { + display: block; + margin-bottom: -1em; + color: red; + opacity: 0; + + &.shown { + opacity: 1; + } + + @include transform(opacity $button_hover_animation_time ease-in-out); + } } } - } - .identity-undefined { - text-align: center; - } + &.audio-sounds { + flex-direction: row; - .manage { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-top: 5px; + min-height: 6em; + width: 100%; + + .left { + flex-shrink: 1; + flex-grow: 1; + + width: 75%; + margin-right: 1em; + + .header { + flex-shrink: 0; + flex-grow: 0; + + height: 3em; + + display: flex; + flex-direction: row; + justify-content: stretch; + + padding-bottom: .5em; + + a { + flex-grow: 1; + flex-shrink: 1; + + align-self: flex-end; + + font-weight: bold; + color: #e0e0e0; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .btn { + flex-shrink: 0; + flex-grow: 0; + + margin-left: 1em; + min-width: 8em; + } + } + + + .body { + flex-grow: 1; + flex-shrink: 1; + + min-height: 6em; + + display: flex; + flex-direction: column; + justify-content: stretch; + + border: 1px $color_list_border solid; + border-radius: $border_radius_large; + + background-color: $color_list_background; + + .container-sounds { + flex-grow: 1; + flex-shrink: 1; + + min-height: 3em; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + overflow-x: hidden; + overflow-y: auto; + + @include chat-scrollbar-vertical(); + + .sound { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + cursor: pointer; + + width: 100%; + + padding-left: .5em; + padding-right: 1em; + + font-size: .9em; + + .container-button-play_pause { + /* the selected border */ + margin-top: 1px; + margin-bottom: 1px; + + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: column; + justify-content: space-around; + + align-self: center; + margin-right: .25em; + + padding: .25em; + + border: none; + + /* copy checkmark */ + position: relative; + + width: 1.3em; + height: 1.3em; + + cursor: pointer; + pointer-events: all; + + overflow: hidden; + + background-color: #272626; + border-radius: $border_radius_middle; + + -webkit-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + + img { + height: 100%; + width: 100%; + + align-self: center; + } + } + + .container-name { + /* the selected border */ + margin-top: 1px; + margin-bottom: 1px; + + flex-shrink: 1; + flex-grow: 1; + + min-width: 4em; + + padding: .25em; + line-height: 1.2em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + border: none; + text-align: right; + } + + .container-button-toggle { + font-size: .8em; + } + + &:hover { + background-color: $color_list_hover; + } + + label { + display: flex; + flex-direction: column; + justify-content: space-around; + } + } + } + + .container-filter { + border: none; + border-top: 1px $color_list_border solid; + + padding-right: 1em; + padding-left: 1em; + } + } + } + + .right { + flex-grow: 0; + flex-shrink: 1; + + width: 25%; + } + } + + &.hidden { + display: none; + } } } } -} - -.container-teamspeak-import { - .error { - color: red; - /* margin-bottom: 5px; */ - } - - .success { - color: green; - } - - .input-file { - display: none; - } - - .load-data { - display: flex; - flex-direction: column; - justify-content: stretch; - - .buttons { - flex-grow: 1; - flex-shrink: 1; - display: flex; - flex-direction: row; - justify-content: end; - - button:not(:first-of-type) { - margin-left: 20px; - } - } - } - - .footer { - margin-top: 5px; - text-align: right; - margin-bottom: 5px; - - .button-import { - width: 100px; - } - } -} - -.container-teamspeak-improve { - display: flex; - flex-direction: column; - - .bmd-label-static { - display: flex; - flex-direction: row; - } - - .form-row { - margin-right: 0!important; - margin-left: 0!important; - justify-content: space-between; - } - - .buttons { - margin-top: 5px; - margin-bottom: 5px; - display: flex; - flex-direction: row; - justify-content: space-between; - - button { - width: 100px; - } - } - - .help-tip-container { - margin-left: 5px; - } } \ No newline at end of file diff --git a/shared/css/static/modal.scss b/shared/css/static/modal.scss new file mode 100644 index 00000000..ca109ec1 --- /dev/null +++ b/shared/css/static/modal.scss @@ -0,0 +1,938 @@ +@import "properties"; +@import "mixin"; + +.modal { + color: #999999; /* base color */ + + overflow: auto; /* allow scrolling if a modal is too big */ + + background-color: rgba(0, 0, 0, 0.8); + + padding-right: 5%; + padding-left: 5%; + + z-index: 1000; + position: fixed; + + top: 0; + left: 0; + right: 0; + bottom: 0; + + display: none; + + margin-top: -7em; + opacity: 0; + + $animation_length: .3s; + @include transition(opacity $animation_length ease-in, margin-top $animation_length ease-in); + &.shown { + display: flex; + flex-direction: column; + justify-content: center; + + margin-top: 0; + opacity: 1; + + @include transition(opacity $animation_length ease-out, margin-top $animation_length ease-out); + } + + .modal-dialog { + display: block; + + margin: 1.75rem 0; + + /* width calculations */ + align-items: center; + + /* height stuff */ + max-height: calc(100% - 3.5em); + + .modal-content { + background: #19191b; + + border: 1px solid black; + border-radius: $border_radius_middle; + + width: max-content; + max-width: 100%; + min-width: 20em; + + min-height: min-content; + + /* align us in the center */ + margin-right: auto; + margin-left: auto; + + flex-shrink: 1; + flex-grow: 0; /* we dont want a grow over the limit set within the content, but we want to shrink the content if necessary */ + align-self: center; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .modal-header, .modal-footer { + flex-grow: 0; + flex-shrink: 0; + } + + .modal-header { + background-color: #222224; + + display: flex; + flex-direction: row; + justify-content: stretch; + + padding: .25em; + + .container-icon, .container-close { + flex-grow: 0; + flex-shrink: 0; + } + + .container-close { + height: 1.4em; + width: 1.4em; + + padding: .2em; + border-radius: .2em; + + cursor: pointer; + + &:hover { + background-color: #1b1b1c; + } + } + + .container-icon { + margin-right: .25em; + + img { + height: 1em; + width: 1em; + } + } + + .modal-title, modal-header { + flex-grow: 1; + flex-shrink: 1; + + color: #9d9d9e; + } + + h5 { + margin: 0; + padding: 0; + } + } + + .modal-body { + max-width: 100%; + min-width: 20em; /* may adjust if needed */ + + overflow-y: auto; + overflow-x: auto; + } + } + } +} + +.modal { + //General style + .properties { + display: grid; + grid-template-columns: minmax(min-content, max-content) auto; + grid-column-gap: 10px; + grid-row-gap: 3px; + box-sizing: border-box; + } + + hr { + border-top: 3px double #8c8b8b; + width: 100%; + } + + + .input_error { + border-radius: 1px; + border: solid red; + } + + .properties_misc { + .complains { + display: grid; + grid-template-columns: auto auto auto; + grid-template-rows: auto auto; + grid-column-gap: 5px; + margin-bottom: 10px; + } + } + + .container { + padding: 6px; + } + + .modal-dialog { + display: flex; + flex-direction: column; + justify-content: stretch; + + &.modal-dialog-centered { + justify-content: stretch; + } + } + + .modal-content { + /* max-height: 500px; */ + min-height: 0; /* required for moz */ + flex-direction: column; + justify-content: stretch; + + .modal-header { + flex-shrink: 0; + flex-grow: 0; + + &.modal-header-error { + background-color: #ce0000; + } + + &.modal-header-info { + background-color: #03a9f4; + } + + &.modal-header-warning, &.modal-header-info, &.modal-header-error { + border-top-left-radius: .125rem; + border-top-right-radius: .125rem; + } + } + + .modal-body { + padding: 20px 24px 24px; + + flex-grow: 1; + flex-shrink: 1; + display: flex; + flex-direction: column; + min-height: 0; + + input.is-invalid { + background-image: linear-gradient(0deg, #d50000 2px, rgba(213, 0, 0, 0) 0), linear-gradient(0deg, rgba(241, 1, 1, 0.61) 1px, transparent 0); + } + } + + .modal-footer { + flex-shrink: 0; + flex-grow: 0; + + &.modal-footer-button-group { + button { + min-width: 100px; + } + + button:not(:first-of-type) { + margin-left: 15px; + }; + } + } + } +} + +/* special general modals */ +.modal { + .modal-body.modal-blue { + border-left: 2px solid #0a73d2; + } + .modal-body.modal-green { + border-left: 2px solid #00d400; + } + + .modal-body.modal-body-input { + color: #999999; + + width: 100%; + + .form-group:not(.with-title) { + padding-top: .75rem; + } + + input.is-invalid ~ .container-help-feedback > .invalid-feedback { + display: block; + } + + .container-help-feedback { + position: absolute; + } + + .buttons { + display: flex; + flex-direction: row; + justify-content: flex-end; + + button { + width: 6em; + + &:not(:last-of-type) { + margin-right: 1em; + } + } + } + } + + .modal-body.modal-body-yesno { + color: #999999; + + border: none; + border-left: 2px solid #d50000; + + width: 100%; + + .buttons { + padding-top: 2em; + + display: flex; + flex-direction: row; + justify-content: flex-end; + + button { + width: 6em; + + &:not(:last-of-type) { + margin-right: 1em; + } + } + } + } +} + + +/* Input group */ +.form-group { + position: relative; + + padding-top: 1.75rem; /* the label above (might be floating) */ + margin-bottom: 1rem; /* for invalid label/help label */ + + .form-control { + display: block; + width: 100%; + padding: .4375rem 0; + font-size: 1rem; + line-height: 1.5; + color: #cdd1d0; + background-color: transparent; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, .26); + border-radius: 0; + box-shadow: none; + + @include transition(border-color .15s ease-in-out, box-shadow .15s ease-in-out); + } + + label { + color: #999999; + + top: 1rem; + left: 0; + font-size: .75rem; + + position: absolute; + pointer-events: none; + transition: all .3s ease; + + line-height: 1; + + &.bmd-label-floating { + will-change: left, top, contents; + color: #999999; + top: 2.42rem; + font-size: 1rem; + } + + @include transition(color $button_hover_animation_time ease-in-out, top $button_hover_animation_time ease-in-out, font-size $button_hover_animation_time ease-in-out); + } + + + &:focus-within { + label { + color: #3c74a2; + + &.bmd-label-floating { + //color: #343434; + } + } + } + + &:focus-within, &.is-filled { + label.bmd-label-floating { + top: 1rem; + font-size: .75rem; + color: #3c74a2; + } + } + + .form-control { + height: 2.25em; + + background: no-repeat bottom, 50% calc(100% - 1px); + background-size: 0 100%, 100% 100%; + border: 0; + transition: background 0s ease-out; + padding-left: 0; + padding-right: 0; + + + background-image: linear-gradient(0deg, #008aff 2px, rgba(0, 150, 136, 0) 0), linear-gradient(0deg, #393939 1px, transparent 0); + + &:focus { + background-size: 100% 100%, 100% 100%; + transition-duration: .3s; + + color: #ced3d3; + background-color: transparent; + outline: 0; + } + + &.is-invalid { + background-image: linear-gradient(0deg, #d50000 2px,rgba(213,0,0,0) 0),linear-gradient(0deg,rgba(241,1,1,.61) 1px,transparent 0); + } + } + + .invalid-feedback { + position: absolute; + opacity: 0; + width: 100%; + margin-top: .25rem; + font-size: 80%; + color: #f44336; + + @include transition(opacity .25s ease-in-out); + } + + .form-control.is-invalid ~ .invalid-feedback { + opacity: 1; + } + + + &.is-invalid { + .form-control { + background-image: linear-gradient(0deg, #d50000 2px,rgba(213,0,0,0) 0),linear-gradient(0deg,rgba(241,1,1,.61) 1px,transparent 0); + } + + .invalid-feedback { + opacity: 1; + } + + label { + color: #f44336!important; + } + } + + .bmd-help { + position: absolute; + opacity: 0; + width: 100%; + margin-top: .25rem; + + font-size: .75em; + + @include transition(opacity .25s ease-in-out); + } + + .form-control:focus-within ~ .bmd-help { + opacity: 1; + } +} + +/* button look */ +.btn { + cursor: pointer; + + background-color: #0000007F; + + border-width: 0; + border-radius: $border_radius_middle; + border-style: solid; + + color: #7c7c7c; + + padding: .25em 1em; + + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12); + + &:hover { + background-color: #151515; + } + + &:disabled { + box-shadow: none; + background-color: #00000045; + + &:hover { + background-color: #00000045; + } + } + + &.btn-success { + border-bottom-width: 2px; + border-bottom-color: #389738; + } + + &.btn-info { + border-bottom-width: 2px; + border-bottom-color: #386896; + } + + &.btn-warning, &.btn-danger { + border-bottom-width: 2px; + border-bottom-color: #973838; + } + + @include transition(background-color $button_hover_animation_time ease-in-out); +} + +/* general switch look */ +.switch { + $ball_outer_width: 1.5em; /* 1.5? */ + $ball_inner_width: .4em; + + $slider_height: .8em; + $slider_width: 2em; + + $slider_border_size: .1em; + + position: relative; + display: inline-block; + outline: none; + + width: $slider_width; + height: $slider_height; + + /* "allocate" space for the slider */ + margin-top: ($ball_outer_width - $slider_height) / 2; + margin-bottom: ($ball_outer_width - $slider_height) / 2; + margin-left: $ball_outer_width / 2; + margin-right: $ball_outer_width / 2; + + /* fix size */ + flex-shrink: 0; + flex-grow: 0; + + input { + /* "hide" the actual input node */ + opacity: 0; + width: 0; + height: 0; + outline: none; + } + + .slider { + pointer-events: all!important; + position: absolute; + cursor: pointer; + outline: none; + + top: -$slider_border_size; + left: -$slider_border_size; + right: -$slider_border_size; + bottom: -$slider_border_size; + + background-color: #252424; + + border: $slider_border_size solid #262628; + border-radius: 5px; + + &:before { + position: absolute; + content: ""; + + height: $ball_outer_width; + width: $ball_outer_width; + + left: - $ball_outer_width / 2; + bottom: -($ball_outer_width - $slider_height) / 2; + + background-color: #3d3a3a; + + @include transition(.4s); + border-radius: 50%; + + box-shadow: 0 0 .2em 1px #00000044; + } + + .dot { + position: absolute; + + height: $ball_inner_width; + width: $ball_inner_width; + + left: -($ball_inner_width / 2); + bottom: $slider_height / 2 - $ball_inner_width / 2; + + background-color: #a5a5a5; + box-shadow: 0 0 1em 1px #a5a5a566; + border-radius: 50%; + + @include transition(.4s); + } + } + + + + input:focus + .slider { + } + + input:checked + .slider { + &:before { + @include transform(translateX($slider_width)); + } + + .dot { + @include transform(translateX($slider_width)); + background-color: #46c0ec; + box-shadow: 0 0 1em 1px #46c0ec; + } + } +} + +/* general ratio button look */ +.ratio-button { + $button_size: 1.2em; + $mark_size: .6em; + + position: relative; + + width: $button_size; + height: $button_size; + + cursor: pointer; + + overflow: hidden; + + background-color: #272626; + border-radius: 50%; + + input { + position: absolute; + width: 0; + height: 0; + opacity: 0; + } + + //#07d1fe + .mark { + position: absolute; + opacity: 0; + + top: ($button_size - $mark_size) / 2; + bottom: ($button_size - $mark_size) / 2; + right: ($button_size - $mark_size) / 2; + left: ($button_size - $mark_size) / 2; + + background-color: #46c0ec; + box-shadow: 0 0 .5em 1px #46c0ec66; + border-radius: 50%; + + @include transition(.4s); + } + + input:checked + .mark { + opacity: 1; + } + + @include transition(background-color $button_hover_animation_time); + + -webkit-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); +} + +label:hover > .ratio-button, .ratio-button:hover { + &.ratio-button, > .ratio-button { + background-color: #2c2b2b; + } +} + +label.disabled > .ratio-button, .ratio-button.disabled, .ratio-button:disabled { + &.ratio-button, > .ratio-button { + pointer-events: none!important; + background-color: #1a1919!important; + } +} + + +/* + + */ +.checkbox { + flex-shrink: 0; + flex-grow: 0; + + position: relative; + + width: 1.3em; + height: 1.3em; + + cursor: pointer; + pointer-events: all; + + overflow: hidden; + + background-color: #272626; + border-radius: $border_radius_middle; + + input { + position: absolute; + width: 0; + height: 0; + opacity: 0; + } + + //#07d1fe + .mark { + position: absolute; + opacity: 0; + + height: .5em; + width: .8em; + + margin-left: 0.25em; + margin-top: .3em; + + border: none; + border-bottom: .2em solid #46c0ec; + border-left: .2em solid #46c0ec; + + transform: rotateY(0deg) rotate(-45deg); /* needs Y at 0 deg to behave properly*/ + @include transition(.4s); + } + + input:checked + .mark { + opacity: 1; + } + + -webkit-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 0.5); +} + +label.disabled > .checkbox, .checkbox:disabled, .checkbox.disabled { + &.checkbox, > .checkbox { + pointer-events: none!important; + background-color: #222227; + } +} + +/* slider */ +$track_height: .6em; + +$thumb_width: .6em; +$thumb_height: 2em; + +$tooltip_width: 4em; +$tooltip_height: 1.8em; + +.container-slider { + font-size: .8em; + + position: relative; + + margin-top: .5em; /* for the track */ + + width: 100%; + height: $track_height; + + cursor: pointer; + + background-color: #242527; + border-radius: $border_radius_large; + + overflow: visible; + + .filler { + position: absolute; + + left: 0; + top: 0; + bottom: 0; + + background-color: #4370a2; + border-radius: $border_radius_large; + } + + .thumb { + position: absolute; + + top: 0; + right: 0; + + height: $thumb_height; + width: $thumb_width; + + margin-left: -($thumb_width / 2); + margin-right: -($thumb_width / 2); + + margin-top: -($thumb_height - $track_height) / 2; + margin-bottom: -($thumb_height - $track_height) / 2; + + background-color: #808080; + + .tooltip { + display: none; + + /* + position: absolute; + top: -($tooltip_height + .6em); + left: -($tooltip_width - $thumb_width) / 2; + + line-height: 1em; + + height: $tooltip_height; + width: $tooltip_width; + + background-color: #232222; + border-radius: $border_radius_middle; + + text-align: center; + display: flex; + flex-direction: column; + justify-content: space-around; + + opacity: 0; + @include transition(opacity .5s ease-in-out); + + &:before { + content: ''; + + position: absolute; + + left: ($tooltip_width - $thumb_width) / 2 - .25em; + right: 0; + bottom: -.4em; + + width: 0; + height: 0; + + border-style: solid; + border-width: .5em .5em 0 .5em; + border-color: #232222 transparent transparent transparent; + } + */ + } + } + + &:hover, &.active { + .tooltip { + opacity: 1; + } + } +} + +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + /* display: none; <- Crashes Chrome on hover */ + -webkit-appearance: none; + margin: 0; /* <-- Apparently some margin are still there even though it's hidden */ +} + +input[type=number] { + -moz-appearance:textfield; /* Firefox */ +} + +/* "Boxed input" Used in channeledit & serveredit */ +.input-boxed { + height: 2.5em; + + border-radius: .2em; + border: 1px solid #111112; + + background-color: #121213; + + display: flex; + flex-direction: row; + justify-content: stretch; + + color: #b3b3b3; + + @include placeholder(&) { + color: #606060; + }; + + .prefix { + flex-grow: 0; + flex-shrink: 0; + + margin: 0; + + line-height: initial; + align-self: center; + padding: 0 .5em; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + opacity: 1; + + @include transition($button_hover_animation_time ease-in-out); + } + + &.is-invalid { + background-color: #180d0d; + border-color: #721c1c; + + background-image: unset!important; + } + + &:focus, &:focus-within { + background-color: #131b22; + border-color: #284262; + + color: #e1e2e3; + + .prefix { + width: 0; + padding-left: 0; + padding-right: 0; + opacity: 0; + } + } + + input, select { + flex-grow: 1; + flex-shrink: 1; + + padding: 0 0.5em; + + background: transparent; + border: none; + outline: none; + margin: 0; + + color: #b3b3b3; + } + + .prefix + input { + padding-left: 0; + } + + + &:focus, &:focus-within { + .prefix + input { + padding-left: .5em; + } + } + + &.disabled, &:disabled { + background-color: #1a1819; + } + + @include transition($button_hover_animation_time ease-in-out); +} + +input.input-boxed { + padding: 0.5em; +} \ No newline at end of file diff --git a/shared/css/static/modals.scss b/shared/css/static/modals.scss index e11f9292..6d6366b1 100644 --- a/shared/css/static/modals.scss +++ b/shared/css/static/modals.scss @@ -1,132 +1,3 @@ -/* backdrop fix */ -.modal-backdrop { - visibility: hidden !important; -} -.modal { - background-color: rgba(0,0,0,0.5); - padding-right: 8% !important; -} - -modal-body { - display: flex; - flex-direction: column; - - min-height: 10px; -} - -.modal { - //General style - .properties { - display: grid; - grid-template-columns: minmax(min-content, max-content) auto; - grid-column-gap: 10px; - grid-row-gap: 3px; - box-sizing: border-box; - } - - hr { - border-top: 3px double #8c8b8b; - width: 100%; - } - - - .input_error { - border-radius: 1px; - border: solid red; - } - - .properties_misc { - .complains { - display: grid; - grid-template-columns: auto auto auto; - grid-template-rows: auto auto; - grid-column-gap: 5px; - margin-bottom: 10px; - } - } - - .container { - padding: 6px; - } - - .modal-dialog { - max-height: 80%; - display: flex; - flex-direction: column; - justify-content: stretch; - - &.modal-dialog-centered { - justify-content: stretch; - } - } - - .modal-content { - /* max-height: 500px; */ - min-height: 0; /* required for moz */ - flex-direction: column; - justify-content: stretch; - - .modal-header { - flex-shrink: 0; - flex-grow: 0; - - &.modal-header-error { - background-color: #ce0000; - } - - &.modal-header-info { - background-color: #03a9f4; - } - - &.modal-header-warning, &.modal-header-info, &.modal-header-error { - border-top-left-radius: .125rem; - border-top-right-radius: .125rem; - } - } - - .modal-body { - flex-grow: 1; - flex-shrink: 1; - display: flex; - flex-direction: column; - min-height: 0; - - input.is-invalid { - background-image: linear-gradient(0deg, #d50000 2px, rgba(213, 0, 0, 0) 0), linear-gradient(0deg, rgba(241, 1, 1, 0.61) 1px, transparent 0); - } - - &.modal-body-input { - .form-group:not(.with-title) { - padding-top: .75rem; - } - - input.is-invalid ~ .container-help-feedback > .invalid-feedback { - display: block; - } - - .container-help-feedback { - position: absolute; - } - } - } - - .modal-footer { - flex-shrink: 0; - flex-grow: 0; - - &.modal-footer-button-group { - button { - min-width: 100px; - } - - button:not(:first-of-type) { - margin-left: 15px; - }; - } - } - } -} - .channel_perm_tbl .value { width: 60px; } @@ -217,9 +88,13 @@ modal-body { .arrow { display: inline-block; border: solid black; - border-width: 0 3px 3px 0; - padding: 3px; - height: 10px; + //border-width: 0 3px 3px 0; + //padding: 3px; + //height: 10px; + + border-width: 0 .2em .2em 0; + padding: .21em; + height: .5em; &.right { transform: rotate(-45deg); @@ -327,106 +202,4 @@ modal-body { } } } -} - -.group-assignment-list { - .group-list { - border: lightgray solid 1px; - padding: 3px; - overflow-y: auto; - - .group-entry { - display: flex; - flex-direction: row; - height: max-content; - } - - .icon-container { - align-self: center; - margin-right: 4px; - margin-left: 2px; - margin-top: -2px; - } - - a { - align-self: center; - } - - .checkbox { - align-self: center; - height: 8px; - - margin-top: 1px; - margin-left: 1px; - display: block; - position: relative; - padding-left: 18px; - margin-bottom: 12px; - cursor: pointer; - font-size: 22px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - /* Hide the browser's default checkbox */ - input { - position: absolute; - opacity: 0; - cursor: pointer; - display: none; - } - - .checkmark { - position: absolute; - top: 0; - left: 0; - height: 16px; - width: 16px; - background-color: #eee; - margin-right: 4px; - - &:after { - content: ""; - position: absolute; - display: none; - - left: 5px; - top: 1px; - width: 6px; - height: 12px; - border: solid white; - border-width: 0 3px 3px 0; - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); - } - } - - &:hover:not(.disabled) input ~ .checkmark { - background-color: #ccc; - } - - input:checked ~ .checkmark { - background-color: #2196F3; - } - - input:checked ~ .checkmark:after { - display: block; - } - - &.disabled { - user-select: none; - pointer-events: none; - cursor: not-allowed; - - .checkmark { - background-color: #00000055; - &:after { - border-color: #00000055; - } - } - } - } - } } \ No newline at end of file diff --git a/shared/css/static/properties.scss b/shared/css/static/properties.scss index 5c81d39f..f0a0a877 100644 --- a/shared/css/static/properties.scss +++ b/shared/css/static/properties.scss @@ -1,4 +1,10 @@ $channel_tree_entry_selected: #2d2d2d; $channel_tree_entry_hovered: #393939; -$channel_tree_entry_text_color: #828282; \ No newline at end of file +$channel_tree_entry_text_color: #828282; + +$border_radius_small: .1em; +$border_radius_middle: .15em; +$border_radius_large: .2em; + +$button_hover_animation_time: .25s \ No newline at end of file diff --git a/shared/css/static/server-log.scss b/shared/css/static/server-log.scss index 3a7a95b0..1f97ac77 100644 --- a/shared/css/static/server-log.scss +++ b/shared/css/static/server-log.scss @@ -1,3 +1,5 @@ +@import "mixin"; + .container-log { display: block; overflow-y: auto; @@ -5,6 +7,9 @@ height: 100%; width: 100%; + @include chat-scrollbar-vertical(); + @include chat-scrollbar-horizontal(); + .container-messages { width: 100%; line-height: 16px; @@ -33,7 +38,7 @@ font-family: sans-serif; font-size: 13px; - line-height: 1; + line-height: initial; } > .timestamp { diff --git a/shared/css/static/ts/country.scss b/shared/css/static/ts/country.scss index 4515f67b..6151d276 100644 --- a/shared/css/static/ts/country.scss +++ b/shared/css/static/ts/country.scss @@ -5,6 +5,8 @@ flex-shrink: 0; flex-grow: 0; + + background-position: 0 -2717px; /* by default use global flag */ } .country.flag-ad { diff --git a/shared/css/static/ts/icons_em.scss b/shared/css/static/ts/icons_em.scss new file mode 100644 index 00000000..6fd9ecef --- /dev/null +++ b/shared/css/static/ts/icons_em.scss @@ -0,0 +1,607 @@ +/* sprite bounds (px): width="496" height="400" */ +.icon_em { + display: inline-block; + background: url('../../../img/client_icon_sprite.svg'), url('../../img/client_icon_sprite.svg') no-repeat; + background-size: calc(496em / 16) calc(400em / 16); + height: 1em; + width: 1em; +} + +/* Icons 1em */ +.icon_em.client-d_sound { + background-position: calc(0em / 16) calc(0em / 16); +} +.icon_em.client-d_sound_me { + background-position: calc(-32em / 16) calc(0em / 16); +} +.icon_em.client-d_sound_user { + background-position: calc(-64em / 16) calc(0em / 16); +} +.icon_em.client-about { + background-position: calc(-96em / 16) calc(0em / 16); +} +.icon_em.client-activate_microphone { + background-position: calc(-128em / 16) calc(0em / 16); +} +.icon_em.client-add { + background-position: calc(-160em / 16) calc(0em / 16); +} +.icon_em.client-add_foe { + background-position: calc(-192em / 16) calc(0em / 16); +} +.icon_em.client-add_folder { + background-position: calc(-224em / 16) calc(0em / 16); +} +.icon_em.client-add_friend { + background-position: calc(-256em / 16) calc(0em / 16); +} +.icon_em.client-addon { + background-position: calc(-288em / 16) calc(0em / 16); +} +.icon_em.client-addon-collection { + background-position: calc(-320em / 16) calc(0em / 16); +} +.icon_em.client-apply { + background-position: calc(-352em / 16) calc(0em / 16); +} +.icon_em.client-arrow_down { + background-position: calc(-384em / 16) calc(0em / 16); +} +.icon_em.client-arrow_left { + background-position: calc(-416em / 16) calc(0em / 16); +} +.icon_em.client-arrow_right { + background-position: calc(-448em / 16) calc(0em / 16); +} +.icon_em.client-arrow_up { + background-position: calc(-480em / 16) calc(0em / 16); +} +.icon_em.client-away { + background-position: calc(0em / 16) calc(-32em / 16); +} +.icon_em.client-ban_client { + background-position: calc(-32em / 16) calc(-32em / 16); +} +.icon_em.client-ban_list { + background-position: calc(-64em / 16) calc(-32em / 16); +} +.icon_em.client-bookmark_add { + background-position: calc(-96em / 16) calc(-32em / 16); +} +.icon_em.client-bookmark_add_folder { + background-position: calc(-128em / 16) calc(-32em / 16); +} +.icon_em.client-bookmark_duplicate { + background-position: calc(-160em / 16) calc(-32em / 16); +} +.icon_em.client-bookmark_manager { + background-position: calc(-192em / 16) calc(-32em / 16); +} +.icon_em.client-bookmark_remove { + background-position: calc(-224em / 16) calc(-32em / 16); +} +.icon_em.client-broken_image { + background-position: calc(-256em / 16) calc(-32em / 16); +} +.icon_em.client-browse-addon-online { + background-position: calc(-288em / 16) calc(-32em / 16); +} +.icon_em.client-capture { + background-position: calc(-320em / 16) calc(-32em / 16); +} +.icon_em.client-changelog { + background-position: calc(-352em / 16) calc(-32em / 16); +} +.icon_em.client-change_nickname { + background-position: calc(-384em / 16) calc(-32em / 16); +} +.icon_em.client-channel_chat { + background-position: calc(-416em / 16) calc(-32em / 16); +} +.icon_em.client-channel_collapse_all { + background-position: calc(-448em / 16) calc(-32em / 16); +} +.icon_em.client-channel_commander { + background-position: calc(-480em / 16) calc(-32em / 16); +} +.icon_em.client-channel_create { + background-position: calc(0em / 16) calc(-64em / 16); +} +.icon_em.client-channel_create_sub { + background-position: calc(-32em / 16) calc(-64em / 16); +} +.icon_em.client-channel_default { + background-position: calc(-64em / 16) calc(-64em / 16); +} +.icon_em.client-channel_delete { + background-position: calc(-96em / 16) calc(-64em / 16); +} +.icon_em.client-channel_edit { + background-position: calc(-128em / 16) calc(-64em / 16); +} +.icon_em.client-channel_expand_all { + background-position: calc(-160em / 16) calc(-64em / 16); +} +.icon_em.client-channel_green { + background-position: calc(-192em / 16) calc(-64em / 16); +} +.icon_em.client-channel_green_subscribed { + background-position: calc(-224em / 16) calc(-64em / 16); +} +.icon_em.client-channel_private { + background-position: calc(-256em / 16) calc(-64em / 16); +} +.icon_em.client-channel_red { + background-position: calc(-288em / 16) calc(-64em / 16); +} +.icon_em.client-channel_red_subscribed { + background-position: calc(-320em / 16) calc(-64em / 16); +} +.icon_em.client-channel_switch { + background-position: calc(-352em / 16) calc(-64em / 16); +} +.icon_em.client-channel_unsubscribed { + background-position: calc(-384em / 16) calc(-64em / 16); +} +.icon_em.client-channel_yellow { + background-position: calc(-416em / 16) calc(-64em / 16); +} +.icon_em.client-channel_yellow_subscribed { + background-position: calc(-448em / 16) calc(-64em / 16); +} +.icon_em.client-check_update { + background-position: calc(-480em / 16) calc(-64em / 16); +} +.icon_em.client-client_hide { + background-position: calc(0em / 16) calc(-96em / 16); +} +.icon_em.client-client_show { + background-position: calc(-32em / 16) calc(-96em / 16); +} +.icon_em.client-close_button { + background-position: calc(-64em / 16) calc(-96em / 16); +} +.icon_em.client-complaint_list { + background-position: calc(-96em / 16) calc(-96em / 16); +} +.icon_em.client-conflict-icon { + background-position: calc(-128em / 16) calc(-96em / 16); +} +.icon_em.client-connect { + background-position: calc(-160em / 16) calc(-96em / 16); +} +.icon_em.client-contact { + background-position: calc(-192em / 16) calc(-96em / 16); +} +.icon_em.client-copy { + background-position: calc(-224em / 16) calc(-96em / 16); +} +.icon_em.client-copy_url { + background-position: calc(-256em / 16) calc(-96em / 16); +} +.icon_em.client-default { + background-position: calc(-288em / 16) calc(-96em / 16); +} +.icon_em.client-default_for_all_bookmarks { + background-position: calc(-320em / 16) calc(-96em / 16); +} +.icon_em.client-delete { + background-position: calc(-352em / 16) calc(-96em / 16); +} +.icon_em.client-delete_avatar { + background-position: calc(-384em / 16) calc(-96em / 16); +} +.icon_em.client-disconnect { + background-position: calc(-416em / 16) calc(-96em / 16); +} +.icon_em.client-down { + background-position: calc(-448em / 16) calc(-96em / 16); +} +.icon_em.client-download { + background-position: calc(-480em / 16) calc(-96em / 16); +} +.icon_em.client-edit { + background-position: calc(0em / 16) calc(-128em / 16); +} +.icon_em.client-edit_friend_foe_status { + background-position: calc(-32em / 16) calc(-128em / 16); +} +.icon_em.client-emoticon { + background-position: calc(-64em / 16) calc(-128em / 16); +} +.icon_em.client-error { + background-position: calc(-96em / 16) calc(-128em / 16); +} +.icon_em.client-file_home { + background-position: calc(-128em / 16) calc(-128em / 16); +} +.icon_em.client-file_refresh { + background-position: calc(-160em / 16) calc(-128em / 16); +} +.icon_em.client-filetransfer { + background-position: calc(-192em / 16) calc(-128em / 16); +} +.icon_em.client-find { + background-position: calc(-224em / 16) calc(-128em / 16); +} +.icon_em.client-folder { + background-position: calc(-256em / 16) calc(-128em / 16); +} +.icon_em.client-folder_up { + background-position: calc(-288em / 16) calc(-128em / 16); +} +.icon_em.client-group_100 { + background-position: calc(-320em / 16) calc(-128em / 16); +} +.icon_em.client-group_200 { + background-position: calc(-352em / 16) calc(-128em / 16); +} +.icon_em.client-group_300 { + background-position: calc(-384em / 16) calc(-128em / 16); +} +.icon_em.client-group_500 { + background-position: calc(-416em / 16) calc(-128em / 16); +} +.icon_em.client-group_600 { + background-position: calc(-448em / 16) calc(-128em / 16); +} +.icon_em.client-guisetup { + background-position: calc(-480em / 16) calc(-128em / 16); +} +.icon_em.client-hardware_input_muted { + background-position: calc(0em / 16) calc(-160em / 16); +} +.icon_em.client-hardware_output_muted { + background-position: calc(-32em / 16) calc(-160em / 16); +} +.icon_em.client-hoster_button { + background-position: calc(-64em / 16) calc(-160em / 16); +} +.icon_em.client-hotkeys { + background-position: calc(-96em / 16) calc(-160em / 16); +} +.icon_em.client-icon-pack { + background-position: calc(-128em / 16) calc(-160em / 16); +} +.icon_em.client-iconsview { + background-position: calc(-160em / 16) calc(-160em / 16); +} +.icon_em.client-iconviewer { + background-position: calc(-192em / 16) calc(-160em / 16); +} +.icon_em.client-identity_default { + background-position: calc(-224em / 16) calc(-160em / 16); +} +.icon_em.client-identity_export { + background-position: calc(-256em / 16) calc(-160em / 16); +} +.icon_em.client-identity_import { + background-position: calc(-288em / 16) calc(-160em / 16); +} +.icon_em.client-identity_manager { + background-position: calc(-320em / 16) calc(-160em / 16); +} +.icon_em.client-info { + background-position: calc(-352em / 16) calc(-160em / 16); +} +.icon_em.client-input_muted { + background-position: calc(-384em / 16) calc(-160em / 16); +} +.icon_em.client-input_muted_local { + background-position: calc(-416em / 16) calc(-160em / 16); +} +.icon_em.client-invite_buddy { + background-position: calc(-448em / 16) calc(-160em / 16); +} +.icon_em.client-is_talker { + background-position: calc(-480em / 16) calc(-160em / 16); +} +.icon_em.client-kick_channel { + background-position: calc(0em / 16) calc(-192em / 16); +} +.icon_em.client-kick_server { + background-position: calc(-32em / 16) calc(-192em / 16); +} +.icon_em.client-listview { + background-position: calc(-64em / 16) calc(-192em / 16); +} +.icon_em.client-loading_image { + background-position: calc(-96em / 16) calc(-192em / 16); +} +.icon_em.client-message_incoming { + background-position: calc(-128em / 16) calc(-192em / 16); +} +.icon_em.client-message_info { + background-position: calc(-160em / 16) calc(-192em / 16); +} +.icon_em.client-message_outgoing { + background-position: calc(-192em / 16) calc(-192em / 16); +} +.icon_em.client-messages { + background-position: calc(-224em / 16) calc(-192em / 16); +} +.icon_em.client-moderated { + background-position: calc(-256em / 16) calc(-192em / 16); +} +.icon_em.client-move_client_to_own_channel { + background-position: calc(-288em / 16) calc(-192em / 16); +} +.icon_em.client-music { + background-position: calc(-320em / 16) calc(-192em / 16); +} +.icon_em.client-new_chat { + background-position: calc(-352em / 16) calc(-192em / 16); +} +.icon_em.client-notifications { + background-position: calc(-384em / 16) calc(-192em / 16); +} +.icon_em.client-offline_messages { + background-position: calc(-416em / 16) calc(-192em / 16); +} +.icon_em.client-on_whisperlist { + background-position: calc(-448em / 16) calc(-192em / 16); +} +.icon_em.client-output_muted { + background-position: calc(-480em / 16) calc(-192em / 16); +} +.icon_em.client-permission_channel { + background-position: calc(0em / 16) calc(-224em / 16); +} +.icon_em.client-permission_client { + background-position: calc(-32em / 16) calc(-224em / 16); +} +.icon_em.client-permission_overview { + background-position: calc(-64em / 16) calc(-224em / 16); +} +.icon_em.client-permission_server_groups { + background-position: calc(-96em / 16) calc(-224em / 16); +} +.icon_em.client-phoneticsnickname { + background-position: calc(-128em / 16) calc(-224em / 16); +} +.icon_em.client-ping_1 { + background-position: calc(-160em / 16) calc(-224em / 16); +} +.icon_em.client-ping_2 { + background-position: calc(-192em / 16) calc(-224em / 16); +} +.icon_em.client-ping_3 { + background-position: calc(-224em / 16) calc(-224em / 16); +} +.icon_em.client-ping_4 { + background-position: calc(-256em / 16) calc(-224em / 16); +} +.icon_em.client-ping_calculating { + background-position: calc(-288em / 16) calc(-224em / 16); +} +.icon_em.client-ping_disconnected { + background-position: calc(-320em / 16) calc(-224em / 16); +} +.icon_em.client-play { + background-position: calc(-352em / 16) calc(-224em / 16); +} +.icon_em.client-player_chat { + background-position: calc(-384em / 16) calc(-224em / 16); +} +.icon_em.client-player_commander_off { + background-position: calc(-416em / 16) calc(-224em / 16); +} +.icon_em.client-player_commander_on { + background-position: calc(-448em / 16) calc(-224em / 16); +} +.icon_em.client-player_off { + background-position: calc(-480em / 16) calc(-224em / 16); +} +.icon_em.client-player_on { + background-position: calc(0em / 16) calc(-256em / 16); +} +.icon_em.client-player_whisper { + background-position: calc(-32em / 16) calc(-256em / 16); +} +.icon_em.client-plugins { + background-position: calc(-64em / 16) calc(-256em / 16); +} +.icon_em.client-poke { + background-position: calc(-96em / 16) calc(-256em / 16); +} +.icon_em.client-present { + background-position: calc(-128em / 16) calc(-256em / 16); +} +.icon_em.client-recording_start { + background-position: calc(-160em / 16) calc(-256em / 16); +} +.icon_em.client-recording_stop { + background-position: calc(-192em / 16) calc(-256em / 16); +} +.icon_em.client-refresh { + background-position: calc(-224em / 16) calc(-256em / 16); +} +.icon_em.client-register { + background-position: calc(-256em / 16) calc(-256em / 16); +} +.icon_em.client-reload { + background-position: calc(-288em / 16) calc(-256em / 16); +} +.icon_em.client-remove_foe { + background-position: calc(-320em / 16) calc(-256em / 16); +} +.icon_em.client-remove_friend { + background-position: calc(-352em / 16) calc(-256em / 16); +} +.icon_em.client-security { + background-position: calc(-384em / 16) calc(-256em / 16); +} +.icon_em.client-selectfolder { + background-position: calc(-416em / 16) calc(-256em / 16); +} +.icon_em.client-send_complaint { + background-position: calc(-448em / 16) calc(-256em / 16); +} +.icon_em.client-server_green { + background-position: calc(-480em / 16) calc(-256em / 16); +} +.icon_em.client-server_log { + background-position: calc(0em / 16) calc(-288em / 16); +} +.icon_em.client-server_query { + background-position: calc(-32em / 16) calc(-288em / 16); +} +.icon_em.client-settings { + background-position: calc(-64em / 16) calc(-288em / 16); +} +.icon_em.client-sort_by_name { + background-position: calc(-96em / 16) calc(-288em / 16); +} +.icon_em.client-soundpack { + background-position: calc(-128em / 16) calc(-288em / 16); +} +.icon_em.client-sound-pack { + background-position: calc(-160em / 16) calc(-288em / 16); +} +.icon_em.client-stop { + background-position: calc(-192em / 16) calc(-288em / 16); +} +.icon_em.client-subscribe_mode { + background-position: calc(-224em / 16) calc(-288em / 16); +} +.icon_em.client-subscribe_to_all_channels { + background-position: calc(-256em / 16) calc(-288em / 16); +} +.icon_em.client-subscribe_to_channel { + background-position: calc(-288em / 16) calc(-288em / 16); +} +.icon_em.client-subscribe_to_channel_family { + background-position: calc(-320em / 16) calc(-288em / 16); +} +.icon_em.client-switch_advanced { + background-position: calc(-352em / 16) calc(-288em / 16); +} +.icon_em.client-switch_standard { + background-position: calc(-384em / 16) calc(-288em / 16); +} +.icon_em.client-sync-disable { + background-position: calc(-416em / 16) calc(-288em / 16); +} +.icon_em.client-sync-enable { + background-position: calc(-448em / 16) calc(-288em / 16); +} +.icon_em.client-sync-icon { + background-position: calc(-480em / 16) calc(-288em / 16); +} +.icon_em.client-tab_close_button { + background-position: calc(0em / 16) calc(-320em / 16); +} +.icon_em.client-talk_power_grant { + background-position: calc(-32em / 16) calc(-320em / 16); +} +.icon_em.client-talk_power_grant_next { + background-position: calc(-64em / 16) calc(-320em / 16); +} +.icon_em.client-talk_power_request { + background-position: calc(-96em / 16) calc(-320em / 16); +} +.icon_em.client-talk_power_request_cancel { + background-position: calc(-128em / 16) calc(-320em / 16); +} +.icon_em.client-talk_power_revoke { + background-position: calc(-160em / 16) calc(-320em / 16); +} +.icon_em.client-talk_power_revoke_all_grant_next { + background-position: calc(-192em / 16) calc(-320em / 16); +} +.icon_em.client-temp_server_password { + background-position: calc(-224em / 16) calc(-320em / 16); +} +.icon_em.client-temp_server_password_add { + background-position: calc(-256em / 16) calc(-320em / 16); +} +.icon_em.client-textformat { + background-position: calc(-288em / 16) calc(-320em / 16); +} +.icon_em.client-textformat_bold { + background-position: calc(-320em / 16) calc(-320em / 16); +} +.icon_em.client-textformat_foreground { + background-position: calc(-352em / 16) calc(-320em / 16); +} +.icon_em.client-textformat_italic { + background-position: calc(-384em / 16) calc(-320em / 16); +} +.icon_em.client-textformat_underline { + background-position: calc(-416em / 16) calc(-320em / 16); +} +.icon_em.client-theme { + background-position: calc(-448em / 16) calc(-320em / 16); +} +.icon_em.client-toggle_server_query_clients { + background-position: calc(-480em / 16) calc(-320em / 16); +} +.icon_em.client-toggle_whisper { + background-position: calc(0em / 16) calc(-352em / 16); +} +.icon_em.client-token { + background-position: calc(-32em / 16) calc(-352em / 16); +} +.icon_em.client-token_use { + background-position: calc(-64em / 16) calc(-352em / 16); +} +.icon_em.client-translation { + background-position: calc(-96em / 16) calc(-352em / 16); +} +.icon_em.client-unsubscribe_from_all_channels { + background-position: calc(-128em / 16) calc(-352em / 16); +} +.icon_em.client-unsubscribe_from_channel_family { + background-position: calc(-160em / 16) calc(-352em / 16); +} +.icon_em.client-unsubscribe_mode { + background-position: calc(-192em / 16) calc(-352em / 16); +} +.icon_em.client-up { + background-position: calc(-224em / 16) calc(-352em / 16); +} +.icon_em.client-upload { + background-position: calc(-256em / 16) calc(-352em / 16); +} +.icon_em.client-upload_avatar { + background-position: calc(-288em / 16) calc(-352em / 16); +} +.icon_em.client-urlcatcher { + background-position: calc(-320em / 16) calc(-352em / 16); +} +.icon_em.client-user-account { + background-position: calc(-352em / 16) calc(-352em / 16); +} +.icon_em.client-virtualserver_edit { + background-position: calc(-384em / 16) calc(-352em / 16); +} +.icon_em.client-volume { + background-position: calc(-416em / 16) calc(-352em / 16); +} +.icon_em.client-warning { + background-position: calc(-448em / 16) calc(-352em / 16); +} +.icon_em.client-warning_external_link { + background-position: calc(-480em / 16) calc(-352em / 16); +} +.icon_em.client-warning_info { + background-position: calc(0em / 16) calc(-384em / 16); +} +.icon_em.client-warning_question { + background-position: calc(-32em / 16) calc(-384em / 16); +} +.icon_em.client-weblist { + background-position: calc(-64em / 16) calc(-384em / 16); +} +.icon_em.client-whisper { + background-position: calc(-96em / 16) calc(-384em / 16); +} +.icon_em.client-whisperlists { + background-position: calc(-128em / 16) calc(-384em / 16); +} +.icon_em.client-channel_green_subscribed2 { + background-position: calc(-160em / 16) calc(-384em / 16); +} +.icon_em.client-home { + background-position: calc(-192em / 16) calc(-384em / 16); +} \ No newline at end of file diff --git a/shared/generate_voice.py b/shared/generate_voice.py index c14ea389..ed6c7cde 100644 --- a/shared/generate_voice.py +++ b/shared/generate_voice.py @@ -1,8 +1,14 @@ """ This should be executed with python 2.7 (because of pydub) + +Used voice: UK-Graham """ import os +import os.path +import string +import base64 +import sys import requests import json import csv @@ -12,7 +18,8 @@ from pydub import AudioSegment TARGET_DIRECTORY = "audio/speech" SOURCE_FILE = "audio/speech_sentences.csv" - +""" +We cant use the automated way because this now requires a security token and the AWS server does bot exists anymore def tts(text, file): voice_id = 4 language_id = 1 @@ -43,33 +50,102 @@ def tts(text, file): sound.export(file, format="wav") os.remove(file + ".mp3") +""" + def main(): - if os.path.exists(TARGET_DIRECTORY): - print("Deleting old speach directory (%s)!" % TARGET_DIRECTORY) - try: - shutil.rmtree(TARGET_DIRECTORY) - except e: - print("Cant delete old dir!") - os.makedirs(TARGET_DIRECTORY) + if False: + if os.path.exists(TARGET_DIRECTORY): + print("Deleting old speach directory (%s)!" % TARGET_DIRECTORY) + try: + shutil.rmtree(TARGET_DIRECTORY) + except e: + print("Cant delete old dir!") + try: + os.makedirs(TARGET_DIRECTORY) + except: + pass + mapping_file = 'audio/speech/mapping.json' mapping = [] + + with open(mapping_file, "r") as fstream: + mapping = json.loads(fstream.read()) + + tts_queue = [] with open(SOURCE_FILE, 'r') as input: reader = csv.reader(filter(lambda row: len(row) != 0 and row[0] != '#', input), delimiter=';', quotechar='#') for row in reader: if len(row) != 2: continue - print("Generating speech for {}: {}".format(row[0], row[1])) - try: - file = "{}.wav".format(row[0]) - tts(row[1], TARGET_DIRECTORY + "/" + file) - mapping.append({'key': row[0], 'file': file}) - except e: - print(e) - print("Failed to generate {}", row[0]) + file = TARGET_DIRECTORY + "/" + "{}.wav".format(row[0]) - with open("audio/speech/mapping.json", "w") as fstream: + _object = filter(lambda e: e["key"] == row[0], mapping) + if len(_object) > 0: + _object = _object[0] + if os.path.exists(TARGET_DIRECTORY + "/" + _object["file"]): + print("Skipping speech generation for {} ({}). File already exists".format(row[0], file)) + continue + + print("Enqueuing speech generation for {} ({}): {}".format(row[0], file, row[1])) + tts_queue.append([row[0], file, row[1]]) + + if len(tts_queue) == 0: + print("No sounds need to be generated!") + return + + print(tts_queue) + print("Please generate HSR file for the following text:") + for entry in tts_queue: + print(entry[2]) + print("") + + print("-" * 30) + print("Enter the HSR file path") + file = "" # /home/wolverindev/Downloads/www.naturalreaders.com.har + while True: + if len(file) > 0: + if os.path.exists(file): + break + print("Invalid file try again") + file = string.strip(sys.stdin.readline()) + print("Testing file {}".format(file)) + + with open(file, "r") as fstream: + data = json.loads(fstream.read()) + entries = data["log"]["entries"] + for entry in entries: + if not entry["request"]["url"].startswith('https://pweb.naturalreaders.com/v0/tts?'): + continue + if not (entry["request"]["method"] == "POST"): + continue + + post_data = json.loads(entry["request"]["postData"]["text"]) + key = post_data["t"] + tts_entry = filter(lambda e: e[2] == key, tts_queue) + if len(tts_entry) == 0: + print("Missing generated speech text handle for: {}".format(key)) + continue + tts_entry = tts_entry[0] + tts_queue.remove(tts_entry) + + print(tts_entry) + with open(tts_entry[1] + ".mp3", "wb") as mp3_tmp: + mp3_tmp.write(base64.decodestring(entry["response"]["content"]["text"])) + mp3_tmp.close() + + sound = AudioSegment.from_mp3(tts_entry[1] + ".mp3") + sound.export(tts_entry[1], format="wav") + os.remove(tts_entry[1] + ".mp3") + + mapping.append({ + 'key': tts_entry[0], + 'file': "{}.wav".format(tts_entry[0]) + }) + + print("FILE DONE!") + with open(mapping_file, "w") as fstream: fstream.write(json.dumps(mapping)) fstream.close() diff --git a/shared/html/index.php b/shared/html/index.php index 4be230a8..3c03dc4b 100644 --- a/shared/html/index.php +++ b/shared/html/index.php @@ -1,46 +1,17 @@
- - - @@ -50,6 +21,7 @@ echo "