try share target
This commit is contained in:
parent
d4a21059ea
commit
b2e027ce3e
|
@ -36,5 +36,12 @@
|
|||
"display": "standalone",
|
||||
"theme_color": "#333333",
|
||||
"background_color": "#f9f9f9",
|
||||
"start_url": "."
|
||||
"start_url": ".",
|
||||
"share_target": {
|
||||
"action": "/share-target",
|
||||
"method": "GET",
|
||||
"params": {
|
||||
"text": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ if (prod) {
|
|||
}
|
||||
|
||||
const possibleLandingPages = [
|
||||
"/", "/about", "/settings", "/word", "/account", "/new-entries",
|
||||
"/", "/about", "/settings", "/word", "/account", "/new-entries", "/share-target",
|
||||
];
|
||||
const editorOnlyPages = [
|
||||
"/edit", "/review-tasks",
|
||||
|
@ -168,6 +168,15 @@ class App extends Component<RouteComponentProps, State> {
|
|||
this.props.history.replace("/");
|
||||
}
|
||||
}
|
||||
if (this.props.location.pathname === "/share-target") {
|
||||
if (this.state.options.language === "English") {
|
||||
this.handleOptionsUpdate({ type: "toggleLanguage" });
|
||||
}
|
||||
const queryString = window.location.search;
|
||||
const urlParams = new URLSearchParams(queryString);
|
||||
const searchString = urlParams.get("text") || "";
|
||||
this.handleSearchValueChange(searchString);
|
||||
}
|
||||
if (this.props.location.pathname === "/new-entries") {
|
||||
this.setState({
|
||||
results: dictionary.getNewWordsThisMonth(),
|
||||
|
|
Loading…
Reference in New Issue