Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sample
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周韬
node-sample
Commits
84b66b17
Commit
84b66b17
authored
Mar 09, 2023
by
Anthony Fu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: fix lint
parent
72f9316b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
8 deletions
+9
-8
LoadSpinner.vue
components/LoadSpinner.vue
+0
-0
LoadingWrapper.vue
components/LoadingWrapper.vue
+1
-1
PostComment.vue
components/PostComment.vue
+1
-1
PostItem.vue
components/PostItem.vue
+0
-0
store.ts
composables/store.ts
+1
-0
[page].vue
pages/[feed]/[page].vue
+2
-2
[id].vue
pages/item/[id].vue
+2
-2
[id].vue
pages/user/[id].vue
+2
-2
No files found.
components/Spinner.vue
→
components/
Load
Spinner.vue
View file @
84b66b17
File moved
components/LoadingWrapper.vue
View file @
84b66b17
...
...
@@ -6,7 +6,7 @@ defineProps<{
<
template
>
<div
v-if=
"loading"
style=
"text-align:center"
>
<Spinner
/>
<
Load
Spinner
/>
</div>
<slot
v-else
/>
</
template
>
components/Comment.vue
→
components/
Post
Comment.vue
View file @
84b66b17
...
...
@@ -29,7 +29,7 @@ function pluralize (n: number) {
</a>
</div>
<ul
v-show=
"open"
class=
"comment-children"
>
<
c
omment
v-for=
"childComment in comment.comments"
:key=
"childComment.id"
:comment=
"childComment"
/>
<
PostC
omment
v-for=
"childComment in comment.comments"
:key=
"childComment.id"
:comment=
"childComment"
/>
</ul>
</li>
</
template
>
...
...
components/Item.vue
→
components/
Post
Item.vue
View file @
84b66b17
File moved
composables/store.ts
View file @
84b66b17
...
...
@@ -115,6 +115,7 @@ export async function reactiveLoad<T> (
data
.
value
=
fetched
}
}
catch
(
e
)
{
// eslint-disable-next-line no-console
console
.
error
(
e
)
data
.
value
=
undefined
}
finally
{
...
...
pages/[feed]/[page].vue
View file @
84b66b17
...
...
@@ -63,10 +63,10 @@ watch(page, (to, old) => pageChanged(to, old))
<ItemListNav
:feed=
"feed"
:page=
"page"
:max-page=
"maxPage"
/>
<div
:key=
"displayedPage"
class=
"news-list"
>
<Spinner
v-if=
"loading"
/>
<
Load
Spinner
v-if=
"loading"
/>
<template
v-else
>
<ul>
<Item
v-for=
"item in items"
:key=
"item.id"
:item=
"item"
/>
<
Post
Item
v-for=
"item in items"
:key=
"item.id"
:item=
"item"
/>
</ul>
<ItemListNav
:feed=
"feed"
:page=
"page"
:max-page=
"maxPage"
/>
</
template
>
...
...
pages/item/[id].vue
View file @
84b66b17
...
...
@@ -15,7 +15,7 @@ useHead({
<
template
>
<div
class=
"item-view view"
>
<div
v-if=
"!item"
class=
"item-view-header"
>
<div
v-if=
"!item
?.url
"
class=
"item-view-header"
>
<h1>
Page not found
</h1>
</div>
<template
v-else
>
...
...
@@ -41,7 +41,7 @@ useHead({
{{ comments ? comments.length + ' comments' : 'No comments yet.' }}
</p>
<ul
class=
"comment-children"
>
<Comment
v-for=
"comment in comments"
:key=
"comment.id"
:comment=
"comment"
/>
<
Post
Comment
v-for=
"comment in comments"
:key=
"comment.id"
:comment=
"comment"
/>
</ul>
</LoadingWrapper>
</div>
...
...
pages/user/[id].vue
View file @
84b66b17
...
...
@@ -18,12 +18,12 @@ useHead({
<
template
>
<div
class=
"user-view view"
>
<Spinner
v-if=
"loading"
/>
<
Load
Spinner
v-if=
"loading"
/>
<template
v-else-if=
"user"
>
<h1>
User:
{{
user
.
id
}}
</h1>
<ul
class=
"meta"
>
<li>
<span
class=
"label"
>
Created:
</span>
{{
timeAgo
(
user
.
created_time
)
}}
ago
<span
class=
"label"
>
Created:
</span>
{{
timeAgo
(
new
Date
(
user
.
created_time
)
)
}}
ago
</li>
<li>
<span
class=
"label"
>
Karma:
</span>
{{
user
.
karma
||
'-'
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment