update nav links

This commit is contained in:
Sean Yesmunt 2018-05-21 22:07:53 -04:00
parent 30c18725d8
commit 487570a3a7
2 changed files with 36 additions and 34 deletions

33
dist/bundle.js vendored
View file

@ -3014,11 +3014,11 @@ var selectPageTitle = exports.selectPageTitle = (0, _reselect.createSelector)(se
var selectNavLinks = exports.selectNavLinks = (0, _reselect.createSelector)(selectCurrentPage, selectHistoryStack, function (currentPage, historyStack) {
var isWalletPage = function isWalletPage(page) {
return page === 'wallet' || page === 'send' || page === 'getcredits' || page === 'rewards' || page === 'history' || page === 'invite';
return page === 'wallet' || page === 'send' || page === 'getcredits' || page === 'rewards' || page === 'history' || page === 'invite' || page === 'backup';
};
var isMyLbryPage = function isMyLbryPage(page) {
return page === 'downloaded' || page === 'published' || page === 'settings';
return page === 'downloaded' || page === 'published';
};
var previousStack = historyStack.slice().reverse();
@ -3061,6 +3061,10 @@ var selectNavLinks = exports.selectNavLinks = (0, _reselect.createSelector)(sele
label: 'Send & Recieve',
path: '/send',
active: currentPage === 'send'
}, {
label: 'Transactions',
path: '/history',
active: currentPage === 'history'
}, {
label: 'Get Credits',
path: '/getcredits',
@ -3074,9 +3078,9 @@ var selectNavLinks = exports.selectNavLinks = (0, _reselect.createSelector)(sele
path: '/invite',
active: currentPage === 'invite'
}, {
label: 'Transactions',
path: '/history',
active: currentPage === 'history'
label: 'Backup',
path: '/backup',
active: currentPage === 'backup'
}];
var myLbrySubLinks = [{
@ -3087,14 +3091,6 @@ var selectNavLinks = exports.selectNavLinks = (0, _reselect.createSelector)(sele
label: 'Publishes',
path: '/published',
active: currentPage === 'published'
}, {
label: 'Settings',
path: '/settings',
active: currentPage === 'settings'
}, {
label: 'Backup',
path: '/backup',
active: currentPage === 'backup'
}];
var navLinks = {
@ -3117,7 +3113,7 @@ var selectNavLinks = exports.selectNavLinks = (0, _reselect.createSelector)(sele
active: isWalletPage(currentPage)
}, {
label: 'My LBRY',
icon: 'Settings',
icon: 'Folder',
subLinks: myLbrySubLinks,
path: isCurrentlyMyLbryPage ? '/downloaded' : getActiveSublink('myLbry'),
active: isMyLbryPage(currentPage)
@ -3126,11 +3122,16 @@ var selectNavLinks = exports.selectNavLinks = (0, _reselect.createSelector)(sele
icon: 'UploadCloud',
path: '/publish',
active: currentPage === 'publish'
}, {
label: 'Settings',
icon: 'Settings',
path: '/settings',
active: currentPage === 'settings'
}, {
label: 'Help',
path: '/help',
active: currentPage === 'help',
icon: 'HelpCircle'
icon: 'HelpCircle',
active: currentPage === 'help'
}]
};

View file

@ -59,10 +59,10 @@ export const selectNavLinks = createSelector(
page === 'getcredits' ||
page === 'rewards' ||
page === 'history' ||
page === 'invite';
page === 'invite' ||
page === 'backup';
const isMyLbryPage = page =>
page === 'downloaded' || page === 'published' || page === 'settings';
const isMyLbryPage = page => page === 'downloaded' || page === 'published';
const previousStack = historyStack.slice().reverse();
@ -107,6 +107,11 @@ export const selectNavLinks = createSelector(
path: '/send',
active: currentPage === 'send',
},
{
label: 'Transactions',
path: '/history',
active: currentPage === 'history',
},
{
label: 'Get Credits',
path: '/getcredits',
@ -123,9 +128,9 @@ export const selectNavLinks = createSelector(
active: currentPage === 'invite',
},
{
label: 'Transactions',
path: '/history',
active: currentPage === 'history',
label: 'Backup',
path: '/backup',
active: currentPage === 'backup',
},
];
@ -140,16 +145,6 @@ export const selectNavLinks = createSelector(
path: '/published',
active: currentPage === 'published',
},
{
label: 'Settings',
path: '/settings',
active: currentPage === 'settings',
},
{
label: 'Backup',
path: '/backup',
active: currentPage === 'backup',
},
];
const navLinks = {
@ -177,7 +172,7 @@ export const selectNavLinks = createSelector(
},
{
label: 'My LBRY',
icon: 'Settings',
icon: 'Folder',
subLinks: myLbrySubLinks,
path: isCurrentlyMyLbryPage ? '/downloaded' : getActiveSublink('myLbry'),
active: isMyLbryPage(currentPage),
@ -188,11 +183,17 @@ export const selectNavLinks = createSelector(
path: '/publish',
active: currentPage === 'publish',
},
{
label: 'Settings',
icon: 'Settings',
path: '/settings',
active: currentPage === 'settings',
},
{
label: 'Help',
path: '/help',
active: currentPage === 'help',
icon: 'HelpCircle',
active: currentPage === 'help',
},
],
};