mirror of
https://github.com/decaf-dev/obsidian-vault-explorer.git
synced 2026-07-22 10:10:31 +00:00
Fix sometimes broken image (#234)
* chore: bump version * fix: resolve broken image still appearing
This commit is contained in:
parent
54db301ea0
commit
0817fca688
6 changed files with 27 additions and 11 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -85,6 +85,6 @@
|
|||
"feed"
|
||||
],
|
||||
"configDir": ".vaultexplorer",
|
||||
"pluginVersion": "1.30.2",
|
||||
"pluginVersion": "1.30.4",
|
||||
"logLevel": "trace"
|
||||
}
|
||||
3
test-vault/Url with no social media image.md
Normal file
3
test-vault/Url with no social media image.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
url: https://x.com/decaf_dev
|
||||
---
|
||||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue