2
2
* cloud functions storage page
3
3
***************************/
4
4
import { useRef } from "react" ;
5
- import { t } from "i18next" ;
5
+ import { useTranslation } from "react- i18next" ;
6
6
7
+ import Content from "@/components/Content" ;
7
8
import EmptyBox from "@/components/EmptyBox" ;
8
9
import { Col , Row } from "@/components/Grid" ;
9
10
import Panel from "@/components/Panel" ;
10
11
import Resize from "@/components/Resize" ;
11
12
13
+ import StatusBar from "../mods/StatusBar" ;
14
+
12
15
import CreateBucketModal from "./mods/CreateBucketModal" ;
13
16
import FileList from "./mods/FileList" ;
14
17
import StorageListPanel from "./mods/StorageListPanel" ;
@@ -17,33 +20,37 @@ import useStorageStore from "./store";
17
20
18
21
import useCustomSettingStore from "@/pages/customSetting" ;
19
22
export default function StoragePage ( ) {
23
+ const { t } = useTranslation ( ) ;
20
24
const containerRef = useRef < HTMLDivElement > ( null ) ;
21
25
const settingStore = useCustomSettingStore ( ) ;
22
26
const { currentStorage } = useStorageStore ( ) ;
23
27
return (
24
- < Row ref = { containerRef } >
25
- < Col { ...settingStore . layoutInfo . storagePage . SideBar } >
26
- < StorageListPanel />
27
- </ Col >
28
- < Resize type = "x" pageId = "storagePage" panelId = "SideBar" containerRef = { containerRef } />
29
- < Col >
30
- { currentStorage === undefined ? (
31
- < Panel className = "h-full items-center" >
32
- < EmptyBox >
33
- < div >
34
- { t ( "StoragePanel.EmptyText" ) }
35
- < CreateBucketModal >
36
- < span className = "ml-2 cursor-pointer text-primary-600 hover:border-b-2 hover:border-primary-600" >
37
- { t ( "CreateNow" ) }
38
- </ span >
39
- </ CreateBucketModal >
40
- </ div >
41
- </ EmptyBox >
42
- </ Panel >
43
- ) : (
44
- < FileList />
45
- ) }
46
- </ Col >
47
- </ Row >
28
+ < Content >
29
+ < Row ref = { containerRef } >
30
+ < Col { ...settingStore . layoutInfo . storagePage . SideBar } >
31
+ < StorageListPanel />
32
+ </ Col >
33
+ < Resize type = "x" pageId = "storagePage" panelId = "SideBar" containerRef = { containerRef } />
34
+ < Col >
35
+ { currentStorage === undefined ? (
36
+ < Panel className = "h-full items-center" >
37
+ < EmptyBox >
38
+ < div >
39
+ { t ( "StoragePanel.EmptyText" ) }
40
+ < CreateBucketModal >
41
+ < span className = "ml-2 cursor-pointer text-primary-600 hover:border-b-2 hover:border-primary-600" >
42
+ { t ( "CreateNow" ) }
43
+ </ span >
44
+ </ CreateBucketModal >
45
+ </ div >
46
+ </ EmptyBox >
47
+ </ Panel >
48
+ ) : (
49
+ < FileList />
50
+ ) }
51
+ </ Col >
52
+ </ Row >
53
+ < StatusBar />
54
+ </ Content >
48
55
) ;
49
56
}
0 commit comments