mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 10:15:26 +00:00
fix(ui): fixes for mobile UI, settings and sessions pages (#451)
Co-authored-by: trashtemp <96388163+trashtemp@users.noreply.github.com>
This commit is contained in:
@@ -554,38 +554,46 @@ export const MyBots = observer(() => {
|
||||
</a>
|
||||
.
|
||||
</h5>
|
||||
{bots?.map((bot) => {
|
||||
return (
|
||||
<BotCard
|
||||
key={bot._id}
|
||||
bot={bot}
|
||||
onDelete={() =>
|
||||
setBots(bots.filter((x) => x._id !== bot._id))
|
||||
}
|
||||
onUpdate={(changes: Changes) =>
|
||||
setBots(
|
||||
bots.map((x) => {
|
||||
if (x._id === bot._id) {
|
||||
if (
|
||||
"public" in changes &&
|
||||
typeof changes.public === "boolean"
|
||||
)
|
||||
x.public = changes.public;
|
||||
if ("interactions_url" in changes)
|
||||
x.interactions_url =
|
||||
changes.interactions_url;
|
||||
if (
|
||||
changes.remove === "InteractionsURL"
|
||||
)
|
||||
x.interactions_url = undefined;
|
||||
}
|
||||
return x;
|
||||
}),
|
||||
)
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
<hr />
|
||||
<h3>
|
||||
<Text id="app.settings.pages.bots.title" />
|
||||
</h3>
|
||||
<div className={styles.botList}>
|
||||
{bots?.map((bot) => {
|
||||
return (
|
||||
<BotCard
|
||||
key={bot._id}
|
||||
bot={bot}
|
||||
onDelete={() =>
|
||||
setBots(bots.filter((x) => x._id !== bot._id))
|
||||
}
|
||||
onUpdate={(changes: Changes) =>
|
||||
setBots(
|
||||
bots.map((x) => {
|
||||
if (x._id === bot._id) {
|
||||
if (
|
||||
"public" in changes &&
|
||||
typeof changes.public ===
|
||||
"boolean"
|
||||
)
|
||||
x.public = changes.public;
|
||||
if ("interactions_url" in changes)
|
||||
x.interactions_url =
|
||||
changes.interactions_url;
|
||||
if (
|
||||
changes.remove ===
|
||||
"InteractionsURL"
|
||||
)
|
||||
x.interactions_url = undefined;
|
||||
}
|
||||
return x;
|
||||
}),
|
||||
)
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user