mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
version bump and adding app version to the admin page
This commit is contained in:
parent
8e5be78464
commit
03d7d68c10
@ -44,6 +44,8 @@ export class Server {
|
|||||||
Logger.info(LOG_TAG, 'running diagnostics...');
|
Logger.info(LOG_TAG, 'running diagnostics...');
|
||||||
await ConfigDiagnostics.runDiagnostics();
|
await ConfigDiagnostics.runDiagnostics();
|
||||||
Logger.info(LOG_TAG, 'using config:');
|
Logger.info(LOG_TAG, 'using config:');
|
||||||
|
const appVer = require('../package.json').version;
|
||||||
|
Config.Client.appVersion = appVer;
|
||||||
Logger.info(LOG_TAG, JSON.stringify(Config, null, '\t'));
|
Logger.info(LOG_TAG, JSON.stringify(Config, null, '\t'));
|
||||||
|
|
||||||
this.app = _express();
|
this.app = _express();
|
||||||
|
@ -79,6 +79,7 @@ export module ClientConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
|
appVersion: string;
|
||||||
applicationTitle: string;
|
applicationTitle: string;
|
||||||
publicUrl: string;
|
publicUrl: string;
|
||||||
urlBase: string;
|
urlBase: string;
|
||||||
@ -105,6 +106,7 @@ export class PublicConfigClass {
|
|||||||
|
|
||||||
public Client: ClientConfig.Config = {
|
public Client: ClientConfig.Config = {
|
||||||
applicationTitle: 'PiGallery 2',
|
applicationTitle: 'PiGallery 2',
|
||||||
|
appVersion: '',
|
||||||
Thumbnail: {
|
Thumbnail: {
|
||||||
concurrentThumbnailGenerations: 1,
|
concurrentThumbnailGenerations: 1,
|
||||||
thumbnailSizes: [200, 400, 600],
|
thumbnailSizes: [200, 400, 600],
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
.version{
|
||||||
|
color: #6c757d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version:hover{
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
@ -21,7 +21,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
<div class="form-group d-flex justify-content-end">
|
<div class="d-flex justify-content-between">
|
||||||
|
<a class="version" href="https://github.com/bpatrik/pigallery2/releases">
|
||||||
|
<span i18n>App version:</span>
|
||||||
|
v<span>{{appVersion}}</span>
|
||||||
|
</a>
|
||||||
|
<div class="form-group">
|
||||||
<label class="control-label align-self-end mr-2" for="simplifiedMode" i18n>Mode</label>
|
<label class="control-label align-self-end mr-2" for="simplifiedMode" i18n>Mode</label>
|
||||||
<bSwitch
|
<bSwitch
|
||||||
id="simplifiedMode"
|
id="simplifiedMode"
|
||||||
@ -29,15 +34,16 @@
|
|||||||
name="simplifiedMode"
|
name="simplifiedMode"
|
||||||
[switch-off-color]="'warning'"
|
[switch-off-color]="'warning'"
|
||||||
[switch-on-color]="'primary'"
|
[switch-on-color]="'primary'"
|
||||||
[switch-inverse]="'inverse'"
|
[switch-inverse]="true"
|
||||||
[switch-off-text]="text.Advanced"
|
[switch-off-text]="text.Advanced"
|
||||||
[switch-on-text]="text.Simplified"
|
[switch-on-text]="text.Simplified"
|
||||||
[switch-handle-width]="'100'"
|
[switch-handle-width]="100"
|
||||||
[switch-label-width]="'20'"
|
[switch-label-width]="20"
|
||||||
[(ngModel)]="simplifiedMode">
|
[(ngModel)]="simplifiedMode">
|
||||||
</bSwitch>
|
</bSwitch>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<app-settings-basic [simplifiedMode]="simplifiedMode"></app-settings-basic>
|
<app-settings-basic [simplifiedMode]="simplifiedMode"></app-settings-basic>
|
||||||
<app-settings-usermanager></app-settings-usermanager>
|
<app-settings-usermanager></app-settings-usermanager>
|
||||||
<app-settings-database [simplifiedMode]="simplifiedMode"></app-settings-database>
|
<app-settings-database [simplifiedMode]="simplifiedMode"></app-settings-database>
|
||||||
|
@ -5,6 +5,7 @@ import {NotificationService} from '../../model/notification.service';
|
|||||||
import {NotificationType} from '../../../../common/entities/NotificationDTO';
|
import {NotificationType} from '../../../../common/entities/NotificationDTO';
|
||||||
import {NavigationService} from '../../model/navigation.service';
|
import {NavigationService} from '../../model/navigation.service';
|
||||||
import {I18n} from '@ngx-translate/i18n-polyfill';
|
import {I18n} from '@ngx-translate/i18n-polyfill';
|
||||||
|
import {Config} from '../../../../common/config/public/Config';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-admin',
|
selector: 'app-admin',
|
||||||
@ -18,6 +19,7 @@ export class AdminComponent implements OnInit {
|
|||||||
Advanced: 'Advanced',
|
Advanced: 'Advanced',
|
||||||
Simplified: 'Simplified'
|
Simplified: 'Simplified'
|
||||||
};
|
};
|
||||||
|
appVersion = Config.Client.appVersion;
|
||||||
|
|
||||||
constructor(private _authService: AuthenticationService,
|
constructor(private _authService: AuthenticationService,
|
||||||
private _navigation: NavigationService,
|
private _navigation: NavigationService,
|
||||||
|
@ -20,6 +20,7 @@ export class SettingsService {
|
|||||||
constructor(private _networkService: NetworkService) {
|
constructor(private _networkService: NetworkService) {
|
||||||
this.settings = new BehaviorSubject<IPrivateConfig>({
|
this.settings = new BehaviorSubject<IPrivateConfig>({
|
||||||
Client: {
|
Client: {
|
||||||
|
appVersion: '',
|
||||||
Search: {
|
Search: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
AutoComplete: {
|
AutoComplete: {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pigallery2",
|
"name": "pigallery2",
|
||||||
"version": "1.5.9",
|
"version": "1.6.5",
|
||||||
"description": "This is a photo gallery optimised for running low resource servers (especially on raspberry pi)",
|
"description": "This is a photo gallery optimised for running low resource servers (especially on raspberry pi)",
|
||||||
"author": "Patrik J. Braun",
|
"author": "Patrik J. Braun",
|
||||||
"homepage": "https://github.com/bpatrik/PiGallery2",
|
"homepage": "https://github.com/bpatrik/PiGallery2",
|
||||||
|
Loading…
Reference in New Issue
Block a user