Skip to content

Commit

Permalink
Add restart button & Add caching policy for SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
yjf2002ghty committed Nov 8, 2024
1 parent 7ae8aab commit 6246a0c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions public/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
]
},
{
"source": "/(.*).avif",
"source": "/(.*).(avif|svg)",
"headers": [
{ "key": "Cache-Control", "value": "public,max-age=86400,must-revalidate" }
{ "key": "Cache-Control", "value": "public,max-age=172800,must-revalidate" }
]
},
{
Expand Down
24 changes: 22 additions & 2 deletions src/html/advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,10 @@
content: "\f053";
}

#restart:before {
content: "\f01e";
}

#go:before {
content: "\f04b";
}
Expand Down Expand Up @@ -1534,11 +1538,11 @@
}

#previousposition:before {
content: "\f04a";
content: "\f048";
}

#nextposition:before {
content: "\f04e";
content: "\f051";
}

#specifiedposition:before {
Expand Down Expand Up @@ -5405,6 +5409,22 @@
},
"Reset",
),
m(
"button#restart",
{
disabled: !is_ready || review_mode,
title:
"Click to clear the moves and set the position to initial position.",
onclick: () => {
if (review_mode) {
return;
}
document.getElementById("move").value = "";
document.getElementById("setpos").click();
},
},
"Restart",
),
m(
"button#undo",
{
Expand Down
4 changes: 2 additions & 2 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
]
},
{
"source": "/(.*).avif",
"source": "/(.*).(avif|svg)",
"headers": [
{
"key": "Cache-Control",
"value": "public,max-age=86400,must-revalidate"
"value": "public,max-age=172800,must-revalidate"
}
]
},
Expand Down

0 comments on commit 6246a0c

Please sign in to comment.