Show application version in console banner
This commit is contained in:
+2
-9
@@ -27,6 +27,7 @@ import BarcodeScannerHook from "./hooks/barcode-scanner";
|
||||
import FormatNumberHook from "./hooks/format-number";
|
||||
import confetti from "canvas-confetti";
|
||||
import { createLiveToastHook } from "live_toast";
|
||||
import banner from "./banner";
|
||||
|
||||
let Hooks = FluxonHooks;
|
||||
Hooks.BarcodeScanner = BarcodeScannerHook;
|
||||
@@ -145,12 +146,4 @@ window.enableLiveViewChangeObserver = () => {
|
||||
});
|
||||
};
|
||||
|
||||
console.log(`%c
|
||||
███╗ ███╗██╗ ██╗███████╗██╗ ██████╗ ██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██╗ ██╗
|
||||
████╗ ████║██║ ██║██╔════╝██║██╔════╝ ██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚██╗ ██╔╝
|
||||
██╔████╔██║██║ ██║███████╗██║██║ ██║ ██║██████╔╝██████╔╝███████║██████╔╝ ╚████╔╝
|
||||
██║╚██╔╝██║██║ ██║╚════██║██║██║ ██║ ██║██╔══██╗██╔══██╗██╔══██║██╔══██╗ ╚██╔╝
|
||||
██║ ╚═╝ ██║╚██████╔╝███████║██║╚██████╗ ███████╗██║██████╔╝██║ ██║██║ ██║██║ ██║ ██║
|
||||
╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
|
||||
|
||||
`, "font-family:monospace; font-size: 20px");
|
||||
banner();
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export default function banner() {
|
||||
const version = document.querySelector('meta[name="version"]').content;
|
||||
console.log(`%c
|
||||
███╗ ███╗██╗ ██╗███████╗██╗ ██████╗ ██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██╗ ██╗
|
||||
████╗ ████║██║ ██║██╔════╝██║██╔════╝ ██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔══██╗╚██╗ ██╔╝
|
||||
██╔████╔██║██║ ██║███████╗██║██║ ██║ ██║██████╔╝██████╔╝███████║██████╔╝ ╚████╔╝
|
||||
██║╚██╔╝██║██║ ██║╚════██║██║██║ ██║ ██║██╔══██╗██╔══██╗██╔══██║██╔══██╗ ╚██╔╝
|
||||
██║ ╚═╝ ██║╚██████╔╝███████║██║╚██████╗ ███████╗██║██████╔╝██║ ██║██║ ██║██║ ██║ ██║
|
||||
╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
|
||||
Version: ${version}
|
||||
`, "font-family: IBM Plex Mono,monospace; font-size: 12px");
|
||||
}
|
||||
Reference in New Issue
Block a user