From 2c442e728c4e83f2ca031d721c0f187100e851ae Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 1 Aug 2023 20:44:03 +1000 Subject: [PATCH] Fixed editing messages, emoji picker --- src/addons/_icons.scss | 18 ++- src/theme/_vars.scss | 2 +- src/theme/chat/_message.scss | 7 +- src/theme/inputs/_select.scss | 8 +- src/theme/popouts/_emojipicker.scss | 6 +- src/theme/popouts/_menuicons.scss | 172 ---------------------------- src/theme/profile/_popout.scss | 2 +- src/theme/sidebar/_container.scss | 2 +- src/theme/sidebar/_panels.scss | 47 ++++---- 9 files changed, 50 insertions(+), 214 deletions(-) delete mode 100644 src/theme/popouts/_menuicons.scss diff --git a/src/addons/_icons.scss b/src/addons/_icons.scss index d4ce5e9..e500589 100644 --- a/src/addons/_icons.scss +++ b/src/addons/_icons.scss @@ -74,7 +74,7 @@ svg:has(path[d^='M17 11V7C17 4.243']) { mask-image: url(mono.$lock-closed); } - + // Members channel svg:has(path[d^='M14 8.00598C14 10.211 12.206 12.006']) { mask-image: url(mono.$people); @@ -250,7 +250,7 @@ $icons: ( 'user-context-add-friend': mono.$user-add, 'user-context-remove-friend': mono.$user-delete, 'user-context-block': mono.$user-denied, - 'user-context-mute': mono.$speaker-off, + 'user-context-mute': mono.$mic-off, 'user-context-disable-video': mono.$video-off, 'user-context-voice-mute': mono.$mic-off, 'user-context-voice-deafen': mono.$speaker-off, @@ -264,6 +264,7 @@ $icons: ( 'user-context-devmode-copy-id': mono.$copy, 'user-context-add-friend-nickname': mono.$rename, 'user-context-soundboard-sound-mute': mono.$speaker-off, + 'user-context-deafen': mono.$speaker-off, // Settings 'user-settings-cog-My_Account': mono.$user, @@ -293,8 +294,10 @@ $icons: ( 'user-settings-cog-Sessions': mono.$phone-laptop, 'user-settings-cog-Friend_Requests': mono.$user-available, 'user-settings-cog-Activity_Privacy': mono.$shield-check, + 'user-settings-cog-Family_Center': mono.$people, // Channel (right click toolbar) + 'channel-context-mark-channel-read': mono.$eye, 'channel-context-mute-channel': mono.$speaker-off, 'channel-context-copy-channel-topic': mono.$copy, 'channel-context-edit-channel': mono.$pen, @@ -322,6 +325,7 @@ $icons: ( 'guild-header-popout-report-raid': mono.$megaphone, 'guild-header-popout-active-threads': mono.$comment-multi, 'guild-header-popout-insights': mono.$eye, + 'guild-header-popout-hide-muted-channels': mono.$eye, // Server dropdown (right click) 'guild-context-mark-guild-read': mono.$eye, @@ -340,6 +344,8 @@ $icons: ( 'guild-context-create-event': mono.$calendar, // Message more options + 'message-actions-add-reaction-0': mono.$emoji, + 'message-actions-add-reaction-1': mono.$emoji-laugh, 'message-actions-reply': mono.$reply, 'message-actions-mark-unread': mono.$comment-note, 'message-actions-copy-link': mono.$link, @@ -354,9 +360,8 @@ $icons: ( 'account-switch-account': mono.$user-swap ); -.item-5ApiZt:not(#account-status-picker, [role='menuitemcheckbox'], [role='menuitemradio'], .hideInteraction-1vQrZJ) { - .icon-3XHs8t, - .iconContainer-Ksy8Oj:has(.icon-3XHs8t):not(:has(path[d*='M18.625'])) { +.item-5ApiZt:not(#account-status-picker, [role='menuitemradio'], .hideInteraction-1vQrZJ) { + .icon-3XHs8t { display: none !important; } &[role='menuitem'], @@ -369,6 +374,9 @@ $icons: ( background: currentColor; margin-right: 8px; } + & + .layer-2BGhQ8 .item-5ApiZt::before { + content: none; + } &.focused-3qFvc8::before { background: var(--text-primary); } diff --git a/src/theme/_vars.scss b/src/theme/_vars.scss index 9433b50..9604443 100644 --- a/src/theme/_vars.scss +++ b/src/theme/_vars.scss @@ -1,5 +1,5 @@ :root { - --fluent-version: '1.1.3'; + --fluent-version: '1.1.4'; --transition: cubic-bezier(0, 0, 0, 1); diff --git a/src/theme/chat/_message.scss b/src/theme/chat/_message.scss index 4e94a19..b4640e1 100644 --- a/src/theme/chat/_message.scss +++ b/src/theme/chat/_message.scss @@ -1,7 +1,7 @@ @use '../mixins'; #app-mount { - .message-2CShn3.selected-2LX7Jy.cozyMessage-1DWF9U .contents-2MsGLg { + .message-2CShn3:has(.channelTextArea-1VQBuV).cozyMessage-1DWF9U .contents-2MsGLg { display: block; width: 100%; background: var(--bg-content); @@ -19,9 +19,12 @@ .inner-NQg18Y::before { content: none; } + .buttons-uaqb-5 { + height: auto; + } } .operations-3q3u6E { - padding: 12px; + padding: 8px 16px 16px 16px; } .mentioned-Tre-dv { background: rgb(var(--chat-mention-colour), 0.05); diff --git a/src/theme/inputs/_select.scss b/src/theme/inputs/_select.scss index 71a2911..8ad0edf 100644 --- a/src/theme/inputs/_select.scss +++ b/src/theme/inputs/_select.scss @@ -1,7 +1,7 @@ @use '../mixins'; #app-mount { - .select-1Ia3hD { + .select-Zz0IcO { background: var(--btn-bg); font-weight: var(--font-weight-regular); color: var(--text-normal); @@ -30,7 +30,7 @@ } } - .popout-1KHNAq { + .popout-15UxD6 { background: var(--bg-menu); border-radius: var(--rounded); border: 1px solid var(--border); @@ -42,7 +42,7 @@ gap: 4px; max-height: 350px !important; } - .option-2eIyOn { + .option-Uc12mm { border-radius: var(--rounded); font-size: var(--font-size-sm); padding: 10px 14px; @@ -68,7 +68,7 @@ } } } - .selectedIcon-19TbzU { + .selectedIcon-122rMx { display: none; } .optionLabel-1h0MHL { diff --git a/src/theme/popouts/_emojipicker.scss b/src/theme/popouts/_emojipicker.scss index 4b6c955..336f022 100644 --- a/src/theme/popouts/_emojipicker.scss +++ b/src/theme/popouts/_emojipicker.scss @@ -4,12 +4,14 @@ border-radius: var(--rounded); border: 1px solid var(--border-high); box-shadow: var(--shadow-flyout); - grid-template-rows: 40px auto; padding-top: 4px; + border-bottom: 1px solid var(--border-high); [class^='header-']:not([aria-expanded]) { - border-bottom: 1px solid var(--border-high); box-shadow: none; } + &:has(.nav-1zWVQw) { + grid-template-rows: 40px auto; + } } .inspector-DFKXwB { border-top: 1px solid var(--border-high); diff --git a/src/theme/popouts/_menuicons.scss b/src/theme/popouts/_menuicons.scss deleted file mode 100644 index 04acf66..0000000 --- a/src/theme/popouts/_menuicons.scss +++ /dev/null @@ -1,172 +0,0 @@ -@use '../assets/mono'; -@use '../assets/brand'; -@use 'sass:list'; - -// Icons -$icons: ( - // Messages - 'message-edit': mono.$pen, - 'message-actions-edit': mono.$pen, - 'message-actions-pin': mono.$pin, - 'message-pin': mono.$pin, - 'message-reply': mono.$reply, - 'message-actions-thread': mono.$comment-multi, - 'message-thread': mono.$comment-multi, - 'message-mark-unread': mono.$comment-dismiss, - 'message-copy-link': mono.$link, - 'message-copy-text': mono.$text, - 'message-tts': mono.$speaker, - 'message-actions-delete': (mono.$delete, 'danger'), - 'message-delete': (mono.$delete, 'danger'), - 'message-devmode-copy-id': mono.$copy, - 'message-report': mono.$megaphone, - - // User - 'user-context-mark-channel-read': mono.$eye, - 'user-context-user-profile': mono.$user, - 'user-context-mention': mono.$chat, - 'user-context-message-user': mono.$comment, - 'user-context-call': mono.$call, - 'user-context-note': mono.$note, - 'user-context-close-dm': mono.$comment-dismiss, - 'user-context-change-nickname': mono.$rename, - 'user-context-invite-to-server': mono.$plus, - 'user-context-add-friend': mono.$user-add, - 'user-context-remove-friend': mono.$user-delete, - 'user-context-block': mono.$user-denied, - 'user-context-mute': mono.$speaker-off, - 'user-context-disable-video': mono.$video-off, - 'user-context-voice-mute': mono.$mic-off, - 'user-context-voice-deafen': mono.$speaker-off, - 'user-context-timeout': (mono.$timer-off, 'danger'), - 'user-context-voice-disconnect': (mono.$disconnect, 'danger'), - 'user-context-kick': (mono.$user-delete, 'danger'), - 'user-context-ban': (mono.$user-denied, 'danger'), - 'user-context-roles': mono.$tag, - 'user-context-mute-channel': mono.$speaker-off, - 'user-context-voice-move': mono.$move, - 'user-context-devmode-copy-id': mono.$copy, - 'user-context-add-friend-nickname': mono.$rename, - 'user-context-soundboard-sound-mute': mono.$speaker-off, - - // Settings - 'user-settings-cog-My_Account': mono.$user, - 'user-settings-cog-Profile_Customization': mono.$user-question, - 'user-settings-cog-Privacy___Safety': mono.$shield-lock, - 'user-settings-cog-Authorized_Apps': mono.$apps, - 'user-settings-cog-Connections': mono.$link, - 'user-settings-cog-Discord_Nitro': brand.$discord-nitro, - 'user-settings-cog-Nitro_Server_Boost': mono.$rocket, - 'user-settings-cog-Subscriptions': mono.$credit-user, - 'user-settings-cog-Library_Inventory': mono.$gift, - 'user-settings-cog-Billing': mono.$money-recepit, - 'user-settings-cog-Appearance': mono.$eye, - 'user-settings-cog-Accessibility': mono.$accessibility, - 'user-settings-cog-Voice___Video': mono.$mic, - 'user-settings-cog-Text___Images': mono.$chat, - 'user-settings-cog-Notifications': mono.$bell, - 'user-settings-cog-Keybinds': mono.$keyboard, - 'user-settings-cog-Language': mono.$language, - 'user-settings-cog-Windows': brand.$windows, - 'user-settings-cog-Streamer_Mode': mono.$live, - 'user-settings-cog-Advanced': mono.$cog, - 'user-settings-cog-Game_Activity': mono.$rss, - 'user-settings-cog-Overlay': mono.$overlay, - 'user-settings-cog-changelog': mono.$document-clock, - 'user-settings-cog-Hypesquad_Online': mono.$star, - 'user-settings-cog-Sessions': mono.$phone-laptop, - 'user-settings-cog-Friend_Requests': mono.$user-available, - 'user-settings-cog-Activity_Privacy': mono.$shield-check, - - // Channel (right click toolbar) - 'channel-context-mute-channel': mono.$speaker-off, - 'channel-context-copy-channel-topic': mono.$copy, - 'channel-context-edit-channel': mono.$pen, - 'channel-context-invite-people': mono.$user-add, - 'channel-context-clone-channel': mono.$save-copy, - 'channel-context-create-text-channel': mono.$text, - 'channel-context-create-voice-channel': mono.$mic, - 'channel-context-delete-channel': mono.$delete, - 'channel-context-channel-notifications': mono.$bell, - 'channel-context-channel-copy-link': mono.$link, - 'channel-context-devmode-copy-id': mono.$copy, - - // Server dropdown (left click) - 'guild-header-popout-premium-subscribe': mono.$rocket, - 'guild-header-popout-invite-people': mono.$user-add, - 'guild-header-popout-settings': mono.$cog, - 'guild-header-popout-create-channel': mono.$collection, - 'guild-header-popout-create-category': mono.$collection-add, - 'guild-header-popout-create-event': mono.$calendar, - 'guild-header-popout-notifications': mono.$bell, - 'guild-header-popout-privacy': mono.$shield-check, - 'guild-header-popout-change-nickname': mono.$pen, - 'guild-header-popout-leave': mono.$sign-out, - 'guild-header-popout-application-directory': mono.$app-store, - 'guild-header-popout-report-raid': mono.$megaphone, - 'guild-header-popout-active-threads': mono.$comment-multi, - 'guild-header-popout-insights': mono.$eye, - - // Server dropdown (right click) - 'guild-context-mark-guild-read': mono.$eye, - 'guild-context-invite-people': mono.$user-add, - 'guild-context-unmute-guild': mono.$speaker-off, - 'guild-context-mute-guild': mono.$speaker-off, - 'guild-context-guild-notifications': mono.$bell, - 'guild-context-hide-muted-channels': mono.$eye, - 'guild-context-guild-settings': mono.$cog, - 'guild-context-privacy': mono.$shield-check, - 'guild-context-change-nickname': mono.$pen, - 'guild-context-leave-guild': mono.$sign-out, - 'guild-context-devmode-copy-id': mono.$copy, - 'guild-context-create-channel': mono.$collection, - 'guild-context-create-category': mono.$collection-add, - 'guild-context-create-event': mono.$calendar, - - // Message more options - 'message-actions-reply': mono.$reply, - 'message-actions-mark-unread': mono.$comment-note, - 'message-actions-copy-link': mono.$link, - 'message-actions-tts': mono.$speaker, - 'message-actions-copy-id': mono.$copy, - 'message-actions-copy-text': mono.$copy, - 'message-actions-report': mono.$megaphone, - 'message-actions-devmode-copy-id': mono.$copy, - - // Current User / Status picker - 'account-set-custom-status': mono.$status, - 'account-switch-account': mono.$user-swap -); - -.item-5ApiZt:not(#account-status-picker, [role='menuitemcheckbox'], [role='menuitemradio']) { - .icon-3XHs8t, - .iconContainer-Ksy8Oj:has(.icon-3XHs8t):not(:has(path[d*='M18.625'])) { - display: none !important; - } - &[aria-haspopup='true'] { - flex-direction: row; - } - &[role='menuitem']:not([id^='message-add-reaction-']), - &[role='menuitemcheckbox'] { - &::before { - width: 18px; - height: 18px; - mask-size: cover; - mask-position: center; - background: currentColor; - } - &.focused-3qFvc8::before { - background: var(--text-primary); - } - } - @each $label, $icon in $icons { - &[id^='#{$label}']::before { - content: ''; - @if list.index($icon, 'danger') { - mask-image: url(list.nth($icon, 1)); - } @else { - mask-image: url($icon); - } - } - } -} diff --git a/src/theme/profile/_popout.scss b/src/theme/profile/_popout.scss index ee12a5a..7c83ed4 100644 --- a/src/theme/profile/_popout.scss +++ b/src/theme/profile/_popout.scss @@ -46,7 +46,7 @@ position: absolute; right: unset; left: 16px; - top: 76px; + top: 105px; z-index: 2; background: transparent; padding: 0; diff --git a/src/theme/sidebar/_container.scss b/src/theme/sidebar/_container.scss index 6e2f425..8111562 100644 --- a/src/theme/sidebar/_container.scss +++ b/src/theme/sidebar/_container.scss @@ -20,7 +20,7 @@ } } .content-yjf30S > li:last-child { - padding-bottom: calc(var(--bottombar-height) + 72px); + padding-bottom: 16px; } .container-1NXEtd { background: var(--bg-alt); diff --git a/src/theme/sidebar/_panels.scss b/src/theme/sidebar/_panels.scss index 9c296e7..a0b37e2 100644 --- a/src/theme/sidebar/_panels.scss +++ b/src/theme/sidebar/_panels.scss @@ -8,26 +8,17 @@ // User area & > .container-YkUktl { - position: absolute; box-sizing: border-box; - bottom: 11px; - left: 12px; background: var(--bg-main); padding: 8px 14px; + margin-left: 11px; + margin-bottom: 12px; width: calc(var(--channels-width) - 12px); border-radius: var(--rounded) 0 0 var(--rounded); border: 1px solid var(--border-high); border-right: none; height: var(--bottombar-height); z-index: 1; - &::before { - content: ''; - position: absolute; - right: 0; - height: calc(var(--bottombar-height) / 2); - width: 1px; - background: var(--border-mid); - } & > .flex-2S1XBF { gap: 8px; height: 75%; @@ -60,38 +51,33 @@ opacity: 1; visibility: visible; } - - &:has(.wrapper-3Hk9OB) { - background-color: red; - } } // Voice connected .container-1zzFcN { - background: transparent; - padding-bottom: 0; position: absolute; - bottom: calc(var(--bottombar-height) + 9px); - left: 12px; + left: 11px; right: 12px; + bottom: 0; border-radius: var(--rounded) var(--rounded) 0 0; background: var(--bg-main); - padding: 8px 8px 11px 8px; + padding: 0; border: 1px solid var(--border-high); border-bottom: none; flex-direction: column-reverse; display: flex; gap: 8px; + z-index: 1; & > .flex-2S1XBF { - padding-bottom: 0; + padding: 8px 8px 11px 8px; position: relative; - z-index: 1; + z-index: 2; &::before { content: ''; position: absolute; - inset: -8px; + inset: 0; + background: var(--bg-main); border-radius: var(--rounded) var(--rounded) 0 0; - background-color: var(--bg-main); } & > .flex-2S1XBF { gap: 4px; @@ -101,7 +87,7 @@ } } &:hover + .actionButtons-2vEOUh { - bottom: calc(100% - 2px); + bottom: calc(100% - 8px); opacity: 1; visibility: visible; transition-delay: 0.45s; @@ -111,6 +97,9 @@ display: none; } } + .wrapper-3Hk9OB + .container-YkUktl { + border-radius: 0 0 0 var(--rounded); + } .inner-llGtyq { position: relative; } @@ -128,7 +117,7 @@ } .actionButtons-2vEOUh { position: absolute; - bottom: calc(0% - 2px); + bottom: 0; width: calc(100% - 16px); background: var(--bg-main); border-radius: var(--rounded) var(--rounded) 0 0; @@ -149,4 +138,10 @@ bottom: calc(100% - 2px); } } + .panel-2ZFCRb { + border: none; + background: transparent; + margin-bottom: 56px; + padding: 8px 16px; + } }