feat: add calculator

This commit is contained in:
SethBurkart123
2025-04-01 15:27:46 +11:00
parent 18441712c9
commit ea77224c75
6 changed files with 197 additions and 14 deletions
+7 -4
View File
@@ -107,7 +107,6 @@ const globalSearchPlugin: Plugin<typeof settings> = {
if (titleElement.querySelector('.search-trigger')) {
return;
}
// Create search button
const searchButton = document.createElement('div');
searchButton.className = 'search-trigger';
@@ -138,9 +137,13 @@ const globalSearchPlugin: Plugin<typeof settings> = {
});
// Mount Svelte component in shadow DOM
app = renderSvelte(SearchBar, searchRootShadow, {
transparencyEffects: api.settings.transparencyEffects,
});
try {
app = renderSvelte(SearchBar, searchRootShadow, {
transparencyEffects: api.settings.transparencyEffects ? true : false,
});
} catch (error) {
console.error('Error rendering Svelte component:', error);
}
}
const title = document.querySelector('#title');