Skip to content

Conversation

@camilasan
Copy link
Member

@camilasan camilasan commented Feb 22, 2018

This implements the request by @karlitschek "It would be great for Nextcloud apps to have the opportunity to create an entry in the primary Desktop Client Menu. So for example the Calendar app could request to have a 'Calendar' entry in the Desktop Client menu. On click it should open the default browser with an url. In this case the Nextcloud Calendar. This would help a lot to promote the Server side apps like Calendar, Spreed, Notes, ..."

The apps are in a section above the section of »Pause all folders« and »Log out«.

One user:
one-user

Multiple users:
multiple-users

One extra: I removed two menu actions in the code that were never being added to any menu.

Camila San added 19 commits February 19, 2018 19:59
Uses option to toggle display of external sites list in the main menu.

Signed-off-by: Camila San <[email protected]>
@camilasan camilasan force-pushed the apps-external-sites-menu branch 6 times, most recently from 3933795 to 1200bc9 Compare February 22, 2018 19:07
…make sure apps is added to the right position.

Signed-off-by: Camila San <[email protected]>
@camilasan camilasan changed the title Apps external sites menu Adds apps and external sites to menu Feb 23, 2018
@jancborchardt jancborchardt self-requested a review February 25, 2018 13:18
foreach (const QJsonValue &value, navLinks) {
auto navLink = value.toObject();
QAction *action = new QAction(navLink.value("name").toString(), this);
QUrl href(account->url().host() + navLink.value("href").toString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just add absolute=true as a get parameter to the OCS request, so the href value already contains the full URL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides that opening fails for me with the following error, when clicking the menu item:

gio: file:///home/jus/repos/nextcloud/build-client-Desktop-Debug/bin/localhost/index.php/apps/contacts: Could not fetch information from »/home/jus/repos/nextcloud/build-client-Desktop-Debug/bin/localhost/index.php/apps/contacts«: File for directory not found

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please, try it again.

@juliusknorr
Copy link
Member

Nice work @camilasan

One minor thing is, that the menu entry shows up after the menu is shown (with the delay of the request). I think we should have it loaded by default and just update it if the request returns anything new.

@camilasan
Copy link
Member Author

@juliushaertl in the PR #197 I am using If-None-Match ETag to check for new notifications. Could we use the same in ocs/v2.php/core/navigation/apps?

@juliusknorr
Copy link
Member

@camilasan Here we go: nextcloud/server#8652

@camilasan
Copy link
Member Author

Can we merge this @juliushaertl ? I will work with If-None-Match ETag in another PR.

@camilasan camilasan merged commit eb3b3f0 into master Mar 9, 2018
@rullzer rullzer deleted the apps-external-sites-menu branch March 9, 2018 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants