From 0c7ff7477b8514d1c23756525887db353d2e25b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 25 Jul 2018 18:48:08 +0200 Subject: [PATCH 01/11] Bump version to 0.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 5eee182f6..c2bc201f4 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -14,7 +14,7 @@ - 🚀 Get your project organized - 0.4.1-dev1 + 0.4.1 agpl Julius Härtl Deck From dfe6e2f21668fa2794af8af2c19d7c67f578c409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 12 Jul 2018 16:06:17 +0200 Subject: [PATCH 02/11] Cast uploadLimit to integer to catch possible INF result MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/PageController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 6e06db25d..b8a8449ae 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -46,7 +46,7 @@ class PageController extends Controller { public function index() { $params = [ 'user' => $this->userId, - 'maxUploadSize' => \OCP\Util::uploadLimit(), + 'maxUploadSize' => (int)\OCP\Util::uploadLimit(), ]; return new TemplateResponse('deck', 'main', $params); } From 9b63e4d745fcc77fc57bc0b5ed41799b70122bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 18 Jul 2018 22:08:35 +0200 Subject: [PATCH 03/11] Simly remove 4byte chars from the description if those are not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/AppInfo/Application.php | 4 ++++ lib/Db/CardMapper.php | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index aac44b52d..528c1e416 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -61,6 +61,10 @@ class Application extends App { return $container->getServer()->getConfig()->getSystemValue('dbtype', 'sqlite'); }); + $container->registerService('database4ByteSupport', function($container) { + return $container->getServer()->getDatabaseConnection()->supports4ByteText(); + }); + // Delete user/group acl entries when they get deleted /** @var IUserManager $userManager */ $userManager = $server->getUserManager(); diff --git a/lib/Db/CardMapper.php b/lib/Db/CardMapper.php index 7c5e78462..e0234fc43 100644 --- a/lib/Db/CardMapper.php +++ b/lib/Db/CardMapper.php @@ -38,29 +38,40 @@ class CardMapper extends DeckMapper implements IPermissionMapper { /** @var IManager */ private $notificationManager; private $databaseType; + private $database4ByteSupport; public function __construct( IDBConnection $db, LabelMapper $labelMapper, IUserManager $userManager, IManager $notificationManager, - $databaseType = 'sqlite' + $databaseType = 'sqlite', + $database4ByteSupport = true ) { parent::__construct($db, 'deck_cards', Card::class); $this->labelMapper = $labelMapper; $this->userManager = $userManager; $this->notificationManager = $notificationManager; $this->databaseType = $databaseType; + $this->database4ByteSupport = $database4ByteSupport; } public function insert(Entity $entity) { $entity->setDatabaseType($this->databaseType); $entity->setCreatedAt(time()); $entity->setLastModified(time()); + if (!$this->database4ByteSupport) { + $description = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $entity->getDescription()); + $entity->setDescription($description); + } return parent::insert($entity); } public function update(Entity $entity, $updateModified = true) { + if (!$this->database4ByteSupport) { + $description = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $entity->getDescription()); + $entity->setDescription($description); + } $entity->setDatabaseType($this->databaseType); if ($updateModified) { From aa4db7f7890ff0281cc804948b6acc3b2ebd95e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 25 Jul 2018 18:39:08 +0200 Subject: [PATCH 04/11] Check when assigning users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/CardService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Service/CardService.php b/lib/Service/CardService.php index f76ce220e..26fa3753c 100644 --- a/lib/Service/CardService.php +++ b/lib/Service/CardService.php @@ -195,6 +195,7 @@ class CardService { } public function assignUser($cardId, $userId) { + $this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT); $assignments = $this->assignedUsersMapper->find($cardId); foreach ($assignments as $assignment) { if ($assignment->getParticipant() === $userId) { @@ -208,6 +209,7 @@ class CardService { } public function unassignUser($cardId, $userId) { + $this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT); $assignments = $this->assignedUsersMapper->find($cardId); foreach ($assignments as $assignment) { if ($assignment->getParticipant() === $userId) { From 9e21c8597f5864956bd2e81a212b41ce3f9cb32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 25 Jul 2018 17:50:42 +0200 Subject: [PATCH 05/11] Move app sidebar out of app content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/style.scss | 47 +++++++++++++++++-------------- js/app/Config.js | 7 +++-- templates/main.php | 20 ++++++------- templates/part.board.mainView.php | 1 - templates/part.board.php | 4 --- templates/part.card.php | 8 +++--- 6 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 templates/part.board.php diff --git a/css/style.scss b/css/style.scss index 673c4b45c..064458d3c 100644 --- a/css/style.scss +++ b/css/style.scss @@ -70,6 +70,32 @@ input.input-inline { cursor: text; } +/** + * Generic app layout + */ + +.app.app-deck { + width: 100%; + height: 100%; + display: flex; +} + + +#app-content { + display: flex; + flex-direction: column; +} +#content-wrapper { + overflow: hidden; + position: fixed; + width: 100%; + height: 100%; + #content { + height: calc(100% - 50px); + min-height: initial; + } +} + /** * Navigation sidebar */ @@ -617,17 +643,6 @@ input.input-inline { /** * App sidebar */ -#app-sidebar { - right: -500px; - max-width: 100%; - width: 500px; - display:flex; - flex-direction: column; - - &.details-visible { - right: 0; - } -} #sidebar-header { h3 { @@ -922,16 +937,6 @@ input.input-inline { } } -#app-content { - overflow: hidden; - display: flex; - flex-direction: column; - - &.details-visible { - margin-right: 500px; - } -} - .labels { display: block; overflow: hidden; diff --git a/js/app/Config.js b/js/app/Config.js index 8a8510496..fcb2203fe 100644 --- a/js/app/Config.js +++ b/js/app/Config.js @@ -71,8 +71,9 @@ app.config(function ($provide, $interpolateProvider, $httpProvider, $urlRouterPr tab: {value: 0, dynamic: true}, }, views: { - 'sidebarView': { - templateUrl: '/board.sidebarView.html' + 'sidebarView@': { + templateUrl: '/board.sidebarView.html', + controller: 'BoardController' } } }) @@ -82,7 +83,7 @@ app.config(function ($provide, $interpolateProvider, $httpProvider, $urlRouterPr tab: {value: 0, dynamic: true}, }, views: { - 'sidebarView': { + 'sidebarView@': { templateUrl: '/card.sidebarView.html', controller: 'CardController' } diff --git a/templates/main.php b/templates/main.php index 0dc3b7fb8..9e61ad6e8 100644 --- a/templates/main.php +++ b/templates/main.php @@ -28,32 +28,30 @@ Util::addScript('deck', 'build/vendor'); Util::addStyle('deck', 'style'); Util::addScript('deck', 'build/deck'); + +if (\OC_Util::getVersion()[0] < 14) { + Util::addStyle('deck', 'comp-13'); +} ?> -
+
inc('part.navigation')); ?> inc('part.settings')); */ ?>
-
-
-
+
+
- - - -
+
\ No newline at end of file diff --git a/templates/part.board.mainView.php b/templates/part.board.mainView.php index 717770d59..28d366af1 100644 --- a/templates/part.board.mainView.php +++ b/templates/part.board.mainView.php @@ -37,7 +37,6 @@
- {{ cardOpen }}
diff --git a/templates/part.board.php b/templates/part.board.php deleted file mode 100644 index 7fe90db85..000000000 --- a/templates/part.board.php +++ /dev/null @@ -1,4 +0,0 @@ -inc('part.board.mainView')); ?> -
-
diff --git a/templates/part.card.php b/templates/part.card.php index 1b8a4920a..6b7146bd7 100644 --- a/templates/part.card.php +++ b/templates/part.card.php @@ -1,5 +1,5 @@ -
-
+
+

