Skip to content

Commit

Permalink
NC22 support / 1.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Rojek committed Jun 29, 2021
1 parent d2cc753 commit 1390863
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![](screenshots/icon.png) Nextcloud Draw.io integration app
# ![](screenshots/icon.png) Nextcloud Draw.io / Diagrams.net integration app

This app allows users to create and edit diagrams in [Nextcloud](https://nextcloud.com) using [Draw.io](https://draw.io) on-line editor.
This app allows users to create and edit diagrams in [Nextcloud](https://nextcloud.com) using [Draw.io](https://app.diagrams.net) / Diagrams.net on-line editor.

App Store link: https://apps.nextcloud.com/apps/drawio

Expand All @@ -15,9 +15,9 @@ Once installed, you will see an option to create a Draw.io diagram from the 'cre
- Requires [Nextcloud](https://nextcloud.com) >11.0.0
- Multi language support (l10n)
- Inspired by the old Draw.io Integration and OnlyOffice
- Tested with Chrome 58-89 and Firefox 53-86
- Tested with PHP 5.6/7.1/7.3/8.0
- Draw.io Integration v1.0.0 tested with NextCloud 11.0.3 / 12.0.2 / 13.0.6 / 14.0.4 / 15.0.0 / 16.0.0 / 17.0.0 / 18.0.0 / 19.0.0 / 20.0.0 / 21.0.0
- Tested with Chrome 58-91 and Firefox 53-89
- Tested with PHP 5.6/7.1/7.3/8.0/8.3
- Draw.io Integration v1.0.1 tested with NextCloud 11.0.3 / 12.0.2 / 13.0.6 / 14.0.4 / 15.0.0 / 16.0.0 / 17.0.0 / 18.0.0 / 19.0.0 / 20.0.0 / 21.0.0 / 22.0.0 RC1


## Mimetype detection ##
Expand All @@ -40,12 +40,18 @@ following command:
sudo -u www-data php occ files:scan --all

## Download ##
Current release: [zip](https://github.com/pawelrojek/nextcloud-drawio/releases/download/v.1.0.0/drawio-v1.0.0.zip) or [tar.gz](https://github.com/pawelrojek/nextcloud-drawio/releases/download/v.1.0.0/drawio-v1.0.0.tar.gz)
Current release: [zip](https://github.com/pawelrojek/nextcloud-drawio/releases/download/v.1.0.1/drawio-v1.0.1.zip) or [tar.gz](https://github.com/pawelrojek/nextcloud-drawio/releases/download/v.1.0.1/drawio-v1.0.1.tar.gz)



## Changelog ##

## 1.0.1
- NC22 compatibility
- Unnecessary warnings removed from logs
- Public Template for public links (#142)
- French translation fixed (#144)

## 1.0.0
- Auto MIME type registration for .drawio #122
- Public Link support fixed #133
Expand Down
12 changes: 9 additions & 3 deletions drawio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Change Log

## 1.0.1
- NC22 compatibility
- Unnecessary warnings removed from logs
- Public Template for public links (#142)
- French translation fixed (#144)

## 1.0.0
- Auto MIME type registration for .drawio #122
- Public Link support fixed #133
- Client-side/JS bug fixes #138
- Auto MIME type registration for .drawio (#122)
- Public Link support fixed (#133)
- Client-side/JS bug fixes (#138)
- XML override deprecated (please rename your files to *.drawio)

## 0.9.9
Expand Down
4 changes: 2 additions & 2 deletions drawio/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Draw.io</name>
<summary>Draw.io integration app</summary>
<description>Integrates Draw.io with Nextcloud</description>
<version>1.0.0</version>
<version>1.0.1</version>
<licence>agpl</licence>
<author>Paweł Rojek</author>
<namespace>Drawio</namespace>
Expand All @@ -20,7 +20,7 @@
<repository type="git">https://github.com/pawelrojek/nextcloud-drawio.git</repository>
<screenshot small-thumbnail="https://raw.githubusercontent.com/pawelrojek/nextcloud-drawio/master/screenshots/drawio_integration_sm.png">https://raw.githubusercontent.com/pawelrojek/nextcloud-drawio/master/screenshots/drawio_integration.png</screenshot>
<dependencies>
<nextcloud min-version="11" max-version="21"/>
<nextcloud min-version="11" max-version="22"/>
</dependencies>
<settings>
<admin>OCA\Drawio\AdminSettings</admin>
Expand Down
2 changes: 1 addition & 1 deletion drawio/controller/editorcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function create($name, $dir, $shareToken = NULL)
* @NoCSRFRequired
*/
public function index($fileId, $shareToken = NULL, $filePath = NULL) {
$this->logger->warning("Open: $fileId $shareToken $filePath", array("app" => $this->appName));
//$this->logger->warning("Open: $fileId $shareToken $filePath", array("app" => $this->appName));
if (empty($shareToken) && !$this->userSession->isLoggedIn()) {
$redirectUrl = $this->urlGenerator->linkToRoute("core.login.showLoginForm", [
"redirect_url" => $this->request->getRequestUri()
Expand Down
4 changes: 2 additions & 2 deletions drawio/controller/viewercontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function __construct($AppName,
* @NoCSRFRequired
*/
public function index($fileId, $shareToken = NULL, $filePath = NULL) {
$this->logger->warning("Open: $fileId $shareToken $filePath", array("app" => $this->appName));
//$this->logger->warning("Open: $fileId $shareToken $filePath", array("app" => $this->appName));
if (empty($shareToken) && !$this->userSession->isLoggedIn()) {
$redirectUrl = $this->urlGenerator->linkToRoute("core.login.showLoginForm", [
"redirect_url" => $this->request->getRequestUri()
Expand Down Expand Up @@ -204,7 +204,7 @@ public function index($fileId, $shareToken = NULL, $filePath = NULL) {

}

if ($this->userId) {
if ($this->userId) {
$response = new TemplateResponse($this->appName, "viewer", $params);
} else {
$response = new PublicTemplateResponse($this->appName, "viewer", $params);
Expand Down
3 changes: 2 additions & 1 deletion drawio/templates/viewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

$finalAutosave = $_['drawioAutosave'];
if ($_['drawioReadOnly']) $finalAutosave = false;

?>

<div id="app-content">
Expand All @@ -42,7 +43,7 @@
OCA.DrawIO.DisplayError("<?php p($_['error']) ?>");
<?php } else { ?>
var iframe = document.getElementById("iframeEditor");
var filePath = <?php echo json_encode(urldecode($_['drawioFilePath'])); ?>;
var filePath = "";
var originUrl = "<?php p($_['drawioUrl']); ?>";
var drawIoUrl = "<?php p($_['drawioUrl']); print_unescaped($frame_params); ?>"
var originUrl = "<?php p($_['drawioUrl']); ?>";
Expand Down

0 comments on commit 1390863

Please sign in to comment.