Fix restricted map controls and release verification
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 5m17s
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 5m17s
This commit is contained in:
@@ -66,10 +66,10 @@ export function GuessMap({
|
||||
maxBounds: b.pad(0.15),
|
||||
attributionControl: false,
|
||||
zoomControl: false,
|
||||
scrollWheelZoom: zoom,
|
||||
touchZoom: zoom,
|
||||
doubleClickZoom: zoom,
|
||||
boxZoom: zoom,
|
||||
scrollWheelZoom: zoom && (pan ? true : "center"),
|
||||
touchZoom: zoom && (pan ? true : "center"),
|
||||
doubleClickZoom: zoom && (pan ? true : "center"),
|
||||
boxZoom: zoom && pan,
|
||||
dragging: pan,
|
||||
keyboard: false,
|
||||
});
|
||||
@@ -232,6 +232,7 @@ export function GuessMap({
|
||||
<div className="map-surface">
|
||||
<div
|
||||
ref={root}
|
||||
tabIndex={0}
|
||||
style={{ height: "100%", width: "100%" }}
|
||||
role="application"
|
||||
aria-label={
|
||||
|
||||
@@ -21,13 +21,31 @@ function inline(text: string) {
|
||||
}
|
||||
|
||||
export function ReleaseNotes({ body }: { body: string }) {
|
||||
return body.split(/\r?\n\s*\r?\n/).map((block, i) => {
|
||||
const lines = block.split(/\r?\n/);
|
||||
if (lines.every((line) => /^\s*[-*]\s+/.test(line)))
|
||||
const blocks: { list: boolean; lines: string[] }[] = [];
|
||||
let current: (typeof blocks)[number] | undefined;
|
||||
for (const line of body.split(/\r?\n/)) {
|
||||
if (!line.trim()) {
|
||||
current = undefined;
|
||||
continue;
|
||||
}
|
||||
const bullet = /^\s*[-*]\s+(.+)$/.exec(line);
|
||||
if (!bullet && current?.list && /^\s{2,}\S/.test(line)) {
|
||||
current.lines[current.lines.length - 1] += ` ${line.trim()}`;
|
||||
continue;
|
||||
}
|
||||
const list = !!bullet;
|
||||
if (!current || current.list !== list) {
|
||||
current = { list, lines: [] };
|
||||
blocks.push(current);
|
||||
}
|
||||
current.lines.push(bullet ? bullet[1] : line);
|
||||
}
|
||||
return blocks.map(({ list, lines }, i) => {
|
||||
if (list)
|
||||
return (
|
||||
<ul key={i}>
|
||||
{lines.map((line, j) => (
|
||||
<li key={j}>{inline(line.replace(/^\s*[-*]\s+/, ""))}</li>
|
||||
<li key={j}>{inline(line)}</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user