This commit is contained in:
2025-04-30 09:51:36 +08:00
parent 561881c9aa
commit 09afa239a6
848 changed files with 385870 additions and 205 deletions

View File

@@ -0,0 +1,40 @@
document.addEventListener('alpine:init', function () {
Alpine.data('data', function () {
return {
items: [],
loading: false,
theme:"",
loadItems() {
if (this.loading) {
return;
}
this.loading = true;
axios.get('themes')
.then(data => {
this.items = data;
})
.finally(() => {
this.loading = false;
});
},
showModal: false,
confirmAction() {
this.isSubmitting = true;
axios.put('themes', { theme: theme })
.then(data => {
this.loadItems();
})
.finally(() => {
this.isSubmitting = false;
});
},
init() {
this.loadItems();
window.addEventListener('load', () => {
document.title = "模板设置 - " + window.config.name + "";
});
}
};
})
});