mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 00:14:07 +01:00
This commit is contained in:
parent
1063f50375
commit
2dae1200b4
8 changed files with 97 additions and 51 deletions
|
|
@ -193,7 +193,12 @@ export class MobileFiles extends Model {
|
|||
const notebookId = ulElement.getAttribute("data-url");
|
||||
if (!window.siyuan.config.readonly) {
|
||||
if (type === "new") {
|
||||
newFile(app, notebookId, pathString);
|
||||
newFile({
|
||||
app,
|
||||
notebookId,
|
||||
currentPath:pathString,
|
||||
useSavePath: false
|
||||
});
|
||||
} else if (type === "more-root") {
|
||||
initNavigationMenu(app, target.parentElement);
|
||||
window.siyuan.menus.menu.fullscreen("bottom");
|
||||
|
|
|
|||
|
|
@ -52,11 +52,21 @@ export const setEmpty = (app: App) => {
|
|||
break;
|
||||
} else if (target.id === "emptyNewFile") {
|
||||
if (window.siyuan.mobile.editor) {
|
||||
newFile(app, window.siyuan.mobile.editor.protyle.notebookId, window.siyuan.mobile.editor.protyle.path, undefined, true);
|
||||
newFile({
|
||||
app,
|
||||
notebookId: window.siyuan.mobile.editor.protyle.notebookId,
|
||||
currentPath: window.siyuan.mobile.editor.protyle.path,
|
||||
useSavePath: true
|
||||
});
|
||||
} else {
|
||||
window.siyuan.notebooks.find(item => {
|
||||
if (!item.closed) {
|
||||
newFile(app, item.id, "/", undefined, true);
|
||||
newFile({
|
||||
app,
|
||||
notebookId: item.id,
|
||||
currentPath: "/",
|
||||
useSavePath: true
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue