diff --git a/files.php b/files.php index 97b7dd72..f1a703f4 100644 --- a/files.php +++ b/files.php @@ -316,12 +316,50 @@ ] ]; + $CERTACCEPT_FILE_LIST = [ + [ /* html files */ + "type" => "html", + "search-pattern" => "/^([a-zA-Z]+)\.(html|php|json)$/", + "build-target" => "dev|rel", + + "path" => "./popup/certaccept/", + "local-path" => "./shared/popup/certaccept/html/" + ], + [ /* javascript loader (debug) */ + "type" => "js", + "search-pattern" => "/.*\.js$/", + "build-target" => "dev", + + "path" => "./popup/certaccept/loader/", + "local-path" => "./shared/loader/" + ], + [ /* javascript loader for releases */ + "type" => "js", + "search-pattern" => "/.*loader_certaccept.min.js$/", + "build-target" => "rel", + + "path" => "./popup/certaccept/loader/", + "local-path" => "./shared/generated/" + ], + + [ /* javascript for debug */ + "type" => "js", + "search-pattern" => "/^.*\.js$/", + "build-target" => "dev", + + "path" => "./popup/certaccept/js/", + "local-path" => "./shared/js/" + ], + ]; + $APP_FILE_LIST = array_merge( $APP_FILE_LIST_SHARED_SOURCE, $APP_FILE_LIST_SHARED_VENDORS, $APP_FILE_LIST_CLIENT_SOURCE, $APP_FILE_LIST_WEB_SOURCE, - $APP_FILE_LIST_WEB_TEASPEAK + $APP_FILE_LIST_WEB_TEASPEAK, + + $CERTACCEPT_FILE_LIST ); function systemify_path($path) { @@ -472,8 +510,8 @@ $file = new AppFile; $f_info = pathinfo($f_entry); - $file->target_path = systemify_path($entry["path"]) . DIRECTORY_SEPARATOR . $f_info["dirname"] . DIRECTORY_SEPARATOR; - $file->local_path = getcwd() . DIRECTORY_SEPARATOR . systemify_path($entry["local-path"]) . DIRECTORY_SEPARATOR . $f_info["dirname"] . DIRECTORY_SEPARATOR; + $file->target_path = realpath(systemify_path($entry["path"]) . DIRECTORY_SEPARATOR . $f_info["dirname"] . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + $file->local_path = realpath(getcwd() . DIRECTORY_SEPARATOR . systemify_path($entry["local-path"]) . DIRECTORY_SEPARATOR . $f_info["dirname"] . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; $file->name = $f_info["basename"]; $file->type = $entry["type"]; @@ -481,7 +519,7 @@ if(strlen($file->hash) > 0) { foreach ($result as $e) - if($e->hash == $file->hash) goto ignore; + if($e->hash == $file->hash && $e->target_path == $file->target_path) goto ignore; } array_push($result, $file); ignore: diff --git a/shared/css/static/modal-bookmarks.scss b/shared/css/static/modal-bookmarks.scss index 69186daa..867fc894 100644 --- a/shared/css/static/modal-bookmarks.scss +++ b/shared/css/static/modal-bookmarks.scss @@ -1,162 +1,5 @@ -.modal .modal-bookmarks { - padding: 5px; - display: flex; - flex-direction: column; - justify-content: stretch; - - .bookmark-list { - flex-grow: 1; - flex-shrink: 1; - min-height: 75px; - - display: flex; - flex-direction: column; - justify-content: stretch; - - .list { - display: flex; - flex-direction: column; - justify-content: start; - - overflow-y: auto; - - .entry { - flex-grow: 1; - flex-shrink: 1; - - > .name { - cursor: pointer; - } - - &.bookmark { - &.selected { - background-color: #0000FF77; - } - } - - &.directory { - &.selected { - > .name { - background-color: #0000FF77; - } - } - - > .name { - border: 0 solid gray; - border-bottom: 1px solid #ad9d9d33; - } - .members { - margin-left: 15px; - } - } - } - } - } - - .buttons { - flex-grow: 0; - flex-shrink: 0; - - display: flex; - justify-content: space-between; - flex-direction: row; - - margin-top: 5px; - text-align: right; - - button { - margin-left: 5px; - } - - - .button-large { - display: block; - } - - .button-small { - display: none; - } - } - - @media (max-width: 1000px) { - .buttons { - .button-large { - display: none; - } - - .button-small { - display: block; - } - } - } - - .group_box { - flex-shrink: 1; - - .header { - flex-grow: 0; - flex-shrink: 0; - } - - - &.gb-settings { - overflow-y: auto; - } - - &.gb-list { - min-height: 100px; /* 25px header + 75px body */ - } - } - - .bookmark-setting { - .group_box { - margin-top: 5px; - } - - .property { - display: flex; - flex-direction: row; - justify-content: stretch; - - &:not(:first-of-type) { - margin-top: 5px; - } - - input, select, .default-channel-container { - flex-grow: 1; - flex-shrink: 1; - } - - .default-channel-container { - display: flex; - flex-direction: row; - justify-content: stretch; - - button { - margin-left: 5px; - max-width: 120px; - } - } - - .key { - width: 160px; - flex-grow: 0; - flex-shrink: 0; - } - } - - .container-default-channel-select { - display: flex; - flex-direction: row; - justify-content: stretch; - - .container-default-channel { - flex-grow: 1; - flex-shrink: 1; - } - } - } -} +@import "properties"; +@import "mixin"; .modal .modal-bookmark-create { .property { @@ -188,4 +31,437 @@ margin-bottom: 5px; } +} + +.modal-body.modal-bookmarks { + padding: 0!important; + + display: flex; + flex-direction: row!important; + justify-content: stretch!important; + + min-width: 30em!important; + height: 60em; + width: 80em; + + .container-tooltip { + flex-shrink: 0; + flex-grow: 0; + + position: relative; + width: 1.6em; + margin-left: .5em; + font-size: .9em; + + display: flex; + flex-direction: column; + justify-content: center; + + img { + height: 1em; + width: 1em; + + align-self: center; + font-size: 1.2em; + } + + .tooltip { + display: none; + } + } + + .input-boxed { + height: 2em; + } + + .left { + min-width: 12em; + width: 30%; + + flex-grow: 1; + flex-shrink: 1; + + padding: .5em; + background-color: #212125; + + display: flex; + flex-direction: column; + justify-content: stretch; + + .title { + flex-shrink: 0; + flex-grow: 0; + + text-align: center; + + font-size: 1.5em; + color: #557edc; + text-transform: uppercase; + } + + .container-bookmarks { + flex-shrink: 1; + flex-grow: 1; + + min-height: 6em; + + display: flex; + flex-direction: column; + justify-content: stretch; + + overflow: auto; + @include chat-scrollbar-vertical(); + @include chat-scrollbar-horizontal(); + + .bookmark, .directory { + flex-grow: 0; + flex-shrink: 0; + + display: flex; + flex-direction: row; + justify-content: stretch; + + border-radius: $border_radius_middle; + padding: .25em .5em; + + cursor: pointer; + + .icon-container { + flex-grow: 0; + flex-shrink: 0; + + align-self: center; + margin-right: .5em; + } + + .name { + flex-grow: 1; + flex-shrink: 1; + + min-width: 5em; + align-self: center; + } + + &:hover { + background-color: #2c2d2f; + } + + &.selected { + background-color: #1a1a1b; + } + + .link { + flex-grow: 0; + flex-shrink: 0; + + position: relative; + width: 1.5em; + + $line_width: 2px; + $color: hsla(0, 0%, 35%, 1); + &:not(.hidden) { + &:before { + content: ""; + position: absolute; + + height: 2.25em; /* connect with the previous one */ + width: .75em; + + left: .5em; /* icons have a width of 1em */ + bottom: calc(.75em - #{$line_width / 2}); + + border-left: $line_width solid $color; + } + + &.connected { + &:before { + border-bottom: $line_width solid $color; + + border-bottom-left-radius: .3em; + } + } + } + } + } + + .link-start { + .link.connected { + &:before { + height: 1.25em; + } + } + } + + .directory { + .name { + //color: #557edc; + } + } + } + + .buttons { + flex-shrink: 0; + flex-grow: 0; + + display: flex; + flex-direction: row; + justify-content: space-between; + + padding-top: .5em; + + button { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + &:not(:first-of-type) { + margin-left: .5em; + } + } + } + } + + .right { + min-width: 25em; + width: 30%; + + flex-grow: 1; + flex-shrink: 1; + + background-color: #2f2f35; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + .header { + flex-grow: 0; + flex-shrink: 0; + + height: 10em; + + background: url('../../../img/bookmark_background.png'), url('../../img/bookmark_background.png') no-repeat; + + display: flex; + flex-direction: column; + justify-content: flex-end; + + padding: .5em; + + .container-name { + font-size: 2em; + color: #fcfcfc; + } + + .container-address { + font-size: 1.5em; + color: #fcfcfc; + } + } + + .container-settings { + flex-grow: 1; + flex-shrink: 1; + min-height: 10em; + + padding: .5em; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + .group { + padding: .5em; + + border-radius: .2em; + border: 1px solid #1f2122; + + background-color: #28292b; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + > .row { + display: flex; + flex-direction: row; + justify-content: stretch; + + .key { + flex-grow: 0; + flex-shrink: 1; + + width: 15em; + min-width: 2em; + + align-self: center; + + color: #557edc; + + text-transform: uppercase; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .value { + flex-grow: 1; + flex-shrink: 1; + + min-width: 2em; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + &:not(:first-of-type) { + margin-top: 1em; + } + } + + &:not(:first-of-type) { + margin-top: 1em; + } + + &.info { + flex-direction: row; + } + + .container-image { + flex-grow: 0; + flex-shrink: 100; + + max-width: 15em; + max-height: 9em; /* minus one padding */ + width: 15em; + + display: flex; + flex-direction: column; + justify-content: center; + + img { + object-fit: contain; + max-height: 100%; + max-width: 100%; + } + + @include transition(.25s ease-in-out); + } + + .container-properties { + flex-shrink: 1; + flex-grow: 1; + + min-width: 23em; + + display: flex; + flex-direction: column; + justify-content: flex-start; + + height: inherit; + + .row { + flex-grow: 0; + flex-shrink: 0; + + height: 1.8em; + + display: flex; + flex-direction: row; + justify-content: flex-start; + + .key { + flex-shrink: 0; + flex-grow: 0; + + color: #557edc; + text-transform: uppercase; + align-self: center; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + width: 15em; + } + + .value { + color: #d6d6d7; + align-self: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + .server-region { + > div { + display: inline-block; + } + + .country { + margin-right: .25em; + } + } + + .connect-count, .connect-never { + display: inline-block; + + color: #7a3131; + } + } + } + + .container-network { + display: flex; + flex-direction: row; + justify-content: center; + + .container-button { + margin-right: 1em; + + flex-shrink: 1; + min-width: 5em; + + display: flex; + flex-direction: column; + justify-content: flex-end; + + button { + height: 2.5em; + width: 12em; + + max-width: 100%; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + } + + .right { + flex-grow: 1; + } + } + } + } + } + + .buttons { + padding: .5em; + display: flex; + flex-direction: row; + justify-content: flex-end; + + button { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + &:not(:first-of-type) { + margin-left: .5em; + } + } + } + } } \ No newline at end of file diff --git a/shared/css/static/modal-serverinfo.scss b/shared/css/static/modal-serverinfo.scss index c874e944..820743f1 100644 --- a/shared/css/static/modal-serverinfo.scss +++ b/shared/css/static/modal-serverinfo.scss @@ -211,7 +211,7 @@ display: flex; flex-direction: row; - justify-content: flex-end; + justify-content: space-between; button { min-width: 8em; diff --git a/shared/html/index.php b/shared/html/index.php index 0ee6701f..1f67af08 100644 --- a/shared/html/index.php +++ b/shared/html/index.php @@ -14,23 +14,31 @@ - + + + + + + - TeaClient"; + echo "\t\t