Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
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
Vũ Hoàng Anh
canifa_note
Commits
b3b4aa9d
Commit
b3b4aa9d
authored
Jul 24, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove unused code
parent
c5900b35
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
58 deletions
+0
-58
acl_config.go
server/router/api/v1/acl_config.go
+0
-1
UsersSection.tsx
web/src/components/ExploreSidebar/UsersSection.tsx
+0
-44
UserProfile.tsx
web/src/pages/UserProfile.tsx
+0
-5
vite.config.ts
web/vite.config.ts
+0
-8
No files found.
server/router/api/v1/acl_config.go
View file @
b3b4aa9d
...
@@ -18,7 +18,6 @@ var authenticationAllowlistMethods = map[string]bool{
...
@@ -18,7 +18,6 @@ var authenticationAllowlistMethods = map[string]bool{
"/memos.api.v1.MemoService/GetMemoByUid"
:
true
,
"/memos.api.v1.MemoService/GetMemoByUid"
:
true
,
"/memos.api.v1.MemoService/ListMemos"
:
true
,
"/memos.api.v1.MemoService/ListMemos"
:
true
,
"/memos.api.v1.MemoService/ListMemoTags"
:
true
,
"/memos.api.v1.MemoService/ListMemoTags"
:
true
,
"/memos.api.v1.MemoService/SearchMemos"
:
true
,
"/memos.api.v1.MarkdownService/GetLinkMetadata"
:
true
,
"/memos.api.v1.MarkdownService/GetLinkMetadata"
:
true
,
"/memos.api.v1.ResourceService/GetResourceBinary"
:
true
,
"/memos.api.v1.ResourceService/GetResourceBinary"
:
true
,
"/memos.api.v1.ResourceService/GetResourceByUid"
:
true
,
"/memos.api.v1.ResourceService/GetResourceByUid"
:
true
,
...
...
web/src/components/ExploreSidebar/UsersSection.tsx
deleted
100644 → 0
View file @
c5900b35
import
{
useEffect
,
useState
}
from
"react"
;
import
{
Link
}
from
"react-router-dom"
;
import
{
useUserStore
}
from
"@/store/v1"
;
import
{
User
}
from
"@/types/proto/api/v1/user_service"
;
import
Icon
from
"../Icon"
;
import
UserAvatar
from
"../UserAvatar"
;
const
UsersSection
=
()
=>
{
const
userStore
=
useUserStore
();
const
[
users
,
setUsers
]
=
useState
<
User
[]
>
([]);
const
fetchRecommendUsers
=
async
()
=>
{
const
users
=
await
userStore
.
searchUsers
(
`random == true && limit == 5`
);
setUsers
(
users
);
};
useEffect
(()
=>
{
fetchRecommendUsers
();
},
[]);
return
(
users
.
length
>
0
&&
(
<
div
className=
"w-full border mt-2 flex flex-col p-2 bg-gray-50 dark:bg-zinc-900 dark:border-zinc-800 rounded-lg"
>
<
div
className=
"w-full mb-1 flex flex-row justify-between items-center px-1"
>
<
span
className=
"text-gray-400 font-medium text-sm select-none"
>
Users
</
span
>
<
Icon
.
RefreshCcw
onClick=
{
fetchRecommendUsers
}
className=
"text-gray-400 w-4 h-auto cursor-pointer hover:opacity-80"
/>
</
div
>
{
users
.
map
((
user
)
=>
(
<
div
key=
{
user
.
name
}
className=
"w-full flex flex-row justify-start items-center px-2 py-1.5 hover:bg-gray-100 dark:hover:bg-zinc-800 rounded-lg"
>
<
Link
className=
"w-full flex flex-row items-center"
to=
{
`/u/${encodeURIComponent(user.username)}`
}
unstable_viewTransition
>
<
UserAvatar
className=
"!w-6 !h-6 !rounded-lg mr-2 shrink-0"
avatarUrl=
{
user
.
avatarUrl
}
/>
<
span
className=
"text-gray-600 truncate dark:text-gray-400"
>
{
user
.
nickname
||
user
.
username
}
</
span
>
</
Link
>
</
div
>
))
}
</
div
>
)
);
};
export
default
UsersSection
;
web/src/pages/UserProfile.tsx
View file @
b3b4aa9d
...
@@ -105,11 +105,6 @@ const UserProfile = () => {
...
@@ -105,11 +105,6 @@ const UserProfile = () => {
(
user
?
(
(
user
?
(
<>
<>
<
div
className=
"my-4 w-full flex justify-end items-center gap-2"
>
<
div
className=
"my-4 w-full flex justify-end items-center gap-2"
>
<
a
className=
""
href=
{
`/u/${encodeURIComponent(user?.username)}/rss.xml`
}
target=
"_blank"
rel=
"noopener noreferrer"
>
<
Button
color=
"neutral"
variant=
"outlined"
endDecorator=
{
<
Icon
.
Rss
className=
"w-4 h-auto opacity-60"
/>
}
>
RSS
</
Button
>
</
a
>
<
Button
<
Button
color=
"neutral"
color=
"neutral"
variant=
"outlined"
variant=
"outlined"
...
...
web/vite.config.ts
View file @
b3b4aa9d
...
@@ -27,14 +27,6 @@ export default defineConfig({
...
@@ -27,14 +27,6 @@ export default defineConfig({
target
:
devProxyServer
,
target
:
devProxyServer
,
xfwd
:
true
,
xfwd
:
true
,
},
},
"^/u/.+/rss.xml"
:
{
target
:
devProxyServer
,
xfwd
:
true
,
},
"^/explore/rss.xml"
:
{
target
:
devProxyServer
,
xfwd
:
true
,
},
},
},
},
},
resolve
:
{
resolve
:
{
...
...
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