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...');
|
||||
await ConfigDiagnostics.runDiagnostics();
|
||||
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'));
|
||||
|
||||
this.app = _express();
|
||||
|
@ -79,6 +79,7 @@ export module ClientConfig {
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
appVersion: string;
|
||||
applicationTitle: string;
|
||||
publicUrl: string;
|
||||
urlBase: string;
|
||||
@ -105,6 +106,7 @@ export class PublicConfigClass {
|
||||
|
||||
public Client: ClientConfig.Config = {
|
||||
applicationTitle: 'PiGallery 2',
|
||||
appVersion: '',
|
||||
Thumbnail: {
|
||||
concurrentThumbnailGenerations: 1,
|
||||
thumbnailSizes: [200, 400, 600],
|
||||
|
@ -0,0 +1,7 @@
|
||||
.version{
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.version:hover{
|
||||
text-decoration: underline;
|
||||
}
|
@ -21,21 +21,27 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group d-flex justify-content-end">
|
||||
<label class="control-label align-self-end mr-2" for="simplifiedMode" i18n>Mode</label>
|
||||
<bSwitch
|
||||
id="simplifiedMode"
|
||||
class="switch"
|
||||
name="simplifiedMode"
|
||||
[switch-off-color]="'warning'"
|
||||
[switch-on-color]="'primary'"
|
||||
[switch-inverse]="'inverse'"
|
||||
[switch-off-text]="text.Advanced"
|
||||
[switch-on-text]="text.Simplified"
|
||||
[switch-handle-width]="'100'"
|
||||
[switch-label-width]="'20'"
|
||||
[(ngModel)]="simplifiedMode">
|
||||
</bSwitch>
|
||||
<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>
|
||||
<bSwitch
|
||||
id="simplifiedMode"
|
||||
class="switch"
|
||||
name="simplifiedMode"
|
||||
[switch-off-color]="'warning'"
|
||||
[switch-on-color]="'primary'"
|
||||
[switch-inverse]="true"
|
||||
[switch-off-text]="text.Advanced"
|
||||
[switch-on-text]="text.Simplified"
|
||||
[switch-handle-width]="100"
|
||||
[switch-label-width]="20"
|
||||
[(ngModel)]="simplifiedMode">
|
||||
</bSwitch>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<app-settings-basic [simplifiedMode]="simplifiedMode"></app-settings-basic>
|
||||
|
@ -5,6 +5,7 @@ import {NotificationService} from '../../model/notification.service';
|
||||
import {NotificationType} from '../../../../common/entities/NotificationDTO';
|
||||
import {NavigationService} from '../../model/navigation.service';
|
||||
import {I18n} from '@ngx-translate/i18n-polyfill';
|
||||
import {Config} from '../../../../common/config/public/Config';
|
||||
|
||||
@Component({
|
||||
selector: 'app-admin',
|
||||
@ -18,6 +19,7 @@ export class AdminComponent implements OnInit {
|
||||
Advanced: 'Advanced',
|
||||
Simplified: 'Simplified'
|
||||
};
|
||||
appVersion = Config.Client.appVersion;
|
||||
|
||||
constructor(private _authService: AuthenticationService,
|
||||
private _navigation: NavigationService,
|
||||
|
@ -20,6 +20,7 @@ export class SettingsService {
|
||||
constructor(private _networkService: NetworkService) {
|
||||
this.settings = new BehaviorSubject<IPrivateConfig>({
|
||||
Client: {
|
||||
appVersion: '',
|
||||
Search: {
|
||||
enabled: true,
|
||||
AutoComplete: {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"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)",
|
||||
"author": "Patrik J. Braun",
|
||||
"homepage": "https://github.com/bpatrik/PiGallery2",
|
||||
|
Loading…
Reference in New Issue
Block a user