From 6dbfad7d9a4e4fd7d5d94f426ed407a9145ffcc5 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Tue, 29 Aug 2017 23:37:38 -0300 Subject: [PATCH] Merge pull request #7944 from RocketChat/fix-embedded [FIX] Broken embedded view layout --- .../client/imports/components/message-box.css | 4 +++ .../client/flexTabBar.html | 34 ++++++++++--------- .../client/flexTabBar.js | 4 +++ .../client/messageBox.html | 32 +++++++++-------- .../client/messageBox.js | 3 ++ 5 files changed, 46 insertions(+), 31 deletions(-) diff --git a/packages/rocketchat-theme/client/imports/components/message-box.css b/packages/rocketchat-theme/client/imports/components/message-box.css index 6137a678148c..f3a63956d623 100644 --- a/packages/rocketchat-theme/client/imports/components/message-box.css +++ b/packages/rocketchat-theme/client/imports/components/message-box.css @@ -6,6 +6,10 @@ font-size: var(--message-box-text-size); + &--embedded { + padding: 12px; + } + &__toolbar-markdown { position: absolute; left: 0; diff --git a/packages/rocketchat-ui-flextab/client/flexTabBar.html b/packages/rocketchat-ui-flextab/client/flexTabBar.html index a9987f0a6a40..e24363c10702 100644 --- a/packages/rocketchat-ui-flextab/client/flexTabBar.html +++ b/packages/rocketchat-ui-flextab/client/flexTabBar.html @@ -1,21 +1,23 @@ diff --git a/packages/rocketchat-ui-flextab/client/flexTabBar.js b/packages/rocketchat-ui-flextab/client/flexTabBar.js index d1de65a4dff0..2d355813b5e4 100644 --- a/packages/rocketchat-ui-flextab/client/flexTabBar.js +++ b/packages/rocketchat-ui-flextab/client/flexTabBar.js @@ -35,6 +35,10 @@ Template.flexTabBar.helpers({ return Object.assign(Template.currentData().data || {}, { tabBar: Template.instance().tabBar }); + }, + + embeddedVersion() { + return RocketChat.Layout.isEmbedded(); } }); diff --git a/packages/rocketchat-ui-message/client/messageBox.html b/packages/rocketchat-ui-message/client/messageBox.html index 989a17801dd2..7d1984543f8d 100644 --- a/packages/rocketchat-ui-message/client/messageBox.html +++ b/packages/rocketchat-ui-message/client/messageBox.html @@ -1,5 +1,5 @@