Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-15 14:55:19 +0300
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-21 10:31:07 +0300
commit9ea72b10104ceb482be33b4626c3603a788a687f (patch)
treec617c4419d160467b587ca02be81c4b65ebef91b /apps/theming/appinfo
parent69d1d1a84e5e8937046d30714f11036b680cc04a (diff)
Migrating themes to Theming app
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/theming/appinfo')
-rw-r--r--apps/theming/appinfo/info.xml5
-rw-r--r--apps/theming/appinfo/routes.php114
2 files changed, 68 insertions, 51 deletions
diff --git a/apps/theming/appinfo/info.xml b/apps/theming/appinfo/info.xml
index 3d7cabe7213..7b6e20a781f 100644
--- a/apps/theming/appinfo/info.xml
+++ b/apps/theming/appinfo/info.xml
@@ -23,8 +23,11 @@
<settings>
<admin>OCA\Theming\Settings\Admin</admin>
- <admin-section>OCA\Theming\Settings\Section</admin-section>
+ <admin-section>OCA\Theming\Settings\AdminSection</admin-section>
+ <personal>OCA\Theming\Settings\Personal</personal>
+ <personal-section>OCA\Theming\Settings\PersonalSection</personal-section>
</settings>
+
<commands>
<command>OCA\Theming\Command\UpdateConfig</command>
</commands>
diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php
index 358f6a39ad4..c9a99a409ef 100644
--- a/apps/theming/appinfo/routes.php
+++ b/apps/theming/appinfo/routes.php
@@ -27,54 +27,68 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-return ['routes' => [
- [
- 'name' => 'Theming#updateStylesheet',
- 'url' => '/ajax/updateStylesheet',
- 'verb' => 'POST'
+return [
+ 'routes' => [
+ [
+ 'name' => 'Theming#updateStylesheet',
+ 'url' => '/ajax/updateStylesheet',
+ 'verb' => 'POST'
+ ],
+ [
+ 'name' => 'Theming#undo',
+ 'url' => '/ajax/undoChanges',
+ 'verb' => 'POST'
+ ],
+ [
+ 'name' => 'Theming#uploadImage',
+ 'url' => '/ajax/uploadImage',
+ 'verb' => 'POST'
+ ],
+ [
+ 'name' => 'Theming#getThemeVariables',
+ 'url' => '/theme/{themeId}.css',
+ 'verb' => 'GET',
+ ],
+ [
+ 'name' => 'Theming#getImage',
+ 'url' => '/image/{key}',
+ 'verb' => 'GET',
+ ],
+ [
+ 'name' => 'Theming#getManifest',
+ 'url' => '/manifest/{app}',
+ 'verb' => 'GET',
+ 'defaults' => ['app' => 'core']
+ ],
+ [
+ 'name' => 'Icon#getFavicon',
+ 'url' => '/favicon/{app}',
+ 'verb' => 'GET',
+ 'defaults' => ['app' => 'core'],
+ ],
+ [
+ 'name' => 'Icon#getTouchIcon',
+ 'url' => '/icon/{app}',
+ 'verb' => 'GET',
+ 'defaults' => ['app' => 'core'],
+ ],
+ [
+ 'name' => 'Icon#getThemedIcon',
+ 'url' => '/img/{app}/{image}',
+ 'verb' => 'GET',
+ 'requirements' => ['image' => '.+']
+ ],
],
- [
- 'name' => 'Theming#undo',
- 'url' => '/ajax/undoChanges',
- 'verb' => 'POST'
- ],
- [
- 'name' => 'Theming#uploadImage',
- 'url' => '/ajax/uploadImage',
- 'verb' => 'POST'
- ],
- [
- 'name' => 'Theming#getThemeVariables',
- 'url' => '/theme/{themeId}.css',
- 'verb' => 'GET',
- ],
- [
- 'name' => 'Theming#getImage',
- 'url' => '/image/{key}',
- 'verb' => 'GET',
- ],
- [
- 'name' => 'Theming#getManifest',
- 'url' => '/manifest/{app}',
- 'verb' => 'GET',
- 'defaults' => ['app' => 'core']
- ],
- [
- 'name' => 'Icon#getFavicon',
- 'url' => '/favicon/{app}',
- 'verb' => 'GET',
- 'defaults' => ['app' => 'core'],
- ],
- [
- 'name' => 'Icon#getTouchIcon',
- 'url' => '/icon/{app}',
- 'verb' => 'GET',
- 'defaults' => ['app' => 'core'],
- ],
- [
- 'name' => 'Icon#getThemedIcon',
- 'url' => '/img/{app}/{image}',
- 'verb' => 'GET',
- 'requirements' => ['image' => '.+']
- ],
-]];
+ 'ocs' => [
+ [
+ 'name' => 'userTheme#enableTheme',
+ 'url' => '/api/v1/theme/{themeId}/enable',
+ 'verb' => 'PUT',
+ ],
+ [
+ 'name' => 'userTheme#disableTheme',
+ 'url' => '/api/v1/theme/{themeId}',
+ 'verb' => 'DELETE',
+ ],
+ ]
+];