#97 - Fixing layout
This commit is contained in:
@@ -141,23 +141,28 @@
|
||||
</script>
|
||||
|
||||
<div class="modal-title">Omnisearch - File</div>
|
||||
<InputSearch value={searchQuery} on:input={e => (searchQuery = e.detail)} />
|
||||
<div class="modal-content">
|
||||
<InputSearch value={searchQuery} on:input={e => (searchQuery = e.detail)} />
|
||||
|
||||
<ModalContainer>
|
||||
{#if groupedOffsets.length && note}
|
||||
{#each groupedOffsets as offset, i}
|
||||
<ResultItemInFile
|
||||
{offset}
|
||||
{note}
|
||||
index={i}
|
||||
selected={i === selectedIndex}
|
||||
on:mousemove={e => (selectedIndex = i)}
|
||||
on:click={openSelection} />
|
||||
{/each}
|
||||
{:else}
|
||||
<div style="text-align: center;">
|
||||
We found 0 result for your search here.
|
||||
</div>
|
||||
{/if}
|
||||
</ModalContainer>
|
||||
</div>
|
||||
|
||||
<ModalContainer>
|
||||
{#if groupedOffsets.length && note}
|
||||
{#each groupedOffsets as offset, i}
|
||||
<ResultItemInFile
|
||||
{offset}
|
||||
{note}
|
||||
index={i}
|
||||
selected={i === selectedIndex}
|
||||
on:mousemove={e => (selectedIndex = i)}
|
||||
on:click={openSelection} />
|
||||
{/each}
|
||||
{:else}
|
||||
<center> We found 0 result for your search here. </center>
|
||||
{/if}
|
||||
</ModalContainer>
|
||||
<div class="prompt-instructions">
|
||||
<div class="prompt-instruction">
|
||||
<span class="prompt-instruction-command">↑↓</span><span>to navigate</span>
|
||||
|
||||
@@ -181,20 +181,22 @@
|
||||
</script>
|
||||
|
||||
<div class="modal-title">Omnisearch - Vault</div>
|
||||
<InputSearch value={searchQuery} on:input={e => (searchQuery = e.detail)} />
|
||||
<div class="modal-content">
|
||||
<InputSearch value={searchQuery} on:input={e => (searchQuery = e.detail)} />
|
||||
|
||||
<ModalContainer>
|
||||
{#each resultNotes as result, i}
|
||||
<ResultItemVault
|
||||
selected={i === selectedIndex}
|
||||
note={result}
|
||||
on:mousemove={e => (selectedIndex = i)}
|
||||
on:click={onClick} />
|
||||
{/each}
|
||||
{#if !resultNotes.length && searchQuery}
|
||||
<center> We found 0 result for your search here. </center>
|
||||
{/if}
|
||||
</ModalContainer>
|
||||
<ModalContainer>
|
||||
{#each resultNotes as result, i}
|
||||
<ResultItemVault
|
||||
selected={i === selectedIndex}
|
||||
note={result}
|
||||
on:mousemove={e => (selectedIndex = i)}
|
||||
on:click={onClick} />
|
||||
{/each}
|
||||
{#if !resultNotes.length && searchQuery}
|
||||
<center> We found 0 result for your search here. </center>
|
||||
{/if}
|
||||
</ModalContainer>
|
||||
</div>
|
||||
|
||||
<div class="prompt-instructions">
|
||||
<div class="prompt-instruction">
|
||||
|
||||
@@ -9,13 +9,13 @@ abstract class OmnisearchModal extends Modal {
|
||||
constructor(app: App) {
|
||||
super(app)
|
||||
|
||||
// Remove all the default modal's children (except the close button)
|
||||
// Remove all the default modal's children
|
||||
// so that we can more easily customize it
|
||||
const closeEl = this.containerEl.find('.modal-close-button')
|
||||
this.modalEl.replaceChildren()
|
||||
this.modalEl.append(closeEl)
|
||||
this.modalEl.addClass('omnisearch-modal', 'prompt')
|
||||
this.modalEl.removeClass('modal')
|
||||
// this.modalEl.removeClass('modal')
|
||||
this.modalEl.tabIndex = -1
|
||||
|
||||
// Setup events that can be listened through the event bus
|
||||
|
||||
Reference in New Issue
Block a user