Skip to content

rename all to files_mindmap2 & update node & change project_dir #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
js
node_modules
node_modules
/build
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
app_name=mindmap
app_name=files_mindmap2

project_dir=$(CURDIR)/../$(app_name)
#project_dir=$(CURDIR)/../$(app_name)
project_dir=$(CURDIR)
build_dir=$(CURDIR)/build
appstore_dir=$(build_dir)/appstore
source_dir=$(build_dir)/source
Expand Down Expand Up @@ -37,6 +38,11 @@ appstore: clean
--exclude=/README.md \
--exclude=/.gitignore \
--exclude=/Makefile \
--exclude=/package.json \
--exclude=/package-lock.json \
--exclude=/node_modules \
--exclude=/src \
--exclude=/vite.config.ts \
$(project_dir)/ $(sign_dir)/$(app_name)

@if [[ -f $(cert_dir)/$(app_name).key && -f $(cert_dir)/$(app_name).crt ]]; then \
Expand Down
12 changes: 6 additions & 6 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0"?>
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>mindmap</id>
<id>files_mindmap2</id>
<name>Mind Map</name>
<summary>A Mind map editor</summary>
<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>
<version>0.0.40</version>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://morgancomputers.net">Austin Morgan</author>
<namespace>MindMap</namespace>
<namespace>Files_MindMap2</namespace>
<category>files</category>
<category>office</category>
<website>https://github.com/admorgan/files_mindmap</website>
<bugs>https://github.com/admorgan/files_mindmap/issues</bugs>
<repository type="git">https://github.com/admorgan/files_mindmap.git</repository>
<screenshot small-thumbnail="https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/1-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/1.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/2-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/2.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/3-small.png">https://raw.githubusercontent.com/ACTom/files_mindmap/master/screenshots/3.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/1-small.png">https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/1.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/2-small.png">https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/2.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/3-small.png">https://raw.githubusercontent.com/admorgan/files_mindmap/master/screenshots/3.png</screenshot>
<dependencies>
<nextcloud min-version="28" max-version="29"/>
</dependencies>
<repair-steps>
<install>
<step>OCA\Files_MindMap\Migration\InstallStep</step>
<step>OCA\Files_MindMap2\Migration\InstallStep</step>
</install>
</repair-steps>
</info>
2 changes: 1 addition & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//declare(strict_types=1);
//
//namespace OCA\Files_MindMap\AppInfo;
//namespace OCA\Files_MindMap2\AppInfo;

