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>
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>
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>
* 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>
Since the response now handles the caching. We need to provide a default
ITimeFactory mock. Else you might have failing tests.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Now that the cache logic is moved to the theming controller we must
properly overwrite this service. Else it could do 💥 in tests.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
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>
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>