diff --git a/ui/js/actions/settings.js b/ui/js/actions/settings.js index 38d489157..3aaf6ad4a 100644 --- a/ui/js/actions/settings.js +++ b/ui/js/actions/settings.js @@ -55,6 +55,10 @@ export function doSetClientSetting(key, value) { export function doGetThemes() { const dir = `${remote.app.getAppPath()}/dist/themes`; + if (!fs.existsSync(dir)) { + return; + } + // Get all .css files const files = readdirSync(dir).filter(file => extname(file) === ".css"); diff --git a/ui/js/component/link/view.jsx b/ui/js/component/link/view.jsx index 6760c6cd3..a30d1a981 100644 --- a/ui/js/component/link/view.jsx +++ b/ui/js/component/link/view.jsx @@ -8,7 +8,6 @@ const Link = props => { style, label, icon, - badge, button, disabled, children, @@ -36,7 +35,6 @@ const Link = props => { {"icon" in props ? : null} {label ? {label} : null} - {"badge" in props ? {badge} : null} ); } diff --git a/ui/scss/_global.scss b/ui/scss/_global.scss deleted file mode 100644 index 34681e5b6..000000000 --- a/ui/scss/_global.scss +++ /dev/null @@ -1,54 +0,0 @@ -@charset "UTF-8"; - -$spacing-vertical: 24px; -$width-page-constrained: 800px; - -@mixin absolute-center() -{ - -} - -@mixin linear-gradient($from-color, $to-color) { - background-color: $to-color; /* Fallback Color */ - background-image: -webkit-linear-gradient(top, $from-color, $to-color); /* Chrome 10+, Saf5.1+, iOS 5+ */ - background-image: -moz-linear-gradient(top, $from-color, $to-color); /* FF3.6 */ - background-image: -ms-linear-gradient(top, $from-color, $to-color); /* IE10 */ - background-image: linear-gradient(top, $from-color, $to-color); -} - -@mixin placeholder { - &::-webkit-input-placeholder {@content} - &:-moz-placeholder {@content} - &:-ms-input-placeholder {@content} -} - -@mixin text-link($color: var(--color-primary), $hover-opacity: 0.70) { - .icon - { - &:first-child { - padding-right: 5px; - } - &:last-child:not(:only-child) { - padding-left: 5px; - } - } - - &:not(.no-underline) { - text-decoration: underline; - .icon { - text-decoration: none; - } - } - &:hover - { - opacity: $hover-opacity; - transition: opacity var(--transition-duration) var(--transition-type); - text-decoration: underline; - .icon { - text-decoration: none; - } - } - - color: $color; - cursor: pointer; -} diff --git a/ui/scss/_gui.scss b/ui/scss/_gui.scss index 6d746f0f2..0f4b13be5 100644 --- a/ui/scss/_gui.scss +++ b/ui/scss/_gui.scss @@ -1,5 +1,3 @@ -@import "global"; - html { height: 100%; @@ -24,14 +22,6 @@ body background: var(--window-bg); } -.badge -{ - background: var(--color-money); - display: inline-block; - padding: 2px; - color: white; - border-radius: 2px; -} .credit-amount--indicator { font-weight: bold; diff --git a/ui/scss/_icons.scss b/ui/scss/_icons.scss index cb487975b..329b65566 100644 --- a/ui/scss/_icons.scss +++ b/ui/scss/_icons.scss @@ -1,5 +1,3 @@ -@import "global"; - @font-face { font-family: 'FontAwesome'; src: url('../font/fontawesome-webfont.eot?v=4.7.0'); diff --git a/ui/scss/_vars.scss b/ui/scss/_vars.scss index 16ac4b569..0a86d1d76 100644 --- a/ui/scss/_vars.scss +++ b/ui/scss/_vars.scss @@ -1,4 +1,9 @@ -@import "global"; +/* +Both of these should probably die and become variables as well + */ +$spacing-vertical: 24px; +$width-page-constrained: 800px; +$text-color: #000; :root { @@ -39,7 +44,7 @@ --transition-type: ease; /* Text */ - --text-color: #000; + --text-color: $text-color; --text-help-color: #EEE; --text-max-width: 660px; --text-link-padding: 4px; diff --git a/ui/scss/all.scss b/ui/scss/all.scss index 7dfd15d34..61f636b77 100644 --- a/ui/scss/all.scss +++ b/ui/scss/all.scss @@ -1,3 +1,4 @@ +@charset "UTF-8"; @import "_reset"; @import "_vars"; @import "_icons"; @@ -21,5 +22,4 @@ @import "component/_pagination.scss"; @import "component/_markdown-editor.scss"; @import "page/_developer.scss"; -@import "page/_reward.scss"; @import "page/_show.scss"; diff --git a/ui/scss/component/_button.scss b/ui/scss/component/_button.scss index 5e2c338db..28075c123 100644 --- a/ui/scss/component/_button.scss +++ b/ui/scss/component/_button.scss @@ -1,4 +1,4 @@ -@import "../global"; +@import "../mixin/link.scss"; $button-focus-shift: 12%; diff --git a/ui/scss/component/_card.scss b/ui/scss/component/_card.scss index 5ec826048..d81f408ac 100644 --- a/ui/scss/component/_card.scss +++ b/ui/scss/component/_card.scss @@ -1,5 +1,3 @@ -@import "../global"; - .card { margin-left: auto; margin-right: auto; diff --git a/ui/scss/component/_channel-indicator.scss b/ui/scss/component/_channel-indicator.scss index 8b72bd36d..2e80c096e 100644 --- a/ui/scss/component/_channel-indicator.scss +++ b/ui/scss/component/_channel-indicator.scss @@ -1,4 +1,3 @@ -@import "../global"; .channel-indicator__icon--invalid { color: var(--color-error); diff --git a/ui/scss/component/_file-actions.scss b/ui/scss/component/_file-actions.scss index 88d67bf29..0350dad90 100644 --- a/ui/scss/component/_file-actions.scss +++ b/ui/scss/component/_file-actions.scss @@ -1,4 +1,3 @@ -@import "../global"; .file-actions { diff --git a/ui/scss/component/_file-tile.scss b/ui/scss/component/_file-tile.scss index 7630f5517..7341cc606 100644 --- a/ui/scss/component/_file-tile.scss +++ b/ui/scss/component/_file-tile.scss @@ -1,4 +1,3 @@ -@import "../global"; $height-file-tile: $spacing-vertical * 6; .file-tile__row { diff --git a/ui/scss/component/_form-field.scss b/ui/scss/component/_form-field.scss index 7fc276ddd..f3d46befd 100644 --- a/ui/scss/component/_form-field.scss +++ b/ui/scss/component/_form-field.scss @@ -1,4 +1,9 @@ -@import "../global"; + +@mixin placeholder { + &::-webkit-input-placeholder {@content} + &:-moz-placeholder {@content} + &:-ms-input-placeholder {@content} +} .form-row-submit { @@ -63,7 +68,7 @@ input[type="text"].input-copyable { input[type="search"], input[type="date"] { @include placeholder { - //color: lighten($color-text-dark, 60%); + color: lighten($text-color, 60%); } transition: all var(--transition-duration) var(--transition-type); cursor: pointer; diff --git a/ui/scss/component/_header.scss b/ui/scss/component/_header.scss index ea114dc5d..9428298e2 100644 --- a/ui/scss/component/_header.scss +++ b/ui/scss/component/_header.scss @@ -1,4 +1,3 @@ -@import "../global"; #header { diff --git a/ui/scss/component/_load-screen.scss b/ui/scss/component/_load-screen.scss index 24221c10d..cfd369c95 100644 --- a/ui/scss/component/_load-screen.scss +++ b/ui/scss/component/_load-screen.scss @@ -1,4 +1,3 @@ -@import "../global"; .load-screen { color: white; diff --git a/ui/scss/component/_menu.scss b/ui/scss/component/_menu.scss index 52399bdfb..19af2af66 100644 --- a/ui/scss/component/_menu.scss +++ b/ui/scss/component/_menu.scss @@ -1,4 +1,3 @@ -@import "../global"; $border-radius-menu: 2px; diff --git a/ui/scss/component/_modal.scss b/ui/scss/component/_modal.scss index 7140e6cf8..cb664e4c1 100644 --- a/ui/scss/component/_modal.scss +++ b/ui/scss/component/_modal.scss @@ -1,4 +1,3 @@ -@import "../global"; .modal-overlay, .error-modal-overlay { position: fixed; diff --git a/ui/scss/component/_notice.scss b/ui/scss/component/_notice.scss index b77ba2a5a..112658987 100644 --- a/ui/scss/component/_notice.scss +++ b/ui/scss/component/_notice.scss @@ -1,4 +1,3 @@ -@import "../global"; .notice { padding: 10px 20px; diff --git a/ui/scss/component/_pagination.scss b/ui/scss/component/_pagination.scss index 6ea2a14c6..4851f366a 100644 --- a/ui/scss/component/_pagination.scss +++ b/ui/scss/component/_pagination.scss @@ -1,4 +1,3 @@ -@import "../global"; .pagination { display: block; diff --git a/ui/scss/component/_snack-bar.scss b/ui/scss/component/_snack-bar.scss index 5be3e1c6d..acc9f98a6 100644 --- a/ui/scss/component/_snack-bar.scss +++ b/ui/scss/component/_snack-bar.scss @@ -1,4 +1,3 @@ -@import "../global"; $padding-snack-horizontal: $spacing-vertical; diff --git a/ui/scss/component/_table.scss b/ui/scss/component/_table.scss index 98cb50664..2e2b664a1 100644 --- a/ui/scss/component/_table.scss +++ b/ui/scss/component/_table.scss @@ -1,4 +1,3 @@ -@import "../global"; table.table-standard { word-wrap: break-word; diff --git a/ui/scss/component/_tooltip.scss b/ui/scss/component/_tooltip.scss index 18b3d92c3..58889f657 100644 --- a/ui/scss/component/_tooltip.scss +++ b/ui/scss/component/_tooltip.scss @@ -1,4 +1,4 @@ -@import "../global"; +@import "../mixin/link.scss"; .tooltip { position: relative; diff --git a/ui/scss/component/_video.scss b/ui/scss/component/_video.scss index 20d5b7572..46cd07eee 100644 --- a/ui/scss/component/_video.scss +++ b/ui/scss/component/_video.scss @@ -1,4 +1,3 @@ -@import "../global"; $height-video-embedded: $width-page-constrained * 9 / 16; diff --git a/ui/scss/mixin/link.scss b/ui/scss/mixin/link.scss new file mode 100644 index 000000000..ae6e752da --- /dev/null +++ b/ui/scss/mixin/link.scss @@ -0,0 +1,30 @@ +@mixin text-link($color: var(--color-primary), $hover-opacity: 0.70) { + .icon + { + &:first-child { + padding-right: 5px; + } + &:last-child:not(:only-child) { + padding-left: 5px; + } + } + + &:not(.no-underline) { + text-decoration: underline; + .icon { + text-decoration: none; + } + } + &:hover + { + opacity: $hover-opacity; + transition: opacity var(--transition-duration) var(--transition-type); + text-decoration: underline; + .icon { + text-decoration: none; + } + } + + color: $color; + cursor: pointer; +} diff --git a/ui/scss/page/_reward.scss b/ui/scss/page/_reward.scss deleted file mode 100644 index 5e6180dc5..000000000 --- a/ui/scss/page/_reward.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "../global"; - -.reward-page__details { - //background-color: lighten($color-canvas, 1.5%); -} diff --git a/ui/scss/page/_show.scss b/ui/scss/page/_show.scss index 0dbfea2e0..d52f28381 100644 --- a/ui/scss/page/_show.scss +++ b/ui/scss/page/_show.scss @@ -1,5 +1,3 @@ -@import "../global"; - .show-page-media { text-align: center; margin-bottom: $spacing-vertical;