83 lines
3.2 KiB
HTML
83 lines
3.2 KiB
HTML
<div class="container" fxLayout="column" fxLayoutAlign="space-evenly center" fxLayoutGap="1em">
|
|
<!-- IPFS -->
|
|
<form fxLayout="row" fxLayoutAlign="space-evenly center" fxLayoutGap="1em">
|
|
<!-- Hash -->
|
|
<mat-form-field [color]="inputColour">
|
|
<mat-label>IPFS</mat-label>
|
|
<input name="ipfs" [(ngModel)]="ipfs" matInput />
|
|
</mat-form-field>
|
|
|
|
<!-- Cache -->
|
|
<button (click)="cacheIPFS()" type="button" mat-flat-button color="primary">Cache</button>
|
|
</form>
|
|
|
|
<!-- IPNS -->
|
|
<form fxLayout="row" fxLayoutAlign="space-evenly center" fxLayoutGap="1em">
|
|
<!-- Hash -->
|
|
<mat-form-field [color]="inputColour">
|
|
<mat-label>IPNS</mat-label>
|
|
<input name="ipns" [(ngModel)]="ipns" matInput />
|
|
</mat-form-field>
|
|
|
|
<!-- Cache -->
|
|
<button (click)="cacheIPNS()" type="button" mat-flat-button color="primary">Cache</button>
|
|
</form>
|
|
|
|
<mat-progress-bar
|
|
[value]="(dataSource.data.length / gateways.length) * 100"
|
|
*ngIf="subscriptions.length"
|
|
mode="determinate"
|
|
color="primary"
|
|
>
|
|
</mat-progress-bar>
|
|
|
|
<table class="mat-elevation-z8" [dataSource]="dataSource" mat-table aria-label="List of IPFS gateways and their statuses.">
|
|
<!-- Result Column -->
|
|
<ng-container matColumnDef="icon">
|
|
<th mat-header-cell *matHeaderCellDef scope="col">Status</th>
|
|
<td mat-cell *matCellDef="let element">
|
|
<span [matTooltip]="element.message"> {{ element.icon }} </span>
|
|
</td>
|
|
</ng-container>
|
|
|
|
<!-- Gateway Column -->
|
|
<ng-container matColumnDef="gateway">
|
|
<th mat-header-cell *matHeaderCellDef scope="col">Gateway</th>
|
|
<td mat-cell *matCellDef="let element">
|
|
<div [ngSwitch]="element.ok">
|
|
<div *ngSwitchCase="true">
|
|
<strong>
|
|
<a class="aqua" href="{{ element.gateway }}#x-ipfs-companion-no-redirect" target="_blank">
|
|
{{ element.gateway }}
|
|
</a>
|
|
</strong>
|
|
</div>
|
|
<div *ngSwitchCase="false">
|
|
<a class="aqua-muted" href="{{ element.gateway }}#x-ipfs-companion-no-redirect" target="_blank">
|
|
{{ element.gateway }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</ng-container>
|
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
</table>
|
|
|
|
<!-- About -->
|
|
<div fxLayout="column" fxLayoutAlign="space-evenly start" fxLayoutGap="1em">
|
|
<h3>About</h3>
|
|
<p>
|
|
This allows you to cache a specific IPFS hash to a bunch of public gateways. It's inspired from
|
|
<a class="link" href="https://github.com/ipfs/public-gateway-checker">github.com/ipfs/public-gateway-checker</a>. The source code is
|
|
available at <a class="link" href="https://gitlab.com/NatoBoram/public-gateway-cacher">gitlab.com/NatoBoram/public-gateway-cacher</a>.
|
|
</p>
|
|
<p>
|
|
If you'd like to add a new public gateway, please go to
|
|
<a class="link" href="https://github.com/ipfs/public-gateway-checker">github.com/ipfs/public-gateway-checker</a>, submit a pull
|
|
request then open an issue <a class="link" href="https://gitlab.com/NatoBoram/public-gateway-cacher/issues/new">here</a>.
|
|
</p>
|
|
</div>
|
|
</div>
|