Commit Graph

60 Commits

Author SHA1 Message Date
John Molakvoæ (skjnldsv) 4f0a318e02
Fixed theming tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-20 19:20:51 +02:00
Morris Jobke 8f6acbff62
Merge pull request #9258 from nextcloud/theming-logo-png
Convert theming app logo to PNG to show it properly in emails
2018-06-15 17:02:14 +02:00
Roeland Jago Douma f65a6e782c
Mock the timefactory in the theming tests
Now that the cache logic is moved to the theming controller we must
properly overwrite this service. Else it could do 💥 in tests.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-07 11:42:21 +02:00
Julius Härtl 5b0ce806a3
Minor fixes and cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-06 13:15:52 +02:00
Roeland Jago Douma e5cc8be9d5
Fix usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-04 08:48:54 +02:00
Arthur Schiwon 16c061818e
also add a privacy link
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-05-24 23:32:07 +02:00
Roeland Jago Douma 9236c20a28
Merge pull request #9437 from nextcloud/feature/noid/imprint
allow to specify a link to a legal notice
2018-05-17 21:16:03 +02:00
Julius Härtl 5b3ca8f7c6
Add Content-Disposition header
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-05-17 12:21:57 +02:00
Julius Härtl 2bf51c7b9e
Properly check mime type of the uploaded file
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-05-17 11:46:01 +02:00
Arthur Schiwon 850e2256f3
fix tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-05-11 15:37:24 +02:00
Julius Härtl b385f1c7d5
Fix theming tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-19 20:14:40 +02:00
rakekniven 789221a0fc
Update ThemingControllerTest.php
Adjusted test
2018-03-19 15:07:49 +01:00
rakekniven bcdbbb56b0
Update ThemingControllerTest.php
Fixed tests for https://github.com/nextcloud/server/pull/8633
2018-03-10 12:57:09 +01:00
Kyle Fazzari 25c89a6feb
Add mock to setup
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2018-02-24 08:16:42 -08:00
Kyle Fazzari a1f1824116
theming: handle not being in the serverroot
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>
2018-02-20 22:45:10 -08:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Julius Härtl f15e85c4f5
Theming: Add tests for mimetype and upload error checks
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-10-03 15:34:44 +02:00
Julius Härtl c337c8fa45
Theming: Handle errors on uploaded files properly
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-10-03 15:32:50 +02:00
Julius Härtl 770aae42f6
Add themed manifest.json to theming app
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-09-12 09:23:12 +02:00
Daniel Calviño Sánchez db52e861dd Provide "server.css" URL in ThemingController response
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>
2017-08-10 12:37:57 +02:00
Daniel Calviño Sánchez 986dffdae4 Split updateStylesheet tests for success and error
This is a preparatory step for a following commit in which the
properties present in the response will change depending on whether the
request was successful or not.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-10 12:37:57 +02:00
Daniel Calviño Sánchez d7e45d45c4 Unify DataResponse format with its uses in the rest of the file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-08-10 12:37:57 +02:00
Julius Härtl 639168ede4
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-17 10:16:59 +02:00
Julius Härtl 510f7cf1b6
Fix tests for theming backgroundColor
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-08 10:16:30 +02:00
Julius Härtl 7c69c117e2
Delete theming images when logo/background is reset to default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-04-30 11:04:55 -03:00
Julius Haertl 68a63ad3f3
Implement scss variable injection by OC_Defaults
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>
2017-04-25 11:39:45 +02:00
Jan-Christoph Borchardt 9a75714c22
rename confusing getMailHeaderColor to getColorPrimary, ref #3491
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-03-29 18:23:23 +02:00
Julius Haertl e5ddb40a3e
Add test for creating AppData folder
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-02-20 15:48:22 +01:00
Julius Haertl 3f0134622d
Use createMock
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-02-16 15:13:39 +01:00
Julius Haertl b2cbe3530d
Use ::class in tests and correct import
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-02-16 15:13:39 +01:00
Julius Haertl 345d1f1291
Adapt ThemingController tests
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-02-16 15:13:38 +01:00
Morris Jobke 8565011b8d Merge pull request #3144 from nextcloud/use-data-download-response
Use DataDownloadResponse
2017-01-19 15:36:31 -06:00
Morris Jobke 3798f842c0
theme app navigation menu highlight color
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-01-18 21:42:50 -06:00
Lukas Reschke be3ec7ffb7
Use DataDownloadResponse
1. As documented
2. No need to show this inline, downloading has security advantages

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-18 17:00:09 +01:00
Morris Jobke faee255ff4 Merge pull request #840 from nextcloud/theming-icon-endpoint
Add dynamic icon creation
2016-11-18 15:35:34 +01:00
Robin Appelman 8b9ad46ba3 Merge pull request #768 from nextcloud/s3-objectstore
Add S3 objectstore backend
2016-11-18 14:55:07 +01:00
Julius Haertl 2ab4d1e0a3
Use IAppManager instead of OC_App
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 11:07:44 +01:00
Julius Haertl cc8b1d3829
Fix icon-folder css
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl 9e28a3ba12
Theming: Code cleanup and cache buster for mime icons
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl b466628bfd
Improve unit tests for image generation
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:23 +01:00
Julius Haertl d1fcfe8e7d
Theming: Add colorized icon css from icons.css
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:23 +01:00
Roeland Jago Douma 07acd34d6e
Fix themeing unit tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-16 15:30:37 +01:00
Julius Haertl 520f2f6221
Revert "Fix #1782"
This reverts commit bc5268bdc8.

Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-16 13:52:51 +01:00
John Molakvoæ bc5268bdc8
Fix #1782
Fix checkbox left margin glitch
Fix tests
fix unit tests

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-02 15:07:24 +01:00
Jan-Christoph Borchardt cbd9fb3c5c also fix log in button confirm arrow when theming, fix #1615
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2016-10-25 14:24:24 +02:00
Jan-Christoph Borchardt 551cffd1b8 remove slight transparency of primary action button, ref #1615
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2016-10-25 13:16:13 +02:00
Julius Haertl d43c9b9e79
Theming: fix primary button for bright colors 2016-08-29 19:07:27 +02:00
Lukas Reschke 683f0e7f77
Use temporary file as cache 2016-08-27 21:38:41 +02:00
Lukas Reschke 73bc108451
Increase theming performance
1. Set proper caching headers (`Pragma: cache`)
2. Resize image proportionally to a max size of 1920px
3. Store images with progressive mode

This resizes a previous 2.8 MB picture to 300kb and makes it rendering going down from 11 seconds to less than 1 here. And future requests won't have to download the file newly.
2016-08-27 21:02:08 +02:00
Julius Haertl 218e2f7850
Theming: Adjust jquery ui elements 2016-08-26 12:07:52 +02:00