Skip to content
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

WIP: Implement folders #560

Merged
merged 24 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d5892cc
Implement folder API
marcelklehr Sep 8, 2018
f4b5271
Folder API: Implement shortcut bookmark add and remove operations
marcelklehr Sep 13, 2018
8847e20
Implement bookmark export with folders
marcelklehr Sep 13, 2018
4473b6f
Implement bookmark import for folders
marcelklehr Sep 14, 2018
0b87f92
UI: Add Folder navigation
marcelklehr Sep 24, 2018
88eab89
UI: Drag and drop bookmarks into folders
marcelklehr Sep 30, 2018
a690e02
Folder API: Fix creation
marcelklehr Sep 30, 2018
8484583
UI: Drag and drop bulk selection into folders
marcelklehr Sep 30, 2018
141280e
UI: Allow larger folder hierarchy
marcelklehr Sep 30, 2018
94f536b
UI: Fix Folders#contains
marcelklehr Sep 30, 2018
36fe01a
UI: Only let the folder label quiver
marcelklehr Sep 30, 2018
5f013ad
Fix folder export
marcelklehr Sep 30, 2018
3044f07
Fix folder import
marcelklehr Sep 30, 2018
0c53fe5
UI: Allow seeing bookmarks in root folder
marcelklehr Oct 2, 2018
b7f7c6b
UI: Don't stretch bookmark cards
marcelklehr Oct 2, 2018
b2f22a0
Transition from database.xml to migrations
marcelklehr Oct 2, 2018
382336d
bump version
marcelklehr Oct 2, 2018
75b9f9f
UI: Allow resorting folders
marcelklehr Oct 2, 2018
bd9de84
UI: Remove first layer of nesting for tags and folders
marcelklehr Oct 3, 2018
1d70639
API: Fix editFolder
marcelklehr Oct 3, 2018
9499b15
UI: Actually fix Interact
marcelklehr Oct 4, 2018
63859e1
Fix FolderView#onDropDeactivate
marcelklehr Oct 20, 2018
743b640
UI: Folders: Hide items before sync hits
marcelklehr Oct 20, 2018
651b525
Folders: Allow reordering children
marcelklehr Oct 29, 2018
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
30 changes: 28 additions & 2 deletions appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
use OCP\AppFramework\Utility\ITimeFactory;
use \OCP\IContainer;
use \OCA\Bookmarks\Controller\WebViewController;
use OCA\Bookmarks\Controller\Rest\TagsController;
use OCA\Bookmarks\Controller\Rest\BookmarkController;
use OCA\Bookmarks\Controller\Rest\InternalTagsController;
use OCA\Bookmarks\Controller\Rest\InternalBookmarkController;
use OCA\Bookmarks\Controller\Rest\TagsController;
use OCA\Bookmarks\Controller\Rest\InternalTagsController;
use OCA\Bookmarks\Controller\Rest\FoldersController;
use OCA\Bookmarks\Controller\Rest\InternalFoldersController;
use OCA\Bookmarks\Controller\Rest\PublicController;
use OCA\Bookmarks\Controller\Rest\SettingsController;
use OCP\IUser;
Expand Down Expand Up @@ -114,6 +116,30 @@ public function __construct(array $urlParams = []) {
);
});

$container->registerService('FoldersController', function ($c) {
/** @var IContainer $c */
$user = $c->query('ServerContainer')->getUserSession()->getUser();
$uid = is_null($user) ? null : $user->getUID();
return new FoldersController(
$c->query('AppName'),
$c->query('Request'),
$uid,
$c->query('ServerContainer')->query(Bookmarks::class)
);
});

$container->registerService('InternalFoldersController', function ($c) {
/** @var IContainer $c */
$user = $c->query('ServerContainer')->getUserSession()->getUser();
$uid = is_null($user) ? null : $user->getUID();
return new InternalFoldersController(
$c->query('AppName'),
$c->query('Request'),
$uid,
$c->query('FoldersController')
);
});

