This commit is contained in:
adueck 2022-10-02 15:13:39 +04:00
parent 955757ad0b
commit 0d39726eb9
2 changed files with 4 additions and 1 deletions

View File

@ -246,12 +246,15 @@ class App extends Component<RouteComponentProps, State> {
this.handlePowerSearch(); this.handlePowerSearch();
}); });
Mousetrap.bind(["ctrl+s", "command+s"], (e) => { Mousetrap.bind(["ctrl+s", "command+s"], (e) => {
console.log("hit ctrl+s");
if (this.state.user?.level === "basic") return;
e.preventDefault(); e.preventDefault();
if (!this.state.isolatedEntry) return; if (!this.state.isolatedEntry) return;
const toAdd = { const toAdd = {
entry: this.state.isolatedEntry, entry: this.state.isolatedEntry,
notes: "", notes: "",
}; };
console.log("Adding this to wordlist", toAdd);
addToWordlist(toAdd); addToWordlist(toAdd);
}); });
Mousetrap.bind(["ctrl+\\", "command+\\"], (e) => { Mousetrap.bind(["ctrl+\\", "command+\\"], (e) => {

View File

@ -177,7 +177,7 @@ function OptionsScreen({
</tr> </tr>
<tr> <tr>
<td><kbd>ctrl / </kbd> + <kbd>s</kbd></td> <td><kbd>ctrl / </kbd> + <kbd>s</kbd></td>
<td>add word to wordlist <i className="fas fa-star fa-lg" /></td> <td>add word to wordlist <i className="far fa-star" /></td>
</tr> </tr>
</>} </>}
<tr> <tr>