Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-04-13 10:52:56 +08:00
commit 184b1dbdb5
9 changed files with 25 additions and 14 deletions

View file

@ -35,7 +35,7 @@
"apiBaseURL": "API Base URL",
"apiBaseURLTip": "The base address of the request, such as <code class='fn__code'>https://api.openai.com/v1</code>",
"skip": "Skip",
"reboot": "Reboot",
"nextRound": "Next round",
"save": "Save",
"ai": "Artificial Intelligence",
"aiContinueWrite": "Continue writing",

View file

@ -35,7 +35,7 @@
"apiBaseURL": "URL base de la API",
"apiBaseURLTip": "La dirección base de la solicitud, como <code class='fn__code'>https://api.openai.com/v1</code>",
"skip": "barco",
"reboot": "Reiniciar",
"nextRound": "Siguiente ronda",
"save": "Ahorrar",
"ai": "Inteligencia Artificial",
"aiContinueWrite": "Continuar escribiendo",

View file

@ -35,7 +35,7 @@
"apiBaseURL": "URL de base de l'API",
"apiBaseURLTip": "L'adresse de base de la requête, telle que <code class='fn__code'>https://api.openai.com/v1</code>",
"skip": "Navire",
"reboot": "Redémarrer",
"nextRound": "Prochain tour",
"save": "Sauvegarder",
"ai": "Intelligence Artificielle",
"aiContinueWrite": "Continuer à écrire",

View file

@ -35,7 +35,7 @@
"apiBaseURL": "API 基礎地址",
"apiBaseURLTip": "發起請求的基礎地址,如 <code class='fn__code'>https://api.openai.com/v1</code>",
"skip": "跳過",
"reboot": "重啟",
"nextRound": "下一輪",
"save": "保存",
"ai": "人工智能",
"aiContinueWrite": "續寫",

View file

@ -35,7 +35,7 @@
"apiBaseURL": "API 基础地址",
"apiBaseURLTip": "发起请求的基础地址,如 <code class='fn__code'>https://api.openai.com/v1</code>",
"skip": "跳过",
"reboot": "重启",
"nextRound": "下一轮",
"save": "保存",
"ai": "人工智能",
"aiContinueWrite": "续写",

View file

@ -358,10 +358,19 @@
const {ipcRenderer} = require('electron')
const fs = require('fs')
const initPath = result.filePaths[0]
if (isCloudDrivePath(initPath)) {
let msg = '⚠️ This folder may be a cloud sync disk folder, please change to another path'
if (isICloudPath(initPath)) {
let msg = '⚠️ This folder is under the iCloud sync path, please change another path'
if ('zh_CN' === currentLang) {
msg = '⚠️ 该文件夹可能是云同步盘文件夹,请更换其他路径'
msg = '⚠️ 该文件夹位于 iCloud 同步路径下,请更换其他路径'
}
alert(msg)
return
}
if (isCloudDrivePath(initPath)) {
let msg = '⚠️ The folder path can not contain onedrive, dropbox, google drive, pcloud and 坚果云, please change another path'
if ('zh_CN' === currentLang) {
msg = '⚠️ 文件夹路径不能包含 onedrive、dropbox、google drive、pcloud 和 坚果云,请更换其他路径'
}
alert(msg)
return
@ -388,10 +397,6 @@
const isCloudDrivePath = (absPath) => {
const absPathLower = absPath.toLowerCase()
if (isICloudPath(absPathLower)) {
return true
}
return -1 < absPathLower.indexOf("onedrive") || -1 < absPathLower.indexOf("dropbox") ||
-1 < absPathLower.indexOf("google drive") || -1 < absPathLower.indexOf("pcloud") ||
-1 < absPathLower.indexOf("坚果云")

View file

@ -713,7 +713,7 @@ app.whenReady().then(() => {
}
});
if (!foundWorkspace) {
initKernel(data.workspace, "", data.lang).then((isSucc) => {
initKernel(data.workspace, "", "").then((isSucc) => {
if (isSucc) {
boot();
}

View file

@ -66,7 +66,7 @@ export const openCardByData = (cardsData: { cards: ICard[], unreviewedCount: num
</div>
<div class="fn__flex card__action fn__none">
<div>
<span>${window.siyuan.languages.reboot}</span>
<span>${window.siyuan.languages.nextRound}</span>
<button data-type="-3" aria-label="0" class="b3-button b3-button--cancel b3-tooltips__s b3-tooltips">
<div>💤</div>
${window.siyuan.languages.skip} (0)

View file

@ -818,6 +818,12 @@ func getDeckDueCards(deck *riff.Deck, reviewedCardIDs, blockIDs []string) (ret [
}
dues = tmp
if 1 > len(reviewedCardIDs) {
// 未传入已复习的卡片 ID说明是开始新的复习需要清空缓存
reviewCardCache = map[string]riff.Card{}
skipCardCache = map[string]riff.Card{}
}
newCount := 0
reviewCount := 0
for _, c := range dues {