summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/Controller
Commit message (Collapse)AuthorAgeFilesLines
* Fix possible test timing issues in IconControllerRoeland Jago Douma2018-06-131-6/+0
| | | | | | | Since the response now handles the caching. We need to provide a default ITimeFactory mock. Else you might have failing tests. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mock the timefactory in the theming testsRoeland Jago Douma2018-06-071-5/+0
| | | | | | | Now that the cache logic is moved to the theming controller we must properly overwrite this service. Else it could do :boom: in tests. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix usageRoeland Jago Douma2018-06-042-29/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* also add a privacy linkArthur Schiwon2018-05-241-0/+11
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #9437 from nextcloud/feature/noid/imprintRoeland Jago Douma2018-05-171-0/+11
|\ | | | | allow to specify a link to a legal notice
| * allow to specify a link to a legal noticeArthur Schiwon2018-05-091-0/+11
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Add Content-Disposition headerJulius Härtl2018-05-171-0/+1
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Properly check mime type of the uploaded fileJulius Härtl2018-05-171-2/+3
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix theming testsJulius Härtl2018-04-191-8/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add typehintsJulius Härtl2018-04-191-1/+0
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move to more generic image handling and add extra imagesJulius Härtl2018-04-192-126/+87
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update ThemingController.phprakekniven2018-03-191-1/+1
| | | Changed file according to discussion on PR.
* Update ThemingController.phprakekniven2018-03-161-3/+3
| | | | Changed wording according to discussion at Transifex. See https://www.transifex.com/nextcloud/nextcloud/translate/#de/$/121491259?issue=yes Aligned ending of error messages
* Update ThemingController.phprakekniven2018-03-101-1/+1
| | | | Improved translation string. Reported at Transifex. See https://www.transifex.com/nextcloud/nextcloud/translate/#de/$/121491256?issue=yes
* Remove null checkKyle Fazzari2018-02-251-7/+2
| | | | Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
* theming: handle not being in the serverrootKyle Fazzari2018-02-201-3/+15
| | | | | | | | | | | | | | Currently, the theming app assumes it's in the serverroot. However, with Nextcloud's flexibility regarding configurable app paths, this is not a safe assumption to make. If it happens to be an incorrect assumption, the theming app fails to work. Instead of relying on the serverroot, just use the path from the AppManager and utilize relative paths for assets from there. Fix #8462 Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
* Remove unused import statementsMorris Jobke2018-02-141-2/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Theming: adjust background image resizingJulius Härtl2018-01-191-6/+4
| | | | | | | | Support high resolution login images by resizing only images that are wider than 4096px fixes #7459 Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix SCSS processing when undoing theming valuesJulius Härtl2018-01-091-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix faulty path in theming scss generationJulius Härtl2018-01-051-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headersMorris Jobke2017-11-062-1/+8
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Theming: Add tests for mimetype and upload error checksJulius Härtl2017-10-031-11/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Theming: Check valid image format also for logoJulius Härtl2017-10-031-0/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Theming: Handle errors on uploaded files properlyJulius Härtl2017-10-031-1/+22
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add themed manifest.json to theming appJulius Härtl2017-09-121-0/+35
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Provide "server.css" URL in ThemingController responseDaniel Calviño Sánchez2017-08-101-3/+10
| | | | | | | | | | | | | | Pull request #5429 made cached SCSS files depend on a hash of the base URL, so the "/css/core/server.css" file does no longer exist. The "server.css" URL must be known by the Theming app in order to update the stylesheets when previewing the changes to the theme, so the DataResponse from the controller now provides the full URL to the "server.css" file that has to be reloaded (if any). The "server.css" URL provided by the response will be taken into account by the JavaScript front-end in a following commit. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Inject FileAccessHelper for proper testingJulius Härtl2017-05-181-7/+7
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add proper Content-Type to iconsJulius Härtl2017-05-171-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fallback to default faviconJulius Härtl2017-05-171-17/+31
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix tests for theming backgroundColorJulius Härtl2017-05-081-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Theming app: Add plain background color optionJulius Haertl2017-05-081-0/+14
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Delete theming images when logo/background is reset to defaultJulius Härtl2017-04-301-0/+19
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Code cleanup and preview for undo actionsJulius Härtl2017-04-291-0/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Use generated SCSS for theming previewJulius Härtl2017-04-291-0/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Implement scss variable injection by OC_DefaultsJulius Haertl2017-04-251-147/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net> Add Scss variables to example theme and theming app Signed-off-by: Julius Haertl <jus@bitgrid.net> Use SCSSCacher to build theming css Signed-off-by: Julius Härtl <jus@bitgrid.net> Update theming.scss Signed-off-by: Julius Härtl <jus@bitgrid.net> Code cleanup Signed-off-by: Julius Härtl <jus@bitgrid.net> Fix tests Signed-off-by: Julius Härtl <jus@bitgrid.net> Inject SCSSCacher for easier testing Signed-off-by: Julius Härtl <jus@bitgrid.net> Fix typehint Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Generate absolute URLs Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Fix tests to always use absolute urls for theming images Signed-off-by: Julius Härtl <jus@bitgrid.net> MailheaderColor -> ColorPrimary Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix theming testsJoas Schilling2017-04-201-4/+4
| | | | | | | Trying to configure method "shouldReplaceIcons" which cannot be configured because it does not exist, has not been specified, is final, or is static Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move OC_Defaults to OCP\DefaultsMorris Jobke2017-04-091-4/+4
| | | | | | | | | | | | | * currently there are two ways to access default values: OCP\Defaults or OC_Defaults (which is extended by OCA\Theming\ThemingDefaults) * our code used a mixture of both of them, which made it hard to work on theme values * this extended the public interface with the missing methods and uses them everywhere to only rely on the public interface Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* rename confusing getMailHeaderColor to getColorPrimary, ref #3491Jan-Christoph Borchardt2017-03-291-2/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Use ::class in tests and correct importJulius Haertl2017-02-161-2/+2
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Move theming images to AppDataJulius Haertl2017-02-161-25/+35
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Merge pull request #3144 from nextcloud/use-data-download-responseMorris Jobke2017-01-191-2/+1
|\ | | | | Use DataDownloadResponse
| * Use DataDownloadResponseLukas Reschke2017-01-181-2/+1
| | | | | | | | | | | | | | 1. As documented 2. No need to show this inline, downloading has security advantages Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | theme app navigation menu highlight colorMorris Jobke2017-01-181-0/+1
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Check if image files for theming are emptyJulius Haertl2016-12-091-0/+3
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Workaround for PHP bug when calling imagescaleJulius Haertl2016-11-221-1/+3
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Merge pull request #840 from nextcloud/theming-icon-endpointMorris Jobke2016-11-182-0/+185
|\ | | | | Add dynamic icon creation
| * Error handling and tests if file was not foundJulius Haertl2016-11-181-39/+38
| | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
| * Sanitize input and small fixesJulius Haertl2016-11-181-2/+5
| | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
| * Replace null return with NotFoundExceptionJulius Haertl2016-11-181-7/+11
| | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
| * Fix icon-folder cssJulius Haertl2016-11-181-1/+1
| | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>