Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #6 from zombodotcom/ask-for-help
Browse files Browse the repository at this point in the history
We doin it
  • Loading branch information
zombodotcom authored Oct 14, 2019
2 parents 65953ff + fa7e08d commit 37a287c
Show file tree
Hide file tree
Showing 13 changed files with 642 additions and 186 deletions.
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
os:
- linux
- osx
language: node_js
node_js:
- "12"
- "11"
- "10"
dist: xenial
sudo: required
services:
- xvfb
addons:
chrome: stable
before_script:
- export DISPLAY=:99.0
install:
- npm set progress=false
- npm install
script:
- ng lint
- npm run test
- npm run e2e
- npm run build
14 changes: 7 additions & 7 deletions e2e/common-setup.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const Application = require('spectron').Application;
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules.
const path = require('path');
const Application = require("spectron").Application;
const electronPath = require("electron"); // Require Electron from the binaries included in node_modules.
const path = require("path");

export default function setup() {
beforeEach(async function () {
beforeEach(async function() {
this.app = new Application({
// Your electron path can be any binary
// i.e for OSX an example path could be '/Applications/MyApp.app/Contents/MacOS/MyApp'
Expand All @@ -23,17 +23,17 @@ export default function setup() {

// The following line tells spectron to look and use the main.js file
// and the package.json located 1 level above.
args: [path.join(__dirname, '..')],
args: [path.join(__dirname, "..")],
webdriverOptions: {}
});
await this.app.start();
const browser = this.app.client;
await browser.waitUntilWindowLoaded();

browser.timeouts('script', 15000);
browser.timeouts("script", 15000);
});

afterEach(function () {
afterEach(function() {
if (this.app && this.app.isRunning()) {
return this.app.stop();
}
Expand Down
4 changes: 3 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { app, BrowserWindow, screen } from "electron";
import { app, BrowserWindow, autoUpdater, screen } from "electron";
import * as path from "path";
import * as url from "url";

// import { PythonShell } from "python-shell";
let win, serve;
const args = process.argv.slice(1);
serve = args.some(val => val === "--serve");
Expand All @@ -20,6 +21,7 @@ function createWindow() {
nodeIntegration: true
}
});
win.webContents.openDevTools({ mode: "undocked" });

if (serve) {
require("electron-reload")(__dirname, {
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "zombpoe",
"version": "6.2.0",
"description": "Angular 8 with Electron (Typescript + SASS + Hot Reload)",
"homepage": "https://github.com/maximegris/angular-electron",
"homepage": "https://github.com/zombodotcom/Zombpoe",
"author": {
"name": "zombo"
},
Expand Down Expand Up @@ -51,6 +51,7 @@
"@angular/router": "8.2.8",
"@ngx-translate/core": "11.0.1",
"@ngx-translate/http-loader": "4.0.0",
"@types/core-js": "^2.5.2",
"@types/jasmine": "3.3.16",
"@types/jasminewd2": "2.0.6",
"@types/mocha": "5.2.7",
Expand Down Expand Up @@ -89,10 +90,13 @@
"@angular/forms": "^8.0.0 || ^9.0.0-0",
"@angular/material": "~8.2.3",
"axios": "^0.19.0",
"express": "^4.17.1",
"electron-is-dev": "^1.1.0",
"electron-log": "^3.0.8",
"hammerjs": "^2.0.8",
"ngx-cookie-service": "^2.2.0",
"node-fetch": "^2.6.0",
"node-poe-api": "^1.0.5",
"request-promise": "^4.2.4"
"python-shell": "^1.0.8",
"request-promise": "^4.2.4",
"update-electron-app": "^1.5.0"
}
}
24 changes: 24 additions & 0 deletions src/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
os:
- linux
- osx
language: node_js
node_js:
- "12"
- "11"
- "10"
dist: xenial
sudo: required
services:
- xvfb
addons:
chrome: stable
before_script:
- export DISPLAY=:99.0
install:
- npm set progress=false
- npm install
script:
- ng lint
- npm run test
- npm run e2e
- npm run build
3 changes: 1 addition & 2 deletions src/app/about/about.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<p>about works!</p>
<p style="padding: 13px;">
An Angular 8 example application that demonstrates how to use HttpClient to
consume REST APIs
This is an app by Zombodotcom
</p>
7 changes: 5 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import { HttpClientModule, HttpClient } from "@angular/common/http";
import { CoreModule } from "./core/core.module";
import { SharedModule } from "./shared/shared.module";
import { Component } from "@angular/core";

import { CookieService } from "ngx-cookie-service";
import { map } from "rxjs/operators";
import { AppRoutingModule } from "./app-routing.module";
import { MatPaginatorModule } from "@angular/material";

// NG Translate
import { TranslateModule, TranslateLoader } from "@ngx-translate/core";
Expand Down Expand Up @@ -55,6 +57,7 @@ export function HttpLoaderFactory(http: HttpClient) {
SharedModule,
HomeModule,
BrowserAnimationsModule,
MatPaginatorModule,
MatToolbarModule,
MatIconModule,
MatTableModule,
Expand All @@ -72,7 +75,7 @@ export function HttpLoaderFactory(http: HttpClient) {
}),
BrowserAnimationsModule
],
providers: [UserService],
providers: [UserService, CookieService],
bootstrap: [AppComponent]
})
export class AppModule {}
183 changes: 113 additions & 70 deletions src/app/displaylist/displaylist.component.html
Original file line number Diff line number Diff line change
@@ -1,83 +1,126 @@
<p style="padding: 13px;">
An Angular 8 example application that demonstrates how to use HttpClient to
consume REST APIs
</p>
<!-- <div *ngIf="poeninjaData">
<ul>
<li *ngFor="let element of poeninjaData.lines; let i = index">
{{ i }}. {{ element.name }}, {{ element.chaosValue }}
</li>
</ul>
</div> -->
<!-- <div *ngIf="poeninjaData">
<table mat-table [dataSource]="poeninjaData">
<ng-container matColumnDef="itemname">
<th mat-header-cell *matHeaderCellDef>Item Name</th>
<td mat-cell *matCellDef="let itemname">{{ itemname.itemname }}</td>
<tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr>
<tr mat-row *matRowDef="let myRowData; columns: columnsToDisplay"></tr>
</ng-container>
</table>
</div> -->
<div *ngIf="poeninjaData" class="example-container">
<table mat-table [dataSource]="poeninjaData.lines" class=" mat-elevation-z8">
<!--- Note that these columns can be defined in any order.
<!-- <table mat-table [dataSource]="dataSource2" class="mat-elevation-z8" matSort>
<ng-container matColumnDef="items">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
<td mat-cell *matCellDef="let element">
{{ element.name }}
</td>
</ng-container>
<ng-container matColumnDef="icon">
<th mat-header-cell *matHeaderCellDef>Icon</th>
<td mat-cell *matCellDef="let element">
{{ element }}}<img [src]="element.icon" />
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumnsUser2"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumnsUser2"></tr>
</table> -->
<div class="mat-elevation-z8">
<div *ngIf="poeninjaData" class="example-container">
<table
mat-table
[dataSource]="poeninjaData.lines"
class=" mat-elevation-z8"
>
<!--- Note that these columns can be defined in any order.
The actual rendered columns are set as a property on the row definition" -->

<!-- Position Column -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>Item Name</th>
<td mat-cell *matCellDef="let element">{{ element.name }}</td>
</ng-container>
<!-- Position Column -->
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>Item Name</th>
<td mat-cell *matCellDef="let element">{{ element.name }}</td>
</ng-container>

<!-- chaosValue Column -->
<ng-container matColumnDef="chaosValue">
<th mat-header-cell *matHeaderCellDef>Chaos Value</th>
<td mat-cell *matCellDef="let element">{{ element.chaosValue }} c</td>
</ng-container>
<!-- exaltedValue Column -->
<ng-container matColumnDef="exaltedValue">
<th mat-header-cell *matHeaderCellDef>exaltedValue</th>
<td mat-cell *matCellDef="let element">{{ element.exaltedValue }} ex</td>
</ng-container>
<!-- chaosValue Column -->
<ng-container matColumnDef="chaosValue">
<th mat-header-cell *matHeaderCellDef>Chaos Value</th>
<td mat-cell *matCellDef="let element">{{ element.chaosValue }} c</td>
</ng-container>
<!-- exaltedValue Column -->
<ng-container matColumnDef="exaltedValue">
<th mat-header-cell *matHeaderCellDef>exaltedValue</th>
<td mat-cell *matCellDef="let element">
{{ element.exaltedValue }} ex
</td>
</ng-container>

<!-- Icon Column -->
<ng-container matColumnDef="icon">
<th mat-header-cell *matHeaderCellDef>Icon</th>
<td mat-cell *matCellDef="let element"><img [src]="element.icon" /></td>
</ng-container>
<!-- exaltedValue Column -->
<ng-container matColumnDef="explicitModifiers">
<th mat-header-cell *matHeaderCellDef>Details</th>

<!-- <td mat-cell *matCellDef="let element">
{{ element.explicitModifiers | json }}
</td> -->
<td mat-cell *matCellDef="let element; let i = index">
<!-- {{ i }} {{ element.explicitModifiers[0].text }} -->
{{ element.explicitModifiers[0].text }}
</td>
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
</div>
</div>
<!-- <h1>Here's the user Details:</h1>
<div *ngIf="images">
{{ images | json }}
</div> -->
<div class="mat-elevation-z8">
<table mat-table [dataSource]="itemsdata3">
<ng-container matColumnDef="items">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
<td mat-cell *matCellDef="let element">
{{ element.name }}
</td>
</ng-container>
<!-- Icon Column -->
<ng-container matColumnDef="icon">
<th mat-header-cell *matHeaderCellDef>Icon</th>
<td mat-cell *matCellDef="let element"><img [src]="element.icon" /></td>
<td mat-cell *matCellDef="let element">
<img [src]="element.icon" />
</td>
</ng-container>
<!-- exaltedValue Column -->
<ng-container matColumnDef="explicitModifiers">
<th mat-header-cell *matHeaderCellDef>Details</th>

<!-- <td mat-cell *matCellDef="let element">
{{ element.explicitModifiers | json }}
</td> -->
<td mat-cell *matCellDef="let element; let i = index">
<!-- {{ i }} {{ element.explicitModifiers[0].text }} -->
{{ element.explicitModifiers[0].text }}
<!-- Socketed Items -->
<ng-container matColumnDef="socketedItems">
<th mat-header-cell *matHeaderCellDef>Socketed Items</th>
<td mat-cell *matCellDef="let element">
<!-- {{ element.socketedItems }} -->
<ng-container *ngFor="let item of element.socketedItems">
<br />
<td *ngIf="item">
<!-- {{ element.typeLine }} -->
<!-- <div *ngIf="item.name == ''; else elseDiv2">
{{ element.typeLine }} No Name, Showing Typeline
</div>
-->
<img [src]="item.icon" />
{{ item.typeLine }}
<li *ngFor="let properties of item.properties">
{{ properties.name }} {{ properties.values }}
</li>
</td>
</ng-container>
<!-- <div *ngIf="element.socketedItems; else elseDiv2">
{{ element.socketedItems.typeLine }}
</div> -->
</td>
</ng-container>
<!-- type Column -->
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef>Icon</th>
<td mat-cell *matCellDef="let element">
<img [src]="element.icon" />
</td>
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
<tr mat-header-row *matHeaderRowDef="displayedColumnsUser2"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumnsUser2"></tr>
</table>
</div>
<!--
<div>
<table matSort (matSortChange)="sortData($event)">
<tr>
<th mat-sort-header="name">Dessert (100g)</th>
<th mat-sort-header="chaosValue">Calories</th>
<th mat-sort-header="exaltedValue">Fat (g)</th>
<th mat-header="icon">Carbs (g)</th>
</tr>
<tr *ngFor="let dessert of sortedData">
<td>{{ dessert.name }}</td>
<td>{{ dessert.chaosValue }}</td>
<td>{{ dessert.exaltedValue }}</td>
<td>{{ dessert.icon }}</td>
</tr>
</table>
</div> -->
20 changes: 10 additions & 10 deletions src/app/displaylist/displaylist.component.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
table {
width: 100%;
}
.example-container {
height: 800px;
overflow: auto;
}
.mat-sort-header-container {
align-items: center;
}
// table {
// width: 100%;
// }
// .example-container {
// height: 800px;
// overflow: auto;
// }
// .mat-sort-header-container {
// align-items: center;
// }
Loading

0 comments on commit 37a287c

Please sign in to comment.