Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Add YALCS_WEB_URL environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXyfir committed Apr 10, 2019
1 parent eb02060 commit a1106ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions types/ptorx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ export namespace Ptorx {
* @example 2073
*/
PORT: number;
/**
* The URL for the embedded Yalcs web client.
* @example "https://ptorx.com/yalcs"
*/
YALCS_WEB_URL: string;
/**
* The URL for the Accownt web client.
* @example "https://ptorx.com/accownt"
Expand Down
4 changes: 2 additions & 2 deletions web/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<html>
<head>
<title><%= htmlWebpackPlugin.options.title %></title>
<title><%= TITLE %></title>

<meta
name="viewport"
Expand Down Expand Up @@ -31,7 +31,7 @@
href="https://www.xyfir.com/static/icons/ptorx/android-chrome-192x192.png"
/>

<script src="https://embed.small.chat/T4KMR0724GHG8G3WH2.js" async></script>
<script src="<%- YALCS_WEB_URL %>/static/yalcs-loader.js" async></script>
</head>
<body>
<div id="content"></div>
Expand Down
7 changes: 5 additions & 2 deletions web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ module.exports = {
}, {})
}),
new HtmlWebpackPlugin({
title: 'Email Forwarding and Aliases by Ptorx',
minify: PROD,
template: 'template.html'
template: 'template.html',
templateParameters: {
YALCS_WEB_URL: process.enve.YALCS_WEB_URL,
TITLE: 'Email Forwarding and Aliases by Ptorx'
}
}),
PROD ? new CompressionPlugin({ filename: '[path].gz' }) : null,
PROD ? null : new webpack.HotModuleReplacementPlugin()
Expand Down

0 comments on commit a1106ba

Please sign in to comment.