diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-03-08 12:14:17 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-03-08 12:14:17 +0300 |
commit | 24d2069a4ce06fbdc5af7ce6f44769c805d34d47 (patch) | |
tree | 848c0dc09d6a0c3470b9c2ee901a2b4b10f6f7a1 /lib | |
parent | fe47092d6b07de6c49ae9e4ba681b86b86ba72b0 (diff) |
Show the app's icons in the personal settings
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Provider/AProvider.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Provider/AProvider.php b/lib/Provider/AProvider.php index 171c49e..dac6f92 100644 --- a/lib/Provider/AProvider.php +++ b/lib/Provider/AProvider.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace OCA\TwoFactorGateway\Provider; +use OCA\TwoFactorGateway\AppInfo\Application; use OCA\TwoFactorGateway\Exception\SmsTransmissionException; use OCA\TwoFactorGateway\PhoneNumberMask; use OCA\TwoFactorGateway\Service\Gateway\IGateway; @@ -30,6 +31,7 @@ use OCA\TwoFactorGateway\Service\StateStorage; use OCA\TwoFactorGateway\Settings\PersonalSettings; use OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings; use OCP\Authentication\TwoFactorAuth\IProvider; +use OCP\Authentication\TwoFactorAuth\IProvidesIcons; use OCP\Authentication\TwoFactorAuth\IProvidesPersonalSettings; use OCP\IL10N; use OCP\ISession; @@ -37,7 +39,7 @@ use OCP\IUser; use OCP\Security\ISecureRandom; use OCP\Template; -abstract class AProvider implements IProvider, IProvidesPersonalSettings { +abstract class AProvider implements IProvider, IProvidesIcons, IProvidesPersonalSettings { const STATE_DISABLED = 0; const STATE_START_VERIFICATION = 1; @@ -147,4 +149,12 @@ abstract class AProvider implements IProvider, IProvidesPersonalSettings { return new PersonalSettings($this->gatewayName); } + public function getLightIcon(): String { + return image_path(Application::APP_NAME, 'app.svg'); + } + + public function getDarkIcon(): String { + return image_path(Application::APP_NAME, 'app-dark.svg'); + } + } |