relative path of the edited file as important part of the context at the
top of the page...
This commit is contained in:
parent
2ddbaa42cb
commit
161465ddd7
|
@ -91,7 +91,7 @@
|
|||
<svelte:window on:keyup={keyUp}/>
|
||||
<main id="sandpoints">
|
||||
<form>
|
||||
<SpTitle title={title} />
|
||||
<SpTitle relpath={relpath} title={title} />
|
||||
<SpHasWhat on:hasTiersSelected={newHasTiers} hases={hases} hastiers={hastiers} />
|
||||
<SpHasTiers on:addToCandidatesRemoveFromTiers={addToCandidatesRemoveFromTiers} hastiers={hastiers} candidates={candidates} tiers={tiers}/>
|
||||
<SpHasCandidates on:addToTiersRemoveFromCandidates={addToTiersRemoveFromCandidates} candidates={candidates} />
|
||||
|
|
|
@ -7,16 +7,18 @@
|
|||
const dispatch = createEventDispatcher();
|
||||
|
||||
afterUpdate(() => {
|
||||
let optsel = document.getElementById(hasNew)
|
||||
let optsel = document.getElementById('hasNew')
|
||||
if (hastiers=="" && optsel) {
|
||||
optsel.selected = 'selected';
|
||||
optsel.disabled = 'disabled'
|
||||
} else if (hastiers != "") {
|
||||
let optsel = document.getElementById('_' + hastiers)
|
||||
optsel.selected = 'selected'
|
||||
}
|
||||
});
|
||||
|
||||
$: {
|
||||
$: {
|
||||
console.log("hases", hases)
|
||||
if (value && value.startsWith("_")) {
|
||||
dispatch("hasTiersSelected", value)
|
||||
}
|
||||
|
@ -24,7 +26,9 @@ $: {
|
|||
</script>
|
||||
|
||||
<select id="selecthas" class="selecthas" bind:value>
|
||||
<option id="hasNew" title="Has new" value="hasNew">Has new...</option>
|
||||
{#if hastiers == ""}
|
||||
<option id="hasNew" title="Has new" value="hasNew">Has new...</option>
|
||||
{/if}
|
||||
{#each hases as has}
|
||||
<option id="{'_' + has}" class="hasoption" title="{has}" value={'_' + has}>Has {has}:</option>
|
||||
{/each}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<script>
|
||||
export let title;
|
||||
export let relpath;
|
||||
</script>
|
||||
|
||||
<p><em>File path: <strong>{relpath}</strong></em></p>
|
||||
<label for="title">Title:</label>
|
||||
<input type="text" name="title" value="{title}">
|
||||
|
|
Loading…
Reference in New Issue