Skip to content

Commit

Permalink
Fix application structure (#52)
Browse files Browse the repository at this point in the history
* refactor: style consistency

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: delete dead code

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: remove duplicates and simplify logics

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: fix templates

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: remove unused file

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: add to docs

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: re-order info

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: icon name

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: fix settings as much as I can

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: todo comments

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: temporary delete app store signature

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: move settings template to parent directory

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

* refactor: clean up javascript files

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>

---------

Signed-off-by: Mohammad Mahdi Baghbani Pourvahid <mahdi-baghbani@azadehafzar.io>
  • Loading branch information
MahdiBaghbani authored Sep 16, 2023
1 parent 13656d0 commit 8326266
Show file tree
Hide file tree
Showing 37 changed files with 276 additions and 3,844 deletions.
2 changes: 1 addition & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'href' => $urlGenerator->linkToRoute('sciencemesh.app.contacts'),

// The icon that will be shown in the navigation, located in img/
'icon' => $urlGenerator->imagePath('sciencemesh', 'app.svg'),
'icon' => $urlGenerator->imagePath('sciencemesh', 'app-white.svg'),

// The application's title, used in the navigation & the settings page of your app
'name' => OC::$server->getL10N('sciencemesh')->t('ScienceMesh'),
Expand Down
70 changes: 0 additions & 70 deletions appinfo/application.php

This file was deleted.

4 changes: 2 additions & 2 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<summary>Connect your ownCloud-10 instance to your Reva instance and the Science Mesh</summary>
<description>Connect your ownCloud-10 instance to your Reva instance and the Science Mesh</description>

<licence>agpl</licence>
<licence>AGPL</licence>
<version>0.5.0</version>

<website>https://sciencemesh.io</website>
Expand All @@ -19,14 +19,14 @@
<author mail="support@pondersource.com" homepage="https://pondersource.com">Stichting Ponder Source</author>
<author mail="info@muze.nl" homepage="https://www.muze.nl">Muze B.V.</author>
<author mail="michiel@pondersource.com">Michiel de Jong (Ponder Source)</author>
<author mail="yvo@muze.nl">Yvo Brevoort (Muze)</author>
<author mail="mahdi.baghbani1@gmail.com">Mahdi Baghbani (Ponder Source)</author>
<author mail="parhamin2010@gmail.com">Parham Rahimpour (Ponder Source)</author>
<author mail="mr.vahedi68@gmail.com">Mohammadreza Vahedi (Ponder Source)</author>
<author mail="triantafyllenia@tuta.io">Triantafullenia Doumani (Ponder Source)</author>
<author mail="benz.schenk@brokkoli.be">Benz Schenk (Ponder Source)</author>
<author mail="ismail94.94@mail.ru">Ismoil Shifoev (Ponder Source)</author>
<author mail="github@pother.ca">Ben Peachey (Muze)</author>
<author mail="yvo@muze.nl">Yvo Brevoort (Muze)</author>

<dependencies>
<nextcloud min-version="28" max-version="28"/>
Expand Down
23 changes: 10 additions & 13 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
* it's instantiated in there
*/

namespace OCA\MyApp\AppInfo;

use OCA\ScienceMesh\AppInfo\ScienceMeshApp;
namespace OCA\ScienceMesh\AppInfo;

$routes_array = [
'routes' => [

// TODO @Mahdi: Split this RevaController into different controllers.
// TODO: @Mahdi Split this RevaController into different controllers.

// auth routes.
['name' => 'reva#Authenticate', 'url' => '/~{userId}/api/auth/Authenticate', 'verb' => 'POST'],
Expand All @@ -38,7 +36,7 @@
['name' => 'reva#Unshare', 'url' => '/~{userId}/api/ocm/Unshare', 'verb' => 'POST'],
['name' => 'reva#UpdateShare', 'url' => '/~{userId}/api/ocm/UpdateShare', 'verb' => 'POST'],

// TODO @Mahdi: why do we have alias here? check with @Giuseppe and Reva EFSS code.
// TODO: @Mahdi why do we have alias here? check with @Giuseppe and Reva EFSS code.
['name' => 'reva#ListSentShares', 'url' => '/~{userId}/api/ocm/ListSentShares', 'verb' => 'POST'],
// alias for ListSentShares.
['name' => 'reva#ListSentShares', 'url' => '/~{userId}/api/ocm/ListShares', 'verb' => 'POST'],
Expand Down Expand Up @@ -78,7 +76,7 @@
['name' => 'reva#UpdateGrant', 'url' => '/~{userId}/api/storage/UpdateGrant', 'verb' => 'POST'],
['name' => 'reva#Upload', 'url' => '/~{userId}/api/storage/Upload/{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+']],

// TODO @Mahdi: Are these used anywhere in Reva?
// TODO: @Mahdi Are these used anywhere in Reva?
// files routes.
['name' => 'storage#handleGet', 'url' => '/~{userId}/files/{path}', 'verb' => 'GET', 'requirements' => ['path' => '.+']],
['name' => 'storage#handlePost', 'url' => '/~{userId}/files/{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+']],
Expand All @@ -94,25 +92,24 @@
['name' => 'app#invitationsSends', 'url' => '/invitations/emailsend', 'verb' => 'POST'],
['name' => 'app#invitationsGenerate', 'url' => '/invitations/generate', 'verb' => 'GET'],

// TODO @Mahdi: Move these to contacts controller.
// TODO: @Mahdi Move these to contacts controller.
['name' => 'app#contacts', 'url' => '/contacts', 'verb' => 'GET'],
['name' => 'app#contactsAccept', 'url' => '/contacts/accept', 'verb' => 'POST'],
['name' => 'app#contactsFindUsers', 'url' => '/contacts/users', 'verb' => 'GET'],

// contacts routes.
['name' => 'contacts#deleteContact', 'url' => '/contact/deleteContact', 'verb' => 'POST'],

// TODO @Mahdi: Are these used anywhere?
// TODO: @Mahdi Are these used anywhere?
// page routes.
['name' => 'page#get_metrics', 'url' => '/metrics', 'verb' => 'GET'],
['name' => 'page#get_internal_metrics', 'url' => '/internal_metrics', 'verb' => 'GET'],

// TODO: @Mahdi Fix settings endpoints.
// settings routes.
["name" => "settings#get_settings", "url" => "/ajax/settings", "verb" => "GET"],
["name" => "settings#save_settings", "url" => "/ajax/settings/address", "verb" => "PUT"],
["name" => "settings#get_sciencemesh_settings", "url" => "/sciencemesh_settings", "verb" => "GET"],
["name" => "settings#save_sciencemesh_settings", "url" => "/ajax/sciencemesh_settings/save", "verb" => "GET"],
["name" => "settings#check_connection_settings", "url" => "/ajax/check_connection_settings", "verb" => "GET"]
["name" => "settings#saveSettings", "url" => "/ajax/settings/address", "verb" => "PUT"],
["name" => "settings#saveSciencemeshSettings", "url" => "/ajax/sciencemesh_settings/save", "verb" => "GET"],
["name" => "settings#checkConnectionSettings", "url" => "/ajax/check_connection_settings", "verb" => "GET"]
]
];

Expand Down
Loading

0 comments on commit 8326266

Please sign in to comment.