Commit Graph

244 Commits (9c4e892a91ce1320f6941987e7d65eaaa34896ca)

Author SHA1 Message Date
Ferdinand Thiessen 7e1152603f feat(theming): Only convert a background image if it benefits from it
* WebP images are generally quite small, converting to pngs would increase
  the filesize a lot.
* Small JPEG and PNG images do not benefit from any conversion, so skip it.
* JPEG images will get quite bigger when converted to PNG so instead convert to progressive JPEG

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-20 13:11:19 +07:00
Vincent Petry 6e75931412
Limit key names when uploading theme images
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2023-01-11 16:16:44 +07:00
John Molakvoæ a869259e41
More theming cypress tests and some fixes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-11-29 11:26:27 +07:00
John Molakvoæ 064fa10ecf
Extract colour from custom background
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-11-29 11:23:05 +07:00
John Molakvoæ cedae7c6d7
Allow to remove the background and select a custom colour
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-11-29 11:22:13 +07:00
Côme Chilliet f171de52b3
Fix theming tests for PHP 8.2
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-24 12:20:27 +07:00
Simon L 04b236e320 generate user themed icons
Signed-off-by: Simon L <szaimen@e.mail.de>
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2022-11-18 15:03:41 +07:00
John Molakvoæ e6b7fa6cae
Fix logo invert
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-11-16 09:46:20 +07:00
Côme Chilliet 38440563dd
Fix themings tests and get rid of deprecated at matcher
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-15 16:29:26 +07:00
Côme Chilliet 68363f6944
Fix some more problems with tests under PHP 8.2
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-15 16:02:24 +07:00
Côme Chilliet c79a6b3f62
Fix errors from PHP 8.2 testing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-14 17:08:21 +07:00
Christopher Ng 4a2bbc7af9 Rewrite admin theming in Vue
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-28 00:18:47 +07:00
John Molakvoæ 746710ad5b
Fix tests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-19 12:57:35 +07:00
John Molakvoæ d77e832223
Fix tests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-14 16:18:40 +07:00
John Molakvoæ 9a92fe9b29
Fix primary and debounce to avoid infinite loop
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-13 12:13:39 +07:00
John Molakvoæ (skjnldsv) db831359d3
Allow to pick custom colour
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-10-13 12:13:39 +07:00
Christopher Ng 46ee620150 Fix excessive increase of cachebuster value
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-11 16:25:42 +07:00
Christopher Ng e962d3fba4 Use color preset of shipped background as primary color
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-05 06:19:08 +07:00
szaimen c9a372034f fix highcontrast theme icons
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-27 13:52:49 +07:00
greta 02cc42d40a Move background settings from dashboard app to Appearance and accessibility settings
Signed-off-by: greta <gretadoci@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-09-14 20:17:01 +07:00
John Molakvoæ 5e550829c5
Fix theming tests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-08-19 14:35:00 +07:00
John Molakvoæ 5f3229ed67
Automatically enable plain background if primary colour is set
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-08-16 09:39:00 +07:00
John Molakvoæ 0ea23cad0e
Revert "Fix unit tests for the theming app"
This reverts commit 13ca01ee12.
2022-08-16 08:51:43 +07:00
Carl Schwan 13ca01ee12
Fix unit tests for the theming app
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-11 18:02:23 +07:00
Côme Chilliet 293c1797eb
Remove deprecated expectException from theming tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-20 09:10:11 +07:00
Côme Chilliet f8a5be6a90
Remove deprecated at matcher from theming tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-16 15:55:05 +07:00
John Molakvoæ f577b5dc96
Fix theming setEnabledThemes unique array
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-30 13:40:27 +07:00
John Molakvoæ 24c5d994c7
Allow to override the default theme
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-30 13:40:27 +07:00
John Molakvoæ 4a646789c3
Add system/light themes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-28 08:41:58 +07:00
John Molakvoæ 4dc96dd165
Fix mix factor
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-26 09:22:43 +07:00
John Molakvoæ f7f4d36a37
Fix dyslexia font loading
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-22 13:04:15 +07:00
John Molakvoæ 850d8ac1cd
Add default theming disabled fallback
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-22 11:24:25 +07:00
John Molakvoæ 3c75a99267
Phpunit
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 19:00:28 +07:00
Carl Schwan 7dddbd0c35 Improve caching policy
* Cache css with version in url. This makes most js and css requests to
  be cached by the browser

* Force caching previews, the etag is in the url so that if the propfind
  gives a new etag, we will refresh it otherwise it's no use to try to
  fetch the new etag and do tons of DB queries

Tested with firefox and 'debug' => false (important so that the js/css
urls are generated with ?v= parameter)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-02-16 11:35:57 +07:00
Julius Härtl 3d0b5c1ff9
Avoid file system access on checking if an image exists
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-02 11:26:36 +07:00
Côme Chilliet 37f8f7a5a1
Fix tests on PHP 8.1 for encryption, files_sharing, files_version,
files_trashbin and theming apps

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:43:29 +07:00
Côme Chilliet 6b770eb579
Fix theming tests on PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:43:29 +07:00
szaimen 0758e0258d improve webmanifest
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-08-24 11:42:04 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Julius Härtl 22e26a7f5e
Store scss variables under a different prefix for each theming config version
The main issue with using the general theming- prefix is that with APCu caching
the cache is not shared between processes, so when trying to reset the cache
through the CLI, e.g. when updating the theming config the old cache is never
invalidated.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-11-30 14:15:17 +07:00
Julius Härtl a0c0918ce2
Optimize chek if background is themed
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-11-23 13:48:05 +07:00
Morris Jobke c7ff0c71b4
Shortcut to avoid file system setup when generating the logo URL
If an SVG is requested and the app config value for logoMime is set then the logo is there. Otherwise we need to check it and maybe also generate a PNG from the SVG (that's done in getImage() which needs to be called then).

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-09 10:01:34 +07:00
Morris Jobke b8ed997238
Remove ISection in favor of IIconSection
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 23:05:00 +07:00
John Molakvoæ (skjnldsv) a7c4369941
Fix theming manifest tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-20 11:03:24 +07:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Julius Härtl 0daf097af3
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-24 08:22:07 +07:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
Morris Jobke 234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +07:00
Joas Schilling f8641a6e55
Fix PHP CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 16:16:06 +07:00