mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +01:00
differ between URL and file custom bg
This commit is contained in:
@@ -92,9 +92,22 @@ class App extends React.Component<IProps, IState> {
|
||||
bgFile: bgLoc
|
||||
}, this.forceUpdate)
|
||||
}
|
||||
} else this.setState({
|
||||
bgFile: convertFileSrc(custom_bg)
|
||||
}, this.forceUpdate)
|
||||
} else {
|
||||
const isUrl = /^(?:http(s)?:\/\/)/gm.test(custom_bg)
|
||||
|
||||
console.log(isUrl)
|
||||
|
||||
|
||||
if (!isUrl) {
|
||||
this.setState({
|
||||
bgFile: convertFileSrc(custom_bg)
|
||||
}, this.forceUpdate)
|
||||
} else {
|
||||
this.setState({
|
||||
bgFile: custom_bg
|
||||
}, this.forceUpdate)
|
||||
}
|
||||
}
|
||||
|
||||
if (!cert_generated) {
|
||||
// Generate the certificate
|
||||
|
||||
Reference in New Issue
Block a user