mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-04 08:30:39 +00:00
Add sidebar separator to dashboard
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
This commit is contained in:
@@ -56,6 +56,7 @@ const builtinTabs = [
|
||||
TabHome,
|
||||
TabApps,
|
||||
TabFiles,
|
||||
'-',
|
||||
TabUsage,
|
||||
TabAccount,
|
||||
TabSecurity,
|
||||
@@ -86,6 +87,10 @@ async function UIDashboard (options) {
|
||||
h += '<div class="dashboard-sidebar-nav">';
|
||||
for ( let i = 0; i < tabs.length; i++ ) {
|
||||
const tab = tabs[i];
|
||||
if ( tab === '-' ) {
|
||||
h += '<hr class="dashboard-sidebar-separator">';
|
||||
continue;
|
||||
}
|
||||
const isActive = i === 0 ? ' active' : '';
|
||||
const isBeta = tab.label === 'Apps';
|
||||
h += `<div class="dashboard-sidebar-item${isActive} ${isBeta ? 'beta' : ''}" data-section="${tab.id}">`;
|
||||
@@ -109,6 +114,7 @@ async function UIDashboard (options) {
|
||||
h += '<div class="dashboard-content">';
|
||||
for ( let i = 0; i < tabs.length; i++ ) {
|
||||
const tab = tabs[i];
|
||||
if ( tab === '-' ) continue;
|
||||
const isActive = i === 0 ? ' active' : '';
|
||||
h += `<div class="dashboard-section dashboard-section-${tab.id}${isActive}" data-section="${tab.id}">`;
|
||||
h += tab.html();
|
||||
|
||||
@@ -186,6 +186,12 @@ body {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.dashboard-sidebar-separator {
|
||||
border: none;
|
||||
border-top: 1px solid var(--dashboard-border);
|
||||
margin: 8px 16px;
|
||||
}
|
||||
|
||||
.dashboard-sidebar-item {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user