Commit graph

536 commits

Author SHA1 Message Date
Christopher Ng
3db3d75bb9 Revert "Fix border color contrast"
This reverts commit a0266d1b16.

Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-12-03 00:48:49 +00: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 +01: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 +01:00
John Molakvoæ
064fa10ecf
Extract colour from custom background
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-11-29 11:23:05 +01: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 +01:00
Christopher Ng
a0266d1b16 Fix border color contrast
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-11-22 18:42:56 +00:00
Arthur Schiwon
9892bdc3c3
rename placeholder
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-11-18 22:30:03 +01:00
Arthur Schiwon
0297a03698
fix const visibility
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-11-18 22:24:59 +01:00
blizzz
df8ed46cce
use const
Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: blizzz <blizzz@arthur-schiwon.de>
2022-11-18 22:24:59 +01:00
blizzz
9bdf4c2254
use const
Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: blizzz <blizzz@arthur-schiwon.de>
2022-11-18 22:24:59 +01:00
blizzz
a2bce2c6fc
use .json extentions
Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: blizzz <blizzz@arthur-schiwon.de>
2022-11-18 22:24:59 +01:00
Arthur Schiwon
dbd573e1b0
do not store state in appconfig
- and use count over isset for better understanding

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-11-18 22:24:59 +01:00
Arthur Schiwon
a7ffdcd3dd
remove dashboard check, as fallback did not consider it either
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-11-18 22:24:59 +01:00
Arthur Schiwon
b725c777aa
optimize background image migration job
- separate in two stages: to prepare, and to actually migrate
- in step one, prepare a list of users to be migrated, and store it
  compressed as app config
  - gzcompress can be used, because we already require zlib
- upon the next calls (step two), slice off the first 5000 users
  and migrate them. Re-add job if necessary to repeat.
- downside is that an app config value will in the beginning use the
  RAM with any request, until it thins out. Examples: 2m UUIDs (75 MiB)
  result in ~40 MiB compressed data, while 0.2Mib for 10 000 UUIDs,
  0.4MiB for 20 000 and 4.1 MiB for 200 000. Acceptable.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-11-18 22:24:58 +01: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 +01:00
