Compare commits
No commits in common. "ac8839ec672a95727b57e1fa1aa2f983f163f5ed" and "20d3cb30841f8988c0f16a4a10f86e3a998ee126" have entirely different histories.
ac8839ec67
...
20d3cb3084
@ -26,7 +26,6 @@
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"dialog-polyfill": "^0.5.6",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
|
13
src/App.tsx
13
src/App.tsx
@ -1,5 +1,4 @@
|
||||
import React, {useState} from "react";
|
||||
import dialogPolyfill from "dialog-polyfill";
|
||||
|
||||
import "./App.scss";
|
||||
import {SaiEntryProps, JutEntryProps, ElesuEntryProps, TukEntryProps, Conlang, SearchDirection} from "./types";
|
||||
@ -9,18 +8,15 @@ import {setPassword, searchEntry} from "./requests";
|
||||
const PasswordDialog = (_props) => {
|
||||
const [password, setPasswordStr] = useState("");
|
||||
|
||||
const modal = (): any => document.querySelector(".passwordDialog");
|
||||
const save = () => {
|
||||
setPassword(password);
|
||||
const modal: any = document.querySelector(".passwordDialog");
|
||||
dialogPolyfill.registerDialog(modal);
|
||||
modal.close();
|
||||
modal().close();
|
||||
location.reload(); // TODO this is a hack
|
||||
};
|
||||
|
||||
const cancel = () => {
|
||||
const modal: any = document.querySelector(".passwordDialog");
|
||||
dialogPolyfill.registerDialog(modal);
|
||||
modal.close();
|
||||
modal().close();
|
||||
};
|
||||
|
||||
return (
|
||||
@ -109,7 +105,7 @@ const Results = (props: ResultsProps) => {
|
||||
|
||||
const convertSearchBoxShorthand = (input: string, conlang: Conlang): string => {
|
||||
if (conlang === Conlang.Saimiar) {
|
||||
return (input as any)
|
||||
return input
|
||||
.replaceAll(/ee/g, "ê")
|
||||
.replaceAll(/oo/g, "ô")
|
||||
.replaceAll(/o'/g, "ø")
|
||||
@ -164,7 +160,6 @@ const App = (_props) => {
|
||||
|
||||
const showPasswordBox = () => {
|
||||
const modal: any = document.querySelector(".passwordDialog");
|
||||
dialogPolyfill.registerDialog(modal);
|
||||
modal.showModal();
|
||||
};
|
||||
|
||||
|
@ -16,8 +16,6 @@ interface SaiEntryProps {
|
||||
eng: string;
|
||||
syn_category: string;
|
||||
morph_type: string;
|
||||
etym: string;
|
||||
semantic_field: string;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
|
@ -2088,11 +2088,6 @@ detect-libc@^1.0.3:
|
||||
resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz"
|
||||
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:
|
||||
version "5.0.3"
|
||||
resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz"
|
||||
|
Loading…
Reference in New Issue
Block a user