mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: alert cap
This commit is contained in:
1 parent
e4c0bb3f61
commit
5d9ab6e425
1 file changed
+5
-1
@@ -35,6 +35,7 @@
|
||||
});
|
||||
|
||||
function addAlert() {
|
||||
if (isNaN(parseInt(search))) return;
|
||||
if (alerts.some((alert) => alert === selectedAlert)) {
|
||||
return;
|
||||
}
|
||||
@@ -96,7 +97,10 @@
|
||||
bind:value={selectedAlert}
|
||||
on:select={() => (search = selectedAlert.toString())} />
|
||||
<div style="align-self: flex-end">
|
||||
<Button secondary disabled={alerts.length > 2} on:click={addAlert}>
|
||||
<Button
|
||||
secondary
|
||||
disabled={alerts.length > 2 || (!search && !selectedAlert)}
|
||||
on:click={addAlert}>
|
||||
Add alert
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user