mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-04 10:58:18 +00:00
fix: 文件主题修复
This commit is contained in:
parent
e712b99287
commit
5760d3ef0f
@ -1431,6 +1431,8 @@ APP推送
|
|||||||
状态
|
状态
|
||||||
协助人
|
协助人
|
||||||
未变更移动项
|
未变更移动项
|
||||||
|
接龙
|
||||||
|
参与接龙
|
||||||
发起接龙
|
发起接龙
|
||||||
由
|
由
|
||||||
发起接龙,参与接龙目前共(*)人
|
发起接龙,参与接龙目前共(*)人
|
||||||
|
|||||||
@ -19171,5 +19171,27 @@
|
|||||||
"de": "Sie haben eine neue nachricht",
|
"de": "Sie haben eine neue nachricht",
|
||||||
"fr": "Voici les nouveaux messages",
|
"fr": "Voici les nouveaux messages",
|
||||||
"id": "Berikut ini untuk informasi baru"
|
"id": "Berikut ini untuk informasi baru"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "接龙",
|
||||||
|
"zh": "",
|
||||||
|
"zh-CHT": "接龍",
|
||||||
|
"en": "Solitaire",
|
||||||
|
"ko": "다이 크",
|
||||||
|
"ja": "しりとりです",
|
||||||
|
"de": "Schnappt euch den drachen!",
|
||||||
|
"fr": "Mines",
|
||||||
|
"id": "JieLong"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "参与接龙",
|
||||||
|
"zh": "",
|
||||||
|
"zh-CHT": "參與接龍",
|
||||||
|
"en": "Participate in the solitaire",
|
||||||
|
"ko": "릴레이 작업에 참여하다.",
|
||||||
|
"ja": "しりとりに参加します",
|
||||||
|
"de": "Ich übernehme die verantwortung.",
|
||||||
|
"fr": "Participez à solitaire",
|
||||||
|
"id": "Berpartisipasi dalam tangkapan"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
2
public/language/web/de.js
vendored
2
public/language/web/de.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/en.js
vendored
2
public/language/web/en.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/fr.js
vendored
2
public/language/web/fr.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/id.js
vendored
2
public/language/web/id.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ja.js
vendored
2
public/language/web/ja.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/key.js
vendored
2
public/language/web/key.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/ko.js
vendored
2
public/language/web/ko.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/zh-CHT.js
vendored
2
public/language/web/zh-CHT.js
vendored
File diff suppressed because one or more lines are too long
2
public/language/web/zh.js
vendored
2
public/language/web/zh.js
vendored
@ -1 +1 @@
|
|||||||
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
if(typeof window.LANGUAGE_DATA==="undefined")window.LANGUAGE_DATA={};window.LANGUAGE_DATA["zh"]=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||||
12
resources/assets/js/app.js
vendored
12
resources/assets/js/app.js
vendored
@ -2,7 +2,7 @@ const isElectron = !!(window && window.process && window.process.type);
|
|||||||
const isEEUiApp = window && window.navigator && /eeui/i.test(window.navigator.userAgent);
|
const isEEUiApp = window && window.navigator && /eeui/i.test(window.navigator.userAgent);
|
||||||
|
|
||||||
import microappInit from "./microapp"
|
import microappInit from "./microapp"
|
||||||
import {switchLanguage as $L} from "./language";
|
import {switchLanguage as $L, setLanguage, getLanguage} from "./language";
|
||||||
|
|
||||||
import './functions/common'
|
import './functions/common'
|
||||||
import './functions/eeui'
|
import './functions/eeui'
|
||||||
@ -91,17 +91,18 @@ if (!isElectron && !isEEUiApp) {
|
|||||||
ViewUI.LoadingBar._load = true;
|
ViewUI.LoadingBar._load = true;
|
||||||
ViewUI.LoadingBar.start();
|
ViewUI.LoadingBar.start();
|
||||||
}, 300)
|
}, 300)
|
||||||
|
//
|
||||||
if (to.query?.theme) {
|
if (to.query?.theme) {
|
||||||
store.dispatch("setTheme", typeof to.query?.theme == 'string' ? to.query?.theme : to.query?.theme[0])
|
store.dispatch("setTheme", typeof to.query?.theme == 'string' ? to.query?.theme : to.query?.theme[0])
|
||||||
}
|
}
|
||||||
if (to.query?.lang) {
|
if (to.query?.lang) {
|
||||||
let lang = typeof to.query?.lang == 'string' ? to.query?.lang : to.query?.lang[0]
|
let lang = typeof to.query?.lang == 'string' ? to.query?.lang : to.query?.lang[0]
|
||||||
if (window.localStorage.getItem("__language:type__") != lang) {
|
if(lang && lang != getLanguage()){
|
||||||
window.localStorage.setItem("__language:type__", to.query?.lang);
|
setLanguage(lang, true)
|
||||||
window.location.reload();
|
return;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
@ -157,6 +158,7 @@ $A.Platform = "web";
|
|||||||
$A.isMainElectron = false;
|
$A.isMainElectron = false;
|
||||||
$A.isSubElectron = false;
|
$A.isSubElectron = false;
|
||||||
$A.isEEUiApp = isEEUiApp;
|
$A.isEEUiApp = isEEUiApp;
|
||||||
|
$A.isElectron = isElectron;
|
||||||
$A.openLog = false;
|
$A.openLog = false;
|
||||||
if (isElectron) {
|
if (isElectron) {
|
||||||
$A.Electron = electron;
|
$A.Electron = electron;
|
||||||
|
|||||||
@ -154,7 +154,6 @@ export default {
|
|||||||
route: this.$route,
|
route: this.$route,
|
||||||
callback: (appName, isAccept) => {
|
callback: (appName, isAccept) => {
|
||||||
if(isAccept){
|
if(isAccept){
|
||||||
console.log(1)
|
|
||||||
microAppIsAccept = true;
|
microAppIsAccept = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
resources/assets/js/functions/web.js
vendored
9
resources/assets/js/functions/web.js
vendored
@ -735,8 +735,9 @@
|
|||||||
// 处理内容连接
|
// 处理内容连接
|
||||||
if (/https*:\/\//.test(text)) {
|
if (/https*:\/\//.test(text)) {
|
||||||
const urlMatch = $.apiUrl('../').match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n]+)/im);
|
const urlMatch = $.apiUrl('../').match(/^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n]+)/im);
|
||||||
// const theme = window.localStorage.getItem("__theme:mode__")
|
const isMentionFile = text.indexOf('class="mention file"') !== -1 && ($A.isEEUiApp || $A.isElectron)
|
||||||
// const lang = window.localStorage.getItem("__language:type__")
|
const theme = isMentionFile ? $A.dark.isDarkEnabled() ? 'dark' : 'light' : '';
|
||||||
|
const lang = isMentionFile ? window.localStorage.getItem("__language:type__") : ''
|
||||||
text = text.split(/(<[^>]*>)/g).map(string => {
|
text = text.split(/(<[^>]*>)/g).map(string => {
|
||||||
if (string && !/<[^>]*>/.test(string)) {
|
if (string && !/<[^>]*>/.test(string)) {
|
||||||
string = string.replace(/(^|[^'"])((https*:\/\/)((\w|=|\?|\.|\/|&|-|:|\+|%|;|#|@|,|!)+))/g, "$1<a href=\"$2\" target=\"_blank\">$2</a>")
|
string = string.replace(/(^|[^'"])((https*:\/\/)((\w|=|\?|\.|\/|&|-|:|\+|%|;|#|@|,|!)+))/g, "$1<a href=\"$2\" target=\"_blank\">$2</a>")
|
||||||
@ -745,8 +746,8 @@
|
|||||||
const href = string.match(/href="([^"]+)"/)?.[1] || ''
|
const href = string.match(/href="([^"]+)"/)?.[1] || ''
|
||||||
if (urlMatch?.[1] && href.indexOf(urlMatch[1]) !== -1) {
|
if (urlMatch?.[1] && href.indexOf(urlMatch[1]) !== -1) {
|
||||||
const searchParams = new URLSearchParams()
|
const searchParams = new URLSearchParams()
|
||||||
// href.indexOf("theme=") === -1 && searchParams.append('theme', theme);
|
theme && href.indexOf("theme=") === -1 && searchParams.append('theme', theme);
|
||||||
// href.indexOf("lang=") === -1 && searchParams.append('lang', lang);
|
lang && href.indexOf("lang=") === -1 && searchParams.append('lang', lang);
|
||||||
const prefix = searchParams.toString() ? (href.indexOf("?") === -1 ? '?' : '&') : '';
|
const prefix = searchParams.toString() ? (href.indexOf("?") === -1 ? '?' : '&') : '';
|
||||||
string = string.replace(/(href="[^"]*)/g, '$1' + prefix + searchParams.toString())
|
string = string.replace(/(href="[^"]*)/g, '$1' + prefix + searchParams.toString())
|
||||||
}
|
}
|
||||||
|
|||||||
35
resources/assets/js/language/index.js
vendored
35
resources/assets/js/language/index.js
vendored
@ -30,20 +30,33 @@ function addLanguage(data) {
|
|||||||
/**
|
/**
|
||||||
* 设置语言
|
* 设置语言
|
||||||
* @param language
|
* @param language
|
||||||
|
* @param silence
|
||||||
*/
|
*/
|
||||||
function setLanguage(language) {
|
function setLanguage(language, silence = false) {
|
||||||
if (language === undefined) {
|
if (language === undefined) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$A.modalConfirm({
|
if(silence){
|
||||||
content: '切换语言需要刷新后生效,是否确定刷新?',
|
window.localStorage.setItem("__language:type__", language)
|
||||||
cancelText: '取消',
|
$A.reloadUrl()
|
||||||
okText: '确定',
|
}else{
|
||||||
onOk: () => {
|
$A.modalConfirm({
|
||||||
window.localStorage.setItem("__language:type__", language)
|
content: '切换语言需要刷新后生效,是否确定刷新?',
|
||||||
$A.reloadUrl()
|
cancelText: '取消',
|
||||||
}
|
okText: '确定',
|
||||||
})
|
onOk: () => {
|
||||||
|
window.localStorage.setItem("__language:type__", language)
|
||||||
|
$A.reloadUrl()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新语言
|
||||||
|
*/
|
||||||
|
function getLanguage() {
|
||||||
|
return utils.getLanguage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,4 +124,4 @@ function switchLanguage(text) {
|
|||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
|
|
||||||
export { languageType, languageList, addLanguage, setLanguage, switchLanguage }
|
export { languageType, languageList, addLanguage, setLanguage, getLanguage, switchLanguage }
|
||||||
|
|||||||
@ -74,7 +74,7 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
|
|
||||||
createId: 0,
|
createId: 0,
|
||||||
value: "#接龙 \n",
|
value: "#" + this.$L('接龙') + " \n",
|
||||||
list: [],
|
list: [],
|
||||||
|
|
||||||
oldData: '',
|
oldData: '',
|
||||||
@ -120,7 +120,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
show(val){
|
show(val){
|
||||||
if(!val){
|
if(!val){
|
||||||
this.value = "#接龙 \n";
|
this.value = "#" + this.$L('接龙') + " \n";
|
||||||
this.list = [];
|
this.list = [];
|
||||||
}else{
|
}else{
|
||||||
if(this.dialogDroupWordChain.type == 'create'){
|
if(this.dialogDroupWordChain.type == 'create'){
|
||||||
|
|||||||
@ -2433,14 +2433,21 @@ export default {
|
|||||||
value: $A.thumbRestore(event.target.currentSrc),
|
value: $A.thumbRestore(event.target.currentSrc),
|
||||||
})
|
})
|
||||||
} else if (event.target.nodeName === 'A') {
|
} else if (event.target.nodeName === 'A') {
|
||||||
|
let href = event.target.href;
|
||||||
if (event.target.classList.contains("mention") && event.target.classList.contains("file")) {
|
if (event.target.classList.contains("mention") && event.target.classList.contains("file")) {
|
||||||
this.findOperateFile(this.operateItem.id, event.target.href)
|
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.operateCopys.push({
|
this.operateCopys.push({
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icon: '',
|
icon: '',
|
||||||
label: '复制链接',
|
label: '复制链接',
|
||||||
value: event.target.href,
|
value: href,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (msgData.type === 'text') {
|
if (msgData.type === 'text') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user