Linux improvements

This commit is contained in:
jliddev
2020-10-26 20:16:42 -07:00
parent d4afadb723
commit 583fbe23a4
13 changed files with 48 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
<div class="tab-container about-container"
[ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin }">
[ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin, 'linux': electronService.isLinux }">
<div class="about">
<div class="header">
<img class="logo" src="assets/wowup_logo_512np.png" />

View File

@@ -60,3 +60,9 @@
}
}
}
.linux {
.about {
height: calc(100vh - 80px);
}
}

View File

@@ -1,4 +1,4 @@
<div class="tab-container" [ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin }">
<div class="tab-container" [ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin, 'linux': electronService.isLinux }">
<div class="control-container">
<div class="select-container ">
<mat-form-field>

View File

@@ -86,4 +86,10 @@
}
.provider-column {
min-width: 60px;
}
.linux {
.table-container {
height: calc(100vh - 150px);
}
}

View File

@@ -1,4 +1,4 @@
<div class="page-container">
<div class="page-container" [ngClass]="{'linux': electronService.isLinux}">
<div class="tabs">
<mat-tab-group mat-align-tabs="center" animationDuration="0ms" [backgroundColor]="'primary'"
[disablePagination]="true" [(selectedIndex)]="selectedIndex"

View File

@@ -23,7 +23,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
public hasWowClient = false;
constructor(
private _electronService: ElectronService,
public electronService: ElectronService,
private _sessionService: SessionService,
private _snackBar: MatSnackBar,
private _translateService: TranslateService,

View File

@@ -1,5 +1,5 @@
<div class="tab-container d-flex flex-col"
[ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin }">
[ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin, 'linux': electronService.isLinux }">
<div class="control-container">
<div class="select-container ">
<mat-form-field>
@@ -50,7 +50,11 @@
</app-progress-spinner>
</div>
<div class="table-container flex-grow-1" [hidden]="isBusy === true">
<div *ngIf="isBusy === false && sortedListItems.length === 0" class="no-addons-container flex-grow-1">
<h1>No Addons found</h1>
</div>
<div class="table-container flex-grow-1" [hidden]="isBusy === true || sortedListItems.length === 0" >
<table mat-table matSort [dataSource]="dataSource" class="mat-elevation-z8">
<ng-container matColumnDef="addon.name">
<th mat-header-cell mat-sort-header *matHeaderCellDef>

View File

@@ -1,5 +1,7 @@
@import "../../../variables.scss";
.control-container {
display: flex;
flex-direction: row;
@@ -33,6 +35,10 @@
}
}
.no-addons-container {
text-align: center;
color: $white-1;
}
.spinner-container {
display: flex;
align-items: center;
@@ -144,3 +150,9 @@
margin-bottom: 0.5em;
}
}
.linux {
.table-container {
height: calc(100vh - 150px);
}
}

View File

@@ -650,10 +650,9 @@ export class MyAddonsComponent implements OnInit, OnDestroy {
next: (addons) => {
this.isBusy = false;
this.enableControls = true;
this._ngZone.run(() => {
this._displayAddonsSrc.next(this.formatAddons(addons));
this.setPageContextText();
});
this._cdRef.detectChanges();
},
error: (err) => {
console.error(err);

View File

@@ -1,4 +1,4 @@
<div class="tab-container" [ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin }">
<div class="tab-container" [ngClass]="{'mac': electronService.isMac, 'windows': electronService.isWin, 'linux': electronService.isLinux }">
<div class="options">
<mat-card class="option-card">
<mat-card-header>

View File

@@ -87,3 +87,9 @@ section {
color: $white-2;
}
}
.linux {
.options {
height: calc(100vh - 80px);
}
}

View File

@@ -46,6 +46,8 @@ export class ElectronService {
return;
}
console.log('Platform', process.platform, this.isLinux)
this.ipcRenderer = window.require("electron").ipcRenderer;
this.webFrame = window.require("electron").webFrame;
this.remote = window.require("electron").remote;

View File

@@ -341,6 +341,10 @@ export class WarcraftService {
}
private decodeProducts(productDbPath: string) {
if(this._electronService.isLinux){
return [];
}
const productDbData = FileUtils.readFileSync(productDbPath);
try {