diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-04-15 13:55:19 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-04-21 09:31:07 +0200 |
commit | 9ea72b10104ceb482be33b4626c3603a788a687f (patch) | |
tree | c617c4419d160467b587ca02be81c4b65ebef91b /apps/theming/appinfo | |
parent | 69d1d1a84e5e8937046d30714f11036b680cc04a (diff) | |
download | nextcloud-server-9ea72b10104ceb482be33b4626c3603a788a687f.tar.gz nextcloud-server-9ea72b10104ceb482be33b4626c3603a788a687f.zip |
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.xml | 5 | ||||
-rw-r--r-- | apps/theming/appinfo/routes.php | 114 |
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', + ], + ] +]; |