Open melvincarvalho opened 1 year ago
This code snippet is a workaround
const urlParam = new URLSearchParams(window.location.search).get('url');
const urlElement = document.querySelector('.url');
if (urlElement && urlParam) {
urlElement.value = urlParam;
}
I see the issue is here
if (url.match(/\.mymind$/)) { // complete file name
} else { // just a path
if (url.charAt(url.length-1) != "/") { url += "/"; }
url += `${map.name}.${formatRepo.get("native")!.extension}`;
}
https://github.com/ondras/my-mind/blob/master/src/ui/backend/webdav.ts#L38
If extension is mymind it will save, else it adds / + root node
I wonder if it's worth adding .json to this
My memories might be completely off, but I think that saving is supposed to work like this:
In other words, if you use "save as", you are supposed to provide an explicit new file name (url suffix).
This is the place where the url-without-the-file-name is being extracted during map load: https://github.com/ondras/my-mind/blob/master/src/ui/backend/webdav.ts#L60
I'm having an issue with saving my mind map. When I load a mind map from a URL in the query string, it loads fine. However, when I try to save it, the input box in the save area only populates the directory.
Here's the URL I'm using:
https://nosdav.com/my-mind/?url=https%3A%2F%2Fnosdav.nostr.rocks%2Fde7ecd1e2976a6adb2ffa5f4db81a7d812c8bb6698aa00dcf1e76adb55efd645%2Fnostr.json
As you can see in the attached screenshot, I was expecting the filename to be at the end, so instead, I have to type it manually. Is there something that can be done to fix this issue?
Thanks in advance for your help!