Skip to content

Commit 3fd75e2

Browse files
authored
Merge pull request #4569 from nextcloud/fix-icons
Fix icons in sidebar on personal page
2 parents a809aa5 + d6e7cee commit 3fd75e2

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

apps/encryption/templates/settings-personal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
script('core', 'multiselect');
66
?>
77
<form id="ocDefaultEncryptionModule" class="section">
8-
<h2><?php p($l->t('Basic encryption module')); ?></h2>
8+
<h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2>
99

1010
<?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>
1111

apps/files_external/css/settings.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,7 @@ td.mountPoint, td.backend { width:160px; }
114114
#externalStorage .mountOptionsDropdown {
115115
margin-right: 40px;
116116
}
117+
118+
.nav-icon-external-storage {
119+
background-image: url('../img/app-dark.svg?v=1');
120+
}

apps/files_external/templates/settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function writeParameterInput($parameter, $options, $classes = []) {
8888
?>
8989

9090
<form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>">
91-
<h2><?php p($l->t('External storage')); ?></h2>
91+
<h2 data-anchor-name="external-storage"><?php p($l->t('External storage')); ?></h2>
9292
<?php if (isset($_['dependencies']) and ($_['dependencies']<>'') and $canCreateMounts) print_unescaped(''.$_['dependencies'].''); ?>
9393
<table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'>
9494
<thead>

apps/twofactor_backupcodes/templates/personal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
?>
88

99
<div class="section">
10-
<h2><?php p($l->t('Second-factor backup codes')); ?></h2>
10+
<h2 data-anchor-name="second-factor-backup-codes"><?php p($l->t('Second-factor backup codes')); ?></h2>
1111
<div id="twofactor-backupcodes-settings"></div>
1212
</div>

settings/css/settings.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ input#openid, input#webdav { width:20em; }
2626
.nav-icon-second-factor-backup-codes {
2727
background-image: url('../img/password.svg?v=1');
2828
}
29+
.nav-icon-ssl-root-certificate {
30+
background-image: url('../img/password.svg?v=1');
31+
}
2932

3033
#avatarform {
3134
min-width: 145px;

settings/personal.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,13 @@
220220
if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
221221
$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
222222
$sectionName = str_replace('</h2>', '', $sectionName);
223-
$anchor = strtolower($sectionName);
224-
$anchor = str_replace(' ', '-', $anchor);
223+
if (strpos($regs['class'], 'data-anchor-name') !== false) {
224+
preg_match('%.*data-anchor-name="(?P<anchor>[^"]*)"%i', $regs['class'], $matches);
225+
$anchor = $matches['anchor'];
226+
} else {
227+
$anchor = strtolower($sectionName);
228+
$anchor = str_replace(' ', '-', $anchor);
229+
}
225230

226231
return array(
227232
'anchor' => $anchor,

settings/templates/certificates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="section">
2-
<h2><?php p($l->t('SSL Root Certificates')); ?></h2>
2+
<h2 data-anchor-name="ssl-root-certificate"><?php p($l->t('SSL Root Certificates')); ?></h2>
33
<table id="sslCertificate" class="grid" data-type="<?php p($_['type']); ?>">
44
<thead>
55
<tr>

0 commit comments

Comments
 (0)