Merge branch 'preview-fixes' into master-cdn

This commit is contained in:
the1812 2022-09-18 16:32:19 +08:00
commit cdb8305ec2
5 changed files with 8 additions and 5 deletions

View File

@ -28,7 +28,7 @@ export default Vue.extend({
this.faceSrc = notLoginFaceUrl
} else {
if (userInfo.face) {
const faceUrl = userInfo.face.replace('http', 'https')
const faceUrl = userInfo.face.replace('http:', 'https:')
if (faceUrl.includes(noFaceUrl)) {
this.faceSrc = noFaceUrl
} else {
@ -38,7 +38,7 @@ export default Vue.extend({
}
}
if (userInfo.pendant?.image) {
const pendantUrl = userInfo.pendant.image.replace('http', 'https')
const pendantUrl = userInfo.pendant.image.replace('http:', 'https:')
const pendantBaseSize = 116
this.pendantSrcset = getDpiSourceSet(pendantUrl, pendantBaseSize, 'png')
}

View File

@ -41,7 +41,7 @@ const options = defineOptionsMetadata({
dropdownEnum: TextColor,
},
cdnRoot: {
defaultValue: CdnTypes.GitHub,
defaultValue: CdnTypes.AltCdn,
displayName: '更新源',
dropdownEnum: CdnTypes,
},

View File

@ -3,6 +3,7 @@ import { CdnConfig } from './types'
const owner = 'the1812'
const host = 'raw.githubusercontent.com'
export const github: CdnConfig = {
name: 'GitHub',
owner,
host,
stableClient: `https://${host}/${owner}/Bilibili-Evolved/master/dist/bilibili-evolved.user.js`,

View File

@ -1,8 +1,9 @@
import { CdnConfig } from './types'
const owner = 'the1812'
const host = 'cdn.jsdelivr.net'
export const jsdelivr: CdnConfig = {
const host = 'fastly.jsdelivr.net'
export const jsDelivr: CdnConfig = {
name: 'jsDelivr',
owner,
host,
stableClient: `https://${host}/gh/${owner}/Bilibili-Evolved@master/dist/bilibili-evolved.user.js`,

View File

@ -1,4 +1,5 @@
export interface CdnConfig {
name: string
owner: string
host: string
stableClient: string