This commit is contained in:
lingdocs 2022-05-05 14:49:42 -05:00
parent 438b54d1d0
commit 8ad69a0a0c
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/pashto-inflector", "name": "@lingdocs/pashto-inflector",
"version": "2.4.2", "version": "2.4.3",
"author": "lingdocs.com", "author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com", "homepage": "https://verbs.lingdocs.com",

View File

@ -180,7 +180,7 @@ function VPExplorer(props: {
<span className="clickable" onClick={() => setShowingExplanation({ role: "servant", item: "subject" })}>{roleIcon.servant}</span> <span className="clickable" onClick={() => setShowingExplanation({ role: "servant", item: "subject" })}>{roleIcon.servant}</span>
{` `} {` `}
{(rendered && rendered.whatsAdjustable !== "king") && {(rendered && rendered.whatsAdjustable !== "king") &&
<span onClick={toggleServantShrink} className="ml-3"> <span onClick={toggleServantShrink} className="ml-3 clickable">
{!servantIsShrunk ? "🪄" : "👶"} {!servantIsShrunk ? "🪄" : "👶"}
</span> </span>
} }
@ -211,7 +211,7 @@ function VPExplorer(props: {
<span className="clickable" onClick={() => setShowingExplanation({ role: "servant", item: "object" })}>{roleIcon.servant}</span> <span className="clickable" onClick={() => setShowingExplanation({ role: "servant", item: "object" })}>{roleIcon.servant}</span>
{` `} {` `}
{(rendered && rendered.whatsAdjustable !== "king") && {(rendered && rendered.whatsAdjustable !== "king") &&
<span onClick={toggleServantShrink} className="ml-3"> <span onClick={toggleServantShrink} className="ml-3 clickable">
{!servantIsShrunk ? "🪄" : "👶"} {!servantIsShrunk ? "🪄" : "👶"}
</span> </span>
} }
@ -272,6 +272,8 @@ function getShareUrl(vps: T.VPSelectionState): string {
const stringJSON = JSON.stringify(vps); const stringJSON = JSON.stringify(vps);
const encoded = LZString.compressToEncodedURIComponent(stringJSON); const encoded = LZString.compressToEncodedURIComponent(stringJSON);
const url = new URL(window.location.href); const url = new URL(window.location.href);
// need to delete or else you could just get a second param written after
// which gets ignored
url.searchParams.delete(phraseURLParam); url.searchParams.delete(phraseURLParam);
url.searchParams.append(phraseURLParam, encoded); url.searchParams.append(phraseURLParam, encoded);
return url.toString(); return url.toString();