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
9ede3da8
Unverified
Commit
9ede3da8
authored
Apr 03, 2023
by
boojack
Committed by
GitHub
Apr 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update learn more link (#1455)
parent
836e496e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
18 deletions
+30
-18
CreateStorageServiceDialog.tsx
web/src/components/CreateStorageServiceDialog.tsx
+2
-8
LearnMore.tsx
web/src/components/LearnMore.tsx
+19
-0
UpdateLocalStorageDialog.tsx
web/src/components/UpdateLocalStorageDialog.tsx
+9
-10
No files found.
web/src/components/CreateStorageServiceDialog.tsx
View file @
9ede3da8
...
@@ -5,6 +5,7 @@ import * as api from "@/helpers/api";
...
@@ -5,6 +5,7 @@ import * as api from "@/helpers/api";
import
{
generateDialog
}
from
"./Dialog"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
import
RequiredBadge
from
"./RequiredBadge"
;
import
RequiredBadge
from
"./RequiredBadge"
;
import
LearnMore
from
"./LearnMore"
;
interface
Props
extends
DialogProps
{
interface
Props
extends
DialogProps
{
storage
?:
ObjectStorage
;
storage
?:
ObjectStorage
;
...
@@ -105,14 +106,7 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
...
@@ -105,14 +106,7 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
<
div
className=
"dialog-header-container"
>
<
div
className=
"dialog-header-container"
>
<
p
className=
"title-text"
>
<
p
className=
"title-text"
>
{
isCreating
?
"Create storage"
:
"Update storage"
}
{
isCreating
?
"Create storage"
:
"Update storage"
}
<
a
<
LearnMore
className=
"ml-2"
url=
"https://usememos.com/docs/storage"
/>
className=
"ml-2 text-sm text-blue-600 hover:opacity-80 hover:underline"
href=
"https://usememos.com/docs/storage"
target=
"_blank"
>
Learn more
<
Icon
.
ExternalLink
className=
"inline -mt-1 ml-1 w-4 h-auto opacity-80"
/>
</
a
>
</
p
>
</
p
>
<
button
className=
"btn close-btn"
onClick=
{
handleCloseBtnClick
}
>
<
button
className=
"btn close-btn"
onClick=
{
handleCloseBtnClick
}
>
<
Icon
.
X
/>
<
Icon
.
X
/>
...
...
web/src/components/LearnMore.tsx
0 → 100644
View file @
9ede3da8
import
Icon
from
"./Icon"
;
interface
Props
{
url
:
string
;
className
?:
string
;
}
const
LearnMore
=
(
props
:
Props
)
=>
{
const
{
url
,
className
}
=
props
;
return
(
<
a
className=
{
`${className || ""} text-sm text-blue-600 hover:opacity-80 hover:underline`
}
href=
{
url
}
target=
"_blank"
>
Learn more
<
Icon
.
ExternalLink
className=
"inline -mt-1 ml-1 w-4 h-auto opacity-80"
/>
</
a
>
);
};
export
default
LearnMore
;
web/src/components/UpdateLocalStorageDialog.tsx
View file @
9ede3da8
import
{
Button
,
Input
,
Typography
}
from
"@mui/joy"
;
import
{
Button
,
Input
}
from
"@mui/joy"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
useGlobalStore
}
from
"@/store/module"
;
import
{
useGlobalStore
}
from
"@/store/module"
;
import
*
as
api
from
"@/helpers/api"
;
import
*
as
api
from
"@/helpers/api"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
import
LearnMore
from
"./LearnMore"
;
interface
Props
extends
DialogProps
{
interface
Props
extends
DialogProps
{
localStoragePath
?:
string
;
localStoragePath
?:
string
;
...
@@ -45,15 +46,13 @@ const UpdateLocalStorageDialog: React.FC<Props> = (props: Props) => {
...
@@ -45,15 +46,13 @@ const UpdateLocalStorageDialog: React.FC<Props> = (props: Props) => {
<
Icon
.
X
/>
<
Icon
.
X
/>
</
button
>
</
button
>
</
div
>
</
div
>
<
div
className=
"dialog-content-container"
>
<
div
className=
"dialog-content-container max-w-xs"
>
<
div
className=
"py-2"
>
<
p
className=
"text-sm break-words mb-1"
>
<
Typography
className=
"!mb-1"
level=
"body2"
>
{
"Local storage path is a relative path to your database file."
}
Local path
<
LearnMore
className=
"ml-1"
url=
"https://usememos.com/docs/local-storage"
/>
</
Typography
>
</
p
>
<
p
className=
"text-sm text-gray-400 break-all"
>
{
"It's a relative path to your database file."
}
</
p
>
<
p
className=
"text-sm text-gray-400 mb-2 break-all"
>
{
"e.g. assets/{timestamp}_{filename}"
}
</
p
>
<
p
className=
"text-sm text-gray-400 mb-2 break-all"
>
{
"e.g. assets/{timestamp}_{filename}"
}
</
p
>
<
Input
className=
"mb-2"
placeholder=
"Local storage path"
fullWidth
value=
{
path
}
onChange=
{
(
e
)
=>
setPath
(
e
.
target
.
value
)
}
/>
<
Input
className=
"mb-2"
placeholder=
"Path"
value=
{
path
}
onChange=
{
(
e
)
=>
setPath
(
e
.
target
.
value
)
}
fullWidth
/>
</
div
>
<
div
className=
"mt-2 w-full flex flex-row justify-end items-center space-x-1"
>
<
div
className=
"mt-2 w-full flex flex-row justify-end items-center space-x-1"
>
<
Button
variant=
"plain"
color=
"neutral"
onClick=
{
handleCloseBtnClick
}
>
<
Button
variant=
"plain"
color=
"neutral"
onClick=
{
handleCloseBtnClick
}
>
Cancel
Cancel
...
...
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