diff --git a/BuildConfig.sh b/BuildConfig.sh index e47d349..0c342ec 100644 --- a/BuildConfig.sh +++ b/BuildConfig.sh @@ -5,7 +5,12 @@ FRONTEND_HOST="${FRONTEND_HOST:-http://localhost:80}" KC_CLIENT_ID="${KC_CLIENT_ID:-labdev}" KC_HOST="${KC_HOST:-https://login.hangman-lab.top}" KC_REALM="${KC_REALM:-Hangman-Lab}" -DEBUG="${DEBUG:false}" +# Note: ${DEBUG:-false} (correct default syntax). The old ${DEBUG:false} +# produced an empty value when DEBUG was unset -> invalid config.json. +DEBUG="${DEBUG:-false}" +# DEBUG is emitted unquoted as a JSON boolean — guarantee it is exactly +# true/false so config.json can never be invalid JSON. +case "$DEBUG" in true|false) ;; *) DEBUG=false ;; esac rm -f /usr/share/nginx/html/config.js diff --git a/src/components/Markdowns/MarkdownContent.js b/src/components/Markdowns/MarkdownContent.js index 57e2274..fe90cad 100644 --- a/src/components/Markdowns/MarkdownContent.js +++ b/src/components/Markdowns/MarkdownContent.js @@ -2,7 +2,8 @@ import React, { useEffect, useState } from "react"; import {Link, useParams} from "react-router-dom"; import "katex/dist/katex.min.css"; import "./MarkdownContent.css"; -import { Settings2, Pencil } from "lucide-react"; +import { Settings2, Pencil, User, Clock, History } from "lucide-react"; +import { formatDateTime } from "../../lib/utils"; import MarkdownView from "./MarkdownView"; import PatchCards from "./PatchCards"; import PermissionGuard from "../PermissionGuard"; @@ -85,6 +86,23 @@ const MarkdownContent = () => { +
+ Unique. Using an existing alias renews that + key (same key string, validity reset). +
+