Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
.addConnectionLink {
display: flex;
align-items: center;
gap: 8px;
gap: 6px;
border-radius: 4px;
box-shadow:
0px 1px 3px 0px rgba(0, 0, 0, 0.2),
Expand All @@ -63,7 +63,7 @@
color: inherit;
font-weight: 600;
height: 48px;
padding-left: 4px;
padding-left: 6px;
text-decoration: none;
transition: box-shadow 200ms, background 200ms, border 200ms;
}
Expand Down
28 changes: 3 additions & 25 deletions frontend/src/app/components/dashboard/dashboard.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,12 @@

.toggle-button-position {
display: flex;
justify-content: flex-end;
margin-bottom: -48px;
justify-content: center;
margin-top: 24px;
}

.toggle-button {
background-color: var(--mat-sidenav-content-background-color);
border-radius: 4px 0 0 4px !important;
color: inherit;
line-height: 24px;
min-width: 52px !important;
box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.1),0px 6px 8px 0px rgba(0, 0, 0, 0.07),0px 1px 8px 0px rgba(0, 0, 0, 0.06);
}

.toggle-button::ng-deep .mat-button-wrapper {
padding: 0;
}

.toggle-button::ng-deep .material-icons {
line-height: 22px;
}

.toggle-button-position__opened::ng-deep .material-icons {
margin-left: -2px;
}

.toggle-button-position__closed::ng-deep .material-icons {
margin-left: 2px;
.toggle-button_opened {
width: calc(100% - 32px);
}

.dashboard {
Expand Down
21 changes: 16 additions & 5 deletions frontend/src/app/components/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,31 @@ <h3 class='mat-subheading-2'>Rocketadmin can not find any tables</h3>
<mat-sidenav #sideList mode="side" [(opened)]="shownTableTitles"
class="table-list-sidenav"
[ngClass]="{'side-bar_collapsed': !shownTableTitles}">
<div class="toggle-button-position"
[ngClass]="(shownTableTitles)?'toggle-button-position__opened':'toggle-button-position__closed'">
<button mat-button type="button" class="toggle-button" (click)="toggleSideBar()"
<div class="toggle-button-position">
<button mat-button type="button" *ngIf="shownTableTitles; else collapsedButton"
class="toggle-button_opened"
(click)="toggleSideBar()"
angulartics2On="click"
angularticsAction="Dashboard: toggle sidebar"
[angularticsProperties]="{'collapsed': !shownTableTitles}">
<mat-icon>{{ shownTableTitles ? 'chevron_left' : 'chevron_right' }} </mat-icon>
Collapse
<mat-icon>chevron_left</mat-icon>
</button>

<ng-template #collapsedButton>
<button mat-icon-button type="button"
(click)="toggleSideBar()"
angulartics2On="click"
angularticsAction="Dashboard: toggle sidebar"
[angularticsProperties]="{'collapsed': !shownTableTitles}">
<mat-icon>chevron_right</mat-icon>
</button>
</ng-template>
</div>
<app-db-tables-list
[collapsed]="!shownTableTitles"
[tables]="tablesList"
[connectionID]="connectionID"
[connectionTitle]="currentConnectionTitle"
[selectedTable]="selectedTableName">
</app-db-tables-list>
</mat-sidenav>
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/app/components/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
return this._connections.currentConnectionAccessLevel
}

get currentConnectionTitle () {
return this._connections.currentConnection.title || this._connections.currentConnection.database || 'Tables'
}

get currentConnectionIsTest () {
return this._connections.currentConnection.isTestConnection
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<div class="sidenav-header">
<mat-icon *ngIf="collapsed; else tableHeader">table_view</mat-icon>
<ng-template #tableHeader>
<h1 class="mat-h2 connection-title">{{connectionTitle}}</h1>
</ng-template>
</div>

<app-content-loader *ngIf="tables === null; else tablesList"></app-content-loader>

<ng-template #tablesList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { TableStateService } from 'src/app/services/table-state.service';
})
export class DbTablesListComponent {
@Input() connectionID: string;
@Input() connectionTitle: string;
@Input() tables: TableProperties[];
@Input() selectedTable: string;
@Input() collapsed: boolean;
Expand Down