- Sign-up emails a confirmation link (24h); unconfirmed accounts see a banner on the web with "send it again", and status in Settings. - Change email (needs the password): the new address gets a confirmation link and only replaces the old one once clicked; the old address gets a heads-up with a reset-password link. Pending changes can be cancelled. - Change password (needs the current one): signs out other sessions. - Password fields have Show/Hide on web and mobile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8
This commit is contained in:
@@ -418,7 +418,22 @@ function JellyfinConnection({
|
||||
}
|
||||
|
||||
function Account() {
|
||||
const { me, signOut } = useSession();
|
||||
const { me, setMe, signOut } = useSession();
|
||||
const resend = async () => {
|
||||
try {
|
||||
await api.resendVerification();
|
||||
Alert.alert('Sent', `We sent a new link to ${me?.email}.`);
|
||||
} catch (err) {
|
||||
showError(err);
|
||||
}
|
||||
};
|
||||
const cancelChange = async () => {
|
||||
try {
|
||||
setMe(await api.cancelEmailChange());
|
||||
} catch (err) {
|
||||
showError(err);
|
||||
}
|
||||
};
|
||||
const confirmDelete = () =>
|
||||
Alert.alert('Delete your account?', 'This permanently removes your profile, follows and connected services.', [
|
||||
{ text: 'Cancel', style: 'cancel' },
|
||||
@@ -439,8 +454,22 @@ function Account() {
|
||||
<Card>
|
||||
<Heading>Account</Heading>
|
||||
<Body muted style={styles.small}>
|
||||
Signed in as @{me?.username} · {me?.plan === 'free' ? 'Free plan' : 'Plus'}
|
||||
Signed in as @{me?.username}
|
||||
</Body>
|
||||
<Body style={styles.small}>
|
||||
{me?.email} · {me?.emailVerified ? 'confirmed' : 'not confirmed'}
|
||||
</Body>
|
||||
{me?.pendingEmail ? (
|
||||
<Body muted style={styles.small}>
|
||||
Changing to {me.pendingEmail}: open the link we sent there.
|
||||
</Body>
|
||||
) : null}
|
||||
<Row>
|
||||
{me && !me.emailVerified && !me.pendingEmail && <Button small variant="primary" title="Resend confirmation" onPress={resend} />}
|
||||
{me?.pendingEmail && <Button small title="Cancel email change" onPress={cancelChange} />}
|
||||
<Button small title="Change email" onPress={() => router.push('/change-email')} />
|
||||
<Button small title="Change password" onPress={() => router.push('/change-password')} />
|
||||
</Row>
|
||||
<Button small title="Blocked accounts" onPress={() => router.push('/blocked')} style={{ alignSelf: 'flex-start' }} />
|
||||
<Row>
|
||||
<Button small title="Log out" onPress={signOut} />
|
||||
|
||||
Reference in New Issue
Block a user