Skip to content

Add occ command to set theming values - #23024

Merged
rullzer merged 2 commits into
masterfrom
enh/theming-occ
Sep 24, 2020
Merged

Add occ command to set theming values#23024
rullzer merged 2 commits into
masterfrom
enh/theming-occ

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Sep 23, 2020

Copy link
Copy Markdown
Member

Fixes#14321 by moving existing logic out of the controller and reusing it in a new occ command.

occ theming:config --help
Description:
Set theming app config values
Usage:
theming:config [options] [--] [<key> [<value>]]
Arguments:
key Key to update the theming app configuration (leave empty to get a list of all configured values)
One of: name, url, imprintUrl, privacyUrl, slogan, color
value Value to set (leave empty to obtain the current value)
Options:
-r, --reset Reset the given config key to default
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Example commands

  • Change the color: occ theming:config color "#ff0000"
  • Change the logo: occ theming:config logo /tmp/foo.png
  • Reset the color: occ theming:config color

@juliusknorrjuliusknorr added this to the Nextcloud 21 milestone Sep 23, 2020
@juliusknorrjuliusknorr added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Sep 23, 2020
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Guess i was a bit to quick, tests need adjustments as well

@kesselb

Copy link
Copy Markdown
Contributor

Value to set (leave empty to reset the key to the default value)

Fine by me (because documented) but I would expect that no value prints the current value.

@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Fine by me (because documented) but I would expect that no value prints the current value.

Now that you mention it, yeah let me add a reset flag.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorrjuliusknorr added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 24, 2020
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Ready for review

@rullzer
rullzer merged commit 9d67c2a into masterSep 24, 2020
@rullzer
rullzer deleted the enh/theming-occ branch September 24, 2020 12:36
@rullzer

Copy link
Copy Markdown
Member

/backport to stable20

@blizzz

Copy link
Copy Markdown
Member

/backport to stable19

@juliusknorrjuliusknorr added the pending documentation This pull request needs an associated documentation update label Nov 19, 2020
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Already documented at nextcloud/documentation#8078

@juliusknorrjuliusknorr removed the pending documentation This pull request needs an associated documentation update label Nov 22, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: theming

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow setting theming options from OCC

5 participants

@juliusknorr@kesselb@rullzer@blizzz@ChristophWurst