Add theme switching!!!! #18
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: gorb/frontend#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "settings-appearance"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@ -10,0 +33,4 @@
const themes: Array<Theme> = []
interface Theme {
id
andthemeUrl
rather thanID
andthemeURL
, and update theme files to match@ -10,0 +41,4 @@
themeURL: string
}
function changeTheme(ID: string, URL: string) {
id
andurl
rather thanID
andURL
@ -10,0 +60,4 @@
const fetchThemes = async () => {
for (const theme of defaultThemes) {
const themeConfig = await fetch(`${baseURL}themes/${theme}.json`)
Use
$fetch
instead offetch
, which among other things automatically parses the body.@ -40,10 +40,10 @@
<script lang="ts" setup>
import { onMounted } from 'vue';
Not needed
@ -41,3 +41,4 @@
<script lang="ts" setup>
import { onMounted } from 'vue';
import Button from '~/components/Button.vue';
Not needed (the Button import)
think that should be good
@ -10,0 +58,4 @@
themeLinkElement.href = `${baseURL}themes/${url}`;
}
const fetchThemes = async () => {
Convert to regular function rather than arrow function. (Forgot to comment on this before)
Looks good. Approved for merge.