fix: fix the auto login bug

parent 423a6ac7
......@@ -46,7 +46,6 @@ export class CleftbarComponent implements OnInit {
clientX = 0;
clientY = 0;
TooltipPosition = 'above';
auto: boolean;
static Reload() {
}
......@@ -96,7 +95,7 @@ export class CleftbarComponent implements OnInit {
this._http.get_my_asset_groups_assets()
.subscribe(response => {
this.HostGroups = response;
if (!this.auto) {
if (!DataStore.autologin) {
this.autologin();
}
});
......@@ -132,7 +131,7 @@ export class CleftbarComponent implements OnInit {
if (!tag) {
this._layer.alert('Maybe you do not have permission on that host');
}
this.auto = true;
DataStore.autologin = true;
}
Connect(host) {
......
......@@ -103,6 +103,7 @@ export let DataStore: {
loglevel: number;
leftbarshow: boolean;
windowsize: Array<number>;
autologin: boolean;
} = {
socket: io.connect(),
Nav: [{}],
......@@ -113,6 +114,7 @@ export let DataStore: {
loglevel: 0,
leftbarshow: true,
windowsize: [],
autologin: false,
};
export let CSRF = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment