Commit Graph

146 Commits (d92bf388b1c553ecd6bfb2a7400b990dcafe9c54)

Author SHA1 Message Date
Maxence Lange dd0099c69f fix(psalm): named attribute argument
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-07-29 11:37:40 +07:00
provokateurin 79d9f2ebf6
refactor(theming): Replace security annotations with respective attributes
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-07-27 22:40:06 +07:00
Andy Scherzinger cc1686dba9
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-31 10:38:47 +07:00
Ferdinand Thiessen 705335e6a5
feat(theming): Allow to configure primary color separate from background in admin settings
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-05-21 20:36:21 +07:00
Ferdinand Thiessen de938bb401
feat(theming): Separate background and primary color
While the primary color is intended to highlight elements,
it can not always be used as the background color.
So now primary is independent from background a user set,
the background color is, if not set directly, calculated as the mean color
of the background image. That color is then used as a fallback if the
background image could not be loaded and for calculating the color of the text used on the app menu and dashboard (they render directly on the background).

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-05-21 20:36:21 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Joas Schilling 2fccd090b3
fix(manifest): Check if app exists instead of accessing null as an array
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-01-17 09:25:44 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Ferdinand Thiessen e9d4036389
feat(theming): Allow to configure default apps and app order in frontend settings
* Also add API for setting the value using ajax.
* Add cypress tests for app order and defaul apps

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-10-20 00:24:17 +07:00
John Molakvoæ a024ee1cfe
Fix background removal check
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-10-19 11:54:09 +07:00
jld3103 c2d45cb172
Add single status code descriptions for OpenAPI
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-09-27 08:05:21 +07:00
jld3103 b58ef2c0b1
theming: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-10 17:25:58 +07:00
Simon L 734b8c26db generate user themed favicon and touchicon
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-06-16 00:24:27 +07:00
Faraz Samapoor 437631a334 Refactors "strpos" calls in /apps/theming to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-02 15:43:47 +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æ 1acd42e10c
Invert header if primary is bright and background disabled
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-12-08 17:52:50 +07:00
John Molakvoæ f26ee9c69d
Faster theming tests, better colours comparison and properly follow admin theming changes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-11-30 18:39:57 +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
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æ ef760e0337
Add admin user customization kill switch
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-19 12:57:35 +07:00
Vincent Petry 19f35f42bc
Improve cache buster for user backgrounds
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-10-14 16:18:41 +07:00
John Molakvoæ e4ff84d468
Scope the appdata theming storage for global and users
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-14 16:18:37 +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
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æ 601664bc84
Allow to manually specify a theme to apply to a section of an app
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-08-16 14:43:35 +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æ d1dfdfe799
Lint and psalm fix
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 19:00:29 +07:00
John Molakvoæ 493b20605f
Font fixes and design update for theme picker
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 09:31:07 +07:00
John Molakvoæ 9ea72b1010
Migrating themes to Theming app
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 09:31:07 +07:00
John Molakvoæ fa18a77fa2
Fix twofactor loading and public image
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 09:31:06 +07:00
Joas Schilling b3cf312edc
Start theming providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-21 09:29:33 +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
Carl Schwan 760db78dba
Add better error handling
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-27 17:03:09 +07:00
Carl Schwan f778cbe7b9
Fix registerEventListener issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-27 11:12:45 +07:00
Carl Schwan e3a12b3482
Fix psalm issues in theming app
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>
2022-01-26 14:26:58 +07:00
Joas Schilling 615a8e60ba
App summary is optional
Fixing:
Error: Undefined index: summary at /var/www/html/apps/theming/lib/Controller/ThemingController.php#392

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-19 14:02:03 +07:00
Carl Schwan 719dbafd13
Add support for Delegation Settings for more apps
* This adds support for the sharing, groupware, theming and user_ldap
  app
* This adds some code who disapeared during a rebase in the initial
  delegation PR (provisioning_api)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-15 18:41:00 +07:00
Joas Schilling 37f40cdd46
Fix translated app details
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-09-30 09:08:17 +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
nhirokinet 3a05334f18 manifest to report correct favicon size
In the environment where php-imagick with SVG support is correctly installed, this endpoint returns 512x512 image.
d9015a8c94/apps/theming/lib/Controller/IconController.php (L146)

The problem is in the environment without php-imagick or without SVG support, this will fall back to original, whose default is 128x128; but I thought this is a separate problem. (For this, default image may be enlarged. Should I create another issue if this is important one?)

Signed-off-by: nhirokinet <nhirokinet@nhiroki.net>
2020-10-16 15:36:56 +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 aa95b3d71b
Add occ command to set theming values
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-24 08:22:07 +07:00
Roeland Jago Douma 3f1b6e2ce9
Move theming js to initial state
A bit more elegant. Plus it will allow us to also write a proper
@nextcloud/theming package. To make life easier down the line for all.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-05 11:01:49 +07:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
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>
2020-04-10 14:19:56 +07:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +07:00