Compare commits

..

No commits in common. "ac8839ec672a95727b57e1fa1aa2f983f163f5ed" and "20d3cb30841f8988c0f16a4a10f86e3a998ee126" have entirely different histories.

4 changed files with 4 additions and 17 deletions

View File

@ -26,7 +26,6 @@
"typescript": "^4.4.3" "typescript": "^4.4.3"
}, },
"dependencies": { "dependencies": {
"dialog-polyfill": "^0.5.6",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"

View File

@ -1,5 +1,4 @@
import React, {useState} from "react"; import React, {useState} from "react";
import dialogPolyfill from "dialog-polyfill";
import "./App.scss"; import "./App.scss";
import {SaiEntryProps, JutEntryProps, ElesuEntryProps, TukEntryProps, Conlang, SearchDirection} from "./types"; import {SaiEntryProps, JutEntryProps, ElesuEntryProps, TukEntryProps, Conlang, SearchDirection} from "./types";
@ -9,18 +8,15 @@ import {setPassword, searchEntry} from "./requests";
const PasswordDialog = (_props) => { const PasswordDialog = (_props) => {
const [password, setPasswordStr] = useState(""); const [password, setPasswordStr] = useState("");
const modal = (): any => document.querySelector(".passwordDialog");
const save = () => { const save = () => {
setPassword(password); setPassword(password);
const modal: any = document.querySelector(".passwordDialog"); modal().close();
dialogPolyfill.registerDialog(modal);
modal.close();
location.reload(); // TODO this is a hack location.reload(); // TODO this is a hack
}; };
const cancel = () => { const cancel = () => {
const modal: any = document.querySelector(".passwordDialog"); modal().close();
dialogPolyfill.registerDialog(modal);
modal.close();
}; };
return ( return (
@ -109,7 +105,7 @@ const Results = (props: ResultsProps) => {
const convertSearchBoxShorthand = (input: string, conlang: Conlang): string => { const convertSearchBoxShorthand = (input: string, conlang: Conlang): string => {
if (conlang === Conlang.Saimiar) { if (conlang === Conlang.Saimiar) {
return (input as any) return input
.replaceAll(/ee/g, "ê") .replaceAll(/ee/g, "ê")
.replaceAll(/oo/g, "ô") .replaceAll(/oo/g, "ô")
.replaceAll(/o'/g, "ø") .replaceAll(/o'/g, "ø")
@ -164,7 +160,6 @@ const App = (_props) => {
const showPasswordBox = () => { const showPasswordBox = () => {
const modal: any = document.querySelector(".passwordDialog"); const modal: any = document.querySelector(".passwordDialog");
dialogPolyfill.registerDialog(modal);
modal.showModal(); modal.showModal();
}; };

View File

@ -16,8 +16,6 @@ interface SaiEntryProps {
eng: string; eng: string;
syn_category: string; syn_category: string;
morph_type: string; morph_type: string;
etym: string;
semantic_field: string;
notes: string; notes: string;
} }

View File

@ -2088,11 +2088,6 @@ detect-libc@^1.0.3:
resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz" resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
dialog-polyfill@^0.5.6:
version "0.5.6"
resolved "https://registry.yarnpkg.com/dialog-polyfill/-/dialog-polyfill-0.5.6.tgz#7507b4c745a82fcee0fa07ce64d835979719599a"
integrity sha512-ZbVDJI9uvxPAKze6z146rmfUZjBqNEwcnFTVamQzXH+svluiV7swmVIGr7miwADgfgt1G2JQIytypM9fbyhX4w==
diffie-hellman@^5.0.0: diffie-hellman@^5.0.0:
version "5.0.3" version "5.0.3"
resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz" resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz"