bg changes

This commit is contained in:
SpikeHD
2022-06-01 19:31:43 -07:00
parent e71ca9ff40
commit 3611cf1a15
2 changed files with 3 additions and 1 deletions

View File

@@ -86,6 +86,8 @@ export default class Options extends React.Component<IProps, IState> {
async setCustomBackground(value: string) {
const isUrl = /^(?:http(s)?:\/\/)/gm.test(value)
if (!value) return await setConfigOption('customBackground', '')
if (!isUrl) {
const filename = value.replace(/\\/g, '/').split('/').pop()
const localBgPath = (await dataDir() as string).replace(/\\/g, '/')