mirror of
https://github.com/bitwarden/web
synced 2025-12-12 14:23:18 +00:00
application version
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-right">
|
<div class="col text-right">
|
||||||
Version 2.0.0
|
{{'versionNumber' | i18n : version}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
|
OnInit,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-footer',
|
selector: 'app-footer',
|
||||||
templateUrl: 'footer.component.html',
|
templateUrl: 'footer.component.html',
|
||||||
})
|
})
|
||||||
export class FooterComponent { }
|
export class FooterComponent implements OnInit {
|
||||||
|
version: string;
|
||||||
|
|
||||||
|
constructor(private platformUtilsService: PlatformUtilsService) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.version = this.platformUtilsService.getApplicationVersion();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -547,5 +547,14 @@
|
|||||||
},
|
},
|
||||||
"noItemsInList": {
|
"noItemsInList": {
|
||||||
"message": "There are no items to list."
|
"message": "There are no items to list."
|
||||||
|
},
|
||||||
|
"versionNumber": {
|
||||||
|
"message": "Version $VERSION_NUMBER$",
|
||||||
|
"placeholders": {
|
||||||
|
"version_number": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "1.2.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getApplicationVersion(): string {
|
getApplicationVersion(): string {
|
||||||
return '1.2.3';
|
return process.env.APPLICATION_VERSION || '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
supportsU2f(win: Window): boolean {
|
supportsU2f(win: Window): boolean {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
|
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
|
||||||
|
const pjson = require('./package.json');
|
||||||
|
|
||||||
if (process.env.NODE_ENV == null) {
|
if (process.env.NODE_ENV == null) {
|
||||||
process.env.NODE_ENV = 'development';
|
process.env.NODE_ENV = 'development';
|
||||||
@@ -102,7 +103,8 @@ const plugins = [
|
|||||||
extractCss,
|
extractCss,
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
'ENV': JSON.stringify(ENV)
|
'ENV': JSON.stringify(ENV),
|
||||||
|
'APPLICATION_VERSION': JSON.stringify(pjson.version),
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user