small fixes
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
import ResultItemContainer from './ResultItemContainer.svelte'
|
||||
import type OmnisearchPlugin from '../main'
|
||||
import { setIcon, TFile } from 'obsidian'
|
||||
import { onMount, SvelteComponent } from 'svelte'
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
// Import icon utility functions
|
||||
import {
|
||||
@@ -165,7 +165,8 @@
|
||||
{:else}
|
||||
<!-- File Icon -->
|
||||
{#if fileIconSVG}
|
||||
<span class="omnisearch-result__icon" use:renderSVG="{fileIconSVG}"></span>
|
||||
<span class="omnisearch-result__icon" use:renderSVG="{fileIconSVG}"
|
||||
></span>
|
||||
{/if}
|
||||
{/if}
|
||||
<span>
|
||||
@@ -191,7 +192,8 @@
|
||||
<div class="omnisearch-result__folder-path">
|
||||
<!-- Folder Icon -->
|
||||
{#if folderIconSVG}
|
||||
<span class="omnisearch-result__icon" use:renderSVG="{folderIconSVG}"></span>
|
||||
<span class="omnisearch-result__icon" use:renderSVG="{folderIconSVG}"
|
||||
></span>
|
||||
{/if}
|
||||
<span>
|
||||
{@html plugin.textProcessor.highlightText(notePath, matchesNotePath)}
|
||||
|
||||
@@ -29,7 +29,7 @@ export class EmbedsRepository {
|
||||
this.embeds.delete(oldPath)
|
||||
}
|
||||
// If the file is a note referencing other files
|
||||
this.embeds.forEach((referencedBy, key) => {
|
||||
this.embeds.forEach((referencedBy, _key) => {
|
||||
if (referencedBy.has(oldPath)) {
|
||||
referencedBy.delete(oldPath)
|
||||
referencedBy.add(newPath)
|
||||
@@ -38,7 +38,7 @@ export class EmbedsRepository {
|
||||
}
|
||||
|
||||
public refreshEmbedsForNote(filePath: string): void {
|
||||
this.embeds.forEach((referencedBy, key) => {
|
||||
this.embeds.forEach((referencedBy, _key) => {
|
||||
if (referencedBy.has(filePath)) {
|
||||
referencedBy.delete(filePath)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TFile, getIcon, normalizePath } from 'obsidian'
|
||||
import { getIcon, normalizePath } from 'obsidian'
|
||||
import type OmnisearchPlugin from '../main'
|
||||
import {
|
||||
isFileImage,
|
||||
@@ -134,7 +134,9 @@ export async function loadIconSVG(
|
||||
|
||||
if (!prefix) {
|
||||
// No prefix, assume it's an emoji or text
|
||||
return `<span class="omnisearch-result__icon--emoji">${escapeHTML(name)}</span>`
|
||||
return `<span class="omnisearch-result__icon--emoji">${escapeHTML(
|
||||
name
|
||||
)}</span>`
|
||||
}
|
||||
|
||||
const iconPackName = prefixToIconPack[prefix]
|
||||
|
||||
Reference in New Issue
Block a user