summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-09-13 17:28:40 +0200
committerJoas Schilling <coding@schilljs.com>2022-09-13 17:50:25 +0200
commit7d6d65600ef432f440d354789fa48c9dd5013f40 (patch)
tree18e140b7b4b00296ab26028864eeed49a63f1219
parentb739dd580743aa3c339eba28c45f14d930956135 (diff)
downloadnextcloud-server-7d6d65600ef432f440d354789fa48c9dd5013f40.tar.gz
nextcloud-server-7d6d65600ef432f440d354789fa48c9dd5013f40.zip
Fix twofactor provider icons in dark mode
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--apps/settings/lib/Settings/Personal/Security/TwoFactor.php1
-rw-r--r--apps/settings/templates/settings/personal/security/twofactor.php12
2 files changed, 2 insertions, 11 deletions
diff --git a/apps/settings/lib/Settings/Personal/Security/TwoFactor.php b/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
index 726fc99943a..c356442a628 100644
--- a/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
+++ b/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
@@ -72,7 +72,6 @@ class TwoFactor implements ISettings {
public function getForm(): TemplateResponse {
return new TemplateResponse('settings', 'settings/personal/security/twofactor', [
'twoFactorProviderData' => $this->getTwoFactorProviderData(),
- 'themedark' => $this->config->getUserValue($this->uid, 'accessibility', 'theme', false)
]);
}
diff --git a/apps/settings/templates/settings/personal/security/twofactor.php b/apps/settings/templates/settings/personal/security/twofactor.php
index 3d85f4505c3..3fa63bd6d28 100644
--- a/apps/settings/templates/settings/personal/security/twofactor.php
+++ b/apps/settings/templates/settings/personal/security/twofactor.php
@@ -40,18 +40,10 @@ declare(strict_types=1);
$provider = $data['provider'];
//Handle 2FA provider icons and theme
if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
- if ($_['themedark']) {
- $icon = $provider->getLightIcon();
- } else {
- $icon = $provider->getDarkIcon();
- }
+ $icon = $provider->getDarkIcon();
//fallback icon if the 2factor provider doesn't provide an icon.
} else {
- if ($_['themedark']) {
- $icon = image_path('core', 'actions/password-white.svg');
- } else {
- $icon = image_path('core', 'actions/password.svg');
- }
+ $icon = image_path('core', 'actions/password.svg');
}
/** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */
$settings = $data['settings'];