From 501a5fb1e715fe68ea34baa2afa96d06d21edd7d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 4 Sep 2021 01:10:00 -0400 Subject: [PATCH 01/22] Fix issue with new notification trying to do a fetch. --- src/shared/utils.ts | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 86e513b3..f54e2592 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -686,18 +686,21 @@ export function notifyPrivateMessage(pmv: PrivateMessageView, router: any) { function notify(info: NotifyInfo, router: any) { messageToastify(info, router); - if (Notification.permission !== "granted") Notification.requestPermission(); - else { - var notification = new Notification(info.name, { - icon: info.icon, - body: info.body, - }); + // TODO absolute nightmare bug, but notifs are currently broken. + // Notification.new will try to do a browser fetch ??? - notification.onclick = (ev: Event): any => { - ev.preventDefault(); - router.history.push(info.link); - }; - } + // if (Notification.permission !== "granted") Notification.requestPermission(); + // else { + // var notification = new Notification(info.name, { + // icon: info.icon, + // body: info.body, + // }); + + // notification.onclick = (ev: Event): any => { + // ev.preventDefault(); + // router.history.push(info.link); + // }; + // } } export function setupTribute() { From 982fae53c89ea1fab142e602d600217435b1624e Mon Sep 17 00:00:00 2001 From: Ernest Date: Sun, 24 Jul 2022 14:08:23 +0200 Subject: [PATCH 02/22] Fix Notification browser fetch --- src/shared/utils.ts | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index f54e2592..f9c554f8 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -686,21 +686,18 @@ export function notifyPrivateMessage(pmv: PrivateMessageView, router: any) { function notify(info: NotifyInfo, router: any) { messageToastify(info, router); - // TODO absolute nightmare bug, but notifs are currently broken. - // Notification.new will try to do a browser fetch ??? + if (Notification.permission !== "granted") Notification.requestPermission(); + else { + var notification = new Notification(info.name, { + ...{body: info.body}, + ...(info.icon && {icon: info.icon}) + }); - // if (Notification.permission !== "granted") Notification.requestPermission(); - // else { - // var notification = new Notification(info.name, { - // icon: info.icon, - // body: info.body, - // }); - - // notification.onclick = (ev: Event): any => { - // ev.preventDefault(); - // router.history.push(info.link); - // }; - // } + notification.onclick = (ev: Event): any => { + ev.preventDefault(); + router.history.push(info.link); + }; + } } export function setupTribute() { From a8ab4e0558820e26a6308e732b2ee1e11dec1051 Mon Sep 17 00:00:00 2001 From: Anon Date: Sat, 4 Jun 2022 11:47:10 -0500 Subject: [PATCH 03/22] Add support for filtering mod logs --- lemmy-translations | 2 +- src/assets/css/main.css | 4 + src/shared/components/home/site-form.tsx | 27 +++ src/shared/components/modlog.tsx | 294 +++++++++++++++++------ src/shared/utils.ts | 35 ++- 5 files changed, 281 insertions(+), 81 deletions(-) diff --git a/lemmy-translations b/lemmy-translations index 7c1b691a..29c689af 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit 7c1b691af63845a2fe2f8219b4620b8db3c9c3ba +Subproject commit 29c689af8d16417c1b84d9491f6bcea888720a87 diff --git a/src/assets/css/main.css b/src/assets/css/main.css index fe728ca6..3ec52d0a 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -375,6 +375,10 @@ br.big { border-radius: 4px; } +.modlog-choices-font-size { + font-size: .9375rem !important; +} + .preview-lines { overflow: hidden; text-overflow: ellipsis; diff --git a/src/shared/components/home/site-form.tsx b/src/shared/components/home/site-form.tsx index 09a7ca35..e2266fee 100644 --- a/src/shared/components/home/site-form.tsx +++ b/src/shared/components/home/site-form.tsx @@ -54,6 +54,7 @@ export class SiteForm extends Component { description: None, community_creation_admin_only: None, auth: undefined, + hide_modlog_mod_names: Some(true), }), loading: false, themeList: None, @@ -98,6 +99,7 @@ export class SiteForm extends Component { default_theme: Some(site.default_theme), default_post_listing_type: Some(site.default_post_listing_type), legal_information: site.legal_information, + hide_modlog_mod_names: site.hide_modlog_mod_names, auth: undefined, }); }, @@ -437,6 +439,25 @@ export class SiteForm extends Component { +
+
+
+ + +
+
+