aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/Util.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: Fix psalm taint false-positives by small refactoringsfix/fix-psalm-taint-errors-2Côme Chilliet2025-02-171-2/+5
| | | | | | | Mostly make it clear that we trust admin input or that we correctly escape strings. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Apply new rector configuration to apps folderCôme Chilliet2025-02-131-1/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(legacy): Introduce public version ct plass and drop version methods ↵clean/version-ocpJulius Knorr2024-09-201-12/+9
| | | | | | from OC_Util Signed-off-by: Julius Knorr <jus@bitgrid.net>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(theming): make cache buster depend on the app versionRichard Steinmetz2024-08-071-1/+3
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* chore: Add SPDX headerAndy Scherzinger2024-05-311-25/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(tests): Adjust theming test for new splitted background and primary colorsFerdinand Thiessen2024-05-211-1/+1
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(theming): Fix erronous phpdoc typingCôme Chilliet2024-04-301-5/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(theming): Adjust dark high contrast to fulfill WCAG 2.1 AAA contrastFerdinand Thiessen2023-12-191-2/+4
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* enh(theming): Adjust color utils to work as specified by WCAG (color ↵Ferdinand Thiessen2023-12-151-4/+51
| | | | | | contrast and luma calculation) Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix loading custom logo imageRobin Appelman2023-05-221-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use brighten and darken instead of greySimon L2023-05-101-4/+4
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* fix(theming): Cut of the brightness into both directions if unknownJoas Schilling2023-05-101-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(theming): replace elementColor dark value with better contrast `#8c8c8c`John Molakvoæ2023-05-041-1/+1
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* fix(theming): calc primary element from current main backgroundJohn Molakvoæ2023-05-041-1/+11
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* generate user themed iconsSimon L2022-11-181-0/+17
| | | | | | 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>
* Fix logo invertJohn Molakvoæ2022-11-161-8/+8
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Lint and psalm fixJohn Molakvoæ2022-04-211-5/+5
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* PhpunitJohn Molakvoæ2022-04-211-1/+1
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Start theming providersJoas Schilling2022-04-211-48/+27
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix psalm issues in theming appCarl Schwan2022-01-261-4/+3
| | | | | | | | After this change, we are down to only one psalm warning for this app and related to the Application.php. This also make composer psam:update-baseline not silently ignore new errors. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Follow upstream security recommandationCarl Schwan2021-12-021-4/+3
| | | | | | See https://scssphp.github.io/scssphp/docs/#security-considerations Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add rgb to hsl converterCarl Schwan2021-12-021-4/+41
| | | | | | This ports away from using now internal functions from scssphp. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-2/+2
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Optimize chek if background is themedJulius Härtl2020-11-231-8/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* override default dashboard background with theming oneJulien Veyssier2020-11-131-1/+1
| | | | | | | | fix getAppValue default value in theming app fix cacheBuster value injection Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Precalculate the primary element color for dark mode tooJoas Schilling2020-06-261-4/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-5/+6
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Migrate leafo/scssphp to scssphp/scssphpChristoph Wurst2020-01-231-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-1/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* The array and string offset access syntax using curly braces is deprecated.Daniel Kesselberg2019-07-211-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Darken element color and add exception for primary buttonsJulius Härtl2019-03-271-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Adapts the theming util to the new core logo image pathMichael Weimann2018-10-041-2/+2
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Make the default element color for bright theming colors lighterJulius Härtl2018-08-301-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Remove unused import statementsMorris Jobke2018-02-141-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* More detailed theming capabilitiesJulius Härtl2018-01-101-0/+12
| | | | | | This will allow clients to easily check if a custom background is used Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Adjust theming color calculations using sRGB lumaJulius Härtl2018-01-081-8/+27
| | | | | | based on https://robots.thoughtbot.com/closer-look-color-lightness Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Theming: expose element color though capabilities APIJulius Härtl2017-11-071-2/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headersMorris Jobke2017-11-061-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Change invertion threshold to 55%Julius Härtl2017-09-021-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Use same lightness calculation as the SCSS compiler for themingJulius Härtl2017-08-011-4/+7
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Prefer custom theme over theming appJulius Härtl2017-07-121-0/+13
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>