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
e3735d2d
Commit
e3735d2d
authored
Jul 17, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: storage setting
parent
f09897e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
9 deletions
+31
-9
StorageSection.tsx
web/src/components/Settings/StorageSection.tsx
+31
-9
No files found.
web/src/components/Settings/StorageSection.tsx
View file @
e3735d2d
...
@@ -136,22 +136,22 @@ const StorageSection = observer(() => {
...
@@ -136,22 +136,22 @@ const StorageSection = observer(() => {
<
div
className=
"w-full flex flex-col gap-2 pt-2 pb-4"
>
<
div
className=
"w-full flex flex-col gap-2 pt-2 pb-4"
>
<
div
className=
"font-medium text-muted-foreground"
>
{
t
(
"setting.storage-section.current-storage"
)
}
</
div
>
<
div
className=
"font-medium text-muted-foreground"
>
{
t
(
"setting.storage-section.current-storage"
)
}
</
div
>
<
RadioGroup
<
RadioGroup
value=
{
workspaceStorageSetting
.
storageType
.
toString
()
}
value=
{
workspaceStorageSetting
.
storageType
}
onValueChange=
{
(
value
)
=>
{
onValueChange=
{
(
value
)
=>
{
handleStorageTypeChanged
(
parseInt
(
value
)
as
unknown
as
WorkspaceStorageSetting_StorageType
);
handleStorageTypeChanged
(
value
as
WorkspaceStorageSetting_StorageType
);
}
}
}
}
className=
"flex flex-row gap-4"
className=
"flex flex-row gap-4"
>
>
<
div
className=
"flex items-center space-x-2"
>
<
div
className=
"flex items-center space-x-2"
>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
DATABASE
.
toString
()
}
id=
"database"
/>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
DATABASE
}
id=
"database"
/>
<
Label
htmlFor=
"database"
>
{
t
(
"setting.storage-section.type-database"
)
}
</
Label
>
<
Label
htmlFor=
"database"
>
{
t
(
"setting.storage-section.type-database"
)
}
</
Label
>
</
div
>
</
div
>
<
div
className=
"flex items-center space-x-2"
>
<
div
className=
"flex items-center space-x-2"
>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
LOCAL
.
toString
()
}
id=
"local"
/>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
LOCAL
}
id=
"local"
/>
<
Label
htmlFor=
"local"
>
{
t
(
"setting.storage-section.type-local"
)
}
</
Label
>
<
Label
htmlFor=
"local"
>
{
t
(
"setting.storage-section.type-local"
)
}
</
Label
>
</
div
>
</
div
>
<
div
className=
"flex items-center space-x-2"
>
<
div
className=
"flex items-center space-x-2"
>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
S3
.
toString
()
}
id=
"s3"
/>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
S3
}
id=
"s3"
/>
<
Label
htmlFor=
"s3"
>
S3
</
Label
>
<
Label
htmlFor=
"s3"
>
S3
</
Label
>
</
div
>
</
div
>
</
RadioGroup
>
</
RadioGroup
>
...
@@ -175,6 +175,7 @@ const StorageSection = observer(() => {
...
@@ -175,6 +175,7 @@ const StorageSection = observer(() => {
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
{
t
(
"setting.storage-section.filepath-template"
)
}
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
{
t
(
"setting.storage-section.filepath-template"
)
}
</
span
>
<
Input
<
Input
className=
"w-64"
value=
{
workspaceStorageSetting
.
filepathTemplate
}
value=
{
workspaceStorageSetting
.
filepathTemplate
}
placeholder=
"assets/
{
timestamp
}
_
{
filename
}"
placeholder=
"assets/
{
timestamp
}
_
{
filename
}"
onChange=
{
handleFilepathTemplateChanged
}
onChange=
{
handleFilepathTemplateChanged
}
...
@@ -185,11 +186,17 @@ const StorageSection = observer(() => {
...
@@ -185,11 +186,17 @@ const StorageSection = observer(() => {
<>
<>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
Access key id
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
Access key id
</
span
>
<
Input
value=
{
workspaceStorageSetting
.
s3Config
?.
accessKeyId
}
placeholder=
""
onChange=
{
handleS3ConfigAccessKeyIdChanged
}
/>
<
Input
className=
"w-64"
value=
{
workspaceStorageSetting
.
s3Config
?.
accessKeyId
}
placeholder=
""
onChange=
{
handleS3ConfigAccessKeyIdChanged
}
/>
</
div
>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
Access key secret
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
Access key secret
</
span
>
<
Input
<
Input
className=
"w-64"
value=
{
workspaceStorageSetting
.
s3Config
?.
accessKeySecret
}
value=
{
workspaceStorageSetting
.
s3Config
?.
accessKeySecret
}
placeholder=
""
placeholder=
""
onChange=
{
handleS3ConfigAccessKeySecretChanged
}
onChange=
{
handleS3ConfigAccessKeySecretChanged
}
...
@@ -197,15 +204,30 @@ const StorageSection = observer(() => {
...
@@ -197,15 +204,30 @@ const StorageSection = observer(() => {
</
div
>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
Endpoint
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
Endpoint
</
span
>
<
Input
value=
{
workspaceStorageSetting
.
s3Config
?.
endpoint
}
placeholder=
""
onChange=
{
handleS3ConfigEndpointChanged
}
/>
<
Input
className=
"w-64"
value=
{
workspaceStorageSetting
.
s3Config
?.
endpoint
}
placeholder=
""
onChange=
{
handleS3ConfigEndpointChanged
}
/>
</
div
>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
Region
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
Region
</
span
>
<
Input
value=
{
workspaceStorageSetting
.
s3Config
?.
region
}
placeholder=
""
onChange=
{
handleS3ConfigRegionChanged
}
/>
<
Input
className=
"w-64"
value=
{
workspaceStorageSetting
.
s3Config
?.
region
}
placeholder=
""
onChange=
{
handleS3ConfigRegionChanged
}
/>
</
div
>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
Bucket
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
Bucket
</
span
>
<
Input
value=
{
workspaceStorageSetting
.
s3Config
?.
bucket
}
placeholder=
""
onChange=
{
handleS3ConfigBucketChanged
}
/>
<
Input
className=
"w-64"
value=
{
workspaceStorageSetting
.
s3Config
?.
bucket
}
placeholder=
""
onChange=
{
handleS3ConfigBucketChanged
}
/>
</
div
>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
Use Path Style
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
Use Path Style
</
span
>
...
...
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