From 2f5d1212844a5b3161482f64c0f31e834061a7f1 Mon Sep 17 00:00:00 2001 From: Ro Date: Fri, 1 Mar 2019 21:51:35 -0500 Subject: [PATCH] fixed new routing issue with post listing --- brain/routes/back/dash_posts.js | 2 +- themes/dash/assets/js/dash.min.js | 2 +- themes/dash/partials/front.pug | 2 +- themes/dash/posts-index.pug | 16 ++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/brain/routes/back/dash_posts.js b/brain/routes/back/dash_posts.js index 5a564a9..29bc8cf 100644 --- a/brain/routes/back/dash_posts.js +++ b/brain/routes/back/dash_posts.js @@ -11,7 +11,7 @@ const dateUtils = new DateUtils(); //-------------------------- // POSTS //-------------------------- -router.get('/:filter?/:page?', function(req, res) { +router.get('/list/:filter?/:page?', function(req, res) { var pageNum = req.params.page; var filter = req.params.filter; if (pageNum == '' || pageNum == null) pageNum = 1; diff --git a/themes/dash/assets/js/dash.min.js b/themes/dash/assets/js/dash.min.js index 8599fb7..78c31f4 100644 --- a/themes/dash/assets/js/dash.min.js +++ b/themes/dash/assets/js/dash.min.js @@ -9020,7 +9020,7 @@ var parent = module.bundle.parent; if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') { var hostname = "" || location.hostname; var protocol = location.protocol === 'https:' ? 'wss' : 'ws'; - var ws = new WebSocket(protocol + '://' + hostname + ':' + "55655" + '/'); + var ws = new WebSocket(protocol + '://' + hostname + ':' + "56361" + '/'); ws.onmessage = function (event) { var data = JSON.parse(event.data); diff --git a/themes/dash/partials/front.pug b/themes/dash/partials/front.pug index 3d2bdd6..3fd535b 100644 --- a/themes/dash/partials/front.pug +++ b/themes/dash/partials/front.pug @@ -3,7 +3,7 @@ .recent-header h3 Recent .index-menu - a(href='/@/dashboard/posts') View Posts + a(href='/@/dashboard/posts/list') View Posts | . a(href='/@/dashboard/posts/add/new') Create Post br diff --git a/themes/dash/posts-index.pug b/themes/dash/posts-index.pug index 946fe2b..37f40c1 100644 --- a/themes/dash/posts-index.pug +++ b/themes/dash/posts-index.pug @@ -4,19 +4,19 @@ block main-content #post-index-wrapper #post-index-menu - if(postFilter=='all') - a.current-filter(href="/@/dashboard/posts/all")= "All Posts ("+page_info.all+")" + a.current-filter(href="/@/dashboard/posts/list/all")= "All Posts ("+page_info.all+")" - else - a(href="/@/dashboard/posts/all")= "All Posts ("+page_info.all+")" + a(href="/@/dashboard/posts/list/all")= "All Posts ("+page_info.all+")" | . - if(postFilter=='published') - a.current-filter(href="/@/dashboard/posts/published")= "Published ("+page_info.published+")" + a.current-filter(href="/@/dashboard/posts/list/published")= "Published ("+page_info.published+")" - else - a(href="/@/dashboard/posts/published")= "Published ("+page_info.published+")" + a(href="/@/dashboard/posts/list/published")= "Published ("+page_info.published+")" | . - if(postFilter=='deleted') - a.current-filter(href="/@/dashboard/posts/deleted")= "Deleted ("+page_info.deleted+")" + a.current-filter(href="/@/dashboard/posts/list/deleted")= "Deleted ("+page_info.deleted+")" - else - a(href="/@/dashboard/posts/deleted")= "Deleted ("+page_info.deleted+")" + a(href="/@/dashboard/posts/list/deleted")= "Deleted ("+page_info.deleted+")" a.add-new-post(href="/@/dashboard/posts/add/new") + Create New Post #posts-list @@ -34,13 +34,13 @@ block main-content - if(prev <= 0) prev = page_count br - a.page-btns(href="/@/dashboard/posts/"+postFilter+"/"+prev) + a.page-btns(href="/@/dashboard/posts/list/"+postFilter+"/"+prev) svg(viewBox="0 0 20 20" class="icons") use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-left') span.paginate= "PAGE "+page_index+" OF "+page_count - a.page-btns(href="/@/dashboard/posts/"+postFilter+"/"+next) + a.page-btns(href="/@/dashboard/posts/list/"+postFilter+"/"+next) svg(viewBox="0 0 20 20" class="icons") use(xlink:href='/dash/assets/images/sprite.svg#entypo-chevron-right')