Add theme switching!!!! #18

Merged
twig merged 9 commits from settings-appearance into main 2025-07-05 17:29:46 +00:00
Owner

there's both json and css files, but i think that's fiiine, it also lets us add more theme metadata in the future.

the way i load gradients from the themes also isn't ideal, but i couldn't really think of a better way of doing it whilst preserving freedom for theme creators.

there's both json and css files, but i think that's fiiine, it also lets us add more theme metadata in the future. the way i load gradients from the themes also isn't ideal, but i couldn't really think of a better way of doing it whilst preserving freedom for theme creators.
twig added the
Kind/Feature
label 2025-07-05 15:37:03 +00:00
sauceyred was assigned by twig 2025-07-05 15:37:03 +00:00
twig added 5 commits 2025-07-05 15:37:04 +00:00
sauceyred requested changes 2025-07-05 16:55:46 +00:00
Dismissed
@ -10,0 +33,4 @@
const themes: Array<Theme> = []
interface Theme {
Owner

id and themeUrl rather than ID and themeURL, and update theme files to match

`id` and `themeUrl` rather than `ID` and `themeURL`, and update theme files to match
@ -10,0 +41,4 @@
themeURL: string
}
function changeTheme(ID: string, URL: string) {
Owner

id and url rather than ID and URL

`id` and `url` rather than `ID` and `URL`
@ -10,0 +60,4 @@
const fetchThemes = async () => {
for (const theme of defaultThemes) {
const themeConfig = await fetch(`${baseURL}themes/${theme}.json`)
Owner

Use $fetch instead of fetch, which among other things automatically parses the body.

Use `$fetch` instead of `fetch`, which among other things automatically parses the body.
@ -40,10 +40,10 @@
<script lang="ts" setup>
import { onMounted } from 'vue';
Owner

Not needed

Not needed
@ -41,3 +41,4 @@
<script lang="ts" setup>
import { onMounted } from 'vue';
import Button from '~/components/Button.vue';
Owner

Not needed (the Button import)

Not needed (the Button import)
twig added 2 commits 2025-07-05 17:03:40 +00:00
fix: remove un-necessary imports
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
7098dda6b4
twig added 1 commit 2025-07-05 17:05:49 +00:00
fix: use $fetch over fetch
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
2c4489917a
Author
Owner

think that should be good

think that should be good
requested review from sauceyred 2025-07-05 17:13:34 +00:00
sauceyred requested changes 2025-07-05 17:21:16 +00:00
Dismissed
@ -10,0 +58,4 @@
themeLinkElement.href = `${baseURL}themes/${url}`;
}
const fetchThemes = async () => {
Owner

Convert to regular function rather than arrow function. (Forgot to comment on this before)

Convert to regular function rather than arrow function. (Forgot to comment on this before)
sauceyred was unassigned by twig 2025-07-05 17:21:17 +00:00
twig added 1 commit 2025-07-05 17:22:20 +00:00
fix: convert arrow function for consistency
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
ci/woodpecker/pr/build-and-publish Pipeline was successful
ci/woodpecker/pull_request_closed/build-and-publish Pipeline was successful
2d8475b20a
requested review from sauceyred 2025-07-05 17:22:26 +00:00
sauceyred approved these changes 2025-07-05 17:29:30 +00:00
sauceyred left a comment
Owner

Looks good. Approved for merge.

Looks good. Approved for merge.
twig merged commit fb35be390e into main 2025-07-05 17:29:46 +00:00
twig deleted branch settings-appearance 2025-07-05 17:29:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: gorb/frontend#18
No description provided.