Commit Graph

263 Commits

Author SHA1 Message Date
Morris Jobke 24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-11 13:14:41 +01: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 +01: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 +01: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 +01:00
Julius Härtl 9b7bdfef79
Fix setting images through occ for theming
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-11-19 08:31:24 +01:00
Julien Veyssier f5ef2d7d58 override default dashboard background with theming one
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>
2020-11-13 06:51:26 +00: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 +01:00
Morris Jobke dd93532526
Cleanup ImageManager::getImage()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-04 10:08:36 +01:00
Jacob Neplokh ef8822d3c7
Add gif to if-statement to not convert
- SVGs are already there, so I just added it alongside it (as recommended by https://github.com/nextcloud/server/issues/16232#issuecomment-679920284)

Signed-off-by: Jacob Neplokh <me@jacobneplokh.com>
2020-11-02 13:52:49 -08:00
John Molakvoæ (skjnldsv) 68f1f44e58
Enable theming background transparency
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-25 19:15:52 +01: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 +00:00
Gary Kim dfa17e9174
Allow setting favicon with a .ico file
Signed-off-by: Gary Kim <gary@garykim.dev>
2020-10-14 18:19:23 -04: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 +02: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 +02: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 +02:00
Morris Jobke 340cd81d2f
Use IBootstrap for the app theming
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-24 12:23:16 +02:00
Joas Schilling be5176076e
Precalculate the primary element color for dark mode too
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 09:58:45 +02:00
GretaD c31c995ff0 Set serverBackground if it is a custom background or default hub
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-06-08 11:23:34 +02: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 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Roeland Jago Douma bb4dedb015
Provide the proper language to the mailer
Else we can't properly translate the footer in the recipients e-mail
language.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-16 09:04:13 +02: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 +02:00
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02: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 +02:00
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
2020-03-27 17:14:08 +01:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Daniel Kesselberg e35b76a12b
Don't try to resize a svg uploaded as background image.
image* are gd functions without support for svg hence we are not able to resize svg.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-03-01 21:19:07 +01:00
Christoph Wurst 30d985b639
Migrate leafo/scssphp to scssphp/scssphp
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-23 14:52:16 +01:00
Julius Härtl 70e3fcea2c
Use themed favicon-fb
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-21 16:34:08 +01:00
Christoph Wurst 1b46621cd3
Update license headers for 18
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Julius Härtl 9691360f6e
Allow inline styles for theming images
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-27 20:26:57 +01:00
John Molakvoæ fe6dc8082c
add var for theming images , advanced options (#16815)
add var for theming images , advanced options
2019-11-26 10:55:20 +01:00
Daniel Kesselberg 6d883f3641
Remove some whitespace
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-11-24 21:51:44 +01:00
Guillaume COMPAGNON ed399a31bd
add var for theming images , advanced options
Signed-off-by: Guillaume COMPAGNON <gcompagnon@outlook.com>
2019-11-24 21:51:43 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* 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>
2019-11-22 20:52:10 +01:00
Robin Appelman ef2fb51065
remove missed manual Application instance constructions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-04 19:51:37 +01:00
Roeland Jago Douma e71f222082
Cleanup theming mess
* Do not do translations in the constructor. This gets called to early
so there is no user yet. Which means we can't obtain the locale. Which
means we store the wrong translation instance.

* Same for the theming app magic. Just use the parent call when needed.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-25 13:31:19 +02:00
Robin Appelman 512eb14d94
make sure that the urls for theming images are valid
In some circumstances the url generation seems to fail,
resulting in an empty image url which causes the browser to load the main
page multiple times, leading to issues with state tokens

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-10-18 18:12:06 +02:00
Julius Härtl 47a0254bb3
Validate urls in theming settings and properly handle error messages
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-31 10:20:57 +02:00
Daniel Kesselberg 1b0f30b1ab
The array and string offset access syntax using curly braces is deprecated.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-07-21 21:19:15 +02:00
Julius Härtl ec6ce43053
Only return link to themed icon if file exists
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-26 10:53:49 +02:00
Julius Härtl cfed233f47
Properly theme folder icons that are accessed though imagePath
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-11 17:38:17 +02:00
Julius Härtl 00b2afb222
Darken element color and add exception for primary buttons
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-27 16:03:31 +01:00
Roeland Jago Douma 575b3f9ff8
Revert "Where is your data?" 2019-03-20 15:17:31 +01:00
Julius Härtl a6b579b772
Add guest navigation type
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-02-18 09:12:11 +01:00
Michael Weimann 2cd3fd3dc2
Move server info to theming section
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2019-01-14 00:08:26 +01:00
Thomas Citharel d63de5471b Don't require Same Site Cookies on assets
Which can be used for public iframe embeeding

See https://github.com/nextcloud/calendar/issues/169

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-10-17 09:24:21 +02:00