diff options
author | silverwind <me@silverwind.io> | 2024-03-24 19:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 18:23:38 +0000 |
commit | ec3d467f15a683b305ac165c3eba6683628dcb25 (patch) | |
tree | efcac44b28525ab5a131893e5eeab1771a5ae901 /web_src/js/features/notification.js | |
parent | 0a2f973de9b681a472c96bdfcd945978e88458d8 (diff) | |
download | gitea-ec3d467f15a683b305ac165c3eba6683628dcb25.tar.gz gitea-ec3d467f15a683b305ac165c3eba6683628dcb25.zip |
Migrate `gt-hidden` to `tw-hidden` (#30046)
We have to define this one in helpers.css because tailwind only
generates a single class but certain things rely on this being
double-class. Command ran:
```sh
perl -p -i -e 's#gt-hidden#tw-hidden#g' web_src/js/**/* templates/**/* models/**/* web_src/css/**/*
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js/features/notification.js')
-rw-r--r-- | web_src/js/features/notification.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web_src/js/features/notification.js b/web_src/js/features/notification.js index 90e19b683b..d9f6e50202 100644 --- a/web_src/js/features/notification.js +++ b/web_src/js/features/notification.js @@ -35,7 +35,7 @@ async function receiveUpdateCount(event) { const data = JSON.parse(event.data); for (const count of document.querySelectorAll('.notification_count')) { - count.classList.toggle('gt-hidden', data.Count === 0); + count.classList.toggle('tw-hidden', data.Count === 0); count.textContent = `${data.Count}`; } await updateNotificationTable(); @@ -179,9 +179,9 @@ async function updateNotificationCount() { const $notificationCount = $('.notification_count'); if (data.new === 0) { - $notificationCount.addClass('gt-hidden'); + $notificationCount.addClass('tw-hidden'); } else { - $notificationCount.removeClass('gt-hidden'); + $notificationCount.removeClass('tw-hidden'); } $notificationCount.text(`${data.new}`); |