Skip to content

Commit

Permalink
Refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
osvaldopina committed Mar 29, 2019
1 parent b2231f6 commit 56103e0
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 32 deletions.
File renamed without changes.
9 changes: 0 additions & 9 deletions generate-extension-zip.js

This file was deleted.

6 changes: 6 additions & 0 deletions generate-zip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var zipFolder = require('zip-folder');

zipFolder('./dist/chrome-plugin', './dist/hal-chrome-plugin.zip', function(err) {
console.log('Could not generate extension zip! ' + err);
process.exit('-1');
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build-all-libraries": "ng build tree-model && ng build uri-template-editor && ng build hal-render-component && ng build chrome-plugin",
"build": "npm run build-all-libraries && ng build chrome-plugin --prod --output-hashing none && copyfiles -f projects/chrome-plugin/src/assets/* dist/chrome-plugin",
"postbuild": "node ./manifest-version.js",
"build-all-libraries": "ng build tree-model && ng build uri-template-editor && ng build hal-render-component",
"build": "npm run test && npm run build-all-libraries && ng build chrome-plugin --prod --output-hashing none && copyfiles -f projects/chrome-plugin/src/app/manifest.json dist/chrome-plugin",
"postbuild": "node ./adjust-manifest-version.js && node ./generate-zip.js",
"build-chrome-plugin": "ng build chrome-plugin --main projects/chrome-plugin/src/main.ts && copyfiles -f projects/chrome-plugin/src/app/manifest.json projects/chrome-plugin/src/app/icon.png dist/chrome-plugin",
"test": "ng test tree-model --watch=false && ng test uri-template-editor --watch=false",
"lint": "ng lint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"homepage_url": "https://github.com/osvaldopina/hal-chrome-plugin",
"minimum_chrome_version": "21",
"icons": {
"16": "hal_16.png",
"32": "hal_32.png",
"64": "hal_64.png"
"16": "assets/hal_16.png",
"32": "assets/hal_32.png",
"64": "assets/hal_64.png"
},
"content_scripts": [
{ "matches": ["<all_urls>"], "js": ["main.js", "polyfills.js", "runtime.js"], "run_at": "document_start" }
Expand Down
Binary file removed projects/chrome-plugin/src/favicon.ico
Binary file not shown.
15 changes: 14 additions & 1 deletion projects/hal-render-component/src/lib/hal-render.component.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.header-li {
.header {
display: flex;
margin-top: 20px;
margin-bottom: 20px;
flex-shrink: 0;
display: inline-flex;
}

.header-link-w-space {
Expand All @@ -23,6 +25,17 @@
margin-bottom: 0px;
}

.wrapper {
display: flex;
flex-direction: column;
height: 100%;
}

.content {
flex-grow: 1;
overflow-y: auto;
}

.ul-wrapper {
list-style-type: none;
padding-top: 0;
Expand Down
30 changes: 16 additions & 14 deletions projects/hal-render-component/src/lib/hal-render.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<ul [ngClass]="'ul-wrapper'">
<li [ngClass]="'header-li'">
<a *ngIf="isCurrentViewTree()" href="javascript:void(0)" (click)="viewRaw()" [ngClass]="'header-link-w-space'">Show raw</a>
<a *ngIf="isCurrentViewRaw()" href="javascript:void(0)" (click)="viewTree()" [ngClass]="'header-link-w-space'">Show tree</a>
<a *ngIf="isCurrentViewTree()" href="javascript:void(0)" (click)="expandAll()" [ngClass]="'header-link-w-space'">Expand all</a>
<a *ngIf="isCurrentViewTree()" href="javascript:void(0)" (click)="colapseAll()"[ngClass]="'header-link-no-space'">Colapse all</a>
<pre [ngClass]="'header-version'" >version:{{versionFromChromeManifest()}}</pre>
</li>
<li *ngIf="isCurrentViewTree()">
<hrc-json-object-node *ngIf="root" [node]="root"></hrc-json-object-node>
</li>
<li *ngIf="isCurrentViewRaw()">
<div ngClass="wrapper">
<div ngClass="header">
<a *ngIf="isCurrentViewTree()" href="javascript:void(0)" (click)="viewRaw()" ngClass="header-link-w-space">Show raw</a>
<a *ngIf="isCurrentViewRaw()" href="javascript:void(0)" (click)="viewTree()" ngClass="header-link-w-space">Show tree</a>
<a *ngIf="isCurrentViewTree()" href="javascript:void(0)" (click)="expandAll()" ngClass="header-link-w-space">Expand all</a>
<a *ngIf="isCurrentViewTree()" href="javascript:void(0)" (click)="colapseAll()"ngClass="header-link-no-space">Colapse all</a>
<pre ngClass="header-version" >version:{{versionFromChromeManifest()}}</pre>
</div>
<div *ngIf="isCurrentViewTree()" ngClass="content">
<ul>
<hrc-json-object-node *ngIf="root" [node]="root"></hrc-json-object-node>
</ul>
</div>
<div *ngIf="isCurrentViewRaw()" ngClass="content">
<pre id="raw-json">{{json}}</pre>
</li>
</ul>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<pre *ngIf="isSimpleProperty()" [ngClass]="propValueStyleClass()">{{value()}}</pre>
<a *ngIf="isLinkProperty()" [ngClass]="'leaf-string-property-link-value'" href="{{linkHref()}}">{{value()}}</a>
<a *ngIf="isLinkProperty()" ngClass="leaf-string-property-link-value" href="{{linkHref()}}">{{value()}}</a>
<uri-template-editor *ngIf="isTemplatedLink()" [uriTemplate]="node.value"></uri-template-editor>
<pre *ngIf="!node.lastItem" [ngClass]="'leaf-property-separator'">,</pre>
<pre *ngIf="!node.lastItem" ngClass="leaf-property-separator">,</pre>

0 comments on commit 56103e0

Please sign in to comment.