t('Drop your files here to upload it to the card')); ?>

@@ -97,8 +97,8 @@ t('Saved')); ?> t('Unsaved changes')); ?> t('Formatting help')); ?> - - + +
From 123e5998a9abc427813b75ff4adb90e30dcde345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 25 Jul 2018 17:51:01 +0200 Subject: [PATCH 06/11] Add CSS rules for 13 to be backward compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/comp-13.scss | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 css/comp-13.scss diff --git a/css/comp-13.scss b/css/comp-13.scss new file mode 100644 index 000000000..776bcdc4b --- /dev/null +++ b/css/comp-13.scss @@ -0,0 +1,29 @@ +#content-wrapper #content { + height: 100%; +} +#app-content { + flex-grow: 1; + height: 100%; +} + +#app-sidebar { + right: -500px; + max-width: 100%; + width: 500px; + display:flex; + flex-direction: column; + + &.details-visible { + right: 0; + } +} + +#app-content { + &.details-visible { + margin-right: 500px; + } +} + +#content[class*='app-'] * { + box-sizing: border-box; +} From 0dd70fb461f6c9281decd83d278d18133305dd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 25 Jul 2018 20:51:41 +0200 Subject: [PATCH 07/11] Move app sidebar handling to angular/css MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/comp-13.scss | 12 ++++++++++++ css/style.scss | 21 ++++++++++++++++++++- js/app/Run.js | 20 -------------------- js/controller/AppController.js | 9 +++++++++ templates/main.php | 4 ++-- 5 files changed, 43 insertions(+), 23 deletions(-) diff --git a/css/comp-13.scss b/css/comp-13.scss index 776bcdc4b..1d888ee92 100644 --- a/css/comp-13.scss +++ b/css/comp-13.scss @@ -27,3 +27,15 @@ #content[class*='app-'] * { box-sizing: border-box; } + + +body:not(.snapjs-left) { + .app-navigation-hide { + #app-content { + margin-left: 0 !important; /* overwrite margin since we want the translateX to handle it*/ + } + #app-navigation { + display: none; + } + } +} \ No newline at end of file diff --git a/css/style.scss b/css/style.scss index 064458d3c..dfcbaf4fc 100644 --- a/css/style.scss +++ b/css/style.scss @@ -264,7 +264,7 @@ input.input-inline { } } -#app-navigation-toggle { +#app-navigation-toggle-custom { width: 44px; height: 44px; cursor: pointer; @@ -1439,3 +1439,22 @@ input.input-inline { .ui-select-dropdown.select2-drop-active { opacity: 1 !important; } + +/** + * Custom app sidebar handling + */ +body:not(.snapjs-left) { + .app-navigation-hide { + #app-content { + margin-left: 0 !important; /* overwrite margin since we want the translateX to handle it*/ + } + #app-navigation { + transform: translateX(-300px); + } + } +} +@media only screen and (max-width: 768px) { + #app-navigation-toggle-custom { + display: none; + } +} \ No newline at end of file diff --git a/js/app/Run.js b/js/app/Run.js index 6fef22355..60523305c 100644 --- a/js/app/Run.js +++ b/js/app/Run.js @@ -56,26 +56,6 @@ app.run(function ($document, $rootScope, $transitions, BoardService) { OC.filePath('deck', 'img', 'app-512.png') ); - $('#app-navigation-toggle').off('click'); - // App sidebar on mobile - var snapper = new Snap({ - element: document.getElementById('app-content'), - disable: 'right', - maxPosition: 250, - touchToDrag: false - }); - - $('#app-navigation-toggle').click(function () { - if ($(window).width() > 768) { - $('#app-navigation').toggle('hidden'); - } else { - if (snapper.state().state === 'left') { - snapper.close(); - } else { - snapper.open('left'); - } - } - }); // Select all elements with data-toggle="tooltips" in the document $('body').tooltip({ selector: '[data-toggle="tooltip"]' diff --git a/js/controller/AppController.js b/js/controller/AppController.js index 62f4e088a..356d3f283 100644 --- a/js/controller/AppController.js +++ b/js/controller/AppController.js @@ -30,4 +30,13 @@ app.controller('AppController', function ($scope, $location, $http, $log, $rootS $scope.sidebar = $rootScope.sidebar; $scope.user = oc_current_user; $rootScope.config = JSON.parse($attrs.config); + + $scope.appNavigationHide = false; + + $scope.toggleSidebar = function() { + if ($(window).width() > 768) { + $scope.appNavigationHide = !$scope.appNavigationHide; + console.log($scope.appNavigationHide); + } + } }); diff --git a/templates/main.php b/templates/main.php index 9e61ad6e8..2cd2310e6 100644 --- a/templates/main.php +++ b/templates/main.php @@ -34,13 +34,13 @@ if (\OC_Util::getVersion()[0] < 14) { } ?> -
+
inc('part.navigation')); ?> inc('part.settings')); */ ?>
-
+
From 38ec3ec0ca7ac238ac7bdebf1d51958a85d29b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 25 Jul 2018 20:56:13 +0200 Subject: [PATCH 08/11] Cleanup css MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/comp-13.scss | 13 +++++-------- css/style.scss | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/css/comp-13.scss b/css/comp-13.scss index 1d888ee92..770fd8727 100644 --- a/css/comp-13.scss +++ b/css/comp-13.scss @@ -4,6 +4,10 @@ #app-content { flex-grow: 1; height: 100%; + + &.details-visible { + margin-right: 500px; + } } #app-sidebar { @@ -18,21 +22,14 @@ } } -#app-content { - &.details-visible { - margin-right: 500px; - } -} - #content[class*='app-'] * { box-sizing: border-box; } - body:not(.snapjs-left) { .app-navigation-hide { #app-content { - margin-left: 0 !important; /* overwrite margin since we want the translateX to handle it*/ + margin-left: 0 !important; } #app-navigation { display: none; diff --git a/css/style.scss b/css/style.scss index dfcbaf4fc..4f0d73c8c 100644 --- a/css/style.scss +++ b/css/style.scss @@ -73,27 +73,27 @@ input.input-inline { /** * Generic app layout */ - -.app.app-deck { - width: 100%; - height: 100%; - display: flex; -} - - -#app-content { - display: flex; - flex-direction: column; -} #content-wrapper { overflow: hidden; position: fixed; width: 100%; height: 100%; + #content { height: calc(100% - 50px); min-height: initial; } + + .app.app-deck { + width: 100%; + height: 100%; + display: flex; + } + + #app-content { + display: flex; + flex-direction: column; + } } /** From 480d01fe9d364c3a1365eafabee012cd60e6b2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 27 Jul 2018 00:06:26 +0200 Subject: [PATCH 09/11] Fix eslint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/AppController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/controller/AppController.js b/js/controller/AppController.js index 356d3f283..c2e4ef4cf 100644 --- a/js/controller/AppController.js +++ b/js/controller/AppController.js @@ -38,5 +38,5 @@ app.controller('AppController', function ($scope, $location, $http, $log, $rootS $scope.appNavigationHide = !$scope.appNavigationHide; console.log($scope.appNavigationHide); } - } + }; }); From 498d062657b7cd6e56210f567554bdc29e66a7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sat, 28 Jul 2018 13:06:40 +0200 Subject: [PATCH 10/11] Fix more 14 layout issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- css/style.scss | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/css/style.scss b/css/style.scss index 4f0d73c8c..bc863506f 100644 --- a/css/style.scss +++ b/css/style.scss @@ -73,27 +73,21 @@ input.input-inline { /** * Generic app layout */ -#content-wrapper { - overflow: hidden; - position: fixed; + +#content { + height: 100%; + min-height: initial; +} + +.app.app-deck { width: 100%; height: 100%; + display: flex; +} - #content { - height: calc(100% - 50px); - min-height: initial; - } - - .app.app-deck { - width: 100%; - height: 100%; - display: flex; - } - - #app-content { - display: flex; - flex-direction: column; - } +#app-content { + display: flex; + flex-direction: column; } /** From 81ea719329c68a60053181253eda56f2e2ea5e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sat, 28 Jul 2018 13:14:30 +0200 Subject: [PATCH 11/11] Prepare changelog for 0.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92dc70c47..61ee9d9cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ # Changelog All notable changes to this project will be documented in this file. +## 0.4.1 - 2018-07-28 + +### Added + +- Make app compatible with Nextcloud 14 + +### Fixed + +- Fix bug with file upload on unlimited quota +- Fix issue on MySQL databases that don't support 4-byte characters +- Fix check when assigning users + ## 0.4.0 - 2018-07-11 ### Added