-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theming: Fix missing color usage #771
Conversation
f3edbbc
to
1debc12
Compare
cc @Mar1u5 @nickvergessen @nextcloud/designers @nextcloud/theming please help reviewing :) |
@jancborchardt still not complete for review ;) - we need #1026 for all the remaining theming pull requests. But i'll rebase this one later today and make it ready. |
1debc12
to
6e98c8b
Compare
6870e43
to
6b68f3b
Compare
CI is happy, ready for review @nextcloud/designers @nextcloud/theming I've included #1026 for easier testing, will rebase to master once this is merged. |
$theme = \OC::$server->query("ThemingDefaults"); | ||
$color = $theme->getMailHeaderColor(); | ||
$textColor = "#ffffff"; | ||
if($theme instanceof \OCA\Theming\ThemingDefaults) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will throw an Exception if the theming app is disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickvergessen Hmm, I've disabled it, but there was no Exception for me.
Sould I just check if the app is enabled like this:
if(\OC::$server->getAppManager()->isEnabledForUser("theming")) { ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's better since it's more explicit.
6b68f3b
to
f753839
Compare
@nickvergessen Thanks for the comments. I've just pushed an update. |
$textColor = "#ffffff"; | ||
if(\OC::$server->getAppManager()->isEnabledForUser("theming")) { | ||
$logoPath = $theme->getLogo(); | ||
$util = \OC::$server->query("\OCA\Theming\Util"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could throw an exception OCP\AppFramework\QueryException
, better catch it so the page still displayes 😉
f753839
to
64179d3
Compare
@nickvergessen ok, i've added a try-catch-block as well. |
Does that fix media type icons? That's the biggest problem right now. |
Awesome, thanks. |
#1026 is in. @juliushaertl can you rebase? |
64179d3
to
4573df4
Compare
@rullzer done. |
👍 works and looks nice. Thanks! |
@@ -66,7 +65,7 @@ class='js-gs-share social-gnu'> | |||
<?php p($l->t('HTML Code:')); ?> | |||
<xmp><a target="_blank" rel="noreferrer" href="<?php p($_['reference']); ?>" | |||
style="padding:10px;background-color:#0082c9;color:#fff;border-radius:3px;padding-left:4px;"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to use the colors here? It still uses blue+white instead of what the preview shows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah also forgot to apply the style changes here. I'll fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickvergessen ok, i've updated the html code as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
4573df4
to
a7273f1
Compare
Second review, @rullzer ? |
LGTM |
requires #1026