From 6de87e8b658a203a471af0210b6677d22aef9ebb Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 6 Apr 2022 20:26:37 -0400 Subject: Use panel text instead of text for shoutbox icon --- src/components/shout_panel/shout_panel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/shout_panel/shout_panel.vue') diff --git a/src/components/shout_panel/shout_panel.vue b/src/components/shout_panel/shout_panel.vue index c88797d1..f3e9ff96 100644 --- a/src/components/shout_panel/shout_panel.vue +++ b/src/components/shout_panel/shout_panel.vue @@ -98,7 +98,7 @@ .icon { color: $fallback--text; - color: var(--text, $fallback--text); + color: var(--panelText, $fallback--text); margin-right: 0.5em; } -- cgit v1.2.3-70-g09d2 From 49db16318b8072cf15f2ffd5a8a237ee86034b74 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 26 Apr 2022 18:12:45 +0300 Subject: more fixes for shoutbox --- src/App.js | 2 +- src/App.vue | 2 +- src/components/shout_panel/shout_panel.vue | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) (limited to 'src/components/shout_panel/shout_panel.vue') diff --git a/src/App.js b/src/App.js index 19c58595..f01f8788 100644 --- a/src/App.js +++ b/src/App.js @@ -91,7 +91,7 @@ export default { }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, shoutboxPosition () { - return this.$store.getters.mergedConfig.showNewPostButton || false + return this.$store.getters.mergedConfig.alwaysShowNewPostButton || false }, hideShoutbox () { return this.$store.getters.mergedConfig.hideShoutbox diff --git a/src/App.vue b/src/App.vue index 707b91e5..5b448972 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,7 +47,7 @@ v-if="currentUser && shout && !hideShoutbox" :floating="true" class="floating-shout mobile-hidden" - :class="{ 'left': shoutboxPosition }" + :class="{ '-left': shoutboxPosition }" /> diff --git a/src/components/shout_panel/shout_panel.vue b/src/components/shout_panel/shout_panel.vue index f3e9ff96..1eca88a7 100644 --- a/src/components/shout_panel/shout_panel.vue +++ b/src/components/shout_panel/shout_panel.vue @@ -57,7 +57,7 @@ >
@@ -79,17 +79,17 @@ .floating-shout { position: fixed; - bottom: 0px; + bottom: 0.5em; z-index: 1000; max-width: 25em; -} -.floating-shout.left { - left: 0px; -} + &.-left { + left: 0.5em; + } -.floating-shout:not(.left) { - right: 0px; + &:not(.-left) { + right: 0.5em; + } } .shout-panel { @@ -121,7 +121,7 @@ .shout-message { display: flex; - padding: 0.2em 0.5em + padding: 0.2em 0.5em; } .shout-avatar { @@ -137,6 +137,7 @@ .shout-input { display: flex; + textarea { flex: 1; margin: 0.6em; -- cgit v1.2.3-70-g09d2 From 872db65fd86aaa605789383e629321e32447a997 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 22 Jun 2022 00:30:10 +0300 Subject: slight z-index refactor and attempt at organizing it --- src/App.scss | 9 ++++++++- src/boot/after_store.js | 3 +++ src/components/desktop_nav/desktop_nav.scss | 1 + src/components/emoji_picker/emoji_picker.scss | 3 ++- src/components/global_notice_list/global_notice_list.vue | 2 +- src/components/media_modal/media_modal.vue | 2 +- src/components/mobile_nav/mobile_nav.vue | 6 ++++-- src/components/modal/modal.vue | 5 ++++- src/components/notifications/notifications.js | 10 ++++++++++ src/components/popover/popover.js | 4 ++++ src/components/popover/popover.vue | 4 ++-- src/components/shout_panel/shout_panel.vue | 2 +- src/components/side_drawer/side_drawer.vue | 2 +- 13 files changed, 42 insertions(+), 11 deletions(-) (limited to 'src/components/shout_panel/shout_panel.vue') diff --git a/src/App.scss b/src/App.scss index 79c07683..78835c61 100644 --- a/src/App.scss +++ b/src/App.scss @@ -4,6 +4,13 @@ :root { --navbar-height: 3.5rem; --post-line-height: 1.4; + // Z-Index stuff + --ZI_media_modal: 90000; + --ZI_navbar_popovers: 85000; + --ZI_navbar: 80000; + --ZI_modals_popovers: 75000; + --ZI_modals: 70000; + --ZI_popovers: 60000; } html { @@ -117,7 +124,7 @@ i[class*=icon-], } nav { - z-index: 1000; + z-index: var(--ZI_navbar); color: var(--topBarText); background-color: $fallback--fg; background-color: var(--topBar, $fallback--fg); diff --git a/src/boot/after_store.js b/src/boot/after_store.js index f655c38f..894a68e1 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -396,6 +396,9 @@ const afterStoreSetup = async ({ store, i18n }) => { app.component('FAIcon', FontAwesomeIcon) app.component('FALayers', FontAwesomeLayers) + // remove after vue 3.3 + app.config.unwrapInjectedRef = true + app.mount('#app') return app diff --git a/src/components/desktop_nav/desktop_nav.scss b/src/components/desktop_nav/desktop_nav.scss index 0ca9802e..e9a47632 100644 --- a/src/components/desktop_nav/desktop_nav.scss +++ b/src/components/desktop_nav/desktop_nav.scss @@ -2,6 +2,7 @@ .DesktopNav { width: 100%; + z-index: var(--ZI_navbar); a { color: var(--topBarLink, $fallback--link); diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss index 2055e02e..a2f17c51 100644 --- a/src/components/emoji_picker/emoji_picker.scss +++ b/src/components/emoji_picker/emoji_picker.scss @@ -7,7 +7,8 @@ right: 0; left: 0; margin: 0 !important; - z-index: 100; + // TODO: actually use popover in emoji picker + z-index: var(--ZI_popovers); background-color: $fallback--bg; background-color: var(--popover, $fallback--bg); color: $fallback--link; diff --git a/src/components/global_notice_list/global_notice_list.vue b/src/components/global_notice_list/global_notice_list.vue index ddc45b81..09904761 100644 --- a/src/components/global_notice_list/global_notice_list.vue +++ b/src/components/global_notice_list/global_notice_list.vue @@ -32,7 +32,7 @@ top: 50px; width: 100%; pointer-events: none; - z-index: 1001; + z-index: var(--ZI_popovers); display: flex; flex-direction: column; align-items: center; diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index b93d3d84..d59055b3 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -121,7 +121,7 @@ $modal-view-button-icon-width: 3em; $modal-view-button-icon-margin: 0.5em; .modal-view.media-modal-view { - z-index: 900000; + z-index: var(--ZI_media_modal); flex-direction: column; .modal-view-button-arrow, diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue index d2d48a03..c58d9e7c 100644 --- a/src/components/mobile_nav/mobile_nav.vue +++ b/src/components/mobile_nav/mobile_nav.vue @@ -86,6 +86,8 @@ @import '../../_variables.scss'; .MobileNav { + z-index: var(--ZI_navbar); + .mobile-nav { display: grid; line-height: var(--navbar-height); @@ -147,7 +149,7 @@ transition-property: transform; transition-duration: 0.25s; transform: translateX(0); - z-index: 1001; + z-index: var(--ZI_navbar); -webkit-overflow-scrolling: touch; &.-closed { @@ -160,7 +162,7 @@ display: flex; align-items: center; justify-content: space-between; - z-index: 1; + z-index: calc(var(--ZI_navbar) + 100); width: 100%; height: 50px; line-height: 50px; diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 9394efff..52d8d27e 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -22,6 +22,9 @@ export default { default: false } }, + provide: { + popoversZLayer: 'modals' + }, computed: { classes () { return { @@ -35,7 +38,7 @@ export default {