2020-06-09 21:00:36 +03:00
|
|
|
const constructFilesTreeForNavigation = (library) => {
|
|
|
|
for (let i = 0; i < library.length; i++) {
|
|
|
|
for (let j = 0; j < library[i].children.length; j++) {
|
|
|
|
let e = library[i].children[j];
|
2020-06-19 06:57:57 +03:00
|
|
|
if (e.decorator === "FILE") {
|
2020-07-16 04:36:29 +03:00
|
|
|
library[i].children[j].pageTitle = "Viewing file";
|
2020-06-09 21:00:36 +03:00
|
|
|
library[i].children[j].ignore = true;
|
2020-04-09 00:29:13 +03:00
|
|
|
}
|
|
|
|
}
|
2020-06-09 21:00:36 +03:00
|
|
|
}
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-06-09 21:00:36 +03:00
|
|
|
return library;
|
2020-04-09 00:29:13 +03:00
|
|
|
};
|
|
|
|
|
2020-07-02 13:54:33 +03:00
|
|
|
export const generate = (library) => [
|
2020-04-09 00:29:13 +03:00
|
|
|
{
|
|
|
|
id: 1,
|
2020-06-19 06:57:57 +03:00
|
|
|
name: "Home",
|
2020-07-16 04:36:29 +03:00
|
|
|
pageTitle: "Welcome back!",
|
2020-06-19 06:57:57 +03:00
|
|
|
decorator: "HOME",
|
2020-04-09 00:29:13 +03:00
|
|
|
children: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
2020-06-19 06:57:57 +03:00
|
|
|
name: "Wallet",
|
2020-07-16 04:36:29 +03:00
|
|
|
pageTitle: "Your wallet and addresses",
|
2020-06-19 06:57:57 +03:00
|
|
|
decorator: "WALLET",
|
2020-04-09 00:29:13 +03:00
|
|
|
},
|
2020-06-09 21:00:36 +03:00
|
|
|
...constructFilesTreeForNavigation(library),
|
2020-07-16 04:36:29 +03:00
|
|
|
{
|
|
|
|
id: 3,
|
|
|
|
name: "Slates",
|
|
|
|
pageTitle: "Your slates",
|
|
|
|
decorator: "SLATES",
|
|
|
|
children: [],
|
|
|
|
},
|
2020-04-09 00:29:13 +03:00
|
|
|
{
|
|
|
|
id: 13,
|
2020-06-19 06:57:57 +03:00
|
|
|
name: "Edit account",
|
|
|
|
pageTitle: "your account",
|
|
|
|
decorator: "EDIT_ACCOUNT",
|
2020-04-09 00:29:13 +03:00
|
|
|
children: null,
|
|
|
|
ignore: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 14,
|
2020-07-16 04:36:29 +03:00
|
|
|
name: "Filecoin Settings",
|
|
|
|
pageTitle: "Your hot and cold deal settings.",
|
2020-06-19 06:57:57 +03:00
|
|
|
decorator: "SETTINGS",
|
2020-04-09 00:29:13 +03:00
|
|
|
children: null,
|
|
|
|
ignore: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 15,
|
|
|
|
name: null,
|
2020-06-19 06:57:57 +03:00
|
|
|
pageTitle: "files",
|
|
|
|
decorator: "FILE",
|
2020-04-09 00:29:13 +03:00
|
|
|
children: null,
|
|
|
|
ignore: true,
|
|
|
|
},
|
2020-07-16 04:36:29 +03:00
|
|
|
{
|
|
|
|
id: 16,
|
|
|
|
name: "API Key & Tokens",
|
|
|
|
pageTitle: "you",
|
|
|
|
decorator: "SETTINGS_DEVELOPER",
|
|
|
|
children: null,
|
|
|
|
ignore: true,
|
|
|
|
},
|
2020-04-09 00:29:13 +03:00
|
|
|
];
|