chat worked
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
// [/SECTION]
|
||||
|
||||
// [SECTION: STATE]
|
||||
let branches = [];
|
||||
let loading = false;
|
||||
let showCreate = false;
|
||||
let newBranchName = '';
|
||||
let branches = $state([]);
|
||||
let loading = $state(false);
|
||||
let showCreate = $state(false);
|
||||
let newBranchName = $state('');
|
||||
// [/SECTION]
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
@@ -129,7 +129,7 @@
|
||||
<div class="flex-grow">
|
||||
<Select
|
||||
bind:value={currentBranch}
|
||||
on:change={handleSelect}
|
||||
onchange={handleSelect}
|
||||
disabled={loading}
|
||||
options={branches.map(b => ({ value: b.name, label: b.name }))}
|
||||
/>
|
||||
@@ -138,7 +138,7 @@
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
on:click={() => showCreate = !showCreate}
|
||||
onclick={() => showCreate = !showCreate}
|
||||
disabled={loading}
|
||||
class="text-blue-600"
|
||||
>
|
||||
@@ -158,7 +158,7 @@
|
||||
<Button
|
||||
variant="primary"
|
||||
size="sm"
|
||||
on:click={handleCreate}
|
||||
onclick={handleCreate}
|
||||
disabled={loading || !newBranchName}
|
||||
isLoading={loading}
|
||||
class="bg-green-600 hover:bg-green-700"
|
||||
@@ -168,7 +168,7 @@
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
on:click={() => showCreate = false}
|
||||
onclick={() => showCreate = false}
|
||||
disabled={loading}
|
||||
>
|
||||
{$t.common.cancel}
|
||||
@@ -178,4 +178,4 @@
|
||||
</div>
|
||||
<!-- [/SECTION] -->
|
||||
|
||||
<!-- [/DEF:BranchSelector:Component] -->
|
||||
<!-- [/DEF:BranchSelector:Component] -->
|
||||
|
||||
Reference in New Issue
Block a user