Merge pull request #4569 from nextcloud/fix-icons

Fix icons in sidebar on personal page
This commit is contained in:
Roeland Jago Douma 2017-04-28 08:33:45 +02:00 committed by GitHub
commit 3fd75e288c
7 changed files with 18 additions and 6 deletions

View File

@ -5,7 +5,7 @@ script('encryption', 'settings-personal');
script('core', 'multiselect'); script('core', 'multiselect');
?> ?>
<form id="ocDefaultEncryptionModule" class="section"> <form id="ocDefaultEncryptionModule" class="section">
<h2><?php p($l->t('Basic encryption module')); ?></h2> <h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2>
<?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?> <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>

View File

@ -114,3 +114,7 @@ td.mountPoint, td.backend { width:160px; }
#externalStorage .mountOptionsDropdown { #externalStorage .mountOptionsDropdown {
margin-right: 40px; margin-right: 40px;
} }
.nav-icon-external-storage {
background-image: url('../img/app-dark.svg?v=1');
}

View File

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

View File

@ -7,6 +7,6 @@ style('twofactor_backupcodes', 'style');
?> ?>
<div class="section"> <div class="section">
<h2><?php p($l->t('Second-factor backup codes')); ?></h2> <h2 data-anchor-name="second-factor-backup-codes"><?php p($l->t('Second-factor backup codes')); ?></h2>
<div id="twofactor-backupcodes-settings"></div> <div id="twofactor-backupcodes-settings"></div>
</div> </div>

View File

@ -26,6 +26,9 @@ input#openid, input#webdav { width:20em; }
.nav-icon-second-factor-backup-codes { .nav-icon-second-factor-backup-codes {
background-image: url('../img/password.svg?v=1'); background-image: url('../img/password.svg?v=1');
} }
.nav-icon-ssl-root-certificate {
background-image: url('../img/password.svg?v=1');
}
#avatarform { #avatarform {
min-width: 145px; min-width: 145px;

View File

@ -220,8 +220,13 @@ $formsMap = array_map(function($form){
if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) { if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]); $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
$sectionName = str_replace('</h2>', '', $sectionName); $sectionName = str_replace('</h2>', '', $sectionName);
if (strpos($regs['class'], 'data-anchor-name') !== false) {
preg_match('%.*data-anchor-name="(?P<anchor>[^"]*)"%i', $regs['class'], $matches);
$anchor = $matches['anchor'];
} else {
$anchor = strtolower($sectionName); $anchor = strtolower($sectionName);
$anchor = str_replace(' ', '-', $anchor); $anchor = str_replace(' ', '-', $anchor);
}
return array( return array(
'anchor' => $anchor, 'anchor' => $anchor,

View File

@ -1,5 +1,5 @@
<div class="section"> <div class="section">
<h2><?php p($l->t('SSL Root Certificates')); ?></h2> <h2 data-anchor-name="ssl-root-certificate"><?php p($l->t('SSL Root Certificates')); ?></h2>
<table id="sslCertificate" class="grid" data-type="<?php p($_['type']); ?>"> <table id="sslCertificate" class="grid" data-type="<?php p($_['type']); ?>">
<thead> <thead>
<tr> <tr>