obsidian-db-folder
obsidian-db-folder copied to clipboard
[FR] Mobile support
@bakerstreet reports that the application does not work on mobile property here
I am opening this issue
While it's not working is it possible to mark isDesktopOnly
as true? That prevents it from trying and failing to load on every mobile start for the moment.
oh that's right! I will change it. Thank you
You may be able to debug this more effectively using Obsidian REPL. Though it won't show the initial failure to load, it will pick up the error when you try and manually enable the plug-in.
Nice plugin idea btw! I will give it a try
"isDesktopOnly": true added with 0.3.1
Great! I look forward to proper mobile support!
Nice! I am working with documentation with mkdocs
Hi @iamrecursion do you need help with this issue? Any progress? You can share with us so could be easy to help
Oh, I think there's been some confusion! I didn't say that I could work on it—unfortunately I've not got the time at the moment—just that I look forward to it being done!
If this is still outstanding in a month or so I should be able to pick it up.
I'm really sorry for the confusion!
@iamrecursion oh do not sorry :) I will try to give mobile support with your debugging plugin
Trying to debug on mobile while is load with this templater script but does not load on mobile yet:
// Call this method inside your plugin's
// `onload` function like so:
// monkeyPatchConsole(this);
function monkeyPatchConsole(path){
console.log("=> monkeyPatchConsole");
// if (!Platform.isMobile) {
// return;
// }
const logFile = `${path}/${new Date().toLocaleDateString('sv')}.log`;
const logs = [];
const logMessages = (prefix) => (messages) => {
logs.push(`\n[${prefix}]`);
for (const message of messages) {
logs.push(String(message));
}
window.app.vault.adapter.write(logFile, logs.join(" "));
};
console.debug = logMessages("debug");
console.error = logMessages("error");
console.info = logMessages("info");
console.log = logMessages("log");
console.warn = logMessages("warn");
console.log(`<= monkeyPatchConsole ${logFile}`);
}
module.exports = monkeyPatchConsole;
I generate a mini plugin just to debug on mobile.
Once I found the problem ([error] Plugin failure: dbfolder ReferenceError: Can't find variable: process
) I used the plugin of rollup @rollup/plugin-replace
to substitute in exec time the variable process
for a controlled one
const getRollupPlugins = (tsconfig, ...plugins) =>
[
typescript2(tsconfig),
nodeResolve({ browser: true }),
json(),
commonjs(),
replace({
'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development')
})
].concat(plugins);
aaaand... Its working! I am sure there are tons of bugs just for mobile but at least the table is loading correctly
That's very exciting!