John Molakvoæ
e6b7fa6cae
Fix logo invert
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-11-16 09:46:20 +01:00
Christopher Ng
4a2bbc7af9 Rewrite admin theming in Vue
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-28 00:18:47 +00:00
Christopher Ng
58abed2059 Invert header icons on bright preset backgrounds
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-19 19:12:56 +00:00
John Molakvoæ
d89da9b898
Simplify variable names
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-19 12:59:16 +02:00
John Molakvoæ
ef760e0337
Add admin user customization kill switch
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-19 12:57:35 +02:00
Christopher Ng
3ead19d997 Add a repair step to cleanup old theming cache
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-18 01:19:47 +00:00
Vincent Petry
19f35f42bc
Improve cache buster for user backgrounds
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-10-14 16:18:41 +02:00
John Molakvoæ
ac21c631a6
Fix migration
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-14 16:18:40 +02:00
John Molakvoæ
a8e90a03fc
Properly use user background cachebuster
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-10-14 16:18:40 +02: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 +02:00
Vincent Petry
c0c0387b8e
Merge pull request #34461 from nextcloud/fix/migrate-background
Fix missing background on upgrade
2022-10-13 20:10:57 +02:00
Simon L
b28757fddc
Merge pull request #34437 from nextcloud/feat/theming-default-system-value
Use default system primary
2022-10-13 19:57:28 +02:00
Arthur Schiwon
59e07102ed
graceful background image handling
- fallback to background image from old location
- migrate background images to new location as insensitive job

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-10-13 17:51:30 +02:00
John Molakvoæ
2f8601a27e Adjust testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-10-13 14:31:20 +00:00
John Molakvoæ
9d0f529f1b
Merge pull request #34546 from nextcloud/improve-hight-contrast
Add seperator in high contrast mode
2022-10-13 12:17:54 +02: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 +02: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 +02:00
John Molakvoæ (skjnldsv)
4b46c5a5a0
Use default system primary
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-10-13 12:13:39 +02:00
Simon L
cbe228ae3a
Merge pull request #34545 from nextcloud/fix/theming-highcontrast-translucency-off
Disable translucency on high contrast themes
2022-10-13 00:56:57 +02:00
szaimen
f1b38426e2 fix color-main-background-rgb
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-10-12 11:59:16 +02:00
Christopher Ng
8c4de8f3bc Add color variables for text on blurred background
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-12 01:43:37 +00:00
Carl Schwan
8a8f150ffb Add seperator in high contrast mode
Between navigation and content and between entry in breadcrump

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-11 23:44:35 +02:00
Carl Schwan
0a5d459c99 Disable translucency on high contrast themes
Fix #34514

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-11 23:15:33 +02:00
Christopher Ng
46ee620150 Fix excessive increase of cachebuster value
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-11 16:25:42 +00:00
Christopher Ng
7044191eb6 Use brand color for background only and keep accessible color as color primary
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-10-05 06:19:08 +00: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 +00:00
szaimen
9d4d95a94c fix the tertiary button text
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-30 17:50:48 +02:00
Simon L
fafc1ee807
Merge pull request #34287 from nextcloud/enh/33836/fix-theme
fix highcontrast theme
2022-09-28 20:35:07 +02:00
Christopher Ng
295d03869e Fix various theming bugs
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-09-28 17:12:56 +00:00
szaimen
c9a372034f fix highcontrast theme icons
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-27 13:52:49 +02:00
Christopher Ng
67742884b7 Add preset primary colors for shipped backgrounds
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-09-27 00:56:58 +00:00
John Molakvoæ
b8912153db
Merge pull request #34210 from nextcloud/fix/theming
Fixing missing theming variables
2022-09-24 07:35:34 +02:00
John Molakvoæ
7a43559197
Refactor primary computation and fix a few missing theme parity variables
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-09-23 15:48:45 +02:00
John Molakvoæ
0b23ad9256
Disable background blur on highcontrast
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-09-23 15:01:38 +02:00
John Molakvoæ
48f324fcb1
Fixing dark primary element variables
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-09-23 14:58:40 +02:00
Vincent Petry
b8dbbb177d
Fix loading custom background
Fix the route for loading the custom background.
Because the controller is UserThemeController, so the route path is
not "theming" but "userTheme".

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-09-23 11:19:38 +02:00
szaimen
310ccfa14e update theming icon in personal settings
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-21 11:26:08 +00:00
Joas Schilling
7672152579
Add a global setting to disable keyboard shortcuts
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-09-15 10:52:55 +02: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 +00:00
Simon L
2a2cb01696
Merge pull request #33952 from nextcloud/enh/33850/scrollbar-visibility
fix scrollbar visiblity
2022-09-08 10:18:58 +02:00
szaimen
4636524b7e fix scrollbar visiblity
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-07 23:21:35 +02:00
greta
7e5d973e7e Remove non existing lighter colour
Signed-off-by: greta <gretadoci@gmail.com>
2022-09-07 16:01:41 +02:00
szaimen
d9b463c20a fix dark-contrast-theme
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-06 18:03:35 +00:00
szaimen
7dd7d4d63d fix background shadow
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-09-05 17:47:07 +02:00
Julius Härtl
b6a6802857
Some more fixes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 14:15:42 +02:00
Julius Härtl
ac134f5f47
Restore dashboard layout
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 14:15:40 +02:00
Julius Härtl
e4113b1779
Adapt layout to new base css variables
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 14:15:39 +02:00
Julius Härtl
cc21ea6419
Fix gradient using the wrong target value
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-26 14:48:38 +02:00
Julius Härtl
9fc52ed491
Properly align element variables to the regular ones
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-26 13:31:26 +02:00
Julius Härtl
57233fd99a
Expose core background image
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-19 11:55:10 +02:00
Julius Härtl
4be6280aa9
Add css variables for blurred background
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-19 11:55:04 +02: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 +02: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 +02:00
John Molakvoæ
0ea23cad0e
Revert "Fix unit tests for the theming app"
This reverts commit 13ca01ee12.
2022-08-16 08:51:43 +02:00
John Molakvoæ
4c6be330ef
Revert "First first run wizzard"
This reverts commit ba3f5337f3.
2022-08-16 08:30:08 +02: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 +02:00
Vincent Petry
684cc097f4
Merge pull request #33452 from nextcloud/fix/firstrunwizzard
Fix first run wizzard
2022-08-10 22:35:55 +02:00
Joas Schilling
05d034a6da
Allow to invert when on bright
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-08-08 12:56:31 +02:00
Carl Schwan
ba3f5337f3
First first run wizzard
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-03 15:51:02 +02:00
Julius Härtl
3f63724c2d
Properly set --color-primary-light-hover on dark themes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-16 09:47:22 +02:00
Carl Schwan
4e0574e184 Port encryption admin settings to vue
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-13 14:58:55 +02:00
John Molakvoæ
d64a63abc6
Properly calculate primary element based on background luminance
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-20 08:42:32 +02:00
John Molakvoæ
264adf0c3b
Fix profile and add gradient-primary-background
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-13 16:13:01 +02:00
John Molakvoæ
73918b8af9
Cleanup and compile
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-13 16:13:00 +02:00
John Molakvoæ
4e7989a83e
Fix dark theme description
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-01 10:23:02 +02:00
John Molakvoæ
f577b5dc96
Fix theming setEnabledThemes unique array
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-30 13:40:27 +02:00
John Molakvoæ
24c5d994c7
Allow to override the default theme
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-30 13:40:27 +02:00
John Molakvoæ
5e8a3eb66c
Fix header apps icons
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-28 18:12:29 +02:00
John Molakvoæ
7c5bb555e7
Fix logo colour on bright primary colour
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-28 18:11:30 +02:00
John Molakvoæ
4a646789c3
Add system/light themes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-28 08:41:58 +02:00
John Molakvoæ
4dc96dd165
Fix mix factor
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-26 09:22:43 +02:00
John Molakvoæ
d9b77bc2eb
Fix dark theme primary mix
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-26 09:00:11 +02:00
John Molakvoæ
f7f4d36a37
Fix dyslexia font loading
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-22 13:04:15 +02:00
John Molakvoæ
850d8ac1cd
Add default theming disabled fallback
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-22 11:24:25 +02:00
John Molakvoæ
d1dfdfe799
Lint and psalm fix
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 19:00:29 +02:00
John Molakvoæ
3c75a99267
Phpunit
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 19:00:28 +02:00
John Molakvoæ
1dee36c761
Remove accessibility
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 19:00:28 +02:00
John Molakvoæ
7b686abe7f
Migrate old accessibility config
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 09:31:07 +02: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 +02:00
John Molakvoæ
9ea72b1010
Migrating themes to Theming app
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 09:31:07 +02:00
John Molakvoæ
69d1d1a84e
Write body theme selector straight in the template
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 09:31:07 +02:00
John Molakvoæ
fa18a77fa2
Fix twofactor loading and public image
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-04-21 09:31:06 +02:00
John Molakvoæ (skjnldsv)
a1aaaaa0c8
Update and fix theming images
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-04-21 09:31:06 +02:00
Joas Schilling
b3cf312edc
Start theming providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-21 09:29:33 +02: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 +01: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 +01:00
Carl Schwan
760db78dba
Add better error handling
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-27 17:03:09 +01:00
Carl Schwan
f778cbe7b9
Fix registerEventListener issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-27 11:12:45 +01: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 +01:00
John Molakvoæ (skjnldsv)
dd7bf0f902
Fix dynamic loading
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-01-08 10:14:53 +01:00
Carl Schwan
dfb569f097
Follow upstream security recommandation
See https://scssphp.github.io/scssphp/docs/#security-considerations

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-02 15:57:53 +01:00
Carl Schwan
324e0dc36c
Add rgb to hsl converter
This ports away from using now internal functions from scssphp.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-02 11:53:34 +01:00
Côme Chilliet
113756db30
Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +01: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 +01:00
Carl Schwan
a67a12cb96
Merge pull request #29240 from nextcloud/work/admin-delegation-implementation
Add support for Delegation Settings for more apps
2021-10-15 20:59:43 +02: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 +02:00
Joas Schilling
da73990d1c
Don't setup the filesystem to check for a favicon we don't use anyway
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-13 15:45:42 +02:00
Joas Schilling
37f40cdd46
Fix translated app details
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-09-30 09:08:17 +02:00
szaimen
0758e0258d improve webmanifest
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-08-24 11:42:04 +02:00
Julius Härtl
3860dad9ea
Merge pull request #26481 from ghost/fdroid 2021-07-13 08:49:59 +02:00
MichaIng
af61ac6a7a Fix Psalm code scanning alerts
InvalidScalarArgument (apps/theming/lib/IconBuilder.php#L213): https://github.com/nextcloud/server/security/code-scanning/6691
InvalidScalarArgument (apps/theming/lib/IconBuilder.php#L213): https://github.com/nextcloud/server/security/code-scanning/6692
MissingReturnType (apps/theming/lib/IconBuilder.php#L226): https://github.com/nextcloud/server/security/code-scanning/6693
MissingParamType (apps/theming/lib/IconBuilder.php#L226): https://github.com/nextcloud/server/security/code-scanning/6694
MissingParamType (apps/theming/lib/IconBuilder.php#L226): https://github.com/nextcloud/server/security/code-scanning/6695
PossiblyFalseArgument (apps/theming/lib/IconBuilder.php#L232): https://github.com/nextcloud/server/security/code-scanning/6696

Signed-off-by: MichaIng <micha@dietpi.com>
2021-07-12 20:05:44 +02:00
HouraisanNEET
0ba0189260 Add F-Droid
Signed-off-by: HouraisanNEET <HouraisanNEET@users.noreply.github.com>
2021-07-04 21:44:55 +08:00
Joas Schilling
080e26fb80
Validate the theming color also on CLI
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-06-25 16:58:29 +02:00
Morris Jobke
f6108acea4
Fix default product name for old themes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-06-16 15:52:49 +02:00
Julius Härtl
4673b54a2c
Add dedicated product name to OCP\Defaults
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-06-16 11:36:56 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
ste101
d41e12f2e2
Allow webp as background image 2021-03-09 10:17:06 +01:00
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
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>
2021-02-18 13:31:24 +01:00
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
Julius Härtl
2538079876
Use default favicon on sharing pages
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-11 16:29:24 +02:00
Morris Jobke
7971ba5cc6
Merge pull request #10898 from nextcloud/feature/10684/default-logo-color-theme-colors
Switches the default logo color depending on the primary color
2018-10-08 10:33:22 +02:00
Michael Weimann
044ab0cbec
Adapts the theming util to the new core logo image path
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-10-04 20:43:27 +02:00
Daniel Kesselberg
1243caea2e
Append error from exception for message
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-03 22:20:57 +02:00
Daniel Kesselberg
1986c1f563
Fix call to logger
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-03 21:15:20 +02:00
Michael Weimann
c7e81e17c8
Updates inverted logo handling to work like the app icons
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-10-02 08:37:55 +02:00
Michael Weimann
d855c38e07
Moves the logo files to logo
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-10-02 08:37:54 +02:00
Michael Weimann
92049c3ceb
Switches the default logo color depending on the primary color
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-10-02 08:37:54 +02:00
Joas Schilling
480783a630
Merge pull request #11042 from nextcloud/bugfix/10894/php73-filter_var-deprecation
Remove filter_var flags due to PHP 7.3 deprecation, fixes #10894
2018-09-13 09:31:41 +02:00
Michael Weimann
38ea5d14b3
Disables SVG favicon uploads when imagemagick is missing.
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-09-05 20:50:21 +02:00
Patrik Kernstock
8f9fa9ee13 Remove filter_var flags due to PHP 7.3 deprecation, fixes #10894
Signed-off-by: Patrik Kernstock <info@pkern.at>
2018-09-04 00:58:44 +02:00
Julius Härtl
5bae5bf3eb
Make the default element color for bright theming colors lighter
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-30 10:37:05 +02:00
Julius Härtl
c4f34ccc4c
Theming: Fix footer tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-27 15:22:49 +02:00
Julius Härtl
5175e33e31
Theming: Only Entity in footer if a url is set
fixes #10024

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-27 13:59:16 +02:00
Julius Härtl
80efb51a1a
[theming] reload css variables instead of the whole server css
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-20 19:20:51 +02:00
John Molakvoæ (skjnldsv)
8aaf2c3272
Theming update on url
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-20 19:17:06 +02:00
Morris Jobke
8f6acbff62
Merge pull request #9258 from nextcloud/theming-logo-png
Convert theming app logo to PNG to show it properly in emails
2018-06-15 17:02:14 +02:00
Julius Härtl
ceee91d9d4
Add info message if an exception occurs during the svg to png conversion
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-14 17:36:02 +02:00
Roeland Jago Douma
e4db293cc1
Fix possible test timing issues in IconController
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>
2018-06-13 22:54:08 +02:00
Roeland Jago Douma
f65a6e782c
Mock the timefactory in the theming tests
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>
2018-06-07 11:42:21 +02:00
Julius Härtl
5b0ce806a3
Minor fixes and cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-06 13:15:52 +02:00
Julius Härtl
d132527aa9
Use svg opt out as parameter
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-05 16:47:38 +02:00
Julius Härtl
9b919245f6
Adjust ImageManager tests for png generation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-05 16:47:38 +02:00
Julius Härtl
4a5826cddb
Generate PNG version of the theming app logo for mails
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-05 16:47:38 +02:00
Roeland Jago Douma
e5cc8be9d5
Fix usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-04 08:48:54 +02:00
Arthur Schiwon
0847c98aaf
addjust footer height when legal links are present. fixes #9572
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-05-24 23:39:50 +02:00
Arthur Schiwon
16c061818e
also add a privacy link
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-05-24 23:32:07 +02:00