From 60609fa0f28ae06d5373b1c42c0ec3c231ce0084 Mon Sep 17 00:00:00 2001 From: sheodox Date: Mon, 14 Aug 2023 20:10:14 -0500 Subject: [PATCH 1/7] Move the button to ban a reporter to a menu button It's pretty unlikely a mod needs to use this button, but it was way too prominently featured. --- .../(app)/[instance]/reports/BanButton.svelte | 6 +++- .../(app)/[instance]/reports/Report.svelte | 35 ++++++++++++------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/routes/(app)/[instance]/reports/BanButton.svelte b/src/routes/(app)/[instance]/reports/BanButton.svelte index 9ff493e..94ec468 100644 --- a/src/routes/(app)/[instance]/reports/BanButton.svelte +++ b/src/routes/(app)/[instance]/reports/BanButton.svelte @@ -5,7 +5,7 @@ {small} icon={banned ? 'check' : 'ban'} > - {banned ? 'Unban' : 'Ban'} + {buttonText} From baee421c011b322570ff9a290a62af731ca095cf Mon Sep 17 00:00:00 2001 From: sheodox Date: Mon, 14 Aug 2023 21:44:53 -0500 Subject: [PATCH 2/7] Light theme, more theme customization --- package-lock.json | 8 +- package.json | 2 +- src/lib/VoteButtons.svelte | 50 ++++++----- src/lib/feeds/posts/PostTitle.svelte | 2 +- src/lib/settings-context.ts | 13 +++ src/routes/(app)/[instance]/+layout.svelte | 22 ++++- .../(app)/[instance]/settings/+page.svelte | 34 ++------ .../[instance]/settings/ThemeSettings.svelte | 83 +++++++++++++++++++ .../[instance]/settings/ThemeSlider.svelte | 29 +++++++ src/routes/(meta)/+layout.svelte | 2 +- src/routes/+layout.svelte | 4 +- vite.config.ts | 4 + 12 files changed, 195 insertions(+), 58 deletions(-) create mode 100644 src/routes/(app)/[instance]/settings/ThemeSettings.svelte create mode 100644 src/routes/(app)/[instance]/settings/ThemeSlider.svelte diff --git a/package-lock.json b/package-lock.json index aeac42a..bb654be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,7 @@ "prettier": "^3.0.0", "prettier-plugin-svelte": "^3.0.0", "sass": "^1.64.1", - "sheodox-ui": "^0.19.38", + "sheodox-ui": "^0.20.0", "svelte": "^4.1.1", "svelte-check": "^3.4.6", "tslib": "^2.6.1", @@ -3533,9 +3533,9 @@ } }, "node_modules/sheodox-ui": { - "version": "0.19.38", - "resolved": "https://registry.npmjs.org/sheodox-ui/-/sheodox-ui-0.19.38.tgz", - "integrity": "sha512-O3u/VNkHuzDa2pgAPQec5hY19refPSqCNPhD5irR3UbeZbPCnITl9yyKFAmqcBCq8QhFCeW6I2jA5dg0Q6xRgw==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/sheodox-ui/-/sheodox-ui-0.20.0.tgz", + "integrity": "sha512-cleXaJjlEuliaORPtaxJm+RwhPG6GBdGF7RYDTe37dCxLmlwzdWypg+emkbpNtDIdLtBX1RjJbKxbjTF+L8+5Q==", "dev": true, "dependencies": { "@floating-ui/dom": "^1.2.9", diff --git a/package.json b/package.json index 6614ff2..038d277 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "prettier": "^3.0.0", "prettier-plugin-svelte": "^3.0.0", "sass": "^1.64.1", - "sheodox-ui": "^0.19.38", + "sheodox-ui": "^0.20.0", "svelte": "^4.1.1", "svelte-check": "^3.4.6", "tslib": "^2.6.1", diff --git a/src/lib/VoteButtons.svelte b/src/lib/VoteButtons.svelte index f86f317..0e37d9e 100644 --- a/src/lib/VoteButtons.svelte +++ b/src/lib/VoteButtons.svelte @@ -1,18 +1,28 @@ - -
+
- -

- If you use DarkReader, make sure to disable it for this site. -

- +
+ +
diff --git a/src/routes/(app)/[instance]/settings/ThemeSettings.svelte b/src/routes/(app)/[instance]/settings/ThemeSettings.svelte new file mode 100644 index 0000000..bf0978f --- /dev/null +++ b/src/routes/(app)/[instance]/settings/ThemeSettings.svelte @@ -0,0 +1,83 @@ + + +
+ + + + + + + + + + +

+ If you use DarkReader, make sure to disable it for this site. +

+
+ +
+
+ +
+
+ Link Text + + + + +
+
+ + diff --git a/src/routes/(app)/[instance]/settings/ThemeSlider.svelte b/src/routes/(app)/[instance]/settings/ThemeSlider.svelte new file mode 100644 index 0000000..fcdd016 --- /dev/null +++ b/src/routes/(app)/[instance]/settings/ThemeSlider.svelte @@ -0,0 +1,29 @@ + + + + + +
+ + {label} + + +
+
+ + diff --git a/src/routes/(meta)/+layout.svelte b/src/routes/(meta)/+layout.svelte index 01e3d8a..9b6feaf 100644 --- a/src/routes/(meta)/+layout.svelte +++ b/src/routes/(meta)/+layout.svelte @@ -1,6 +1,6 @@ diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 76d0195..5837cb3 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,6 +1,4 @@ - - - +