mirror of
https://github.com/KoalaSat/nostros.git
synced 2024-09-29 06:30:47 +00:00
Merge branch 'main' into dependabot/npm_and_yarn/typescript-4.8.4
This commit is contained in:
commit
460e35f67c
@ -32,7 +32,7 @@ yarn start
|
|||||||
|
|
||||||
### Bugs
|
### Bugs
|
||||||
|
|
||||||
- [ ] User info missing on first start
|
- [x] User info missing on first start
|
||||||
- [ ] i18n not loading
|
- [ ] i18n not loading
|
||||||
- [ ] Logging out and in again does not work
|
- [ ] Logging out and in again does not work
|
||||||
- [ ] Clipboard library not working
|
- [ ] Clipboard library not working
|
||||||
@ -59,6 +59,7 @@ yarn start
|
|||||||
- [ ] Direct Messages https://github.com/nostr-protocol/nips/blob/master/04.md
|
- [ ] Direct Messages https://github.com/nostr-protocol/nips/blob/master/04.md
|
||||||
|
|
||||||
### Note
|
### Note
|
||||||
|
|
||||||
- [ ] Autoscroll to reply
|
- [ ] Autoscroll to reply
|
||||||
- [ ] Mentions https://github.com/nostr-protocol/nips/blob/master/08.md
|
- [ ] Mentions https://github.com/nostr-protocol/nips/blob/master/08.md
|
||||||
- [ ] Reactions https://github.com/nostr-protocol/nips/blob/master/25.md
|
- [ ] Reactions https://github.com/nostr-protocol/nips/blob/master/25.md
|
||||||
|
@ -29,11 +29,12 @@ export const ConfigPage: React.FC = () => {
|
|||||||
const onPressLogout: () => void = () => {
|
const onPressLogout: () => void = () => {
|
||||||
if (database) {
|
if (database) {
|
||||||
dropTables(database).then(() => {
|
dropTables(database).then(() => {
|
||||||
|
EncryptedStorage.removeItem('privateKey').then(() => {
|
||||||
setPrivateKey('');
|
setPrivateKey('');
|
||||||
relayPool?.unsubscribeAll();
|
relayPool?.unsubscribeAll();
|
||||||
EncryptedStorage.removeItem('privateKey');
|
|
||||||
setPage('landing');
|
setPage('landing');
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,10 +10,11 @@ import { Event, EventKind } from '../../lib/nostr/Events';
|
|||||||
import { AppContext } from '../../Contexts/AppContext';
|
import { AppContext } from '../../Contexts/AppContext';
|
||||||
import { insertUserContact } from '../../Functions/DatabaseFunctions/Users';
|
import { insertUserContact } from '../../Functions/DatabaseFunctions/Users';
|
||||||
import EncryptedStorage from 'react-native-encrypted-storage';
|
import EncryptedStorage from 'react-native-encrypted-storage';
|
||||||
|
import { getPublickey } from '../../lib/nostr/Bip';
|
||||||
|
|
||||||
export const LandingPage: React.FC = () => {
|
export const LandingPage: React.FC = () => {
|
||||||
const { database, setPage } = useContext(AppContext);
|
const { database, setPage } = useContext(AppContext);
|
||||||
const { privateKey, publicKey, relayPool, setPrivateKey } = useContext(RelayPoolContext);
|
const { privateKey, publicKey, relayPool, setPublicKey } = useContext(RelayPoolContext);
|
||||||
const { t } = useTranslation('common');
|
const { t } = useTranslation('common');
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
const [status, setStatus] = useState<number>(0);
|
const [status, setStatus] = useState<number>(0);
|
||||||
@ -107,10 +108,12 @@ export const LandingPage: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onPress: () => void = () => {
|
const onPress: () => void = () => {
|
||||||
|
if (privateKey && privateKey !== '') {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setPrivateKey(inputValue);
|
setPublicKey(getPublickey(privateKey));
|
||||||
setStatus(1);
|
setStatus(1);
|
||||||
EncryptedStorage.setItem('privateKey', inputValue);
|
EncryptedStorage.setItem('privateKey', privateKey);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const statusName: { [status: number]: string } = {
|
const statusName: { [status: number]: string } = {
|
||||||
|
Loading…
Reference in New Issue
Block a user