Hello,
This project looks so great ! That's why I want to try to self host a web version ! So I will be able to access the same version of this start page on all my devices with the same customisation by default. However, I'm a noob... I have seen a closed issue on modifying default styles and bookmarks, but can somebody tell me if It is possible to configure default icons too before compiling the project?
Hi. If you are self hosting the project you can edit the state.js and bookmarks.js files with your preferred settings and bookmarks before building (compiling) the project files to host.
bookmarks.js has an array with two example groups both with some example bookmarks. You can of course add as many groups and bookmarks as you wish to the array:
mod.all = [{
name: {...},
openAll: {...},
items: [{...}, {...}]
}, {
name: {...},
openAll: {...},
items: [{...}, {...}]
}, {
name: {...},
openAll: {...},
items: [{...}, {...}]
}];
You can configure the bookmarks inside the items array and the (fontawesome) icons in each bookmark to your preference. These would be the "default" icons. Just make sure the icon names are those from fontawesomes project.
Hope that helps.
Oh ok thank you so much ! I did not see that we only have to use the icons from font awesome. Thank you !
Oh sorry just one more question : can I first compile the project with the default settings, then modify what I want on the start page GUI and finally generate all the .js files that correspond to my custom settings ? So I would be able to compile again using my custom settings and all my devices will have the same start page ! That would give an opportunity no to dig in the different settings using a code editor, and actually see what I am modifying without having to compile each time to make a test !
I'm afraid nothing quite like that is possible in this project.
Anything you modify in the browser, via the GUI, will be local to the device you are working on. Those changes will not persist between different devices. (Unless you manually Export a backup JSON file, copy to another device and Import on that copy of nightTab. Which sounds like what you want to avoid.)
You could in theory:
This requires some knowledge of where parts of the code would live. It's possible but tricky. The backup JSON looks like this:
{
"nighttab": true,
"version": "5.5.2",
"state": {...},
"bookmarks": [{...}, {...}]
}
So the steps might look like this:
"state": {...}" object (just the object, so from { to }) from the backup JSON and paste over the mod.current = {...} object in state.js"bookmarks": [{...}, {...}] array (just the array, so from [ to ]) from the backup JSON and paste it over the mod.all = [{...}] array from bookmark.js. This _should_ work.
Ok thank you so much for your fast and precise answers, It is so helpful ! I am going to try that way ! At least, you may consider making cross device compatibility easier as a possible improvement ! But thank you again for all your support !
Most helpful comment
Oh ok thank you so much ! I did not see that we only have to use the icons from font awesome. Thank you !