diff --git a/core/css/styles.scss b/core/css/styles.scss index 9ac41b3f023..0c048e666e8 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -60,11 +60,11 @@ a { * { cursor: pointer; } -} -a.external { - margin: 0 3px; - text-decoration: underline; + &.external { + margin: 0 3px; + text-decoration: underline; + } } input { diff --git a/lib/private/Settings/Personal/PersonalInfo.php b/lib/private/Settings/Personal/PersonalInfo.php index 8c1c8cb19b8..bd9cd263260 100644 --- a/lib/private/Settings/Personal/PersonalInfo.php +++ b/lib/private/Settings/Personal/PersonalInfo.php @@ -38,6 +38,7 @@ use OCP\IUser; use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\Settings\ISettings; +use OCP\Encryption\IManager as EncryptionManager; class PersonalInfo implements ISettings { @@ -55,6 +56,8 @@ class PersonalInfo implements ISettings { private $l10nFactory; /** @var IL10N */ private $l; + /** @var EncryptionManager */ + private $encryptionManager; /** * @param IConfig $config @@ -71,7 +74,8 @@ class PersonalInfo implements ISettings { AccountManager $accountManager, IAppManager $appManager, IFactory $l10nFactory, - IL10N $l + IL10N $l, + EncryptionManager $encryptionManager ) { $this->config = $config; $this->userManager = $userManager; @@ -80,6 +84,7 @@ class PersonalInfo implements ISettings { $this->appManager = $appManager; $this->l10nFactory = $l10nFactory; $this->l = $l; + $this->encryptionManager = $encryptionManager; } /** @@ -135,9 +140,15 @@ class PersonalInfo implements ISettings { 'twitterScope' => $userData[AccountManager::PROPERTY_TWITTER]['scope'], 'twitterVerification' => $userData[AccountManager::PROPERTY_TWITTER]['verified'], 'groups' => $this->getGroups($user), + 'dataLocation' => 'Germany', + 'provider' => 'Hetzner Online GmbH', + 'providerLink' => 'https://www.hetzner.de/', + 'providerPrivacyLink' => 'https://www.hetzner.de/rechtliches/datenschutz', + 'encryptionEnabled' => true || $this->encryptionManager->isEnabled(), + 'adminName' => 'Michael Weimann', + 'adminMail' => 'mail@michael-weimann.eu' ] + $messageParameters + $languageParameters + $localeParameters; - return new TemplateResponse('settings', 'settings/personal/personal.info', $parameters, ''); } diff --git a/settings/css/settings.scss b/settings/css/settings.scss index d384ef26577..65e66370887 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -98,6 +98,7 @@ input { #personal-settings-avatar-container { display: inline-grid; + grid-row: span 3; grid-template-columns: 1fr; grid-template-rows: 2fr 1fr; vertical-align: top; @@ -178,6 +179,15 @@ select { grid-template-columns: 1fr; #personal-settings-avatar-container { grid-template-rows: 1fr; + + // swap "Where is my data" and "Detail" + *:nth-child(2) { + order: 3; + } + + *:nth-child(3) { + order: 2; + } } .personal-settings-container { grid-template-columns: 1fr 1fr; @@ -1614,3 +1624,10 @@ doesnotexist:-o-prefocus, .strengthify-wrapper { } } } + +.where-is-your-data { + // @todo replace by common Nextcloud link style as soon as available + a { + border-bottom: 1px dotted; + } +} diff --git a/settings/templates/settings/personal/partials/where-is-your-data.php b/settings/templates/settings/personal/partials/where-is-your-data.php new file mode 100644 index 00000000000..0888bcfc006 --- /dev/null +++ b/settings/templates/settings/personal/partials/where-is-your-data.php @@ -0,0 +1,76 @@ +
+ t('Your data is located in %s.', [$_['dataLocation']]); ?> +
++ t('Your provider is %s%s%s.', [ + '', + $_['provider'], + '' + ]); + } else { + echo $l->t('Your provider is %s.', [$_['provider']]); + } + ?> + t('Read the %sprivacy policy%s now.', [ + '', + '' + ]); + } + ?> +
++ t( + 'Your data is protected by %sserver side encryption%s.', + [ + '', + '' + ] + ); ?> +
++ t( + '%s%s%s is your admin. If you have any issues, %scontact them%s.', + [ + '', + $_['adminName'], + '', + '', + '' + ] + ); ?> +
+