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
f48d9153
Unverified
Commit
f48d9153
authored
Apr 05, 2023
by
boojack
Committed by
GitHub
Apr 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update locale file structure (#1478)
parent
cc23f69f
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
138 additions
and
249 deletions
+138
-249
ArchivedMemo.tsx
web/src/components/ArchivedMemo.tsx
+1
-1
ArchivedMemoDialog.tsx
web/src/components/ArchivedMemoDialog.tsx
+3
-3
ChangeMemberPasswordDialog.tsx
web/src/components/ChangeMemberPasswordDialog.tsx
+4
-4
ChangePasswordDialog.tsx
web/src/components/ChangePasswordDialog.tsx
+4
-4
CreateResourceDialog.tsx
web/src/components/CreateResourceDialog.tsx
+10
-10
Header.tsx
web/src/components/Header.tsx
+2
-2
MemoList.tsx
web/src/components/MemoList.tsx
+2
-2
ResourceItemDropdown.tsx
web/src/components/ResourceItemDropdown.tsx
+6
-6
ResourceSearchBar.tsx
web/src/components/ResourceSearchBar.tsx
+1
-1
ResourcesSelectorDialog.tsx
web/src/components/ResourcesSelectorDialog.tsx
+3
-3
SearchBar.tsx
web/src/components/SearchBar.tsx
+1
-1
site.ts
web/src/helpers/site.ts
+1
-0
de.json
web/src/locales/de.json
+1
-5
en.json
web/src/locales/en.json
+64
-98
es.json
web/src/locales/es.json
+1
-5
fr.json
web/src/locales/fr.json
+1
-5
it.json
web/src/locales/it.json
+1
-5
ko.json
web/src/locales/ko.json
+1
-5
nl.json
web/src/locales/nl.json
+1
-5
pl.json
web/src/locales/pl.json
+1
-5
pt_BR.json
web/src/locales/pt_BR.json
+1
-20
ru.json
web/src/locales/ru.json
+1
-5
sl.json
web/src/locales/sl.json
+1
-5
sv.json
web/src/locales/sv.json
+1
-5
tr.json
web/src/locales/tr.json
+1
-5
uk.json
web/src/locales/uk.json
+1
-5
vi.json
web/src/locales/vi.json
+1
-5
zh-Hant.json
web/src/locales/zh-Hant.json
+1
-5
zh.json
web/src/locales/zh.json
+1
-5
Auth.tsx
web/src/pages/Auth.tsx
+2
-1
DailyReview.tsx
web/src/pages/DailyReview.tsx
+2
-2
Explore.tsx
web/src/pages/Explore.tsx
+1
-1
MemoDetail.tsx
web/src/pages/MemoDetail.tsx
+1
-1
NotFound.tsx
web/src/pages/NotFound.tsx
+1
-1
ResourcesDashboard.tsx
web/src/pages/ResourcesDashboard.tsx
+13
-13
No files found.
web/src/components/ArchivedMemo.tsx
View file @
f48d9153
...
...
@@ -54,7 +54,7 @@ const ArchivedMemo: React.FC<Props> = (props: Props) => {
<
div
className=
{
`memo-wrapper archived ${"memos-" + memo.id}`
}
onMouseLeave=
{
handleMouseLeaveMemoWrapper
}
>
<
div
className=
"memo-top-wrapper"
>
<
span
className=
"time-text"
>
{
t
(
"
common
.archived-at"
)
}
{
utils
.
getDateTimeString
(
memo
.
updatedTs
)
}
{
t
(
"
memo
.archived-at"
)
}
{
utils
.
getDateTimeString
(
memo
.
updatedTs
)
}
</
span
>
<
div
className=
"btns-container"
>
<
span
className=
"btn-text"
onClick=
{
handleRestoreMemoClick
}
>
...
...
web/src/components/ArchivedMemoDialog.tsx
View file @
f48d9153
...
...
@@ -36,7 +36,7 @@ const ArchivedMemoDialog: React.FC<Props> = (props: Props) => {
return
(
<>
<
div
className=
"dialog-header-container"
>
<
p
className=
"title-text"
>
{
t
(
"
archived
.archived-memos"
)
}
</
p
>
<
p
className=
"title-text"
>
{
t
(
"
memo
.archived-memos"
)
}
</
p
>
<
button
className=
"btn close-btn"
onClick=
{
destroy
}
>
<
Icon
.
X
className=
"icon-img"
/>
</
button
>
...
...
@@ -44,11 +44,11 @@ const ArchivedMemoDialog: React.FC<Props> = (props: Props) => {
<
div
className=
"dialog-content-container"
>
{
loadingState
.
isLoading
?
(
<
div
className=
"tip-text-container"
>
<
p
className=
"tip-text"
>
{
t
(
"
archived
.fetching-data"
)
}
</
p
>
<
p
className=
"tip-text"
>
{
t
(
"
memo
.fetching-data"
)
}
</
p
>
</
div
>
)
:
archivedMemos
.
length
===
0
?
(
<
div
className=
"tip-text-container"
>
<
p
className=
"tip-text"
>
{
t
(
"
archived
.no-archived-memos"
)
}
</
p
>
<
p
className=
"tip-text"
>
{
t
(
"
memo
.no-archived-memos"
)
}
</
p
>
</
div
>
)
:
(
<
div
className=
"archived-memos-container"
>
...
...
web/src/components/ChangeMemberPasswordDialog.tsx
View file @
f48d9153
...
...
@@ -70,19 +70,19 @@ const ChangeMemberPasswordDialog: React.FC<Props> = (props: Props) => {
</
button
>
</
div
>
<
div
className=
"dialog-content-container"
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"
common
.new-password"
)
}
</
p
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"
auth
.new-password"
)
}
</
p
>
<
input
type=
"password"
className=
"input-text"
placeholder=
{
t
(
"
common
.repeat-new-password"
)
}
placeholder=
{
t
(
"
auth
.repeat-new-password"
)
}
value=
{
newPassword
}
onChange=
{
handleNewPasswordChanged
}
/>
<
p
className=
"text-sm mb-1 mt-2"
>
{
t
(
"
common
.repeat-new-password"
)
}
</
p
>
<
p
className=
"text-sm mb-1 mt-2"
>
{
t
(
"
auth
.repeat-new-password"
)
}
</
p
>
<
input
type=
"password"
className=
"input-text"
placeholder=
{
t
(
"
common
.repeat-new-password"
)
}
placeholder=
{
t
(
"
auth
.repeat-new-password"
)
}
value=
{
newPasswordAgain
}
onChange=
{
handleNewPasswordAgainChanged
}
/>
...
...
web/src/components/ChangePasswordDialog.tsx
View file @
f48d9153
...
...
@@ -66,21 +66,21 @@ const ChangePasswordDialog: React.FC<Props> = ({ destroy }: Props) => {
</
button
>
</
div
>
<
div
className=
"dialog-content-container"
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"
common
.new-password"
)
}
</
p
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"
auth
.new-password"
)
}
</
p
>
<
input
type=
"password"
autoComplete=
"new-password"
className=
"input-text"
placeholder=
{
t
(
"
common
.repeat-new-password"
)
}
placeholder=
{
t
(
"
auth
.repeat-new-password"
)
}
value=
{
newPassword
}
onChange=
{
handleNewPasswordChanged
}
/>
<
p
className=
"text-sm mb-1 mt-2"
>
{
t
(
"
common
.repeat-new-password"
)
}
</
p
>
<
p
className=
"text-sm mb-1 mt-2"
>
{
t
(
"
auth
.repeat-new-password"
)
}
</
p
>
<
input
type=
"password"
autoComplete=
"new-password"
className=
"input-text"
placeholder=
{
t
(
"
common
.repeat-new-password"
)
}
placeholder=
{
t
(
"
auth
.repeat-new-password"
)
}
value=
{
newPasswordAgain
}
onChange=
{
handleNewPasswordAgainChanged
}
/>
...
...
web/src/components/CreateResourceDialog.tsx
View file @
f48d9153
...
...
@@ -146,14 +146,14 @@ const CreateResourceDialog: React.FC<Props> = (props: Props) => {
return
(
<>
<
div
className=
"dialog-header-container"
>
<
p
className=
"title-text"
>
{
t
(
"resource
s
.create-dialog.title"
)
}
</
p
>
<
p
className=
"title-text"
>
{
t
(
"resource.create-dialog.title"
)
}
</
p
>
<
button
className=
"btn close-btn"
onClick=
{
handleCloseDialog
}
>
<
Icon
.
X
/>
</
button
>
</
div
>
<
div
className=
"dialog-content-container !w-80"
>
<
Typography
className=
"!mb-1"
level=
"body2"
>
{
t
(
"resource
s
.create-dialog.upload-method"
)
}
{
t
(
"resource.create-dialog.upload-method"
)
}
</
Typography
>
<
Select
className=
"w-full mb-2"
...
...
@@ -161,15 +161,15 @@ const CreateResourceDialog: React.FC<Props> = (props: Props) => {
value=
{
state
.
selectedMode
}
startDecorator=
{
<
Icon
.
File
className=
"w-4 h-auto"
/>
}
>
<
Option
value=
"local-file"
>
{
t
(
"resource
s
.create-dialog.local-file.option"
)
}
</
Option
>
<
Option
value=
"external-link"
>
{
t
(
"resource
s
.create-dialog.external-link.option"
)
}
</
Option
>
<
Option
value=
"local-file"
>
{
t
(
"resource.create-dialog.local-file.option"
)
}
</
Option
>
<
Option
value=
"external-link"
>
{
t
(
"resource.create-dialog.external-link.option"
)
}
</
Option
>
</
Select
>
{
state
.
selectedMode
===
"local-file"
&&
(
<>
<
div
className=
"w-full relative bg-blue-50 dark:bg-zinc-900 rounded-md flex flex-row justify-center items-center py-8"
>
<
label
htmlFor=
"files"
className=
"p-2 px-4 text-sm text-white cursor-pointer bg-blue-500 block rounded hover:opacity-80"
>
{
t
(
"resource
s
.create-dialog.local-file.choose"
)
}
{
t
(
"resource.create-dialog.local-file.choose"
)
}
</
label
>
<
input
className=
"absolute inset-0 w-full h-full opacity-0"
...
...
@@ -196,7 +196,7 @@ const CreateResourceDialog: React.FC<Props> = (props: Props) => {
{
state
.
selectedMode
===
"external-link"
&&
(
<>
<
Typography
className=
"!mb-1"
level=
"body2"
>
{
t
(
"resource
s
.create-dialog.external-link.link"
)
}
{
t
(
"resource.create-dialog.external-link.link"
)
}
</
Typography
>
<
Input
className=
"mb-2"
...
...
@@ -206,22 +206,22 @@ const CreateResourceDialog: React.FC<Props> = (props: Props) => {
fullWidth
/>
<
Typography
className=
"!mb-1"
level=
"body2"
>
{
t
(
"resource
s
.create-dialog.external-link.file-name"
)
}
{
t
(
"resource.create-dialog.external-link.file-name"
)
}
</
Typography
>
<
Input
className=
"mb-2"
placeholder=
{
t
(
"resource
s
.create-dialog.external-link.file-name-placeholder"
)
}
placeholder=
{
t
(
"resource.create-dialog.external-link.file-name-placeholder"
)
}
value=
{
resourceCreate
.
filename
}
onChange=
{
handleFileNameChanged
}
fullWidth
/>
<
Typography
className=
"!mb-1"
level=
"body2"
>
{
t
(
"resource
s
.create-dialog.external-link.type"
)
}
{
t
(
"resource.create-dialog.external-link.type"
)
}
</
Typography
>
<
Autocomplete
className=
"w-full"
size=
"sm"
placeholder=
{
t
(
"resource
s
.create-dialog.external-link.type-placeholder"
)
}
placeholder=
{
t
(
"resource.create-dialog.external-link.type-placeholder"
)
}
freeSolo=
{
true
}
options=
{
fileTypeAutocompleteOptions
}
onChange=
{
(
_
,
value
)
=>
handleFileTypeChanged
(
value
||
""
)
}
...
...
web/src/components/Header.tsx
View file @
f48d9153
...
...
@@ -74,7 +74,7 @@ const Header = () => {
}
>
<>
<
Icon
.
Calendar
className=
"mr-4 w-6 h-auto opacity-80"
/>
{
t
(
"
common.daily-review
"
)
}
<
Icon
.
Calendar
className=
"mr-4 w-6 h-auto opacity-80"
/>
{
t
(
"
daily-review.title
"
)
}
</>
</
NavLink
>
<
NavLink
...
...
@@ -112,7 +112,7 @@ const Header = () => {
className=
"px-4 pr-5 py-2 rounded-lg flex flex-row items-center text-lg dark:text-gray-200 hover:bg-white hover:shadow dark:hover:bg-zinc-700"
onClick=
{
()
=>
showAskAIDialog
()
}
>
<
Icon
.
Bot
className=
"mr-4 w-6 h-auto opacity-80"
/>
{
t
(
"
common.ask-ai
"
)
}
<
Icon
.
Bot
className=
"mr-4 w-6 h-auto opacity-80"
/>
{
t
(
"
ask-ai.title
"
)
}
</
button
>
<
button
id=
"header-archived-memo"
...
...
web/src/components/MemoList.tsx
View file @
f48d9153
...
...
@@ -139,7 +139,7 @@ const MemoList = () => {
))
}
{
isFetching
?
(
<
div
className=
"status-text-container fetching-tip"
>
<
p
className=
"status-text"
>
{
t
(
"memo
-list
.fetching-data"
)
}
</
p
>
<
p
className=
"status-text"
>
{
t
(
"memo.fetching-data"
)
}
</
p
>
</
div
>
)
:
(
<
div
className=
"status-text-container"
>
...
...
@@ -153,7 +153,7 @@ const MemoList = () => {
)
:
(
<>
<
span
className=
"cursor-pointer hover:text-green-600"
onClick=
{
handleFetchMoreClick
}
>
{
t
(
"memo
-list
.fetch-more"
)
}
{
t
(
"memo.fetch-more"
)
}
</
span
>
</>
)
}
...
...
web/src/components/ResourceItemDropdown.tsx
View file @
f48d9153
...
...
@@ -57,13 +57,13 @@ const ResourceItemDropdown = ({ resource }: Props) => {
};
const
handleDeleteResourceBtnClick
=
(
resource
:
Resource
)
=>
{
let
warningText
=
t
(
"resource
s
.warning-text"
);
let
warningText
=
t
(
"resource.warning-text"
);
if
(
resource
.
linkedMemoAmount
>
0
)
{
warningText
=
warningText
+
`\n
${
t
(
"resource
s
.linked-amount"
)}
:
${
resource
.
linkedMemoAmount
}
`
;
warningText
=
warningText
+
`\n
${
t
(
"resource.linked-amount"
)}
:
${
resource
.
linkedMemoAmount
}
`
;
}
showCommonDialog
({
title
:
t
(
"resource
s
.delete-resource"
),
title
:
t
(
"resource.delete-resource"
),
content
:
warningText
,
style
:
"warning"
,
dialogName
:
"delete-resource-dialog"
,
...
...
@@ -83,13 +83,13 @@ const ResourceItemDropdown = ({ resource }: Props) => {
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick=
{
()
=>
handlePreviewBtnClick
(
resource
)
}
>
{
t
(
"
resources
.preview"
)
}
{
t
(
"
common
.preview"
)
}
</
button
>
<
button
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick=
{
()
=>
handleCopyResourceLinkBtnClick
(
resource
)
}
>
{
t
(
"resource
s
.copy-link"
)
}
{
t
(
"resource.copy-link"
)
}
</
button
>
<
button
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
...
...
@@ -101,7 +101,7 @@ const ResourceItemDropdown = ({ resource }: Props) => {
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick=
{
()
=>
handleRenameBtnClick
(
resource
)
}
>
{
t
(
"
resources
.rename"
)
}
{
t
(
"
common
.rename"
)
}
</
button
>
<
button
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded text-red-600 hover:bg-gray-100 dark:hover:bg-zinc-600"
...
...
web/src/components/ResourceSearchBar.tsx
View file @
f48d9153
...
...
@@ -31,7 +31,7 @@ const ResourceSearchBar = ({ setQuery }: ResourceSearchBarProps) => {
<
input
className=
"flex ml-2 w-24 grow text-sm outline-none bg-transparent dark:text-gray-200"
type=
"text"
placeholder=
{
t
(
"resource
s
.search-bar-placeholder"
)
}
placeholder=
{
t
(
"resource.search-bar-placeholder"
)
}
ref=
{
inputRef
}
value=
{
queryText
}
onChange=
{
handleTextQueryInput
}
...
...
web/src/components/ResourcesSelectorDialog.tsx
View file @
f48d9153
...
...
@@ -87,17 +87,17 @@ const ResourcesSelectorDialog: React.FC<Props> = (props: Props) => {
<
div
className=
"dialog-content-container"
>
{
loadingState
.
isLoading
?
(
<
div
className=
"loading-text-container"
>
<
p
className=
"tip-text"
>
{
t
(
"resource
s
.fetching-data"
)
}
</
p
>
<
p
className=
"tip-text"
>
{
t
(
"resource.fetching-data"
)
}
</
p
>
</
div
>
)
:
(
<
div
className=
"resource-table-container"
>
<
div
className=
"fields-container"
>
<
span
className=
"field-text name-text"
>
{
t
(
"
resources
.name"
)
}
</
span
>
<
span
className=
"field-text name-text"
>
{
t
(
"
common
.name"
)
}
</
span
>
<
span
className=
"field-text type-text"
>
Type
</
span
>
<
span
></
span
>
</
div
>
{
resources
.
length
===
0
?
(
<
p
className=
"tip-text"
>
{
t
(
"resource
s
.no-resources"
)
}
</
p
>
<
p
className=
"tip-text"
>
{
t
(
"resource.no-resources"
)
}
</
p
>
)
:
(
resources
.
map
((
resource
,
index
)
=>
(
<
div
key=
{
resource
.
id
}
className=
"resource-container"
>
...
...
web/src/components/SearchBar.tsx
View file @
f48d9153
...
...
@@ -66,7 +66,7 @@ const SearchBar = () => {
<
input
className=
"flex ml-2 w-24 grow text-sm outline-none bg-transparent dark:text-gray-200"
type=
"text"
placeholder=
{
t
(
"
search-bar.input
-placeholder"
)
}
placeholder=
{
t
(
"
memo.search
-placeholder"
)
}
ref=
{
inputRef
}
value=
{
queryText
}
onChange=
{
handleTextQueryInput
}
...
...
web/src/helpers/site.ts
0 → 100644
View file @
f48d9153
export
const
slogan
=
"A lightweight, self-hosted memo hub. Open Source and Free forever."
;
web/src/locales/de.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"avatar"
:
"Avatar"
,
"database"
:
"Database"
},
"slogan"
:
"Eine quelloffene, selbst gehostete Sammlung an Memos zur Wissensverwaltung und Vernetzung."
,
"auth"
:
{
"signup-as-host"
:
"Als Host registrieren"
,
"host-tip"
:
"Du registrierst dich als Host dieser Seite."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Einstellung"
,
"archived"
:
"Archiviert"
},
"daily-review"
:
{
"oops-nothing"
:
"Ups, hier ist nichts."
},
"resources"
:
{
"resource"
:
{
"no-resources"
:
"Keine Ressourcen."
,
"fetching-data"
:
"Lade Daten..."
,
"upload"
:
"Hochladen"
,
...
...
web/src/locales/en.json
View file @
f48d9153
...
...
@@ -4,16 +4,12 @@
"home"
:
"Home"
,
"resources"
:
"Resources"
,
"settings"
:
"Settings"
,
"daily-review"
:
"Daily Review"
,
"ask-ai"
:
"Ask AI"
,
"archived"
:
"Archived"
,
"email"
:
"Email"
,
"password"
:
"Password"
,
"avatar"
:
"Avatar"
,
"username"
:
"Username"
,
"nickname"
:
"Nickname"
,
"new-password"
:
"New password"
,
"repeat-new-password"
:
"Repeat the new password"
,
"save"
:
"Save"
,
"close"
:
"Close"
,
"cancel"
:
"Cancel"
,
...
...
@@ -37,53 +33,76 @@
"sign-in"
:
"Sign in"
,
"sign-up"
:
"Sign up"
,
"sign-out"
:
"Sign out"
,
"back-to-home"
:
"Back to Home"
,
"type"
:
"Type"
,
"shortcuts"
:
"Shortcuts"
,
"title"
:
"Title"
,
"filter"
:
"Filter"
,
"tags"
:
"Tags"
,
"yourself"
:
"Yourself"
,
"archived-at"
:
"Archived at"
,
"changed"
:
"changed"
,
"update-on"
:
"Update on"
,
"fold"
:
"Fold"
,
"expand"
:
"Expand"
,
"image"
:
"Image"
,
"link"
:
"Link"
,
"vacuum"
:
"Vacuum"
,
"select"
:
"Select"
,
"database"
:
"Database"
"database"
:
"Database"
,
"upload"
:
"Upload"
,
"preview"
:
"Preview"
,
"rename"
:
"Rename"
,
"clear"
:
"Clear"
,
"name"
:
"Name"
},
"router"
:
{
"back-to-home"
:
"Back to Home"
},
"slogan"
:
"An open-source, self-hosted memo hub with knowledge management and social networking."
,
"auth"
:
{
"signup-as-host"
:
"Sign up as Host"
,
"host-tip"
:
"You are registering as the Site Host."
,
"not-host-tip"
:
"If you don't have an account, please contact the site host."
"not-host-tip"
:
"If you don't have an account, please contact the site host."
,
"new-password"
:
"New password"
,
"repeat-new-password"
:
"Repeat the new password"
},
"daily-review"
:
{
"oops-nothing"
:
"Oops, there is nothing."
"editor"
:
{
"editing"
:
"Editing..."
,
"cancel-edit"
:
"Cancel edit"
,
"save"
:
"Save"
,
"placeholder"
:
"Any thoughts..."
,
"only-image-supported"
:
"Only image file supported."
,
"cant-empty"
:
"Content can't be empty"
,
"local"
:
"Local"
,
"resources"
:
"Resources"
},
"resources"
:
{
"description"
:
"View your static resources in memos. e.g. images"
,
"memo"
:
{
"view-detail"
:
"View Detail"
,
"copy"
:
"Copy"
,
"embed"
:
"Embed memo"
,
"archived-memos"
:
"Archived Memos"
,
"no-archived-memos"
:
"No archived memos."
,
"fetching-data"
:
"fetching data..."
,
"fetch-more"
:
"Click here to fetch more"
,
"archived-at"
:
"Archived at"
,
"search-placeholder"
:
"Search memos"
,
"visibility"
:
{
"private"
:
"Only visible to you"
,
"protected"
:
"Visible to members"
,
"public"
:
"Everyone can see"
,
"disabled"
:
"Public memos are disabled"
}
},
"resource"
:
{
"no-resources"
:
"No resources."
,
"fetching-data"
:
"fetching data..."
,
"upload"
:
"Upload"
,
"preview"
:
"Preview"
,
"copy-link"
:
"Copy Link"
,
"delete-resource"
:
"Delete Resource"
,
"warning-text"
:
"Are you sure to delete this resource? THIS ACTION IS IRREVERSIBLE❗"
,
"linked-amount"
:
"Linked memo amount"
,
"rename"
:
"Rename"
,
"clear"
:
"Clear"
,
"warning-text-unused"
:
"Are you sure to delete these unused resources? THIS ACTION IS IRREVERSIBLE❗"
,
"no-unused-resources"
:
"No unused resources"
,
"name"
:
"Name"
,
"delete-selected-resources"
:
"Delete Selected Resources"
,
"no-files-selected"
:
"No files selected❗"
,
"upload-successfully"
:
"Upload successfully"
,
"file-drag-drop-prompt"
:
"Drag and drop your file here to upload file"
,
"select"
:
"Select"
,
"search-bar-placeholder"
:
"Search resource"
,
"create-dialog"
:
{
"title"
:
"Create Resource"
,
...
...
@@ -102,36 +121,6 @@
}
}
},
"archived"
:
{
"archived-memos"
:
"Archived Memos"
,
"no-archived-memos"
:
"No archived memos."
,
"fetching-data"
:
"fetching data..."
},
"editor"
:
{
"editing"
:
"Editing..."
,
"cancel-edit"
:
"Cancel edit"
,
"save"
:
"Save"
,
"placeholder"
:
"Any thoughts..."
,
"only-image-supported"
:
"Only image file supported."
,
"cant-empty"
:
"Content can't be empty"
,
"local"
:
"Local"
,
"resources"
:
"Resources"
},
"memo"
:
{
"view-detail"
:
"View Detail"
,
"copy"
:
"Copy"
,
"embed"
:
"Embed memo"
,
"visibility"
:
{
"private"
:
"Only visible to you"
,
"protected"
:
"Visible to members"
,
"public"
:
"Everyone can see"
,
"disabled"
:
"Public memos are disabled"
}
},
"memo-list"
:
{
"fetching-data"
:
"fetching data..."
,
"fetch-more"
:
"Click here to fetch more"
},
"shortcut-list"
:
{
"shortcut-title"
:
"shortcut title"
,
"create-shortcut"
:
"Create Shortcut"
,
...
...
@@ -141,41 +130,14 @@
"title-required"
:
"Title is required"
,
"value-required"
:
"Filter value is required"
},
"filter"
:
{
"new-filter"
:
"New Filter"
,
"type"
:
{
"tag"
:
"Tag"
,
"type"
:
"Type"
,
"text"
:
"Text"
,
"display-time"
:
"Display Time"
,
"visibility"
:
"Visibility"
},
"operator"
:
{
"contains"
:
"Contains"
,
"not-contains"
:
"Does not contain"
,
"is"
:
"Is"
,
"is-not"
:
"Is Not"
,
"before"
:
"Before"
,
"after"
:
"After"
},
"value"
:
{
"not-tagged"
:
"No tags"
,
"linked"
:
"Has links"
,
"has-attachment"
:
"Has attachments"
},
"text-placeholder"
:
"Starts with ^ to use regex"
},
"tag-list"
:
{
"tip-text"
:
"Input `#tag` to create"
,
"create-tag"
:
"Create Tag"
,
"all-tags"
:
"All Tags"
,
"tag-name"
:
"TAG_NAME"
},
"search"
:
{
"quickly-filter"
:
"Quickly filter"
},
"search-bar"
:
{
"input-placeholder"
:
"Search memos"
"daily-review"
:
{
"title"
:
"Daily Review"
},
"setting"
:
{
"my-account"
:
"My Account"
,
...
...
@@ -234,13 +196,29 @@
"dark"
:
"Always dark"
}
},
"amount-text"
:
{
"memo_one"
:
"MEMO"
,
"memo_other"
:
"MEMOS"
,
"tag_one"
:
"TAG"
,
"tag_other"
:
"TAGS"
,
"day_one"
:
"DAY"
,
"day_other"
:
"DAYS"
"filter"
:
{
"new-filter"
:
"New Filter"
,
"type"
:
{
"tag"
:
"Tag"
,
"type"
:
"Type"
,
"text"
:
"Text"
,
"display-time"
:
"Display Time"
,
"visibility"
:
"Visibility"
},
"operator"
:
{
"contains"
:
"Contains"
,
"not-contains"
:
"Does not contain"
,
"is"
:
"Is"
,
"is-not"
:
"Is Not"
,
"before"
:
"Before"
,
"after"
:
"After"
},
"value"
:
{
"not-tagged"
:
"No tags"
,
"linked"
:
"Has links"
,
"has-attachment"
:
"Has attachments"
},
"text-placeholder"
:
"Starts with ^ to use regex"
},
"message"
:
{
"no-memos"
:
"no memos 🌃"
,
...
...
@@ -285,19 +263,12 @@
"page-not-found"
:
"404 - Page Not Found 😥"
},
"days"
:
{
"monday"
:
"Monday"
,
"mon"
:
"Mon"
,
"tuesday"
:
"Tuesday"
,
"tue"
:
"Tue"
,
"wednesday"
:
"Wednesday"
,
"wed"
:
"Wed"
,
"thursday"
:
"Thursday"
,
"thu"
:
"Thu"
,
"friday"
:
"Friday"
,
"fri"
:
"Fri"
,
"saturday"
:
"Saturday"
,
"sat"
:
"Sat"
,
"sunday"
:
"Sunday"
,
"sun"
:
"Sun"
},
"ask-ai"
:
{
...
...
@@ -311,10 +282,5 @@
"text"
:
"Copy and paste the below codes into your blog or website."
,
"only-public-supported"
:
"* Only the public memo supports."
,
"copy"
:
"Copy"
},
"visibility"
:
{
"PUBLIC"
:
"PUBLIC"
,
"PROTECTED"
:
"PROTECTED"
,
"PRIVATE"
:
"PRIVATE"
}
}
web/src/locales/es.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"database"
:
"Base de datos"
,
"avatar"
:
"Avatar"
},
"slogan"
:
"Un código abierto, centro de notas autoalojado con la gestión del conocimiento y la socialización."
,
"auth"
:
{
"signup-as-host"
:
"Registrarse como Anfitrión"
,
"host-tip"
:
"Te estás registrando como Anfitrión del Sitio."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Ajustes"
,
"archived"
:
"Archivado"
},
"daily-review"
:
{
"oops-nothing"
:
"Ups, no hay nada."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Visualiza tus recursos estáticos en notas. p.ej., imágenes"
,
"no-resources"
:
"Sin recursos."
,
"fetching-data"
:
"obteniendo datos..."
,
...
...
web/src/locales/fr.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"avatar"
:
"Avatar"
,
"database"
:
"Database"
},
"slogan"
:
"An open-source, self-hosted memo hub with knowledge management and social networking."
,
"auth"
:
{
"signup-as-host"
:
"S'inscrire en tant qu'hôte"
,
"host-tip"
:
"Vous vous inscrivez en tant qu'hébergeur du site."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Réglage"
,
"archived"
:
"Archivé"
},
"daily-review"
:
{
"oops-nothing"
:
"Oups, il n'y a rien."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Visualisez vos ressources statiques dans des mémos, par exemple des images."
,
"no-resources"
:
"Aucune ressource."
,
"fetching-data"
:
"récupération des données..."
,
...
...
web/src/locales/it.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"avatar"
:
"Avatar"
,
"database"
:
"Database"
},
"slogan"
:
"An open-source, self-hosted memo hub with knowledge management and social networking."
,
"auth"
:
{
"signup-as-host"
:
"Registrati come Host"
,
"host-tip"
:
"Ti stai registrando come Host del sito."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Impostazioni"
,
"archived"
:
"Archiviati"
},
"daily-review"
:
{
"oops-nothing"
:
"Oops, non c'è niente."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Visualizza le tue risorse statiche nei memo. es: immagini"
,
"no-resources"
:
"Nessuna risorsa."
,
"fetching-data"
:
"recupero i dati..."
,
...
...
web/src/locales/ko.json
View file @
f48d9153
...
...
@@ -81,16 +81,12 @@
"tag_one"
:
"TAG"
,
"tag_other"
:
"TAGS"
},
"slogan"
:
"지식 정리와 소셜 네트워킹 기능을 갖춘 자체 호스팅의 오픈 소스 메모 허브입니다."
,
"auth"
:
{
"signup-as-host"
:
"호스트로서 회원등록"
,
"host-tip"
:
"사이트 주인으로서의 계정을 등록합니다."
,
"not-host-tip"
:
"계정이 없다면 사이트 주인에게 문의해 주세요."
},
"daily-review"
:
{
"oops-nothing"
:
"앗, 아무것도 없네요."
},
"resources"
:
{
"resource"
:
{
"clear"
:
"정리"
,
"copy-link"
:
"링크 복사"
,
"delete-resource"
:
"리소스 삭제"
,
...
...
web/src/locales/nl.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"select"
:
"Selecteer"
,
"database"
:
"Database"
},
"slogan"
:
"Een open-source, zelf-beheerd memo applicatie voor kennismanagement en collaboratie."
,
"auth"
:
{
"signup-as-host"
:
"Registreren als Host"
,
"host-tip"
:
"Je registreert je als Site Host."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Instellingen"
,
"archived"
:
"Gearchiveerd"
},
"daily-review"
:
{
"oops-nothing"
:
"Oeps, er is niets."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Bekijk je statische bronnen in memos, zoals foto's."
,
"no-resources"
:
"Geen bronnen."
,
"fetching-data"
:
"data aan het ophalen..."
,
...
...
web/src/locales/pl.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"select"
:
"Wybierz"
,
"database"
:
"Baza danych"
},
"slogan"
:
"Open-source centrum notatek do samodzielnego hostowania z zarządzaniem wiedzą i sieciami społecznościowymi."
,
"auth"
:
{
"signup-as-host"
:
"Zarejestruj się jako właściciel"
,
"host-tip"
:
"Rejestrujesz się jako właściciel."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Ustawienia"
,
"archived"
:
"Zarchiwizowane"
},
"daily-review"
:
{
"oops-nothing"
:
"Ups, nic tu nie ma."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Zobacz statyczne zasoby w notatkach, na przykład obrazki"
,
"no-resources"
:
"Brak zasobów."
,
"fetching-data"
:
"pobieranie danych..."
,
...
...
web/src/locales/pt_BR.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"select"
:
"Selecionar"
,
"database"
:
"Banco de dados"
},
"slogan"
:
"An open-source, self-hosted memo hub with knowledge management and social networking."
,
"auth"
:
{
"signup-as-host"
:
"Sign up as Host"
,
"host-tip"
:
"You are registering as the Site Host."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Configurações"
,
"archived"
:
"Arquivado"
},
"daily-review"
:
{
"oops-nothing"
:
"Oops, não há nada aqui."
},
"resources"
:
{
"resource"
:
{
"description"
:
"View your static resources in memos. e.g. images"
,
"no-resources"
:
"No resources."
,
"fetching-data"
:
"fetching data..."
,
...
...
@@ -204,14 +200,6 @@
"dark"
:
"Always dark"
}
},
"amount-text"
:
{
"memo_one"
:
"MEMO"
,
"memo_many"
:
""
,
"tag_one"
:
"TAG"
,
"tag_many"
:
""
,
"day_one"
:
"DAY"
,
"day_many"
:
""
},
"message"
:
{
"no-memos"
:
"no memos 🌃"
,
"memos-ready"
:
"all memos are ready 🎉"
,
...
...
@@ -253,19 +241,12 @@
"page-not-found"
:
"404 - Page Not Found 😥"
},
"days"
:
{
"monday"
:
"Monday"
,
"mon"
:
"Mon"
,
"tuesday"
:
"Tuesday"
,
"tue"
:
"Tue"
,
"wednesday"
:
"Wednesday"
,
"wed"
:
"Wed"
,
"thursday"
:
"Thursday"
,
"thu"
:
"Thu"
,
"friday"
:
"Friday"
,
"fri"
:
"Fri"
,
"saturday"
:
"Saturday"
,
"sat"
:
"Sat"
,
"sunday"
:
"Sunday"
,
"sun"
:
"Sun"
}
}
web/src/locales/ru.json
View file @
f48d9153
...
...
@@ -57,7 +57,6 @@
"database"
:
"База-Данных"
,
"settings"
:
"Настройки"
},
"slogan"
:
"Self-hosted платформа с открытым исходным кодом для заметок и управления записями с поддержкой социальных функций."
,
"auth"
:
{
"signup-as-host"
:
"Зарегистрироваться как владелец"
,
"host-tip"
:
"Вы регистрируете владельца сайта."
,
...
...
@@ -69,10 +68,7 @@
"setting"
:
"Настройки"
,
"archived"
:
"Заархивировано"
},
"daily-review"
:
{
"oops-nothing"
:
"Ой, здесь ничего нет."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Посмотреть ваши статические ресурсы в Memos (изображения и пр.)"
,
"no-resources"
:
"Нет ресурсов."
,
"fetching-data"
:
"загрузка данных..."
,
...
...
web/src/locales/sl.json
View file @
f48d9153
...
...
@@ -55,16 +55,12 @@
"select"
:
"Izberi"
,
"database"
:
"Baza"
},
"slogan"
:
"Odprtokodno, samo-gostovano vozlišče beležk z nadzorom znanja in socialne mreže."
,
"auth"
:
{
"signup-as-host"
:
"Prijavite se kot gostitelj"
,
"host-tip"
:
"Registrirani ste kot gostitelj strani."
,
"not-host-tip"
:
"Če nimate računa, prosim kontaktirajte gostitelja strani."
},
"daily-review"
:
{
"oops-nothing"
:
"Ups, tu ni še ničesar."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Poglejte svoje statične vire v beležkah npr. slike"
,
"no-resources"
:
"Ni virov."
,
"fetching-data"
:
"pridobivam podatke..."
,
...
...
web/src/locales/sv.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"avatar"
:
"Avatar"
,
"database"
:
"Databas"
},
"slogan"
:
"En öppen källkod, self-hosted antecknings hubb med kunskapshantering och socialisering"
,
"auth"
:
{
"signup-as-host"
:
"Registera dig som värd"
,
"host-tip"
:
"Du registerar dig som webbplatsvärd."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Inställningar"
,
"archived"
:
"Arkiverade"
},
"daily-review"
:
{
"oops-nothing"
:
"Oj, det finns inget här."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Visa dina statiska resurser i anteckningarn. t.ex bilder."
,
"no-resources"
:
"Inga resurser."
,
"fetching-data"
:
"hämtar data..."
,
...
...
web/src/locales/tr.json
View file @
f48d9153
...
...
@@ -41,7 +41,6 @@
"yourself"
:
"Sen"
,
"archived-at"
:
"Arşivlendi"
},
"slogan"
:
"Açık kaynaklı bir not ve sosyalleşme platformu olan self-hosted."
,
"auth"
:
{
"signup-as-host"
:
"Sahip olarak kaydolun"
,
"host-tip"
:
"Site sahibi olarak kaydoluyorsunuz."
,
...
...
@@ -53,10 +52,7 @@
"setting"
:
"Ayarlar"
,
"archived"
:
"Arşivlenmiş"
},
"daily-review"
:
{
"oops-nothing"
:
"Oops, burada hiçbir şey yok."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Memos'taki statik kaynaklarınızı (fotoğraflar) görüntüleyin"
,
"no-resources"
:
"Kaynak yok."
,
"fetching-data"
:
"veriler yükleniyor..."
,
...
...
web/src/locales/uk.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"database"
:
"Database"
,
"avatar"
:
"Avatar"
},
"slogan"
:
"Self-hosted платформа для записок та соціалізації з відкритим кодом An open-source."
,
"auth"
:
{
"signup-as-host"
:
"Зареєструватися як власник"
,
"host-tip"
:
"Ви реєструєте власника сайту."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Налаштування"
,
"archived"
:
"Заархівовані"
},
"daily-review"
:
{
"oops-nothing"
:
"Ой, тут нічого немає."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Переглянути ваші статичні ресурси в Memos (світлини)"
,
"no-resources"
:
"Немає ресурсів."
,
"fetching-data"
:
"завантаження даних..."
,
...
...
web/src/locales/vi.json
View file @
f48d9153
...
...
@@ -51,7 +51,6 @@
"avatar"
:
"Avatar"
,
"database"
:
"Database"
},
"slogan"
:
"Mã nguồn mở ghi chú cho phép quản lý tri thức và chia sẻ cộng đồng."
,
"auth"
:
{
"signup-as-host"
:
"Đăng ký như chủ nhân"
,
"host-tip"
:
"Bạn đang đăng ký với tư cách chủ nhân của trang web này."
,
...
...
@@ -63,10 +62,7 @@
"setting"
:
"Cài Đặt"
,
"archived"
:
"Lưu Trữ"
},
"daily-review"
:
{
"oops-nothing"
:
"Ồ, chẳng có gì ở đây cả."
},
"resources"
:
{
"resource"
:
{
"description"
:
"Xem toàn bộ tài nguyên của trang web. Ví dụ như các hình ảnh."
,
"no-resources"
:
"Không có tài nguyên."
,
"fetching-data"
:
"đang tải dữ liệu..."
,
...
...
web/src/locales/zh-Hant.json
View file @
f48d9153
...
...
@@ -54,16 +54,12 @@
"database"
:
"資料庫"
,
"avatar"
:
"頭像"
},
"slogan"
:
"一個可用於知識管理和社交網絡的開源、自托管的備忘錄中心。"
,
"auth"
:
{
"signup-as-host"
:
"註冊為管理員"
,
"host-tip"
:
"你正在註冊為管理員帳號。"
,
"not-host-tip"
:
"如果你沒有帳號,請聯絡網站管理員。"
},
"daily-review"
:
{
"oops-nothing"
:
"啊哦,空空蕩蕩。"
},
"resources"
:
{
"resource"
:
{
"description"
:
"查看在 Memo 中的靜態資源。例如:圖片"
,
"no-resources"
:
"沒有資源"
,
"fetching-data"
:
"擷取資料中..."
,
...
...
web/src/locales/zh.json
View file @
f48d9153
...
...
@@ -54,16 +54,12 @@
"database"
:
"数据库"
,
"avatar"
:
"头像"
},
"slogan"
:
"一个可用于知识管理和社交网络的开源、自托管的备忘录中心。"
,
"auth"
:
{
"signup-as-host"
:
"注册为 Host"
,
"host-tip"
:
"你正在注册为 Host 用户账号。"
,
"not-host-tip"
:
"如果你没有账号,请联系站点 Host"
},
"daily-review"
:
{
"oops-nothing"
:
"啊哦,空空荡荡。"
},
"resources"
:
{
"resource"
:
{
"description"
:
"查看在 Memo 中的静态资源。例如:图片"
,
"no-resources"
:
"没有资源"
,
"fetching-data"
:
"请求数据中..."
,
...
...
web/src/pages/Auth.tsx
View file @
f48d9153
...
...
@@ -4,6 +4,7 @@ import { toast } from "react-hot-toast";
import
{
useTranslation
}
from
"react-i18next"
;
import
{
useGlobalStore
,
useUserStore
}
from
"@/store/module"
;
import
*
as
api
from
"@/helpers/api"
;
import
{
slogan
}
from
"@/helpers/site"
;
import
{
absolutifyLink
}
from
"@/helpers/utils"
;
import
useLoading
from
"@/hooks/useLoading"
;
import
Icon
from
"@/components/Icon"
;
...
...
@@ -132,7 +133,7 @@ const Auth = () => {
<
img
className=
"h-12 w-auto rounded-lg mr-1"
src=
{
systemStatus
.
customizedProfile
.
logoUrl
}
alt=
""
/>
<
p
className=
"text-6xl tracking-wide text-black opacity-80 dark:text-gray-200"
>
{
systemStatus
.
customizedProfile
.
name
}
</
p
>
</
div
>
<
p
className=
"text-sm text-gray-700 dark:text-gray-300"
>
{
systemStatus
.
customizedProfile
.
description
||
t
(
"slogan"
)
}
</
p
>
<
p
className=
"text-sm text-gray-700 dark:text-gray-300"
>
{
systemStatus
.
customizedProfile
.
description
||
slogan
}
</
p
>
</
div
>
<
form
className=
"w-full"
onSubmit=
{
handleFormSubmit
}
>
<
div
className=
{
`flex flex-col justify-start items-start w-full ${actionBtnLoadingState.isLoading && "opacity-80"}`
}
>
...
...
web/src/pages/DailyReview.tsx
View file @
f48d9153
...
...
@@ -90,7 +90,7 @@ const DailyReview = () => {
className=
"px-2 py-1 flex flex-row justify-start items-center cursor-pointer select-none rounded hover:bg-gray-100 dark:hover:bg-zinc-700"
onClick=
{
()
=>
toggleShowDatePicker
()
}
>
<
Icon
.
Calendar
className=
"w-5 h-auto mr-1"
/>
{
t
(
"
common.daily-review
"
)
}
<
Icon
.
Calendar
className=
"w-5 h-auto mr-1"
/>
{
t
(
"
daily-review.title
"
)
}
</
p
>
<
div
className=
"flex flex-row justify-end items-center"
>
<
button
...
...
@@ -138,7 +138,7 @@ const DailyReview = () => {
</
div
>
{
dailyMemos
.
length
===
0
?
(
<
div
className=
"mx-auto pt-4 pb-5 px-0"
>
<
p
className=
"italic text-gray-400"
>
{
t
(
"daily-review.oops-nothing"
)
}
</
p
>
<
p
className=
"italic text-gray-400"
>
Oops, there is nothing.
</
p
>
</
div
>
)
:
(
<
div
className=
"flex flex-col justify-start items-start w-full mt-2"
>
...
...
web/src/pages/Explore.tsx
View file @
f48d9153
...
...
@@ -98,7 +98,7 @@ const Explore = () => {
)
:
null
)
:
(
<
p
className=
"m-auto text-center mt-4 italic cursor-pointer text-gray-500 hover:text-green-600"
onClick=
{
handleFetchMoreClick
}
>
{
t
(
"memo
-list
.fetch-more"
)
}
{
t
(
"memo.fetch-more"
)
}
</
p
>
)
}
</
main
>
...
...
web/src/pages/MemoDetail.tsx
View file @
f48d9153
...
...
@@ -61,7 +61,7 @@ const MemoDetail = () => {
<>
{
user
?
(
<
Link
to=
"/"
className=
"btn"
>
<
span
className=
"icon"
>
🏠
</
span
>
{
t
(
"
common
.back-to-home"
)
}
<
span
className=
"icon"
>
🏠
</
span
>
{
t
(
"
router
.back-to-home"
)
}
</
Link
>
)
:
(
<
Link
to=
"/auth"
className=
"btn"
>
...
...
web/src/pages/NotFound.tsx
View file @
f48d9153
...
...
@@ -11,7 +11,7 @@ const NotFound = () => {
<
p
className=
"title-text"
>
{
t
(
"message.page-not-found"
)
}
</
p
>
<
div
className=
"action-button-container"
>
<
Link
to=
"/"
className=
"link-btn"
>
<
span
>
🏠
</
span
>
{
t
(
"
common
.back-to-home"
)
}
<
span
>
🏠
</
span
>
{
t
(
"
router
.back-to-home"
)
}
</
Link
>
</
div
>
</
div
>
...
...
web/src/pages/ResourcesDashboard.tsx
View file @
f48d9153
...
...
@@ -54,7 +54,7 @@ const ResourcesDashboard = () => {
};
const
handleDeleteUnusedResourcesBtnClick
=
async
()
=>
{
let
warningText
=
t
(
"resource
s
.warning-text-unused"
);
let
warningText
=
t
(
"resource.warning-text-unused"
);
const
allResources
=
await
fetchAllResources
();
const
unusedResources
=
allResources
.
filter
((
resource
)
=>
{
if
(
resource
.
linkedMemoAmount
===
0
)
{
...
...
@@ -64,12 +64,12 @@ const ResourcesDashboard = () => {
return
false
;
});
if
(
unusedResources
.
length
===
0
)
{
toast
.
success
(
t
(
"resource
s
.no-unused-resources"
));
toast
.
success
(
t
(
"resource.no-unused-resources"
));
return
;
}
showCommonDialog
({
title
:
t
(
"resource
s
.delete-resource"
),
title
:
t
(
"resource.delete-resource"
),
content
:
warningText
,
style
:
"warning"
,
dialogName
:
"delete-unused-resources"
,
...
...
@@ -83,11 +83,11 @@ const ResourcesDashboard = () => {
const
handleDeleteSelectedBtnClick
=
()
=>
{
if
(
selectedList
.
length
==
0
)
{
toast
.
error
(
t
(
"resource
s
.no-files-selected"
));
toast
.
error
(
t
(
"resource.no-files-selected"
));
}
else
{
const
warningText
=
t
(
"resource
s
.warning-text"
);
const
warningText
=
t
(
"resource.warning-text"
);
showCommonDialog
({
title
:
t
(
"resource
s
.delete-resource"
),
title
:
t
(
"resource.delete-resource"
),
content
:
warningText
,
style
:
"warning"
,
dialogName
:
"delete-resource-dialog"
,
...
...
@@ -182,7 +182,7 @@ const ResourcesDashboard = () => {
await
resourceStore
.
createResourcesWithBlob
(
e
.
dataTransfer
.
files
).
then
(
(
res
)
=>
{
for
(
const
resource
of
res
)
{
toast
.
success
(
`
${
resource
.
filename
}
${
t
(
"resource
s
.upload-successfully"
)}
`
);
toast
.
success
(
`
${
resource
.
filename
}
${
t
(
"resource.upload-successfully"
)}
`
);
}
},
(
reason
)
=>
{
...
...
@@ -205,7 +205,7 @@ const ResourcesDashboard = () => {
onDrop=
{
handleDrop
}
>
<
div
className=
"flex h-full w-full"
>
<
p
className=
"m-auto text-2xl text-white dark:text-black"
>
{
t
(
"resource
s
.file-drag-drop-prompt"
)
}
</
p
>
<
p
className=
"m-auto text-2xl text-white dark:text-black"
>
{
t
(
"resource.file-drag-drop-prompt"
)
}
</
p
>
</
div
>
</
div
>
)
}
...
...
@@ -242,7 +242,7 @@ const ResourcesDashboard = () => {
onClick=
{
handleDeleteUnusedResourcesBtnClick
}
>
<
Icon
.
Trash2
className=
"w-4 h-auto mr-2"
/>
{
t
(
"
resources
.clear"
)
}
{
t
(
"
common
.clear"
)
}
</
button
>
</>
}
...
...
@@ -269,7 +269,7 @@ const ResourcesDashboard = () => {
<
div
className=
"w-full flex flex-col justify-start items-start mt-4 mb-6"
>
{
loadingState
.
isLoading
?
(
<
div
className=
"w-full h-32 flex flex-col justify-center items-center"
>
<
p
className=
"w-full text-center text-base my-6 mt-8"
>
{
t
(
"resource
s
.fetching-data"
)
}
</
p
>
<
p
className=
"w-full text-center text-base my-6 mt-8"
>
{
t
(
"resource.fetching-data"
)
}
</
p
>
</
div
>
)
:
(
<
div
...
...
@@ -283,12 +283,12 @@ const ResourcesDashboard = () => {
<
div
className=
"px-2 py-2 w-full grid grid-cols-10 border-b dark:border-b-zinc-600"
>
<
span
></
span
>
<
span
className=
"col-span-2"
>
ID
</
span
>
<
span
className=
"col-span-6"
>
{
t
(
"
resources
.name"
)
}
</
span
>
<
span
className=
"col-span-6"
>
{
t
(
"
common
.name"
)
}
</
span
>
<
span
></
span
>
</
div
>
)
}
{
resourceList
.
length
===
0
?
(
<
p
className=
"w-full text-center text-base my-6 mt-8"
>
{
t
(
"resource
s
.no-resources"
)
}
</
p
>
<
p
className=
"w-full text-center text-base my-6 mt-8"
>
{
t
(
"resource.no-resources"
)
}
</
p
>
)
:
(
resourceList
)
}
...
...
@@ -299,7 +299,7 @@ const ResourcesDashboard = () => {
<
p
className=
"text-sm text-gray-400 italic"
>
{
!
isComplete
&&
(
<
span
className=
"cursor-pointer my-6 hover:text-green-600"
onClick=
{
handleFetchMoreResourceBtnClick
}
>
{
t
(
"memo
-list
.fetch-more"
)
}
{
t
(
"memo.fetch-more"
)
}
</
span
>
)
}
</
p
>
...
...
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