diff --git a/css/style.scss b/css/style.scss index 94daf5cff62..04c42da0778 100644 --- a/css/style.scss +++ b/css/style.scss @@ -134,7 +134,7 @@ } .icon-file-white { - @include icon-color('file', 'filetypes', $color-white, 1, true); + @include icon-color('text', 'filetypes', $color-white, 1, true); } #app-navigation .favorite-mark { @@ -661,9 +661,52 @@ */ .detailCallInfoContainer, .authorRow { + .room-name-container { + display: flex; + + /* Prevent the room name from overlapping the button to close the + * sidebar. */ + margin-right: 29px; + + a { + opacity: .6; + + &:hover, + &:focus, + &:active { + opacity: 1; + } + + /* The container height is 42px (line height of 30px and bottom + * margin of 12px, both defined for h2 in the server), so clear the + * extra height of the link below the icon; this limits the + * clickable area to 44x44px, as otherwise it was too near the call + * button. */ + margin-bottom: 5px; + + .icon { + display: block; + + width: 44px; + height: 44px; + + background-size: 24px; + + /* Pull up the icon slightly to align it vertically with the + * label, which has a line height of 30px (defined in the + * server). */ + margin-top: -7px; + } + } + } + .room-name { display: block; - margin-right: 29px; + + /* Limit the room name to the container width and prevent it from + * wrapping the full label when using a flex display; this is needed for + * the edit button and the ellipsis in the name to work as expected. */ + overflow: hidden; .label { white-space: nowrap; diff --git a/js/views/callinfoview.js b/js/views/callinfoview.js index e0d79da098d..10cc8de23f7 100644 --- a/js/views/callinfoview.js +++ b/js/views/callinfoview.js @@ -29,7 +29,14 @@ OCA.SpreedMe.Views = OCA.SpreedMe.Views || {}; var TEMPLATE = - '
' + + '
' + + '
' + + ' {{#if isRoomForFile}}' + + ' ' + + ' ' + + ' ' + + ' {{/if}}' + + '
' + '
' + '
' + '{{#if canModerate}}' + @@ -77,7 +84,9 @@ templateContext: function() { var canModerate = this._canModerate(); return $.extend(this.model.toJSON(), { - isGuest: this.model.get('participantType') === 4, + isRoomForFile: this.model.get('objectType') === 'file', + fileLink: OC.generateUrl('/f/{fileId}', { fileId: this.model.get('objectId') }), + fileLinkTitle: t('spreed', 'Go to file'), canModerate: canModerate, canFullModerate: this._canFullModerate(), isPublic: this.model.get('type') === 3, @@ -88,6 +97,7 @@ ui: { 'roomName': 'div.room-name', + 'fileLink': '.file-link', 'shareLinkOptions': '.share-link-options', 'clipboardButton': '.clipboard-button', 'linkCheckbox': '.link-checkbox', @@ -223,6 +233,10 @@ title: (this.model.get('hasPassword')) ? t('spreed', 'Change password') : t('spreed', 'Set password') }); + // Set the body as the container to show the tooltip in front of the + // header. + this.ui.fileLink.tooltip({container: $('body')}); + var self = this; OC.registerMenu($(this.ui.passwordButton), $(this.ui.passwordMenu), function() { $(self.ui.passwordInput).focus();