Skip to content

Commit

Permalink
💄 adjust UI
Browse files Browse the repository at this point in the history
  • Loading branch information
yuudi committed Oct 24, 2024
1 parent 8934821 commit f9cd2ae
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rclone-webui-angular",
"version": "0.7.0",
"version": "0.8.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
22 changes: 21 additions & 1 deletion src/app/features/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<table *ngIf="version">
<tr>
<td i18n>Version</td>
<td>{{ version.version }}</td>
<td>
{{ version.version }}
<ng-container *ngIf="version.isBeta" i18n> (Beta) </ng-container>
<ng-container *ngIf="version.isGit" i18n> (Git)</ng-container>
</td>
</tr>
<tr>
<td i18n>Platform</td>
Expand All @@ -18,6 +22,22 @@
</mat-card-content>
</mat-card>

<mat-card class="dashboard__card">
<mat-card-title i18n>WebUI</mat-card-title>
<mat-card-content>
<table>
<tr>
<td i18n>Version</td>
<td>{{ webUIVersion }}</td>
</tr>
<tr>
<td i18n>Environment</td>
<td>{{ webUIEnv }}</td>
</tr>
</table>
</mat-card-content>
</mat-card>

<mat-card class="dashboard__card">
<mat-card-title i18n>Statistics</mat-card-title>
<mat-card-content>
Expand Down
5 changes: 5 additions & 0 deletions src/app/features/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';

import packageJson from '../../../../package.json';
import { environment } from '../../../environments/environment';

import { DashboardService } from './dashboard.service';
import { RcloneVersionInfo, TransferStatus } from './dashboard.model';

Expand All @@ -11,6 +14,8 @@ import { RcloneVersionInfo, TransferStatus } from './dashboard.model';
})
export class DashboardComponent implements OnInit {
version?: RcloneVersionInfo;
webUIVersion = packageJson.version;
webUIEnv = environment.environment;
stat$?: Observable<TransferStatus>;
constructor(private dashboardService: DashboardService) {}
async ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</ng-container>
</mat-card-content>
<mat-card-actions>
<button mat-button (click)="browseClicked()">
<button mat-flat-button (click)="browseClicked()">
<ng-container i18n>Browse</ng-container>
<mat-icon fontIcon="folder_open"></mat-icon>
</button>
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.embed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const environment = {
environment: 'embed',
explorerCanDownload: true,
connectSelf: true,
useServiceWorker: false,
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const environment = {
environment: 'native',
explorerCanDownload: false,
connectSelf: true,
useServiceWorker: false,
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.standalone.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const environment = {
environment: 'standalone',
explorerCanDownload: false,
connectSelf: false,
useServiceWorker: true,
Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// this is debug environment
export const environment = {
environment: 'development',
explorerCanDownload: true,
connectSelf: false,
useServiceWorker: false,
Expand Down
16 changes: 16 additions & 0 deletions src/locale/messages.tr-TR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,22 @@
<source>This is options for advanced user only! Please input options in JSON format, keys are in PascalCase. Available options: please refer to https://github.com/rclone/rclone/blob/master/vfs/vfscommon/options.go find &quot;type Options struct&quot; part</source>
<target state="new">This is options for advanced user only! Please input options in JSON format, keys are in PascalCase. Available options: please refer to https://github.com/rclone/rclone/blob/master/vfs/vfscommon/options.go find &quot;type Options struct&quot; part</target>
</trans-unit>
<trans-unit id="6329815074444777622" datatype="html">
<source> (Beta) </source>
<target state="new"> (Beta) </target>
</trans-unit>
<trans-unit id="4997332608178159092" datatype="html">
<source> (Git)</source>
<target state="new"> (Git)</target>
</trans-unit>
<trans-unit id="1261272419600256892" datatype="html">
<source>WebUI</source>
<target state="new">WebUI</target>
</trans-unit>
<trans-unit id="9180110319941008393" datatype="html">
<source>Environment</source>
<target state="new">Environment</target>
</trans-unit>
</body>
</file>
</xliff>
12 changes: 12 additions & 0 deletions src/locale/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,18 @@
<trans-unit id="8917490374035866138" datatype="html">
<source>Continue Anyway</source>
</trans-unit>
<trans-unit id="1261272419600256892" datatype="html">
<source>WebUI</source>
</trans-unit>
<trans-unit id="4997332608178159092" datatype="html">
<source> (Git)</source>
</trans-unit>
<trans-unit id="6329815074444777622" datatype="html">
<source> (Beta) </source>
</trans-unit>
<trans-unit id="9180110319941008393" datatype="html">
<source>Environment</source>
</trans-unit>
</body>
</file>
</xliff>
16 changes: 16 additions & 0 deletions src/locale/messages.zh-CN.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,22 @@
<source>This is options for advanced user only! Please input options in JSON format, keys are in PascalCase. Available options: please refer to https://github.com/rclone/rclone/blob/master/vfs/vfscommon/options.go find &quot;type Options struct&quot; part</source>
<target state="translated">此选项仅供高级用户使用!请以 JSON 格式输入选项,字段以驼峰命名法命名。可用选项:请参阅 https://github.com/rclone/rclone/blob/master/vfs/vfscommon/options.go 并找到 &quot;type Options struct&quot;部分</target>
</trans-unit>
<trans-unit id="6329815074444777622" datatype="html">
<source> (Beta) </source>
<target state="translated"> (Beta) </target>
</trans-unit>
<trans-unit id="4997332608178159092" datatype="html">
<source> (Git)</source>
<target state="translated"> (Git)</target>
</trans-unit>
<trans-unit id="1261272419600256892" datatype="html">
<source>WebUI</source>
<target state="translated">网页UI</target>
</trans-unit>
<trans-unit id="9180110319941008393" datatype="html">
<source>Environment</source>
<target state="translated">环境</target>
</trans-unit>
</body>
</file>
</xliff>
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
Expand Down

0 comments on commit f9cd2ae

Please sign in to comment.