Roeland Jago Douma
e4db293cc1
Fix possible test timing issues in IconController
...
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>
2018-06-13 22:54:08 +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
Julius Härtl
d132527aa9
Use svg opt out as parameter
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-05 16:47:38 +02:00
Julius Härtl
9b919245f6
Adjust ImageManager tests for png generation
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-05 16:47:38 +02:00
Julius Härtl
4a5826cddb
Generate PNG version of the theming app logo for mails
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-05 16:47:38 +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
0847c98aaf
addjust footer height when legal links are present. fixes #9572
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-05-24 23:39:50 +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
62f1156a56
allow to specify a link to a legal notice
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-05-09 15:52:41 +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
Julius Härtl
7f9dabd984
Make sure the custom favicon is used
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-19 20:14:40 +02:00
Julius Härtl
39f44e1452
Add typehints
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-19 20:14:40 +02:00
Julius Härtl
5a5c125b23
Return value
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-19 20:14:39 +02:00
Julius Härtl
272b392cac
Move to more generic image handling and add extra images
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-04-19 20:14:38 +02:00
Roeland Jago Douma
06f52ead31
Merge pull request #8993 from nextcloud/theming-allow-ui-with-theme
...
Show UI when using a custom theme
2018-03-27 19:27:49 +02:00
Julius Härtl
b6501ae966
Show UI when using a custom theme
...
Do not hide the theming app UI when using a custom theme besides it, but warn the users about some settings being overwritten by that.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-26 18:23:51 +02:00
Julius Härtl
e7c3b8da77
Clear any theming prefixed cache on cache buster increase
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-26 12:34:26 +02:00
rakekniven
d88db9b496
Update ThemingController.php
...
Changed file according to discussion on PR.
2018-03-19 15:00:27 +01:00
rakekniven
b2ceb29484
Update ThemingController.php
...
Changed wording according to discussion at Transifex. See https://www.transifex.com/nextcloud/nextcloud/translate/#de/$/121491259?issue=yes
Aligned ending of error messages
2018-03-16 18:45:20 +01:00
rakekniven
4fc4e6dcaa
Update ThemingController.php
...
Improved translation string.
Reported at Transifex. See https://www.transifex.com/nextcloud/nextcloud/translate/#de/$/121491256?issue=yes
2018-03-10 12:57:05 +01:00
Julius Härtl
573b940761
Use cache prefix for theming as well
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-07 15:09:43 +01:00
Julius Härtl
95366bbd1f
Fix tests to use ICacheFactory
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-07 15:09:43 +01:00
Julius Härtl
50a9beb4bb
Move base url from global cache prefix to frontend related ones
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-07 15:09:43 +01:00
Kyle Fazzari
8dcbea124e
Remove null check
...
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
2018-02-25 07:08:59 -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
d3d045dd5c
Remove unused import statements
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-14 16:55:43 +01:00
Morris Jobke
4fcdfbf5de
Merge pull request #8078 from nextcloud/theming-validate-scss
...
SCSS hardening
2018-01-29 16:12:10 +01:00
Julius Härtl
6770213649
Do not rewrite absolute URLs
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-26 19:08:45 +01:00
Julius Härtl
5e325730d6
Remove theming migration
...
Those images are alredy migrated after the instance has been updated to NC12
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-26 15:10:22 +01:00
Julius Härtl
422e20569b
Theming: adjust background image resizing
...
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>
2018-01-19 13:34:43 +01:00
Julius Härtl
d4e106f2b3
More detailed theming capabilities
...
This will allow clients to easily check if a custom background is used
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-10 13:23:22 +01:00
Morris Jobke
8257689e35
Merge pull request #7705 from nextcloud/theming-calc-adjust
...
Adjust theming color calculations using sRGB luma
2018-01-09 23:04:30 +01:00
Julius Härtl
3379290a73
Fix SCSS processing when undoing theming values
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-09 14:18:03 +01:00
Julius Härtl
e4f9c75a05
Adjust theming color calculations using sRGB luma
...
based on https://robots.thoughtbot.com/closer-look-color-lightness
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-08 10:31:34 +01:00
Julius Härtl
24233162a0
Fix faulty path in theming scss generation
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-05 09:43:09 +01:00
Morris Jobke
d2d73f1ce8
Also replace all other occurences
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-12-18 20:57:11 +01:00
Morris Jobke
cce4c285db
Fix email buttons for white theme
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-12-11 14:33:54 +01:00
Julius Härtl
d70e9059a5
Theming: Fix tests for favicon containing multiple sizes
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-11-13 10:18:48 +01:00
Julius Härtl
31b9fc9eac
Theming: Generate favicon sizes to avoid resizing issues done by the browser
...
fixes #5193
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-11-13 10:18:47 +01:00
Morris Jobke
c7e5bc0f9a
Merge pull request #7112 from nextcloud/theming-imagemagick-hint
...
Theming: add hint about favicon generation
2017-11-09 12:16:55 +01:00
Julius Härtl
b1b8c99193
Theming: add hint about favicon generation
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-11-08 23:31:18 +01:00
Lukas Reschke
8c915baa34
Merge pull request #6788 from staabm/master
...
Prevent XSS in links which open a new browser window
2017-11-08 18:55:35 +01:00
Julius Härtl
00956c00b2
Theming: expose element color though capabilities API
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-11-07 12:31:23 +01:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Markus Staab
db34b59238
Prevent XSS in links which open a new browser window
2017-10-19 12:16:04 +02: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
c0d104087b
Theming: Check valid image format also for logo
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-10-03 15:32:50 +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
Morris Jobke
d659199ff5
Merge pull request #5398 from nextcloud/theming-page-title
...
Fallback to "getTitle" / "getEntity" of filesystem theme in theming app
2017-09-13 13:08:37 +02:00
Joachim Bauch
91598cbfb5
Use theme methods "getTitle" and "getEntity" as fallback if name is not themed.
...
This fixes an issue with custom filesystem themes that can define title, name
and entity differently, but the theming app was only using the name as fallback
(see #5374 ).
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-09-13 11:02:45 +02:00
Morris Jobke
241579587a
Merge pull request #6457 from nextcloud/theming-favicon-invert-apps
...
Invert themed favicons on bright colors
2017-09-13 10:48:33 +02:00
Julius Härtl
9a47b25f19
Theming: Invert app icon in favicon for bright backgrounds
...
fixes #5650
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-09-12 11:37:25 +02:00
Julius Härtl
1f8a3e05c1
Theming: Use png32 for generated icons
...
fixes #4796
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-09-12 11:34:21 +02:00
Julius Härtl
8391ca8792
Use IAppManager instead of private API
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-09-12 09:28:22 +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
Julius Härtl
b49ab065b7
Move theming related imagePath logic to ThemingDefaults
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-09-12 09:22:57 +02:00
Julius Härtl
da5662c454
Use separate element color in theming
...
This way we can use a grey color when the primary color is to bright
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-09-04 14:30:46 +02:00
Julius Härtl
0a49757535
Change invertion threshold to 55%
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-09-02 21:48:14 +02:00
Jan-Christoph Borchardt
badbab81ea
Update background image to the one used on the website
...
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2017-08-29 16:04:11 +02:00
Joas Schilling
b7b4cfd6a1
Add the primary font color to the capabilities as well
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-15 13:50:08 +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
Julius Härtl
9cd21bbe8a
Use same lightness calculation as the SCSS compiler for theming
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-08-01 18:09:07 +01:00
Morris Jobke
e48ca730fe
Add Android and iOS URLs to theming app
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-07-19 10:20:47 +02:00
Roeland Jago Douma
e2298e0a71
Allow overwriting of IOS theming values
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-19 08:22:45 +02:00
Joas Schilling
e335121d5e
Merge pull request #5070 from nextcloud/theming-vs-themes
...
Prefer custom theme over the theming app
2017-07-13 13:41:31 +02:00
Julius Härtl
ce5ad7e7f4
Prefer custom theme over theming app
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-07-12 11:42:15 +02:00
Julius Härtl
42d9be4529
Expose theming capabilities to public
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-06-30 11:08:54 +02:00
Lukas Reschke
c1c676f602
Merge pull request #4910 from nextcloud/make-the-logo-smaller-cream
...
Fix logo being too big on log in page, fix #4585
2017-05-19 20:50:09 +02:00
Julius Härtl
52f10c436e
Scale logo only for custom ones
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-19 16:18:09 +02:00
Lukas Reschke
c605472950
Merge pull request #4888 from nextcloud/theming-fallback-icons
...
Fallback to default favicon
2017-05-18 23:30:02 +02:00
Julius Härtl
489131333a
Inject FileAccessHelper for proper testing
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-18 10:45:42 +02:00
Morris Jobke
2ec616323b
Merge pull request #4918 from nextcloud/theming-capabilities-plain-background
...
OCS Return color when theming uses no background image
2017-05-17 10:42:41 -05:00
Julius Härtl
81847c01b0
Return color when theming uses no background image
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-17 13:16:44 +02:00
Julius Härtl
d3865b6096
Use appdata logo when generating icons
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-17 10:14:37 +02:00
Julius Härtl
edb5502b9d
Add proper Content-Type to icons
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-17 10:11:29 +02:00
Julius Härtl
1157f413c9
Fallback to default favicon
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-05-17 10:11:29 +02:00
Lukas Reschke
099234cf12
Add function to request SVG or regular fallback image
...
Fixes https://github.com/nextcloud/server/issues/4647
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-05-08 14:51:55 +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 Haertl
4199a56912
Theming app: Add plain background color option
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-05-08 10:16:29 +02:00
Morris Jobke
ac04fb8277
Fix invalid theming URLs
...
* logo and background image had the cache buster applied twice:
background-image: url(http://192.168.99.100/server/core/img/logo.svg?v=0?v=0 );
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-05 00:37:32 -03: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 Härtl
6e215a0874
Code cleanup and preview for undo actions
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-04-29 00:40:15 -03:00
Julius Härtl
b436e43d68
Make sure that ThemingDefaults uses the correct default values from \OC_Defaults
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-04-29 00:40:15 -03:00
Julius Härtl
6b8341ce4b
Use generated SCSS for theming preview
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-04-29 00:40:15 -03:00
Joas Schilling
bedd500884
Logo and background URLs must be relative
...
They are used way to often for such a change
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-25 11:43:06 +02:00
Julius Härtl
bc1efdf2e1
Fix theming tests
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-04-25 11:39:49 +02: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
Joas Schilling
8c703c954d
Fix theming tests
...
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>
2017-04-20 13:10:34 +02:00
Morris Jobke
d83c8e0271
ThemingDefaults append cacheBusterCounter to logo URL by default
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-09 21:43:09 -05:00
Morris Jobke
5b4adf66e5
Move OC_Defaults to OCP\Defaults
...
* 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>
2017-04-09 21:43:01 -05:00
Lukas Reschke
281ad406e8
Add support for theming
...
Add support for theming in generated emails and simplify API
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-07 12:03:47 -05: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
Joas Schilling
b3556456b6
Don't use private api
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-20 11:32:29 +01:00
Joas Schilling
e8750f618b
Correctly escape the footer description from theming
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-17 09:11:41 +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
88a0ef7d4a
Add tests for theming migration step
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-02-16 15:13:38 +01:00