diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 007425f80..512d27ec1 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -91,18 +91,6 @@ if (!isElectron && !isEEUiApp) { ViewUI.LoadingBar._load = true; ViewUI.LoadingBar.start(); }, 300) - // - if (to.query?.theme) { - store.dispatch("setTheme", typeof to.query?.theme == 'string' ? to.query?.theme : to.query?.theme[0]) - } - if (to.query?.lang) { - let lang = typeof to.query?.lang == 'string' ? to.query?.lang : to.query?.lang[0] - if(lang && lang != getLanguage()){ - setLanguage(lang, true) - return; - } - } - // next(); }); router.afterEach(() => { diff --git a/resources/assets/js/functions/web.js b/resources/assets/js/functions/web.js index 023b3373e..427420103 100755 --- a/resources/assets/js/functions/web.js +++ b/resources/assets/js/functions/web.js @@ -752,24 +752,10 @@ import {MarkdownPreview} from "../store/markdown"; text = text.replace(atReg, ``) // 处理内容连接 if (/https*:\/\//.test(text)) { - const urlMatch = $.apiUrl('../').match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n]+)/im); - const isMentionFile = text.indexOf('class="mention file"') !== -1 && ($A.isEEUiApp || $A.isElectron) - const theme = isMentionFile ? $A.dark.isDarkEnabled() ? 'dark' : 'light' : ''; - const lang = isMentionFile ? window.localStorage.getItem("__language:type__") : '' text = text.split(/(<[^>]*>)/g).map(string => { if (string && !/<[^>]*>/.test(string)) { string = string.replace(/(^|[^'"])((https*:\/\/)((\w|=|\?|\.|\/|&|-|:|\+|%|;|#|@|,|!)+))/g, "$1$2") } - // - const href = string.match(/href="([^"]+)"/)?.[1] || '' - if (urlMatch?.[1] && href.indexOf(urlMatch[1]) !== -1) { - const searchParams = new URLSearchParams() - theme && href.indexOf("theme=") === -1 && searchParams.append('theme', theme); - lang && href.indexOf("lang=") === -1 && searchParams.append('lang', lang); - const prefix = searchParams.toString() ? (href.indexOf("?") === -1 ? '?' : '&') : ''; - string = string.replace(/(href="[^"]*)/g, '$1' + prefix + searchParams.toString()) - } - // return string; }).join("") } diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 595a09ce0..173dc4ea0 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -2569,21 +2569,14 @@ export default { value: $A.thumbRestore(event.target.currentSrc), }) } else if (event.target.nodeName === 'A') { - let href = event.target.href; if (event.target.classList.contains("mention") && event.target.classList.contains("file")) { - if(this.isEEUiApp || this.$Electron){ - const url = new URL(href); - const params = new URLSearchParams(url.search); - params.delete('theme'); params.delete('lang'); - href = url.origin + url.pathname + (params.toString() ? ('?' + params.toString()) : ''); - } - this.findOperateFile(this.operateItem.id, href) + this.findOperateFile(this.operateItem.id, event.target.href) } this.operateCopys.push({ type: 'link', icon: '', label: '复制链接', - value: href, + value: event.target.href, }) } if (msgData.type === 'text') {