Add Dexie for persistence; user management with dexie; this is the way

This commit is contained in:
Philipp Heckel 2022-03-01 21:23:12 -05:00
parent 8036aa2942
commit 23d275acec
16 changed files with 285 additions and 494 deletions

View file

@ -14,7 +14,6 @@ import api from "../app/Api";
const IconSubscribeSettings = (props) => {
const [open, setOpen] = useState(false);
const anchorRef = useRef(null);
const users = props.users;
const handleToggle = () => {
setOpen((prevOpen) => !prevOpen);
@ -40,8 +39,7 @@ const IconSubscribeSettings = (props) => {
const handleSendTestMessage = () => {
const baseUrl = props.subscription.baseUrl;
const topic = props.subscription.topic;
const user = users.get(baseUrl); // May be null
api.publish(baseUrl, topic, user,
api.publish(baseUrl, topic,
`This is a test notification sent by the ntfy Web UI at ${new Date().toString()}.`); // FIXME result ignored
setOpen(false);
}