]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed layout of bruteforcesettings
authorMorris Jobke <hey@morrisjobke.de>
Tue, 14 Mar 2017 01:44:10 +0000 (19:44 -0600)
committerRoeland Jago Douma <roeland@famdouma.nl>
Sun, 2 Apr 2017 19:19:30 +0000 (21:19 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
apps/bruteforcesettings/css/settings.css [new file with mode: 0644]
apps/bruteforcesettings/js/IPWhitelistView.js
apps/bruteforcesettings/templates/ipwhitelist.php
lib/private/Settings/Manager.php
tests/lib/Settings/ManagerTest.php

diff --git a/apps/bruteforcesettings/css/settings.css b/apps/bruteforcesettings/css/settings.css
new file mode 100644 (file)
index 0000000..1d2837b
--- /dev/null
@@ -0,0 +1,17 @@
+
+#whitelist-list {
+       min-width: 262px;
+}
+
+#whitelist-list td span {
+       padding: 10px 15px;
+       display: inline-block;
+}
+
+#whitelist-list .action-column {
+       width: 46px;
+}
+
+#whitelist-list .action-column a {
+       display: inline-block;
+}
\ No newline at end of file
index da711ae12252e5e941785cd618e0fc3c350e869f..7341c7d079715c3fdcd77af0f44dc4186433f982 100644 (file)
@@ -27,7 +27,7 @@
        var TEMPLATE_WHITELIST =
                '<tr data-id="{{id}}">'
                + '<td><span>{{ip}}/{{mask}}</span></td>'
-               + '<td><a class="icon-delete has-tooltip" title="' + t('bruteforcesettings', 'Delete') + '">BAD CSS</a></td>'
+               + '<td class="action-column"><span><a class="icon-delete has-tooltip" title="' + t('bruteforcesettings', 'Delete') + '"></a></span></td>'
                + '</tr>';
 
        OCA.BruteForceSettings.WhitelistView = OC.Backbone.View.extend({
index 69354956168d49908d6f137743898abc3422686b..a4b0292e94298e0e9c000569d0992f04a397035e 100644 (file)
@@ -30,16 +30,17 @@ script('bruteforcesettings', [
        'IPWhitelistCollection',
        'IPWhitelistView',
 ]);
+style('bruteforcesettings', [
+       'settings'
+])
 
 /** @var \OCP\IL10N $l */
 ?>
 <form id="IPWhiteList" class="section">
        <h2><?php p($l->t('Brute force ip whitelist')); ?></h2>
 
-       <table>
-               <tbody id="whitelist-list">
+       <table id="whitelist-list">
 
-               </tbody>
        </table>
 
        <input type="text" name="whitelist_ip" id="whitelist_ip" placeholder="1.2.3.4" style="width: 200px;" />/
index 2ae1e0682b7e857528ce9c4967f938a631baee37..080b697b238e18549fd37a294a0a86e5a4a1ad06 100644 (file)
@@ -273,7 +273,7 @@ class Manager implements IManager {
                $sections = [
                        0 => [new Section('server', $this->l->t('Server settings'), 0, $this->url->imagePath('settings', 'admin.svg'))],
                        5 => [new Section('sharing', $this->l->t('Sharing'), 0, $this->url->imagePath('core', 'actions/share.svg'))],
-                       10 => [new Section('security', $this->l->t('Security'), 0)],
+                       10 => [new Section('security', $this->l->t('Security'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
                        45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
                        98 => [new Section('additional', $this->l->t('Additional settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))],
                        99 => [new Section('tips-tricks', $this->l->t('Tips & tricks'), 0, $this->url->imagePath('settings', 'help.svg'))],
index e6acafe9b885bb923a4fc78639512df93e2c2acc..497a0df9f4e976d3340455f6db0a94cadda491b2 100644 (file)
@@ -146,7 +146,7 @@ class ManagerTest extends TestCase {
                                ['class' => \OCA\WorkflowEngine\Settings\Section::class, 'priority' => 90]
                        ]));
 
-               $this->url->expects($this->exactly(5))
+               $this->url->expects($this->exactly(6))
                        ->method('imagePath')
                        ->willReturnMap([
                                ['settings', 'admin.svg', '1'],
@@ -159,7 +159,7 @@ class ManagerTest extends TestCase {
                $this->assertEquals([
                        0 => [new Section('server', 'Server settings', 0, '1')],
                        5 => [new Section('sharing', 'Sharing', 0, '2')],
-                       10 => [new Section('security', 'Security', 0)],
+                       10 => [new Section('security', 'Security', 0, '3')],
                        45 => [new Section('encryption', 'Encryption', 0, '3')],
                        90 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)],
                        98 => [new Section('additional', 'Additional settings', 0, '4')],
@@ -178,7 +178,7 @@ class ManagerTest extends TestCase {
                        ->will($this->returnValue([
                        ]));
 
-               $this->url->expects($this->exactly(5))
+               $this->url->expects($this->exactly(6))
                        ->method('imagePath')
                        ->willReturnMap([
                                ['settings', 'admin.svg', '1'],
@@ -191,7 +191,7 @@ class ManagerTest extends TestCase {
                $this->assertEquals([
                        0 => [new Section('server', 'Server settings', 0, '1')],
                        5 => [new Section('sharing', 'Sharing', 0, '2')],
-                       10 => [new Section('security', 'Security', 0)],
+                       10 => [new Section('security', 'Security', 0, '3')],
                        45 => [new Section('encryption', 'Encryption', 0, '3')],
                        98 => [new Section('additional', 'Additional settings', 0, '4')],
                        99 => [new Section('tips-tricks', 'Tips & tricks', 0, '5')],