summaryrefslogtreecommitdiff
path: root/Pages/Component/NsfwSwitch.razor
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-08-22 10:00:21 +1000
committerJake Mannens <jake@asger.xyz>2025-08-18 17:03:21 +1000
commitff715df3ccda51c1bb3d4b84f4391b4fdd1962dd (patch)
tree00cca236a9036896dc7a1d3688311c65f96159d8 /Pages/Component/NsfwSwitch.razor
parent4558ed9d6cbc59229cd56cc7a6c36b1df0b8199a (diff)
Finalised initial implementation of NSFW tag filtering
Diffstat (limited to 'Pages/Component/NsfwSwitch.razor')
-rw-r--r--Pages/Component/NsfwSwitch.razor8
1 files changed, 8 insertions, 0 deletions
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
+
+<Switch InitialValue=userState.ShowNsfw OnToggle=ToggleNsfw/>
+
+@code {
+ private void ToggleNsfw(bool showNsfw) =>
+ userState.ShowNsfw = showNsfw;
+} \ No newline at end of file