mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Fix twofactor provider icons in dark mode
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b739dd5807
commit
7d6d65600e
2 changed files with 2 additions and 11 deletions
|
|
@ -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)
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue