diff --git a/www/images/developing.png b/www/images/developing.png new file mode 100644 index 0000000..f52ca91 Binary files /dev/null and b/www/images/developing.png differ diff --git a/www/scripts/controllers/note-controller.js b/www/scripts/controllers/note-controller.js index 0b5d133..64b2d71 100644 --- a/www/scripts/controllers/note-controller.js +++ b/www/scripts/controllers/note-controller.js @@ -195,7 +195,7 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind if (note.id == $scope.currentNoteId) { note.content = $scope.content; note.tagName = tagName; - note.tag_id = $scope.currentTagId; + note.tagId = $scope.currentTagId; toPos(note.id); } }) @@ -292,7 +292,7 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind var key = event.key.toUpperCase(); if ($scope.hoverNote && dataService.keyShortcuts()) { if (key == 'E') { - $scope.editNote($scope.hoverNote.id, $scope.hoverNote.content, $scope.hoverNote.tag_id) + $scope.editNote($scope.hoverNote.id, $scope.hoverNote.content, $scope.hoverNote.tagId) } else if (key == 'I') { $scope.detailNote($scope.hoverNote.content) } else if (key == 'D') { @@ -304,7 +304,6 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind }) }); - let count = 1; async function getNotes(tagId) { $scope.notes = []; $scope.loading = true; @@ -314,7 +313,6 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind keyword: $scope.keyword, tagId: tagId || $scope.currentTagId }; - // if (count++ % 2) return; let reply = await get("notes", params); $timeout(function () { @@ -325,14 +323,14 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind note.brief = note.brief.replace(/\n/g, ""); } note.brief = " " + note.brief.substring(0, 200) + (note.content.length > 200 ? " ......" : ""); + let tag = $scope.tags.find(tag => tag.id == note.tagId); + tag && (note.tagName = tag.name); }) $scope.notes = notes; $scope.totalPages = reply.totalPages; $scope.totalItems = reply.count; - timeagoInstance.cancel(); - timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN'); // 如果需要增加书签 if ($scope.key == 'A') { $scope.key = null; @@ -343,6 +341,11 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind $(".js-note").removeClass("hidden"); } }) + + $timeout(() => { + timeagoInstance.cancel(); + timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN'); + }, 50); } async function updateTags(_tags) { diff --git a/www/scripts/controllers/weixin-article-controller.js b/www/scripts/controllers/weixin-article-controller.js index 4ae112c..5f89a43 100644 --- a/www/scripts/controllers/weixin-article-controller.js +++ b/www/scripts/controllers/weixin-article-controller.js @@ -225,8 +225,8 @@ app.controller('weixinArticleCtr', ['$scope', '$state', '$sce', '$filter', '$win } } b.favCount = bookmark.favCount; - b.created_at = $filter('date')(new Date(bookmark.createtime < bookmark.updatetime ? bookmark.createtime : bookmark.updatetime), "yyyy-MM-dd HH:mm:ss"); - b.last_click = $filter('date')(new Date(bookmark.createtime > bookmark.updatetime ? bookmark.createtime : bookmark.updatetime), "yyyy-MM-dd HH:mm:ss"); + b.createdAt = $filter('date')(new Date(bookmark.createtime < bookmark.updatetime ? bookmark.createtime : bookmark.updatetime), "yyyy-MM-dd HH:mm:ss"); + b.lastClick = $filter('date')(new Date(bookmark.createtime > bookmark.updatetime ? bookmark.createtime : bookmark.updatetime), "yyyy-MM-dd HH:mm:ss"); b.id = bookmark.articleId; b.index = $scope.bookmarks.length - 1; $scope.bookmarks.push(b); diff --git a/www/views/advice.html b/www/views/advice.html index d3a0ef6..fc6daf8 100644 --- a/www/views/advice.html +++ b/www/views/advice.html @@ -21,7 +21,7 @@
+