diff --git a/app/assets/javascripts/discourse/templates/composer.hbs b/app/assets/javascripts/discourse/templates/composer.hbs index 4e75418d926..2856970e894 100644 --- a/app/assets/javascripts/discourse/templates/composer.hbs +++ b/app/assets/javascripts/discourse/templates/composer.hbs @@ -85,19 +85,26 @@ {{popup-input-tip validation=view.replyValidation shownAt=view.showReplyTip}} -
-
-
-
- {{{model.toggleText}}} -
- {{loading-spinner size="small"}} {{i18n 'upload_selector.uploading'}} {{view.uploadProgress}}% {{i18n 'cancel'}} + {{#unless site.mobileView}} +
+
+ {{/unless}} +
{{#if site.mobileView}} - {{i18n 'upload'}} + {{#unless view.isUploading}} + {{i18n 'upload'}} + {{/unless}} + {{else}} + {{{model.toggleText}}} {{/if}} -
+ {{#if view.isUploading}} +
+ {{loading-spinner size="small"}} {{i18n 'upload_selector.uploading'}} {{view.uploadProgress}}% {{fa-icon "times"}} +
+ {{/if}} +
{{model.draftStatus}}
diff --git a/app/assets/stylesheets/common/base/compose.scss b/app/assets/stylesheets/common/base/compose.scss index c128d32ccec..2838b2d8902 100644 --- a/app/assets/stylesheets/common/base/compose.scss +++ b/app/assets/stylesheets/common/base/compose.scss @@ -148,6 +148,20 @@ div.ac-wrap { } } +#cancel-file-upload { + font-size: 1.6em; +} + +#draft-status, #file-uploading { + color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%)); +} + +.composer-bottom-right { + .spinner.small { + width: 6px; + height: 6px; + } +} // this removes the topmost margin from the first element in the topic post // if we don't do this, all posts would have extra space at the top @@ -157,3 +171,5 @@ div.ac-wrap { .cooked > *:first-child { margin-top: 0; } + + diff --git a/app/assets/stylesheets/common/base/discourse.scss b/app/assets/stylesheets/common/base/discourse.scss index d8b47398043..7a39495197a 100644 --- a/app/assets/stylesheets/common/base/discourse.scss +++ b/app/assets/stylesheets/common/base/discourse.scss @@ -106,7 +106,7 @@ body { margin: 0 10px 0 10px; } -.message { + .message { @include border-radius-all(8px); background-color: $secondary; padding: 14px; @@ -118,7 +118,8 @@ body { font-size: 1.429em; } } - #footer { + + #footer { .container { height: 50px; .contents { @@ -134,54 +135,51 @@ body { transition:none !important; } -.tip { - display: inline-block; - &.good { - color: $success; - } - &.bad { - color: $danger; - } -} - -input[type].invalid { - background-color: dark-light-choose(scale-color($danger, $lightness: 80%), scale-color($danger, $lightness: -60%)); -} - -.wmd-input { - resize: none; -} - -.pagedown-editor { - width: 540px; - background-color: $secondary; - padding: 0 10px 13px 10px; - border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); - .preview { - margin-top: 8px; - border: 1px dashed dark-light-diff($primary, $secondary, 90%, -60%); - padding: 8px 8px 0 8px; - p { - margin: 0 0 10px 0; + .tip { + display: inline-block; + &.good { + color: $success; + } + &.bad { + color: $danger; } } - .preview.hidden { - display: none; + + input[type].invalid { + background-color: dark-light-choose(scale-color($danger, $lightness: 80%), scale-color($danger, $lightness: -60%)); } -} + .wmd-input { + resize: none; + } -.avatar-wrapper { - background-color: $secondary; - display: inline-block; - border-radius: 50%; -} - -.profiler-results.profiler-left { - top: 60px !important; -} + .pagedown-editor { + width: 540px; + background-color: $secondary; + padding: 0 10px 13px 10px; + border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%); + .preview { + margin-top: 8px; + border: 1px dashed dark-light-diff($primary, $secondary, 90%, -60%); + padding: 8px 8px 0 8px; + p { + margin: 0 0 10px 0; + } + } + .preview.hidden { + display: none; + } + } + .avatar-wrapper { + background-color: $secondary; + display: inline-block; + border-radius: 50%; + } + .profiler-results.profiler-left { + top: 60px !important; + } } .unread-private-messages { diff --git a/app/assets/stylesheets/desktop/compose.scss b/app/assets/stylesheets/desktop/compose.scss index 5fc774c7ac4..55c0d45af11 100644 --- a/app/assets/stylesheets/desktop/compose.scss +++ b/app/assets/stylesheets/desktop/compose.scss @@ -110,7 +110,6 @@ } #draft-status, #file-uploading { right: 51%; - color: $primary; } #file-uploading { font-size: 0.857em; diff --git a/app/assets/stylesheets/mobile/compose.scss b/app/assets/stylesheets/mobile/compose.scss index 987a34cab0f..592fa4b27d4 100644 --- a/app/assets/stylesheets/mobile/compose.scss +++ b/app/assets/stylesheets/mobile/compose.scss @@ -22,26 +22,12 @@ input { #reply-control { // used for upload link .composer-bottom-right { - position: absolute; - bottom: -32px; - right: -5px; - } - .toggle-preview { display:none; } - .preview-wrapper { display:none; } - #mobile-uploader { display: none; } - #draft-status, #file-uploading, .mobile-file-upload { float: right; - margin-right: 8px; + line-height: 3em; } - #file-uploading { - left: 51%; - font-size: 0.857em; - color: scale-color($secondary, $lightness: 50%); - } - #draft-status { - color: dark-light-choose(scale-color($primary, $lightness: 75%), scale-color($secondary, $lightness: 25%)); - } - transition: height 0.4s ease; + #mobile-uploader { display: none; } + #draft-status, #file-uploading, .mobile-file-upload { display: inline-block; } + transition: height .4s ease; width: 100%; z-index: 1039; height: 0;