Redesign Creator's Note block (#4298) * Restyle creator's notes block * Creator Notes to standoutHeader styling, allows for viewing Note without hiding chardefs * Fix closing tag * Remove stray close tag * Adjust spoiler-free mode toggle * Make the whole toggle area clickable * Remove redundant comment * Add empty state for creator's notes * Adjust paddings * Update public/index.html Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: RossAscends <124905043+RossAscends@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed| @@ -5616,19 +5616,26 @@ | ||
| 5616 | 5616 | </div> |
| 5617 | 5617 | </div> |
| 5618 | 5618 | </div> |
| 5619 | - <hr> | |
| 5619 | + <div id="spoiler_free_desc" class="inline-drawer flex-container flexFlowColumn flexNoGap"> | |
| 5620 | - <div id="spoiler_free_desc" class="flex-container flexFlowColumn flex1 flexNoGap"> | |
| 5620 | + <div class="inline-drawer-toggle inline-drawer-header padding0 gap5px standoutHeader"> | |
| 5621 | 5621 | <div id="creators_notes_div" class="title_restorable flexGap5 wide100p "> |
| 5622 | 5622 | <span class="flex1" data-i18n="Creator's Notes">Creator's Notes</span> |
| 5623 | - <small id="creators_note_desc_hidden" data-i18n="Character details are hidden.">Character details are hidden.</small> | |
| 5624 | 5623 | <div id="creators_note_styles_button" class="margin0 menu_button fa-solid fa-palette fa-fw" title="Allow / Forbid the use of global styles for this character." data-i18n="[title]Allow / Forbid the use of global styles for this character."></div> |
| 5625 | 5624 | <div id="spoiler_free_desc_button" class="margin0 menu_button fa-solid fa-eye fa-fw" title="Show / Hide Description and First Message" data-i18n="[title]Show / Hide Description and First Message"></div> |
| 5626 | 5625 | </div> |
| 5627 | - <div id="creator_notes_spoiler" class="flex1"></div> | |
| 5626 | + <div class="flex-container widthFitContent"> | |
| 5628 | - <!-- A button to show / hide description_div and description_textarea and first_message_div and firstmessage_textarea--> | |
| 5627 | + <div class="inline-drawer-icon fa-solid fa-circle-chevron-down down interactable"></div> | |
| 5628 | + </div> | |
| 5629 | + </div> | |
| 5630 | + <div class="inline-drawer-content"> | |
| 5631 | + <div id="creator_notes_spoiler"></div> | |
| 5632 | + <div id="creator_notes_empty" data-i18n="No Creator's Notes provided."> | |
| 5633 | + No Creator's Notes provided. | |
| 5629 | 5634 | </div> |
| 5635 | + </div> | |
| 5636 | + </div> | |
| 5637 | + <small id="creators_note_desc_hidden" data-i18n="Character details are hidden.">Character details are hidden.</small> | |
| 5630 | 5638 | <div id="descriptionWrapper" class="flex-container flexFlowColumn flex1"> |
| 5631 | - <hr> | |
| 5632 | 5639 | <div id="description_div" class="title_restorable"> |
| 5633 | 5640 | <div class="flex-container alignitemscenter"> |
| 5634 | 5641 | <span data-i18n="Character Description" class="mdhotkey_location">Description</span> |
| @@ -2021,7 +2021,8 @@ export function initChatUtilities() { | ||
| 2021 | 2021 | reloadCurrentChat(); |
| 2022 | 2022 | }); |
| 2023 | 2023 | |
| 2024 | 2024 | $('#creators_note_styles_button').on('click', function (e) { |
| 2025 | + e.stopPropagation(); | |
| 2025 | 2026 | openGlobalStylesPreferenceDialog(); |
| 2026 | 2027 | }); |
| 2027 | 2028 | |
| @@ -965,24 +965,23 @@ function switchSpoilerMode() { | ||
| 965 | 965 | $('#descriptionWrapper').hide(); |
| 966 | 966 | $('#firstMessageWrapper').hide(); |
| 967 | 967 | $('#spoiler_free_desc').addClass('flex1'); |
| 968 | 968 | $('#creator_notes_spoilercreators_note_desc_hidden').show(); |
| 969 | 969 | } |
| 970 | 970 | else { |
| 971 | 971 | $('#descriptionWrapper').show(); |
| 972 | 972 | $('#firstMessageWrapper').show(); |
| 973 | 973 | $('#spoiler_free_desc').removeClass('flex1'); |
| 974 | 974 | $('#creator_notes_spoilercreators_note_desc_hidden').hide(); |
| 975 | 975 | } |
| 976 | 976 | } |
| 977 | 977 | |
| 978 | 978 | function peekSpoilerMode() { |
| 979 | 979 | $('#descriptionWrapper').toggle(); |
| 980 | 980 | $('#firstMessageWrapper').toggle(); |
| 981 | - $('#creator_notes_spoiler').toggle(); | |
| 982 | 981 | $('#spoiler_free_desc').toggleClass('flex1'); |
| 982 | + $('#creators_note_desc_hidden').toggle(); | |
| 983 | 983 | } |
| 984 | 984 | |
| 985 | - | |
| 986 | 985 | function switchMovingUI() { |
| 987 | 986 | $('.drawer-content.maximized').each(function () { |
| 988 | 987 | $(this).find('.inline-drawer-maximize').trigger('click'); |
| @@ -3825,7 +3824,8 @@ jQuery(() => { | ||
| 3825 | 3824 | saveSettingsDebounced(); |
| 3826 | 3825 | }); |
| 3827 | 3826 | |
| 3828 | 3827 | $('#spoiler_free_desc_button').on('click', function (e) { |
| 3828 | + e.stopPropagation(); | |
| 3829 | 3829 | peekSpoilerMode(); |
| 3830 | 3830 | $(this).toggleClass('fa-eye fa-eye-slash'); |
| 3831 | 3831 | }); |
| @@ -2536,7 +2536,11 @@ textarea::placeholder { | ||
| 2536 | 2536 | #creator_notes_spoiler { |
| 2537 | 2537 | border: 0; |
| 2538 | 2538 | font-size: calc(var(--mainFontSize)*.8); |
| 2539 | 2539 | padding-top: 5px 0; |
| 2540 | +} | |
| 2541 | + | |
| 2542 | +#creator_notes_spoiler p:last-child { | |
| 2543 | + margin-bottom: 0; | |
| 2540 | 2544 | } |
| 2541 | 2545 | |
| 2542 | 2546 | @media screen and (max-width: 1000px) { |
| @@ -3581,12 +3585,20 @@ grammarly-extension { | ||
| 3581 | 3585 | align-items: baseline; |
| 3582 | 3586 | } |
| 3583 | 3587 | |
| 3588 | +#creator_notes_spoiler:empty, | |
| 3589 | +#creator_notes_empty, | |
| 3584 | 3590 | #creators_note_desc_hidden { |
| 3585 | 3591 | display: none; |
| 3586 | 3592 | } |
| 3587 | 3593 | |
| 3588 | -#creators_notes_div:has(#spoiler_free_desc_button.fa-eye-slash) #creators_note_desc_hidden { | |
| 3594 | +#creator_notes_spoiler:empty~#creator_notes_empty { | |
| 3589 | 3595 | display: initialflex; |
| 3596 | + justify-content: center; | |
| 3597 | + align-items: center; | |
| 3598 | + width: 100%; | |
| 3599 | + height: 100%; | |
| 3600 | + font-size: calc(var(--mainFontSize) * 0.9); | |
| 3601 | + color: var(--SmartThemeEmColor); | |
| 3590 | 3602 | } |
| 3591 | 3603 | |
| 3592 | 3604 | .alternate_greeting details { |