Side Navigation Fix

Side Navigation Fix
pull/209/head
Shahana Farooqui 5 years ago
parent c641c1e1dd
commit e1afb792fb

@ -6,8 +6,8 @@
<base href="/rtl/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico">
<link rel="stylesheet" href="styles.57e2ca8febc1e490a78e.css"></head>
<link rel="stylesheet" href="styles.6dc77cb683437fd2a879.css"></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.f8adc32abf38a237412d.js"></script><script src="polyfills-es5.763f4f23e8aee5ec234d.js" nomodule></script><script src="polyfills.e59b6f9dc696bd89cf7f.js"></script><script src="main.320310cf17286025611f.js"></script></body>
<script src="runtime.f8adc32abf38a237412d.js"></script><script src="polyfills-es5.763f4f23e8aee5ec234d.js" nomodule></script><script src="polyfills.e59b6f9dc696bd89cf7f.js"></script><script src="main.ec8d88afe9847528250a.js"></script></body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -7,7 +7,6 @@ var upperCase = require('upper-case');
var crypto = require('crypto');
var hash = crypto.createHash('sha256');
var logger = require('./logger');
var token = '';
exports.authenticateUser = (req, res, next) => {
if(+common.rtl_sso) {
@ -15,7 +14,7 @@ exports.authenticateUser = (req, res, next) => {
res.status(200).json({ token: token });
} else if (req.body.authenticateWith === 'PASSWORD' && crypto.createHash('sha256').update(common.cookie).digest('hex') === req.body.authenticationValue) {
connect.refreshCookie(common.rtl_cookie_path);
token = jwt.sign(
const token = jwt.sign(
{ user: 'Custom_User', configPath: common.nodes[0].config_path, macaroonPath: common.nodes[0].macaroon_path },
common.secret_key
);

@ -16,17 +16,19 @@
</div>
<mat-tree [dataSource]="navMenus" [treeControl]="treeControl" *ngIf="settings.menuType !== 'Compact'">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle (click)="onChildNavClicked(node)" matTreeNodePadding [matTreeNodePaddingIndent]="settings.menuType === 'Mini' ? 28 : 40" routerLinkActive="active-link" routerLink="{{node.link}}">
<mat-icon class="mr-1" matTooltip="{{node.name}}" matTooltipPosition="right" [matTooltipDisabled]="settings.menuType !== 'Mini'">{{node.icon}}<span *ngIf="node.name === 'Pending' && settings.menuType === 'Mini'" [matBadgeHidden]="numPendingChannels<1" matBadge="{{numPendingChannels}}" matBadgeOverlap="false" matBadgeColor="accent"></span></mat-icon>
<span *ngIf="settings.menuType !== 'Mini'">{{node.name}}<span *ngIf="node.name === 'Pending'" [matBadgeHidden]="numPendingChannels<1" matBadge="{{numPendingChannels}}" matBadgeOverlap="false" matBadgeColor="accent"></span></span>
<mat-tree-node *matTreeNodeDef="let node" (click)="onChildNavClicked(node);" matTreeNodePadding [matTreeNodePaddingIndent]="settings.menuType === 'Mini' ? 28 : 40" routerLinkActive="active-link" routerLink="{{node.link}}">
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center">
<mat-icon class="mr-1" matTooltip="{{node.name}}" matTooltipPosition="right" [matTooltipDisabled]="settings.menuType !== 'Mini'">{{node.icon}}<span *ngIf="node.name === 'Pending' && settings.menuType === 'Mini'" [matBadgeHidden]="numPendingChannels<1" matBadge="{{numPendingChannels}}" matBadgeOverlap="false" matBadgeColor="accent"></span></mat-icon>
<span *ngIf="settings.menuType !== 'Mini'">{{node.name}}<span *ngIf="node.name === 'Pending'" [matBadgeHidden]="numPendingChannels<1" matBadge="{{numPendingChannels}}" matBadgeOverlap="false" matBadgeColor="accent"></span></span>
</div>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding>
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center" matTreeNodeToggle (click)="toggleTree(node)">
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding matTreeNodeToggle>
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start center">
<div fxFlex="89" fxLayoutAlign="start center">
<mat-icon class="mr-1" matTooltip="{{node.name}}" matTooltipPosition="right" [matTooltipDisabled]="settings.menuType !== 'Mini'">{{node.icon}}</mat-icon><span *ngIf="settings.menuType !== 'Mini'">{{node.name}}</span>
</div>
<button fxFlex="11" fxLayoutAlign="end center" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name" fxLayoutAlign="end center">
<button fxFlex="11" fxLayoutAlign="end center" mat-icon-button [attr.aria-label]="'toggle ' + node.name" fxLayoutAlign="end center">
<mat-icon class="mat-icon-rtl-mirror"> {{treeControl.isExpanded(node) ? 'arrow_drop_up' : 'arrow_drop_down'}}</mat-icon>
</button>
</div>
@ -46,11 +48,11 @@
</mat-tree-node>
<mat-tree-node fxLayout="row" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding>
<div class="ml-8" fxLayout="column" fxLayoutAlign="center center" matTreeNodeToggle (click)="toggleTree(node)">
<div class="ml-8" fxLayout="column" fxLayoutAlign="center center" matTreeNodeToggle>
<mat-icon class="mat-icon-36">{{node.icon}}</mat-icon>
<span>{{node.name}}</span>
</div>
<div fxLayout="column" fxLayoutAlign="center center" matTreeNodeToggle (click)="toggleTree(node)">
<div fxLayout="column" fxLayoutAlign="center center" matTreeNodeToggle>
<button mat-icon-button [attr.aria-label]="'toggle ' + node.name" matTreeNodeToggle>
<mat-icon class="mat-icon-rtl-mirror"> {{treeControl.isExpanded(node) ? 'arrow_drop_up' : 'arrow_drop_down'}}</mat-icon>
</button>

@ -115,19 +115,6 @@ export class SideNavigationComponent implements OnInit, OnDestroy {
hasChild(_: number, _nodeData: FlatMenuNode) { return _nodeData.expandable; }
toggleTree(node: FlatMenuNode) {
this.treeControl.collapseAll();
if (node.parentId === 0) {
this.treeControl.expandDescendants(node);
this.router.navigate([node.link]);
} else {
const parentNode = this.treeControl.dataNodes.filter(dataNode => {
return dataNode.id === node.parentId;
})[0];
this.treeControl.expandDescendants(parentNode);
}
}
onClick(node: MenuChildNode) {
if (node.name === 'Logout') {
this.store.dispatch(new RTLActions.OpenConfirmation({
@ -148,7 +135,7 @@ export class SideNavigationComponent implements OnInit, OnDestroy {
onChildNavClicked(node) {
this.ChildNavClicked.emit(node);
}
ngOnDestroy() {
this.unSubs.forEach(completeSub => {
completeSub.next();

@ -4,7 +4,7 @@ $toolbar-height: 46px;
$regular-sidenav-width: 250px;
$compact-sidenav-width: 185px;
$mini-sidenav-width: 100px;
$sidenav-info-height: 100px;
$sidenav-info-height: 90px;
$settings-nav-width: 150px;
$gap: 8px;
$icon-size: 36px;

@ -718,11 +718,10 @@ a {
.mat-tree {
width: 100%;
margin-top: 8px;
}
.mat-tree-node {
min-height: 42px !important;
min-height: 38px !important;
padding: 0 12px 0 12px;
cursor: pointer;
}

@ -237,6 +237,7 @@ export class RTLEffects implements OnDestroy {
} else {
this.router.navigate([store.appConfig.sso.logoutRedirectLink]);
}
sessionStorage.removeItem('clUnlocked');
sessionStorage.removeItem('lndUnlocked');
sessionStorage.removeItem('token');
this.logger.warn('LOGGED OUT');

@ -1 +1 @@
export const VERSION = '0.5.0-beta';
export const VERSION = '0.5.1-beta';
Loading…
Cancel
Save