I am working on a presentation and I am using Carbon for make the code look better but I need to setup all the time the look like of the "terminal" but i work on it in my free time so sometime i close all and work on other project and lost the config or part of it.
Is a bad idea to put an import/export of the config or something similare into Carbon?
I'd be happy to work on this aswell if no one takes it. 😄
Your config should be being saved to localStorage. Is the config not being saved for you?
Not always. Sometime I open the browser and Carbon has the default config
@fundor333 localStorage can only hold data up to a certain limit. Let's say you have 2 apps, and one extension that makes use of localStorage and let's say your extension has full control over the size limit cap on localStorage. Then, it can potentially override data from other apps/extensions if it wanted to. This is true in case of Chrome; I'm not sure if this holds for other browsers too.
What if we can upload a .json file _(and it get saved in localStorage until a newly uploaded file overrides)_ which includes the settings and then carbon read the file and show _(in a select widget)_ which settings ["latest-preset", "presentation"] you want to choose and carbon apply those settings.
Example of .json file
{
"latest-preset": {
"t": "base16-light",
"bg": "none",
"wt": "none",
"wc": true,
"fm": "Inconsolata",
"fs": "18px",
"ln": true,
"ds": true,
"dsyoff": "3px",
"dsblur": "5px",
"wa": true,
"pv": "15px",
"ph": "15px",
"si": false,
"wm": false,
"es": "2x",
"type": "png"
},
"presentation": {
"t": "base16-light",
"bg": "none",
"wt": "none",
"wc": true,
"fm": "Inconsolata",
"fs": "18px",
"ln": true,
"ds": true,
"dsyoff": "3px",
"dsblur": "5px",
"wa": true,
"pv": "15px",
"ph": "15px",
"si": false,
"wm": false,
"es": "2x",
"type": "png"
}
}
With the help of this feature, we can get more beautiful default theme created by users.
This 💡 is taken from carbon-now-cli, thanks to @mixn.
I love the idea, @mittalyashu. This would be great.
Right. I always thought you would just drop in a new json file which would immediately update the settings (including localStorage). No need to keep two copies.
I'm _also_ working on a presentation, and it'd be nice to be able to download the config and store it in my presentation so I can load it when switching between computers
Most helpful comment
What if we can upload a
.jsonfile _(and it get saved in localStorage until a newly uploaded file overrides)_ which includes the settings and then carbon read the file and show _(in a select widget)_ which settings["latest-preset", "presentation"]you want to choose and carbon apply those settings.Example of
.jsonfileWith the help of this feature, we can get more beautiful default theme created by users.
This 💡 is taken from
carbon-now-cli, thanks to @mixn.