2021-03-24 21:11:14 +00:00
|
|
|
<script>
|
|
|
|
|
export let loading, branches;
|
|
|
|
|
import { application } from "@store";
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
{#if loading}
|
|
|
|
|
<div class="grid grid-cols-1">
|
|
|
|
|
<label for="branch">Branch</label>
|
|
|
|
|
<select disabled>
|
|
|
|
|
<option selected>Loading branches</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
{:else}
|
|
|
|
|
<div class="grid grid-cols-1">
|
|
|
|
|
<label for="branch">Branch</label>
|
|
|
|
|
<!-- svelte-ignore a11y-no-onchange -->
|
|
|
|
|
<select id="branch" bind:value="{$application.repository.branch}">
|
|
|
|
|
<option disabled selected>Select a branch</option>
|
|
|
|
|
{#each branches as branch}
|
2021-03-30 21:35:22 +00:00
|
|
|
<option value="{branch.name}" class="font-bold">{branch.name}</option>
|
2021-03-24 21:11:14 +00:00
|
|
|
{/each}
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|