feat: update backend repository url

This commit is contained in:
kunish 2023-12-01 18:36:46 +08:00
parent ee84c2f780
commit 43acdace5d
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
4 changed files with 1300 additions and 1169 deletions

View File

@ -1,6 +1,6 @@
{
"name": "metacubexd",
"version": "1.130.0",
"version": "1.129.0",
"description": "Clash.Meta Dashboard, The Official One, XD",
"license": "MIT",
"type": "module",
@ -14,7 +14,7 @@
"serve": "vite preview"
},
"dependencies": {
"@commitlint/config-conventional": "^18.1.0",
"@commitlint/config-conventional": "^18.4.3",
"@felte/solid": "^1.2.11",
"@felte/validator-zod": "^1.0.17",
"@fontsource/fira-sans": "^5.0.17",
@ -28,48 +28,48 @@
"@solid-primitives/storage": "^2.1.1",
"@solid-primitives/timer": "^1.3.7",
"@solid-primitives/websocket": "^1.2.0",
"@solidjs/router": "^0.8.3",
"@tabler/icons-solidjs": "^2.40.0",
"@solidjs/router": "^0.9.1",
"@tabler/icons-solidjs": "^2.42.0",
"@tanstack/match-sorter-utils": "^8.8.4",
"@tanstack/solid-table": "^8.10.7",
"@tanstack/solid-virtual": "3.0.0-beta.68",
"@tanstack/virtual-core": "3.0.0-beta.68",
"@thisbeyond/solid-dnd": "^0.7.4",
"@types/byte-size": "^8.1.1",
"@types/lodash": "^4.14.200",
"@types/node": "^20.8.10",
"@types/uuid": "^9.0.6",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@vite-pwa/assets-generator": "^0.0.10",
"@tanstack/solid-virtual": "3.0.0-beta.6",
"@tanstack/virtual-core": "3.0.0-alpha.1",
"@thisbeyond/solid-dnd": "^0.7.5",
"@types/byte-size": "^8.1.2",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.1",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@vite-pwa/assets-generator": "^0.0.11",
"apexcharts": "^3.44.0",
"autoprefixer": "^10.4.16",
"byte-size": "^8.1.1",
"commitlint": "^18.2.0",
"daisyui": "^3.9.4",
"commitlint": "^18.4.3",
"daisyui": "^4.4.17",
"dayjs": "^1.11.10",
"eslint": "^8.52.0",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.3",
"is-ip": "^5.0.1",
"ky": "^1.1.3",
"lint-staged": "^15.0.2",
"lint-staged": "^15.1.0",
"lodash": "^4.17.21",
"match-sorter": "^6.3.1",
"prettier": "^3.0.3",
"prettier-plugin-organize-imports": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.5.6",
"prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-tailwindcss": "^0.5.7",
"solid-apexcharts": "^0.3.2",
"solid-js": "^1.8.5",
"solid-js": "^1.8.6",
"solid-toast": "^0.5.0",
"sort-package-json": "^2.6.0",
"tailwind-merge": "^2.0.0",
"tailwindcss": "^3.3.5",
"typescript": "^5.2.2",
"typescript": "^5.3.2",
"uuid": "^9.0.1",
"vite": "^4.5.0",
"vite-plugin-pwa": "^0.16.6",
"vite": "^5.0.4",
"vite-plugin-pwa": "^0.17.2",
"vite-plugin-solid": "^2.7.2",
"zod": "^3.22.4"
}

2390
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -209,7 +209,12 @@ export const updateRuleProviderAPI = (providerName: string) => {
return request.put(`providers/rules/${providerName}`)
}
type ReleaseAPIResponse = {
assets: { name: string }[]
}
export const isUpdateAvailableAPI = async (versionResponse: string) => {
const repositoryURL = 'https://api.github.com/repos/MetaCubeX/mihomo'
const match = /(alpha|beta|meta)-?(\w+)/.exec(versionResponse)
if (!match) {
@ -221,12 +226,8 @@ export const isUpdateAvailableAPI = async (versionResponse: string) => {
if (channel === 'meta') {
const { assets } = await ky
.get('https://api.github.com/repos/MetaCubeX/Clash.Meta/releases/latest')
.json<{
assets: {
name: string
}[]
}>()
.get(`${repositoryURL}/releases/latest`)
.json<ReleaseAPIResponse>()
const alreadyLatest = assets.some(({ name }) => name.includes(version))
@ -235,14 +236,8 @@ export const isUpdateAvailableAPI = async (versionResponse: string) => {
if (channel === 'alpha') {
const { assets } = await ky
.get(
'https://api.github.com/repos/MetaCubeX/Clash.Meta/releases/tags/Prerelease-Alpha',
)
.json<{
assets: {
name: string
}[]
}>()
.get(`${repositoryURL}/releases/tags/Prerelease-Alpha`)
.json<ReleaseAPIResponse>()
const alreadyLatest = assets.some(({ name }) => name.includes(version))

View File

@ -40,10 +40,10 @@ const ThemeSwitcher = () => (
</label>
</div>
<div class="drawer-side">
<div class="drawer-side overflow-x-hidden">
<label for="themes" class="drawer-overlay" />
<ul class="menu rounded-l-box gap-2 bg-base-300 p-2">
<ul class="menu gap-2 rounded-l-box bg-base-300 p-2">
<For each={themes}>
{(theme) => (
<li
@ -120,7 +120,7 @@ export const Header = () => {
<div class="drawer-side">
<label for="navs" class="drawer-overlay" />
<ul class="menu rounded-r-box min-h-full w-2/5 gap-2 bg-base-300 pt-20">
<ul class="menu min-h-full w-2/5 gap-2 rounded-r-box bg-base-300 pt-20">
<For each={navs()}>
{({ href, name }) => (
<li onClick={() => setOpenedDrawer(false)}>