Fix sometimes broken image (#234)

* chore: bump version

* fix: resolve broken image still appearing
This commit is contained in:
DecafDev 2024-07-24 22:57:15 -06:00 committed by GitHub
parent 54db301ea0
commit 0817fca688
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 27 additions and 11 deletions

View file

@ -1,7 +1,7 @@
{
"id": "vault-explorer",
"name": "Vault Explorer",
"version": "1.30.3",
"version": "1.30.4",
"minAppVersion": "1.4.13",
"description": "Explore your vault in visual format",
"author": "DecafDev",

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-vault-explorer",
"version": "1.30.3",
"version": "1.30.4",
"description": "Explore your vault in visual format",
"main": "main.js",
"scripts": {

View file

@ -51,6 +51,18 @@
const dispatch = createEventDispatcher();
onMount(() => {
if (imageUrl) {
if (!isHttpsLink(imageUrl) || isImageUrl(imageUrl)) {
imgSrc = imageUrl;
}
}
if (loadSocialMediaImage) {
loadSocialImage(imageUrl);
}
});
onMount(() => {
function handleFileInteractionStyleChange() {
fileInteractionStyle = plugin.settings.fileInteractionStyle;
@ -70,8 +82,13 @@
onMount(() => {
function handleLoadSocialMediaImageChange() {
loadSocialMediaImage =
plugin.settings.views.grid.loadSocialMediaImage;
const newValue = plugin.settings.views.grid.loadSocialMediaImage;
loadSocialMediaImage = newValue;
if (newValue) {
loadSocialImage(imageUrl);
} else {
clearSocialImage(imageUrl);
}
}
EventManager.getInstance().on(
@ -186,11 +203,6 @@
handleCardMouseOver(e);
}
//This is needed so that the property doesn't get removed
$: imageUrl !== null, (imgSrc = imageUrl);
$: loadSocialMediaImage && loadSocialImage(imageUrl);
$: !loadSocialMediaImage && clearSocialImage(imageUrl);
$: hasBodyContent =
tags != null || custom1 != null || custom2 != null || custom3 != null;
</script>

View file

@ -85,6 +85,6 @@
"feed"
],
"configDir": ".vaultexplorer",
"pluginVersion": "1.30.2",
"pluginVersion": "1.30.4",
"logLevel": "trace"
}

View file

@ -0,0 +1,3 @@
---
url: https://x.com/decaf_dev
---

View file

@ -107,5 +107,6 @@
"1.30.0": "1.4.13",
"1.30.1": "1.4.13",
"1.30.2": "1.4.13",
"1.30.3": "1.4.13"
"1.30.3": "1.4.13",
"1.30.4": "1.4.13"
}