$container->registerService('PublicController', function ($c) {
/** @var IContainer $c */
$user = $c->query('ServerContainer')->getUserSession()->getUser();
Expand Down
109 changes: 0 additions & 109 deletions appinfo/database.xml

This file was deleted.

2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This app allows you to store and organize your favorite places on the web in one spot, while allowing you to sync them with your various devices and browsers.
Check out the third-party clients listed here: https://github.com/nextcloud/bookmarks#third-party-clients
]]></description>
<version>0.13.1</version>
<version>0.14.0</version>
<licence>agpl</licence>
<author mail="blizzz@arthur-schiwon.de" homepage="https://www.arthur-schiwon.de">Arthur Schiwon</author>
<author mail="mklehr@gmx.net">Marcel Klehr</author>
Expand Down
18 changes: 18 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
['name' => 'internal_tags#rename_tag', 'url' => '/tag/{old_name}', 'verb' => 'POST'],
['name' => 'internal_tags#rename_tag', 'url' => '/tag/{old_name}', 'verb' => 'PUT'],
['name' => 'internal_tags#delete_tag', 'url' => '/tag/{old_name}', 'verb' => 'DELETE'],
['name' => 'internal_folders#get_folders', 'url' => '/folder', 'verb' => 'GET'],
['name' => 'internal_folders#get_folder', 'url' => '/folder/{folderId}', 'verb' => 'GET'],
['name' => 'internal_folders#add_folder', 'url' => '/folder', 'verb' => 'POST'],
['name' => 'internal_folders#edit_folder', 'url' => '/folder/{folderId}', 'verb' => 'PUT'],
['name' => 'internal_folders#delete_folder', 'url' => '/folder/{folderId}', 'verb' => 'DELETE'],
['name' => 'internal_folders#get_folder_children_order', 'url' => '/folder/{folderId}/childorder', 'verb' => 'GET'],
['name' => 'internal_folders#set_folder_children_order', 'url' => '/folder/{folderId}/childorder', 'verb' => 'PATCH'],
['name' => 'internal_folders#add_to_folder', 'url' => '/folder/{folderId}/bookmarks/{bookmarkId}', 'verb' => 'POST'],
['name' => 'internal_folders#remove_from_folder', 'url' => '/folder/{folderId}/bookmarks/{bookmarkId}', 'verb' => 'DELETE'],
// Public REST API
['name' => 'bookmark#get_bookmarks', 'url' => '/public/rest/v2/bookmark', 'verb' => 'GET'],
['name' => 'bookmark#new_bookmark', 'url' => '/public/rest/v2/bookmark', 'verb' => 'POST'],
Expand All @@ -54,6 +63,15 @@
['name' => 'tags#full_tags', 'url' => '/public/rest/v2/tag', 'verb' => 'GET'],
['name' => 'tags#rename_tag', 'url' => '/public/rest/v2/tag', 'verb' => 'POST'],
['name' => 'tags#delete_tag', 'url' => '/public/rest/v2/tag', 'verb' => 'DELETE'],
['name' => 'folders#get_folders', 'url' => '/public/rest/v2/folder', 'verb' => 'GET'],
['name' => 'folders#get_folder', 'url' => '/public/rest/v2/folder/{folderId}', 'verb' => 'GET'],
['name' => 'folders#add_folder', 'url' => '/public/rest/v2/folder', 'verb' => 'POST'],
['name' => 'folders#edit_folder', 'url' => '/public/rest/v2/folder/{folderId}', 'verb' => 'PUT'],
['name' => 'folders#delete_folder', 'url' => '/public/rest/v2/folder/{folderId}', 'verb' => 'DELETE'],
['name' => 'folders#get_folder_children_order', 'url' => '/public/rest/v2/folder/{folderId}/childorder', 'verb' => 'GET'],
['name' => 'folders#set_folder_children_order', 'url' => '/public/rest/v2/folder/{folderId}/childorder', 'verb' => 'PATCH'],
['name' => 'folders#add_to_folder', 'url' => '/public/rest/v2/folder/{folderId}/bookmarks/{bookmarkId}', 'verb' => 'POST'],
['name' => 'folders#remove_from_folder', 'url' => '/public/rest/v2/folder/{folderId}/bookmarks/{bookmarkId}', 'verb' => 'DELETE'],
['name' => 'bookmark#preflighted_cors', 'url' => '/public/rest/v2/{path}',
'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],
//Settings
Expand Down
Loading