return ['routes' => [
['name' => 'display#showMindmapViewer', 'url' => '/', 'verb' => 'GET'],
Expand Down
8 changes: 4 additions & 4 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace OCA\Files_MindMap\AppInfo;
namespace OCA\Files_MindMap2\AppInfo;

use OC\Files\Type\Detection;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Files_MindMap\Listener\LoadAdditionalScripts;
use OCA\Files_MindMap2\Listener\LoadAdditionalScripts;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
Expand All @@ -16,7 +16,7 @@


class Application extends App implements IBootstrap {
const APPNAME = 'files_mindmap';
const APPNAME = 'files_mindmap2';

public function __construct(array $urlParams = array()) {
parent::__construct(self::APPNAME, $urlParams);
Expand All @@ -43,7 +43,7 @@ public function register(IRegistrationContext $context): void {
$container = $this->getContainer();
/** @var IEventDispatcher $eventDispatcher */
$eventDispatcher = $container->get(IEventDispatcher::class);
$eventDispatcher->addListener('OCA\Files_Sharing::loadAdditionalScripts', array('OCA\Files_MindMap\Listener\LoadAdditionalScripts','additionalScripts'));
$eventDispatcher->addListener('OCA\Files_Sharing::loadAdditionalScripts', array('OCA\Files_MindMap2\Listener\LoadAdditionalScripts','additionalScripts'));
}

public function boot(IBootContext $context): void {
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/DisplayController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);

namespace OCA\Files_MindMap\Controller;
namespace OCA\Files_MindMap2\Controller;

use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\ContentSecurityPolicy;
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/FileHandlingController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace OCA\Files_MindMap\Controller;
namespace OCA\Files_MindMap2\Controller;


use OC\HintException;
Expand Down Expand Up @@ -129,7 +129,7 @@ public function save($path, $filecontents, $mtime) {

if($file->isUpdateable()) {
if ($mtime != $file->getMTime()) {
$this->logger->error("User cannot save shared mindmap (someone updated it in the meantime): {$mtime} vs. {$file->getMTime()} {$file->getPath()}", ['app' => 'files_mindmap']);
$this->logger->error("User cannot save shared mindmap (someone updated it in the meantime): {$mtime} vs. {$file->getMTime()} {$file->getPath()}", ['app' => 'files_mindmap2']);
return new DataResponse([ 'message' => $this->l->t('The file you are working on was updated in the meantime. You cannot save your progress as saving would overwrite these changes. Please reload the page.')],Http::STATUS_BAD_REQUEST);
}
try {
Expand Down
6 changes: 3 additions & 3 deletions lib/Controller/PublicFileHandlingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Files_MindMap\Controller;
namespace OCA\Files_MindMap2\Controller;

use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
Expand Down Expand Up @@ -200,7 +200,7 @@ public function save($token, $filecontents, $path, $mtime) {

if($file->isUpdateable()) {
if ($mtime != $file->getMTime()) {
$this->logger->error("Anonymous cannot save shared mindmap (someone updated it in the meantime): {$mtime} vs. {$file->getMTime()} {$file->getPath()}", ['app' => 'files_mindmap']);
$this->logger->error("Anonymous cannot save shared mindmap (someone updated it in the meantime): {$mtime} vs. {$file->getMTime()} {$file->getPath()}", ['app' => 'files_mindmap2']);
return new DataResponse([ 'message' => $this->l->t('The file you are working on was updated in the meantime. You cannot save your progress as saving would overwrite these changes. Please reload the page.')],Http::STATUS_BAD_REQUEST);
}
try {
Expand All @@ -221,7 +221,7 @@ public function save($token, $filecontents, $path, $mtime) {
return new DataResponse(['mtime' => $newmtime, 'size' => $newsize], Http::STATUS_OK);
} else {
// Not writeable!
$this->logger->error('User does not have permission to write to share file: ' . $file->getPath(), ['app' => 'files_mindmap']);
$this->logger->error('User does not have permission to write to share file: ' . $file->getPath(), ['app' => 'files_mindmap2']);
return new DataResponse([ 'message' => $this->l->t('Insufficient permissions')],Http::STATUS_BAD_REQUEST);
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Listener/LoadAdditionalScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace OCA\Files_MindMap\Listener;
namespace OCA\Files_MindMap2\Listener;

use OCA\Files_MindMap\AppInfo\Application;
use OCA\Files_MindMap2\AppInfo\Application;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
Expand All @@ -20,6 +20,6 @@ public function handle(Event $event): void {

public static function additionalScripts() {
Util::addStyle(Application::APPNAME, 'style');
Util::addScript(Application::APPNAME, 'files_mindmap-mindmap');
Util::addScript(Application::APPNAME, 'files_mindmap2-mindmap');
}
}
4 changes: 2 additions & 2 deletions lib/Migration/InstallStep.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace OCA\Files_MindMap\Migration;
namespace OCA\Files_MindMap2\Migration;

require \OC::$SERVERROOT . "/3rdparty/autoload.php";

Expand Down Expand Up @@ -36,7 +36,7 @@ public function run(IOutput $output) {

if (version_compare($currentVersion, '21.0.0.11', '<')) {
/* Since 21.0.0 beta4, NC has mindmap's mimetype icon */
$this->logger->info("Copy mindmap icon to core/img directory.", ["app" => "files_mindmap"]);
$this->logger->info("Copy mindmap icon to core/img directory.", ["app" => "files_mindmap2"]);
$appImagePath = __DIR__ . '/../../img/mindmap.svg';
$coreImagePath = \OC::$SERVERROOT . '/core/img/filetypes/mindmap.svg';
if (!file_exists($coreImagePath) || md5_file($coreImagePath) !== md5_file($appImagePath)) {
Expand Down
Loading