1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 03:18:23 +00:00

12.0 change add existing file in wiki edit (#6057)

* 12.0 change add existing file in wiki edit

* 01 delete create wiki from existing library

* 02 change click wiki name jump to edit page and delete edit icon

* 03 delete select existing file to create new page

* optimize edit wiki

* 04 old wiki page use the early version 11.x features

* optimize wiki permission

* wiki add wiki2

* delete page file

* fix wiki test

---------

Co-authored-by: ‘JoinTyang’ <yangtong1009@163.com>
This commit is contained in:
Michael An
2024-05-15 11:57:30 +08:00
committed by GitHub
parent a4fa7f899a
commit d7ac5688ef
73 changed files with 2649 additions and 1422 deletions

View File

@@ -1,25 +1,8 @@
import { slug, repoID, historyRepoID } from './constants';
import { repoID, historyRepoID } from './constants';
import { seafileAPI } from './seafile-api';
class EditorUtilities {
getFiles() {
return seafileAPI.listWikiDir(slug, '/').then(items => {
const files = items.data.dir_file_list.map(item => {
return {
name: item.name,
type: item.type === 'dir' ? 'dir' : 'file',
isExpanded: item.type === 'dir' ? true : false,
parent_path: item.parent_dir,
last_update_time: item.last_update_time,
permission: item.permission,
size: item.size
};
});
return files;
});
}
listRepoDir() {
return seafileAPI.listDir(repoID, '/',{recursive: true}).then(items => {
const files = items.data.dirent_list.map(item => {