ui: restore flat top-level rail (drop nested PineAP sub-entries)
This commit is contained in:
@@ -143,12 +143,6 @@ body {
|
||||
align-items: center; justify-content: center; margin-right: 14px; flex: none;
|
||||
}
|
||||
.entry-icon svg { width: 24px; height: 24px; display: block; }
|
||||
#rail .entry.sub {
|
||||
height: 36px; padding-left: 34px; font-size: 13px;
|
||||
}
|
||||
#rail .entry.sub .entry-icon { width: 18px; height: 18px; margin-right: 10px; }
|
||||
#rail .entry.sub .entry-icon svg { width: 18px; height: 18px; }
|
||||
#rail.open .entry.sub .entry-text { font-size: 12px; }
|
||||
#topbar .btn.ghost { color: #fff; border-color: #fff; }
|
||||
.entry-text { white-space: nowrap; opacity: 0; transition: opacity .2s; }
|
||||
#rail.open .entry-text { opacity: 1; }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>WiFi Pineapple</title>
|
||||
<link rel="icon" type="image/png" href="assets/logo.png">
|
||||
<link rel="stylesheet" href="css/app.css?v=20260818-7">
|
||||
<link rel="stylesheet" href="css/app.css?v=20260818-8">
|
||||
<link rel="stylesheet" href="js/xterm.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -269,6 +269,6 @@
|
||||
<script src="js/terminal.js"></script>
|
||||
<script src="js/pager.js"></script>
|
||||
<script src="js/views.js?v=20260818-7"></script>
|
||||
<script src="js/app.js?v=20260818-7"></script>
|
||||
<script src="js/app.js?v=20260818-8"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -29,16 +29,7 @@ const App = (() => {
|
||||
|
||||
const railItems = [
|
||||
{ key: 'dashboard', label: 'Dashboard', hash: '#/dashboard', icon: 'dashboard' },
|
||||
{
|
||||
key: 'pineap', label: 'PineAP', hash: '#/pineap', icon: 'pineap', children: [
|
||||
{ key: 'pineap_evilwpa', label: 'Evil WPA', hash: '#/pineap/evilwpa', icon: 'attack' },
|
||||
{ key: 'pineap_open', label: 'Evil Open', hash: '#/pineap/open', icon: 'wifi' },
|
||||
{ key: 'pineap_enterprise', label: 'Evil Enterprise', hash: '#/pineap/enterprise', icon: 'record' },
|
||||
{ key: 'pineap_impersonation', label: 'Impersonation', hash: '#/pineap/impersonation', icon: 'place' },
|
||||
{ key: 'pineap_clients', label: 'Clients', hash: '#/pineap/clients', icon: 'pager' },
|
||||
{ key: 'pineap_filtering', label: 'Filtering', hash: '#/pineap/filtering', icon: 'settings' }
|
||||
]
|
||||
},
|
||||
{ key: 'pineap', label: 'PineAP', hash: '#/pineap', icon: 'pineap' },
|
||||
{ key: 'recon', label: 'Recon', hash: '#/recon', icon: 'recon' },
|
||||
{ key: 'logging', label: 'Logging', hash: '#/logging', icon: 'logging' },
|
||||
{ key: 'modules', label: 'Payloads', hash: '#/modules', icon: 'modules' },
|
||||
@@ -71,13 +62,6 @@ const App = (() => {
|
||||
rail.appendChild(d);
|
||||
}
|
||||
rail.appendChild(railEntry(it));
|
||||
if (it.children) {
|
||||
it.children.forEach((sub) => {
|
||||
const s = railEntry(sub);
|
||||
s.classList.add('sub');
|
||||
rail.appendChild(s);
|
||||
});
|
||||
}
|
||||
});
|
||||
const foot = document.createElement('div');
|
||||
foot.className = 'rail-footer';
|
||||
@@ -129,13 +113,9 @@ const App = (() => {
|
||||
currentView = views[name](els.content);
|
||||
}
|
||||
const key = keyOf(hash);
|
||||
const subs = els.rail.querySelectorAll('.entry.sub');
|
||||
const subActive = Array.prototype.some.call(subs, (s) => s.getAttribute('href') === hash);
|
||||
Array.prototype.forEach.call(els.rail.querySelectorAll('.entry'), (a) => {
|
||||
const href = a.getAttribute('href');
|
||||
const exact = !!href && href === hash;
|
||||
const groupActive = !subActive && !!href && keyOf(href) === key;
|
||||
a.classList.toggle('active', exact || groupActive);
|
||||
a.classList.toggle('active', !!href && (href === hash || keyOf(href) === key));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user