add build time
This commit is contained in:
parent
2e4842efd4
commit
be998f068c
@ -10,6 +10,13 @@ const nextConfig = {
|
||||
env: {
|
||||
NEXT_PUBLIC_BUILD_ID:
|
||||
process.env.GIT_REV || nextBuildId.sync({ dir: __dirname }),
|
||||
NEXT_PUBLIC_BUILD_TIME: new Date().toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
}),
|
||||
},
|
||||
images: {
|
||||
remotePatterns: [
|
||||
@ -58,6 +65,7 @@ module.exports = withBundleAnalyzer(nextConfig);
|
||||
// // Injected content via Sentry wizard below
|
||||
|
||||
const { withSentryConfig } = require("@sentry/nextjs");
|
||||
const { format } = require("path");
|
||||
|
||||
module.exports = withSentryConfig(
|
||||
module.exports,
|
||||
|
@ -15,9 +15,14 @@ const buttons = [
|
||||
];
|
||||
|
||||
const buildId = process.env.NEXT_PUBLIC_BUILD_ID
|
||||
? process.env.NEXT_PUBLIC_BUILD_ID.slice(0, 7) +
|
||||
(isProduction() ? "" : "-dev")
|
||||
? isProduction()
|
||||
? process.env.NEXT_PUBLIC_BUILD_ID.slice(0, 7)
|
||||
: "dev"
|
||||
: "";
|
||||
const buildTime = process.env.NEXT_PUBLIC_BUILD_TIME;
|
||||
const gitUrl = isProduction()
|
||||
? `https://git.fascinated.cc/Fascinated/scoresaber-reloaded-v2/commit/${buildId}`
|
||||
: "https://git.fascinated.cc/Fascinated/scoresaber-reloaded-v2";
|
||||
|
||||
export default function Footer() {
|
||||
return (
|
||||
@ -52,10 +57,10 @@ export default function Footer() {
|
||||
|
||||
<Link
|
||||
className="transform-gpu text-sm text-gray-400 transition-all hover:opacity-80"
|
||||
href={`https://git.fascinated.cc/Fascinated/scoresaber-reloaded-v2/commit/${buildId}`}
|
||||
href={gitUrl}
|
||||
target="_blank"
|
||||
>
|
||||
Build ID: {buildId}
|
||||
Build ID: {buildId} ({buildTime})
|
||||
</Link>
|
||||
</Card>
|
||||
</footer>
|
||||
|
@ -14,7 +14,7 @@ export default function SongInfo() {
|
||||
<div
|
||||
className={clsx(
|
||||
"flex transform-gpu gap-2 p-2 transition-all",
|
||||
paused ? "grayscale" : "grayscale-0",
|
||||
paused ? "grayscale" : "grayscale-0", // make the song info grayscale when paused
|
||||
)}
|
||||
>
|
||||
<Image
|
||||
|
Loading…
Reference in New Issue
Block a user