From 8929a8c7c4aad7a3af1b99de1f256c731abf8695 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Tue, 28 Sep 2021 16:44:33 +0200 Subject: [PATCH 1/2] fix collabora icon color invertion issue in bright theme Signed-off-by: Luka Trovic --- css/viewer.scss | 8 ++++++++ src/view/FilesAppIntegration.js | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/css/viewer.scss b/css/viewer.scss index 434f4eea61..4ecb4c903a 100644 --- a/css/viewer.scss +++ b/css/viewer.scss @@ -21,6 +21,14 @@ background-image: url('../img/x-office-presentation.svg'); } +.icon-collabora { + cursor: pointer; + opacity: 0.6; + &:hover { + opacity: 1; + } +} + .richdocuments-sharing .icon-shared { display: block; width: 16px; diff --git a/src/view/FilesAppIntegration.js b/src/view/FilesAppIntegration.js index cb2a19eacf..ee58fd67b8 100644 --- a/src/view/FilesAppIntegration.js +++ b/src/view/FilesAppIntegration.js @@ -261,7 +261,8 @@ export default { _addHeaderShareButton() { if ($('header').length) { - const $button = $('
') + const isInverted = window.OCA.Theming.inverted + const $button = $('
') $('#richdocuments-header').append($button) $button.on('click', () => { if (!$('#app-sidebar').is(':visible')) { @@ -277,7 +278,8 @@ export default { console.debug('[FilesAppIntegration] Adding header file actions') OC.unregisterMenu($('#richdocuments-actions .icon-more'), $('#richdocuments-actions-menu')) $('#richdocuments-actions').remove() - const actionsContainer = $('
    ') + const isInverted = window.OCA.Theming.inverted + const actionsContainer = $('
      ') const actions = actionsContainer.find('#richdocuments-actions-menu').empty() const getContext = () => ({ From d526b1183ff3f7df4afd76325be532cc87782144 Mon Sep 17 00:00:00 2001 From: Luka Trovic Date: Tue, 5 Oct 2021 11:59:14 +0200 Subject: [PATCH 2/2] fix feedback Signed-off-by: Luka Trovic --- css/viewer.scss | 9 ++++----- src/view/FilesAppIntegration.js | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/css/viewer.scss b/css/viewer.scss index 4ecb4c903a..3c2aeec0e4 100644 --- a/css/viewer.scss +++ b/css/viewer.scss @@ -22,11 +22,10 @@ } .icon-collabora { - cursor: pointer; - opacity: 0.6; - &:hover { - opacity: 1; - } + opacity: 0.6; + &:hover { + opacity: 1; + } } .richdocuments-sharing .icon-shared { diff --git a/src/view/FilesAppIntegration.js b/src/view/FilesAppIntegration.js index ee58fd67b8..0df6418e5c 100644 --- a/src/view/FilesAppIntegration.js +++ b/src/view/FilesAppIntegration.js @@ -261,7 +261,7 @@ export default { _addHeaderShareButton() { if ($('header').length) { - const isInverted = window.OCA.Theming.inverted + const isInverted = Boolean(window?.OCA?.Theming?.inverted) const $button = $('
      ') $('#richdocuments-header').append($button) $button.on('click', () => { @@ -278,7 +278,7 @@ export default { console.debug('[FilesAppIntegration] Adding header file actions') OC.unregisterMenu($('#richdocuments-actions .icon-more'), $('#richdocuments-actions-menu')) $('#richdocuments-actions').remove() - const isInverted = window.OCA.Theming.inverted + const isInverted = Boolean(window?.OCA?.Theming?.inverted) const actionsContainer = $('
        ') const actions = actionsContainer.find('#richdocuments-actions-menu').empty()