Add separate vendor version property
This commit is contained in:
parent
dc98368f5b
commit
649ed1284c
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "padloc",
|
||||
"private": true,
|
||||
"version": "3.1.1",
|
||||
"version": "4.0.0",
|
||||
"description": "A minimalist password manager",
|
||||
"author": "Martin Kleinschrodt <martin@maklesoft.com>",
|
||||
"license": "GPL-3.0",
|
||||
|
@ -29,4 +29,4 @@
|
|||
"test": "lerna run test",
|
||||
"locale:extract": "lerna run extract --scope '@padloc/locale'"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -515,11 +515,11 @@ export class LoginOrSignup extends StartForm {
|
|||
|
||||
render() {
|
||||
return html`
|
||||
<div class="fullbleed centering layout">
|
||||
<div class="fit double-padded scrolling">
|
||||
<div class="fullbleed scrolling">
|
||||
<div class="fill centering double-padded vertical layout">
|
||||
<pl-logo class="animated"></pl-logo>
|
||||
|
||||
<form class="double-padded animated" style="box-sizing: border-box">
|
||||
<form class="double-padded animated" style="box-sizing: border-box" autocomplete="off">
|
||||
<div class="vertical layout" style="flex-direction: column-reverse">
|
||||
<pl-input
|
||||
id="emailInput"
|
||||
|
|
|
@ -256,7 +256,7 @@ export class Menu extends Routing(StateMixin(LitElement)) {
|
|||
<div class="padded">
|
||||
<pl-logo reveal></pl-logo>
|
||||
|
||||
<div class="subtle tiny text-centering">v${process.env.PL_VERSION}</div>
|
||||
<div class="subtle tiny text-centering">v${process.env.PL_VENDOR_VERSION}</div>
|
||||
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
|
|
|
@ -84,6 +84,7 @@ export class WebPlatform extends StubPlatform implements Platform {
|
|||
osVersion: (os.version && os.version.replace(" ", "")) || "",
|
||||
id: "",
|
||||
appVersion: process.env.PL_VERSION || "",
|
||||
vendorVersion: process.env.PL_VENDOR_VERSION || "",
|
||||
manufacturer: "",
|
||||
model: "",
|
||||
browser: browser.name || "",
|
||||
|
|
|
@ -5,7 +5,9 @@ const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
|||
const { version } = require("./package.json");
|
||||
const sharp = require("sharp");
|
||||
|
||||
const assetsDir = process.env.PL_ASSETS_DIR || "../../assets";
|
||||
const assetsDir = path.resolve(__dirname, process.env.PL_ASSETS_DIR || "../../assets");
|
||||
|
||||
const { icon_background, version: vendorVersion } = require(path.join(assetsDir, "manifest.json"));
|
||||
|
||||
module.exports = {
|
||||
entry: path.resolve(__dirname, "src/index.ts"),
|
||||
|
@ -37,6 +39,10 @@ module.exports = {
|
|||
test: /\.(woff|woff2|eot|ttf|otf|svg)$/,
|
||||
use: ["file-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.txt|md$/i,
|
||||
use: "raw-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
externals: {
|
||||
|
@ -51,6 +57,7 @@ module.exports = {
|
|||
PL_BILLING_STRIPE_PUBLIC_KEY: null,
|
||||
PL_SUPPORT_EMAIL: "support@padloc.app",
|
||||
PL_VERSION: version,
|
||||
PL_VENDOR_VERSION: vendorVersion || version,
|
||||
PL_DISABLE_SW: true,
|
||||
PL_AUTH_DEFAULT_TYPE: null,
|
||||
}),
|
||||
|
@ -71,19 +78,18 @@ module.exports = {
|
|||
{
|
||||
apply(compiler) {
|
||||
compiler.hooks.emit.tapPromise("Prepare App Icons", async (compilation) => {
|
||||
const background = process.env.PL_APP_ICON_BACKGROUND;
|
||||
const iconPath = path.resolve(__dirname, assetsDir, "app-icon.png");
|
||||
const iconPath = path.join(assetsDir, "app-icon.png");
|
||||
const { width } = await sharp(iconPath).metadata();
|
||||
const iosPadding = Math.floor(width / 10);
|
||||
const androidPadding = Math.floor(width * 0.7);
|
||||
const iosIcon = await sharp(iconPath)
|
||||
.flatten({ background })
|
||||
.flatten({ background: icon_background })
|
||||
.extend({
|
||||
top: iosPadding,
|
||||
right: iosPadding,
|
||||
bottom: iosPadding,
|
||||
left: iosPadding,
|
||||
background,
|
||||
background: icon_background,
|
||||
})
|
||||
.toBuffer();
|
||||
|
||||
|
@ -93,7 +99,7 @@ module.exports = {
|
|||
right: androidPadding,
|
||||
bottom: androidPadding,
|
||||
left: androidPadding,
|
||||
background,
|
||||
background: { r: 0, b: 0, g: 0, alpha: 0 },
|
||||
})
|
||||
.toBuffer();
|
||||
|
||||
|
@ -166,7 +172,7 @@ module.exports = {
|
|||
|
||||
const colors = `<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="background">${background}</color>
|
||||
<color name="background">${icon_background}</color>
|
||||
</resources>`;
|
||||
compilation.assets["res/icons/android/colors.xml"] = {
|
||||
source: () => colors,
|
||||
|
|
|
@ -24,6 +24,8 @@ export class DeviceInfo extends Serializable {
|
|||
/** Padloc version installed on the device */
|
||||
appVersion: string = "";
|
||||
|
||||
vendorVersion: string = "";
|
||||
|
||||
/** The user agent of the browser running the application */
|
||||
userAgent: string = "";
|
||||
|
||||
|
|
|
@ -4,11 +4,12 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
const manifest = require("./src/manifest.json");
|
||||
const sharp = require("sharp");
|
||||
const { version } = require("../../package.json");
|
||||
|
||||
const serverUrl = process.env.PL_SERVER_URL || `http://0.0.0.0:${process.env.PL_SERVER_PORT || 3000}`;
|
||||
const assetsDir = process.env.PL_ASSETS_DIR || "../../assets";
|
||||
|
||||
const { name, version } = require(path.join(assetsDir, "manifest.json"));
|
||||
const { name, version: vendorVersion } = require(path.join(assetsDir, "manifest.json"));
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
|
@ -63,6 +64,7 @@ module.exports = {
|
|||
PL_BILLING_STRIPE_PUBLIC_KEY: null,
|
||||
PL_SUPPORT_EMAIL: "support@padloc.app",
|
||||
PL_VERSION: version,
|
||||
PL_VENDOR_VERSION: vendorVersion || version,
|
||||
PL_DISABLE_SW: true,
|
||||
}),
|
||||
new CleanWebpackPlugin(),
|
||||
|
|
|
@ -5,13 +5,13 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
const WebpackPwaManifest = require("webpack-pwa-manifest");
|
||||
// const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
|
||||
const { version } = require("./package.json");
|
||||
const { version } = require("../../package.json");
|
||||
|
||||
const out = process.env.PL_PWA_DIR || path.resolve(__dirname, "dist");
|
||||
const serverUrl = process.env.PL_SERVER_URL || `http://0.0.0.0:${process.env.PL_SERVER_PORT || 3000}`;
|
||||
const assetsDir = process.env.PL_ASSETS_DIR || "../../assets";
|
||||
|
||||
const { name } = require(path.join(assetsDir, "manifest.json"));
|
||||
const { name, version: vendorVersion } = require(path.join(assetsDir, "manifest.json"));
|
||||
|
||||
module.exports = {
|
||||
entry: path.resolve(__dirname, "src/index.ts"),
|
||||
|
@ -59,6 +59,7 @@ module.exports = {
|
|||
PL_BILLING_STRIPE_PUBLIC_KEY: null,
|
||||
PL_SUPPORT_EMAIL: "support@padloc.app",
|
||||
PL_VERSION: version,
|
||||
PL_VENDOR_VERSION: vendorVersion || version,
|
||||
PL_DISABLE_SW: false,
|
||||
PL_CLIENT_SUPPORTED_AUTH_TYPES: "email",
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue