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
Julius Haertl
60d77ceccb
Add repair step to move existing theming images
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-02-16 15:13:38 +01:00
Julius Haertl
6a9d5d60dc
Move theming images to AppData
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2017-02-16 15:13:38 +01:00
blizzz
64e9a1aec0
Merge pull request #3176 from nextcloud/default-value-datadir
...
Add proper default value for datadir
2017-01-30 13:01:24 +01:00
Morris Jobke
e09bba5e36
Merge pull request #3151 from nextcloud/navigation-icons
...
add icons to navigation of personal & admin settings
2017-01-24 10:56:31 -06:00
Morris Jobke
a4ad8af6e3
Add proper default value for datadir
...
* better safe than sorry
* fixes #3091
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-01-19 19:49:41 -06:00
Morris Jobke
8565011b8d
Merge pull request #3144 from nextcloud/use-data-download-response
...
Use DataDownloadResponse
2017-01-19 15:36:31 -06:00
Joas Schilling
17a7eaabcd
Add the icons for shipped apps
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-19 10:42:22 +01: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
Björn Schießle
d10be51d40
Merge pull request #2588 from nextcloud/theming-check-empty
...
Check if image files for theming are empty
2016-12-09 15:57:44 +01:00
Julius Haertl
5fbadee95f
Check if image files for theming are empty
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-12-09 12:54:03 +01:00
Julius Haertl
366f14d7db
Add fallback to FILTER_LANCZOS for icon resizing
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-12-09 11:53:27 +01:00
Julius Haertl
fd6670ae72
Fix transparency of icons
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-12-04 13:38:37 +01:00
Julius Haertl
f423bdcb81
Fix background border radius
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-12-04 13:38:36 +01:00
Julius Haertl
797e761492
Move sizing to renderAppIcon method
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-12-04 13:38:29 +01:00
Julius Haertl
6c4664bc82
Workaround for PHP bug when calling imagescale
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-22 12:12:59 +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
d409fe1c52
Error handling and tests if file was not found
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:25 +01:00
Julius Haertl
78de213b85
Sanitize input and small fixes
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:25 +01:00
Julius Haertl
3a400f92d1
Replace null return with NotFoundException
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:25 +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
43097eabee
Fix svg resizing and remove deprecated method call
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl
2e8dd21815
Improve caching
...
Signed-off-by: Julius Haertl <jus@bitgrid.net>
2016-11-18 10:23:24 +01:00
Julius Haertl
492d0b9f9b
Caching for icon files using AppData
...
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