Skip to content

Commit 4baa09d

Browse files
authored
Merge pull request #34057 from nextcloud/bugfix/noid/fix-2fa-providers-dark-mode
Fix twofactor provider icons in dark mode
2 parents b739dd5 + 7d6d656 commit 4baa09d

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

apps/settings/lib/Settings/Personal/Security/TwoFactor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public function __construct(ProviderLoader $providerLoader,
7272
public function getForm(): TemplateResponse {
7373
return new TemplateResponse('settings', 'settings/personal/security/twofactor', [
7474
'twoFactorProviderData' => $this->getTwoFactorProviderData(),
75-
'themedark' => $this->config->getUserValue($this->uid, 'accessibility', 'theme', false)
7675
]);
7776
}
7877

apps/settings/templates/settings/personal/security/twofactor.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,10 @@
4040
$provider = $data['provider'];
4141
//Handle 2FA provider icons and theme
4242
if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
43-
if ($_['themedark']) {
44-
$icon = $provider->getLightIcon();
45-
} else {
46-
$icon = $provider->getDarkIcon();
47-
}
43+
$icon = $provider->getDarkIcon();
4844
//fallback icon if the 2factor provider doesn't provide an icon.
4945
} else {
50-
if ($_['themedark']) {
51-
$icon = image_path('core', 'actions/password-white.svg');
52-
} else {
53-
$icon = image_path('core', 'actions/password.svg');
54-
}
46+
$icon = image_path('core', 'actions/password.svg');
5547
}
5648
/** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */
5749
$settings = $data['settings'];

0 commit comments

Comments
 (0)