Rebrand web-ui

This commit is contained in:
Yukino Song
2024-08-04 19:07:38 +08:00
parent a8e1ecde6e
commit ad3b725a81
23 changed files with 605 additions and 603 deletions

View File

@@ -78,9 +78,9 @@
import { initApp } from './init'
import Navbar from './Navbar.vue'
import ResourceCard from './ResourceCard.vue'
import SunshineVersion from './sunshine_version'
import ApolloVersion from './apollo_version'
console.log("Hello, Sunshine!")
console.log("Hello, Apollo!")
let app = createApp({
components: {
Navbar,
@@ -100,12 +100,14 @@
try {
let config = await fetch("/api/config").then((r) => r.json());
this.notifyPreReleases = config.notify_pre_releases;
this.version = new SunshineVersion(null, config.version);
this.version = new ApolloVersion(null, config.version);
console.log("Version: ", this.version.version)
this.githubVersion = new SunshineVersion(await fetch("https://api.github.com/repos/LizardByte/Sunshine/releases/latest").then((r) => r.json()), null);
this.githubVersion = new ApolloVersion(await fetch("https://api.github.com/repos/ClassicOldSong/Apollo/releases/latest").then((r) => r.json()), null);
console.log("GitHub Version: ", this.githubVersion.version)
this.preReleaseVersion = new SunshineVersion((await fetch("https://api.github.com/repos/LizardByte/Sunshine/releases").then((r) => r.json())).find(release => release.prerelease), null);
console.log("Pre-Release Version: ", this.preReleaseVersion.version)
if (this.githubVersion) {
this.preReleaseVersion = new ApolloVersion((await fetch("https://api.github.com/repos/ClassicOldSong/Apollo/releases").then((r) => r.json())).find(release => release.prerelease), null);
console.log("Pre-Release Version: ", this.preReleaseVersion.version)
}
} catch (e) {
console.error(e);
}