mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Fix mark read logic, should fix #307.
Add bot delete confirmation, closes #302.
This commit is contained in:
@@ -469,15 +469,20 @@ function BotCard({ bot, onDelete, onUpdate }: Props) {
|
||||
<div className={styles.buttonRow}>
|
||||
{editMode && (
|
||||
<>
|
||||
<Button accent onClick={save}>
|
||||
<Button onClick={save}>
|
||||
<Text id="app.special.modals.actions.save" />
|
||||
</Button>
|
||||
<Button
|
||||
error
|
||||
accent
|
||||
onClick={async () => {
|
||||
setSaving(true);
|
||||
await client.bots.delete(bot._id);
|
||||
onDelete();
|
||||
openScreen({
|
||||
id: "special_prompt",
|
||||
type: "delete_bot",
|
||||
target: bot._id,
|
||||
name: user.username,
|
||||
cb: onDelete,
|
||||
});
|
||||
}}>
|
||||
<Text id="app.special.modals.actions.delete" />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user