Many changes. See further for more details.
- Notification API - New Modal API - Vault JSON import and export - Improved Page Cache - Adding Context Menu API - Adding Vault Deletion - Fixing Sync Issues - Implementing Share Target API - Implementing Share To API
This commit is contained in:
30
src/components/routes/share/Share.tsx
Normal file
30
src/components/routes/share/Share.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import { h } from "preact";
|
||||
import { Page } from "../../../page";
|
||||
import VaultsPage from "../vaults/Vaults";
|
||||
import Navigation from "../../../navigation";
|
||||
|
||||
export default class SharePage extends Page<{ state: any }, { vault: string }> {
|
||||
text: string;
|
||||
componentWillMount() {
|
||||
let { title, text, url } = Navigation.getQuery() || {} as any;
|
||||
let note = "";
|
||||
if (title) {
|
||||
note += title + "\n"
|
||||
}
|
||||
|
||||
if (text) {
|
||||
note += text;
|
||||
}
|
||||
|
||||
if (url) {
|
||||
note += "\n" + url;
|
||||
}
|
||||
this.text = note;
|
||||
}
|
||||
|
||||
render() {
|
||||
return <VaultsPage state={undefined} selectVault onSelected={vault => {
|
||||
Navigation.setPage("/vault", { id: vault }, { entry: "true", note: this.text }, true);
|
||||
}} />
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user