From ff715df3ccda51c1bb3d4b84f4391b4fdd1962dd Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Tue, 22 Aug 2023 10:00:21 +1000 Subject: Finalised initial implementation of NSFW tag filtering --- Pages/Component/NsfwSwitch.razor | 8 +++++++ Pages/Component/Switch.razor | 5 ++++ Pages/Component/TagSelectDialog.razor | 18 +++++++++++++- Pages/Gallery.razor | 44 +++++++++++++++++++++++++---------- Pages/TagDefinitions.razor | 29 +++++++++++++++++------ Pages/Upload.razor | 14 ++--------- Pages/Upload.razor.css | 9 +++++-- 7 files changed, 93 insertions(+), 34 deletions(-) create mode 100644 Pages/Component/NsfwSwitch.razor (limited to 'Pages') diff --git a/Pages/Component/NsfwSwitch.razor b/Pages/Component/NsfwSwitch.razor new file mode 100644 index 0000000..d4e809b --- /dev/null +++ b/Pages/Component/NsfwSwitch.razor @@ -0,0 +1,8 @@ +@inject IUserStateService userState + + + +@code { + private void ToggleNsfw(bool showNsfw) => + userState.ShowNsfw = showNsfw; +} \ No newline at end of file diff --git a/Pages/Component/Switch.razor b/Pages/Component/Switch.razor index ffb3543..d11ac81 100644 --- a/Pages/Component/Switch.razor +++ b/Pages/Component/Switch.razor @@ -3,6 +3,7 @@