mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 09:25:47 +01:00
Remove JSON and add 🍪 Tryconfig save cookies
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"name": "default",
|
"name": "default",
|
||||||
"services": [
|
"services": [
|
||||||
{
|
{
|
||||||
"type": "Other hello",
|
"type": "Other",
|
||||||
"name": "example",
|
"name": "example",
|
||||||
"icon": "https://c.tenor.com/o656qFKDzeUAAAAC/rick-astley-never-gonna-give-you-up.gif",
|
"icon": "https://c.tenor.com/o656qFKDzeUAAAAC/rick-astley-never-gonna-give-you-up.gif",
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "low",
|
|
||||||
"services": [
|
|
||||||
{
|
|
||||||
"type": "I am ",
|
|
||||||
"name": "example",
|
|
||||||
"icon": "https://c.tenor.com/o656qFKDzeUAAAAC/rick-astley-never-gonna-give-you-up.gif",
|
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"searchBar": true,
|
|
||||||
"searchUrl": "https://www.google.com/search?q=",
|
|
||||||
"enabledModules": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"true": ""
|
|
||||||
}
|
|
||||||
@@ -79,6 +79,7 @@ export default function TryConfig(props: any) {
|
|||||||
label="Config loader"
|
label="Config loader"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
loadConfig(e ?? 'default');
|
loadConfig(e ?? 'default');
|
||||||
|
setCookies('config-name', e ?? 'default', { maxAge: 60 * 60 * 24 * 30 });
|
||||||
}}
|
}}
|
||||||
data={
|
data={
|
||||||
// If config list is empty, return the current config
|
// If config list is empty, return the current config
|
||||||
|
|||||||
Reference in New Issue
Block a user