From 13c9d7e70431c91d03e206e2f04121bc8cb69db7 Mon Sep 17 00:00:00 2001 From: awesomerobot Date: Fri, 4 Sep 2020 22:18:29 -0400 Subject: [PATCH] UX: Add missing labels to mobile composer buttons --- .../discourse/app/components/composer-toggles.js | 5 +++++ .../discourse/app/templates/components/composer-toggles.hbs | 3 ++- app/assets/javascripts/discourse/app/templates/composer.hbs | 6 +++--- config/locales/client.en.yml | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/composer-toggles.js b/app/assets/javascripts/discourse/app/components/composer-toggles.js index ef0f1c99537..16b1773bb15 100644 --- a/app/assets/javascripts/discourse/app/components/composer-toggles.js +++ b/app/assets/javascripts/discourse/app/components/composer-toggles.js @@ -11,6 +11,11 @@ export default Component.extend({ : "composer.collapse"; }, + @discourseComputed("showToolbar") + toggleToolbarTitle(showToolbar) { + return showToolbar ? "composer.hide_toolbar" : "composer.show_toolbar"; + }, + @discourseComputed("composeState") fullscreenTitle(composeState) { return composeState === "draft" diff --git a/app/assets/javascripts/discourse/app/templates/components/composer-toggles.hbs b/app/assets/javascripts/discourse/app/templates/components/composer-toggles.hbs index 09509b0557c..cd4bac7c5cf 100644 --- a/app/assets/javascripts/discourse/app/templates/components/composer-toggles.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/composer-toggles.hbs @@ -5,7 +5,8 @@ {{flat-button class="toggle-toolbar" icon="bars" - action=toggleToolbar}} + action=toggleToolbar + title=toggleToolbarTitle}} {{/if}} {{flat-button diff --git a/app/assets/javascripts/discourse/app/templates/composer.hbs b/app/assets/javascripts/discourse/app/templates/composer.hbs index e8dbfc8fff8..ded30ce02a8 100644 --- a/app/assets/javascripts/discourse/app/templates/composer.hbs +++ b/app/assets/javascripts/discourse/app/templates/composer.hbs @@ -43,7 +43,7 @@ {{/if}} {{/unless}} - {{composer-toggles composeState=model.composeState + {{composer-toggles composeState=model.composeState showToolbar=showToolbar toggleComposer=(action "toggle") toggleToolbar=(action "toggleToolbar") toggleFullscreen=(action "fullscreenComposer")}} @@ -190,12 +190,12 @@ {{#if site.mobileView}} {{#if allowUpload}} - + {{d-icon uploadIcon}} {{/if}} - + {{d-icon "desktop"}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 7454e26609e..f0cec47959d 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1758,7 +1758,6 @@ en: lora: "Lora" mukta: "Mukta" - shortcut_modifier_key: shift: "Shift" ctrl: "Ctrl" @@ -1919,6 +1918,8 @@ en: abandon: "close composer and discard draft" enter_fullscreen: "enter fullscreen composer" exit_fullscreen: "exit fullscreen composer" + show_toolbar: "show composer toolbar" + hide_toolbar: "hide composer toolbar" modal_ok: "OK" modal_cancel: "Cancel" cant_send_pm: "Sorry, you can't send a message to %{username}."