Update global footer (#354)
This commit is contained in:
parent
6833c9d676
commit
40054d1501
@ -15,7 +15,9 @@
|
||||
></script>
|
||||
</head>
|
||||
<body class="text-base">
|
||||
<browsertrix-app></browsertrix-app>
|
||||
<browsertrix-app
|
||||
version="v<%= version %>-<%= commitHash %>"
|
||||
></browsertrix-app>
|
||||
|
||||
<script>
|
||||
const isDev = "<%= environment %>" === "development";
|
||||
@ -24,7 +26,7 @@
|
||||
if (isDev && dsn) {
|
||||
Sentry.init({
|
||||
dsn: dsn,
|
||||
release: "<%= commit_hash %>",
|
||||
release: "<%= gitBranch %> (<%= commitHash %>) v<%= version %>",
|
||||
environment: "<%= environment %>",
|
||||
debug: isDev,
|
||||
autoSessionTracking: false, // Turn off unsupported page/session tracking
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { TemplateResult } from "lit";
|
||||
import { render } from "lit";
|
||||
import { state, query } from "lit/decorators.js";
|
||||
import { property, state, query } from "lit/decorators.js";
|
||||
import { ifDefined } from "lit/directives/if-defined.js";
|
||||
import { msg, localized } from "@lit/localize";
|
||||
import type { SlDialog } from "@shoelace-style/shoelace";
|
||||
@ -40,6 +40,9 @@ type DialogContent = {
|
||||
*/
|
||||
@localized()
|
||||
export class App extends LiteElement {
|
||||
@property({ type: String })
|
||||
version?: string;
|
||||
|
||||
private router: APIRouter = new APIRouter(ROUTES);
|
||||
authService: AuthService = new AuthService();
|
||||
|
||||
@ -320,17 +323,31 @@ export class App extends LiteElement {
|
||||
renderFooter() {
|
||||
return html`
|
||||
<footer
|
||||
class="w-full max-w-screen-lg mx-auto p-1 md:p-3 box-border flex justify-between"
|
||||
class="w-full max-w-screen-lg mx-auto p-1 md:p-3 box-border flex justify-end"
|
||||
>
|
||||
<div>
|
||||
<sl-icon-button
|
||||
name="github"
|
||||
<a
|
||||
class="text-neutral-400"
|
||||
href="https://github.com/webrecorder/browsertrix-cloud"
|
||||
target="_blank"
|
||||
></sl-icon-button>
|
||||
rel="noopener"
|
||||
>
|
||||
${this.version
|
||||
? html`
|
||||
<span class="inline-block align-middle text-mono text-xs">
|
||||
${this.version}
|
||||
</span>
|
||||
`
|
||||
: ""}
|
||||
<sl-icon
|
||||
name="github"
|
||||
class="inline-block align-middle ml-1"
|
||||
></sl-icon>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<btrix-locale-picker></btrix-locale-picker>
|
||||
<!-- TODO re-enable when translations are added -->
|
||||
<!-- <btrix-locale-picker></btrix-locale-picker> -->
|
||||
</div>
|
||||
</footer>
|
||||
`;
|
||||
|
@ -5,6 +5,7 @@ const ESLintPlugin = require("eslint-webpack-plugin");
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const childProcess = require("child_process");
|
||||
const packageJSON = require("./package.json");
|
||||
|
||||
const isDevServer = process.env.WEBPACK_SERVE;
|
||||
|
||||
@ -24,7 +25,7 @@ const WEBSOCKET_HOST =
|
||||
? new URL(process.env.API_BASE_URL).host
|
||||
: process.env.WEBSOCKET_HOST || "";
|
||||
|
||||
// Get git info to use as Glitchtip release version
|
||||
// Get git info for release version info
|
||||
|
||||
const execCommand = (cmd, defValue) => {
|
||||
try {
|
||||
@ -101,7 +102,9 @@ module.exports = {
|
||||
rwp_base_url: RWP_BASE_URL,
|
||||
glitchtip_dsn: process.env.GLITCHTIP_DSN || "",
|
||||
environment: isDevServer ? "development" : "production",
|
||||
commit_hash: `${gitBranch} (${commitHash})`,
|
||||
version: packageJSON.version,
|
||||
gitBranch,
|
||||
commitHash,
|
||||
},
|
||||
// Need to block during local development for HMR:
|
||||
inject: isDevServer ? "head" : true,
|
||||
|
Loading…
Reference in New Issue
Block a user