Skip to content

Commit 7d70a33

Browse files
committed
fix a bug
1 parent 8abf737 commit 7d70a33

File tree

11 files changed

+70
-28
lines changed

11 files changed

+70
-28
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source_dir=$(build_dir)/source
77
sign_dir=$(build_dir)/sign
88
package_name=$(app_name)
99
cert_dir=$(CURDIR)/../../key
10-
version+=0.0.3
10+
version+=0.0.4
1111

1212
all: appstore
1313

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Mind map for Nextcloud
2+
3+
This application enables Nextcloud users to open, save and edit mind map files in the web browser.
4+
App icon by [Icons8](https://icons8.com) and mind map powered by [KityMinder Editor](https://github.com/fex-team/kityminder-editor).
5+
6+
7+
这是Nextcloud的一个思维导图应用,它可以让用户在浏览器中打开、编辑、保存思维导图文件,应用的图标来自于[Icons8](https://icons8.com),应用核心显示模块采用[KityMinder Editor](https://github.com/fex-team/kityminder-editor)
8+
9+
# 应用截图
10+
![截图1](https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/1.png)
11+
12+
![截图2](https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/2.png)
13+
14+
![截图3](https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/3.png)
15+
16+
# 计划
17+
* 本地图片上传并编码至km文件
18+
* 多标签页思维导图kmp格式支持
19+
* xmind格式支持

appinfo/info.xml

+27-22
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
<?xml version="1.0"?>
22
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
4-
<id>files_mindmap</id>
5-
<name>Mind Map</name>
6-
<summary>A Mind map editor</summary>
7-
<description><![CDATA[This application enables Nextcloud users to open, save and edit mind map files in the web browser. If enabled, an entry in the New button at the top of the web browser the Mindmap file entry appears. When clicked, a new mindmap file opens in the browser and the file can be saved into the current Nextcloud directory.]]></description>
8-
<version>0.0.3</version>
9-
<licence>agpl</licence>
10-
<author mail="[email protected]" homepage="https://actom.me">Jingtao Yan</author>
11-
<namespace>Files_MindMap</namespace>
12-
<category>files</category>
13-
<category>office</category>
14-
<bugs>https://github.com/ACTom/files_mindmap/issues</bugs>
15-
<dependencies>
16-
<nextcloud min-version="14" max-version="14"/>
17-
</dependencies>
18-
<repair-steps>
19-
<install>
20-
<step>OCA\Files_MindMap\Migration\InstallStep</step>
21-
</install>
22-
<uninstall>
23-
<step>OCA\Files_MindMap\Migration\UninstallStep</step>
24-
</uninstall>
25-
</repair-steps>
4+
<id>files_mindmap</id>
5+
<name>Mind Map</name>
6+
<summary>A Mind map editor</summary>
7+
<description><![CDATA[This application enables Nextcloud users to open, save and edit mind map files in the web browser. If enabled, an entry in the New button at the top of the web browser the Mindmap file entry appears. When clicked, a new mindmap file opens in the browser and the file can be saved into the current Nextcloud directory.]]></description>
8+
<version>0.0.4</version>
9+
<licence>agpl</licence>
10+
<author mail="[email protected]" homepage="https://actom.me">Jingtao Yan</author>
11+
<namespace>Files_MindMap</namespace>
12+
<category>files</category>
13+
<category>office</category>
14+
<bugs>https://github.com/ACTom/files_mindmap/issues</bugs>
15+
<repository type="git">https://github.com/ACTom/files_mindmap.git</repository>
16+
<screenshot small-thumbnail="https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/1-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/1.png</screenshot>
17+
<screenshot small-thumbnail="https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/2-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/2.png</screenshot>
18+
<screenshot small-thumbnail="https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/3-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/3.png</screenshot>
19+
<dependencies>
20+
<php min-version="5.6"/>
21+
<nextcloud min-version="14" max-version="14"/>
22+
</dependencies>
23+
<repair-steps>
24+
<install>
25+
<step>OCA\Files_MindMap\Migration\InstallStep</step>
26+
</install>
27+
<uninstall>
28+
<step>OCA\Files_MindMap\Migration\UninstallStep</step>
29+
</uninstall>
30+
</repair-steps>
2631
</info>

appinfo/routes.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
2-
declare(strict_types=1);
3-
4-
namespace OCA\Files_MindMap\AppInfo;
2+
//declare(strict_types=1);
3+
//
4+
//namespace OCA\Files_MindMap\AppInfo;
55

66
return ['routes' => [
77
['name' => 'display#showMindmapViewer', 'url' => '/', 'verb' => 'GET'],

lib/Controller/FileHandlingController.php

+20-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ public function __construct($AppName,
4646
$this->userFolder = $userFolder;
4747
}
4848

49+
/**
50+
* load mind map file
51+
*
52+
* @NoAdminRequired
53+
*
54+
* @param string $dir
55+
* @param string $filename
56+
* @return DataResponse
57+
*/
4958
public function load($dir, $filename) {
5059
try {
5160
if (!empty($filename)) {
@@ -58,8 +67,8 @@ public function load($dir, $filename) {
5867
return new DataResponse(['message' => $this->l->t('You can not open a folder')], Http::STATUS_BAD_REQUEST);
5968
}
6069

61-
// default of 4MB
62-
$maxSize = 4194304;
70+
// default of 100MB
71+
$maxSize = 104857600;
6372
if ($file->getSize() > $maxSize) {
6473
return new DataResponse(['message' => (string)$this->l->t('This file is too big to be opened. Please download the file instead.')], Http::STATUS_BAD_REQUEST);
6574
}
@@ -98,6 +107,15 @@ public function load($dir, $filename) {
98107
}
99108
}
100109

110+
/**
111+
* save mind map file
112+
*
113+
* @NoAdminRequired
114+
*
115+
* @param string $path
116+
* @param string $filecontents
117+
* @return DataResponse
118+
*/
101119
public function save($path, $filecontents) {
102120
try {
103121
if($path !== '') {

screenshots/1-small.png

49.2 KB
Loading

screenshots/1.png

298 KB
Loading

screenshots/2-small.png

33.7 KB
Loading

screenshots/2.png

221 KB
Loading

screenshots/3-small.png

44.2 KB
Loading

screenshots/3.png

273 KB
Loading

0 commit comments

Comments
 (0)