mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: button disabled button
This commit is contained in:
1 parent
aff4c7dc77
commit
91650cfe8c
2 files changed
+8
-5
No files matched your search
@@ -23,7 +23,7 @@ function createFeedbackStore() {
|
||||
elapsed: browser ? parseInt(localStorage.getItem('feedbackElapsed')) : 0,
|
||||
visualized: browser ? parseInt(localStorage.getItem('feedbackVisualized')) : 0,
|
||||
notification: false,
|
||||
type: 'nps'
|
||||
type: 'general'
|
||||
});
|
||||
return {
|
||||
subscribe,
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
let btnActive = false;
|
||||
|
||||
let options = [
|
||||
{ label: 'years', value: 'y' },
|
||||
{ label: 'months', value: 'M' },
|
||||
{ label: 'days', value: 'd' },
|
||||
{ label: 'hours', value: 'h' },
|
||||
{ label: 'minutes', value: 'm' },
|
||||
@@ -64,6 +62,7 @@
|
||||
try {
|
||||
await sdkForConsole.projects.updateAuthDuration(projectId, timeToSeconds(time, period));
|
||||
invalidate(Dependencies.PROJECT);
|
||||
period = 's';
|
||||
|
||||
addNotification({
|
||||
type: 'success',
|
||||
@@ -77,6 +76,10 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
project.subscribe((p) => {
|
||||
time = p.authDuration;
|
||||
});
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
@@ -159,14 +162,14 @@
|
||||
<form class="form u-grid u-gap-16">
|
||||
<ul class="form-list is-multiple">
|
||||
<InputNumber id="length" label="Length" bind:value={time} />
|
||||
<InputSelect id="period" label="Time Period" value={period} {options} />
|
||||
<InputSelect id="period" label="Time Period" bind:value={period} {options} />
|
||||
</ul>
|
||||
</form>
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
<Button
|
||||
disabled={period !== 's' || time !== $project.authDuration}
|
||||
disabled={period === 's' && time === $project.authDuration}
|
||||
on:click={() => {
|
||||
updateSessionLength();
|
||||
}}>
|
||||
|
||||
Reference in new issue
Block a user