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 @@
{{ advice.username }}
- {{ advice.created_at }} + {{ advice.createdAt }}
{{ advice.comment }}
diff --git a/www/views/bookmark-info.html b/www/views/bookmark-info.html index 5d28c51..4a5c915 100644 --- a/www/views/bookmark-info.html +++ b/www/views/bookmark-info.html @@ -18,7 +18,7 @@
创建日期: - {{bookmark.created_at}} + {{bookmark.createdAt}}
最后点击: diff --git a/www/views/bookmarks.html b/www/views/bookmarks.html index cdba54e..48a3ff2 100644 --- a/www/views/bookmarks.html +++ b/www/views/bookmarks.html @@ -1,3 +1,5 @@ -
- 正在开发中... +
+ +
正在开发中...
+
diff --git a/www/views/note.html b/www/views/note.html index 9a15d10..73c5dfc 100644 --- a/www/views/note.html +++ b/www/views/note.html @@ -37,16 +37,16 @@
-
{{ note.tagName || "未分类" }}
+
{{ note.tagName || "未分类" }}
- + 添加 diff --git a/www/views/tags.html b/www/views/tags.html index 59a8ca4..5db0370 100644 --- a/www/views/tags.html +++ b/www/views/tags.html @@ -78,7 +78,7 @@ {{ bookmark.click_count }} - + diff --git a/www/views/weixin-article.html b/www/views/weixin-article.html index 085d85b..65b8f07 100644 --- a/www/views/weixin-article.html +++ b/www/views/weixin-article.html @@ -42,7 +42,7 @@    {{bookmark.account}}        - {{bookmark.created_at}} + {{bookmark.createdAt}}