| 47 | ); |
| 48 | |
| 49 | const setBackgroundImage = (url: string) => { |
| 50 | const body = document.querySelector("body"); |
| 51 | if (body) { |
| 52 | body.style.backgroundSize = "cover"; |
| 53 | body.style.backgroundPosition = "center"; |
| 54 | body.style.backgroundRepeat = "no-repeat"; |
| 55 | if (isDarkTheme.value) { |
| 56 | body.style.backgroundImage = `linear-gradient(135deg, rgba(0,0,0,0.65), rgba(0,0,0,0.65) 100%), url(${url})`; |
| 57 | body.classList.remove("app-light-extend-theme"); |
| 58 | body.classList.add("app-dark-extend-theme"); |
| 59 | } else { |
| 60 | body.style.backgroundImage = `linear-gradient(135deg, rgba(220,220,220,0.3), rgba(53,53,53,0.3) 100%), url(${url})`; |
| 61 | body.classList.remove("app-dark-extend-theme"); |
| 62 | body.classList.add("app-light-extend-theme"); |
| 63 | } |
| 64 | |
| 65 | hasBgImage.value = true; |
| 66 | } |
| 67 | }; |
| 68 | |
| 69 | const setLight = () => { |
| 70 | theme.algorithm = antTheme.defaultAlgorithm; |