Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
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
Administrator
bkunyun
Commits
5d5ace48
Commit
5d5ace48
authored
Jun 16, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220608-projectdata' into 'release'
Feat 20220608 projectdata See merge request
sunyihao/bkunyun!45
parents
29fa2987
1d039edc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
index.tsx
src/views/Project/ProjectData/index.tsx
+12
-1
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+14
-1
No files found.
src/views/Project/ProjectData/index.tsx
View file @
5d5ace48
...
...
@@ -102,6 +102,13 @@ const ProjectData = observer(() => {
}
},
[
list
,
dataSetList
,
activeTab
]);
// 是否全是文件夹
const
isAllDirectory
=
useMemo
(()
=>
{
return
showList
.
every
((
li
:
any
)
=>
{
return
li
.
type
===
"directory"
;
});
},
[
showList
]);
// 全(文件、文件夹、数据集)列表
const
allList
=
useMemo
(()
=>
{
return
[...
list
,
...
dataSetList
];
...
...
@@ -341,13 +348,17 @@ const ProjectData = observer(() => {
const
renderButtons
=
(
item
:
any
)
=>
{
return
(
<
span
>
{
item
.
type
!==
"dataSet"
&&
item
.
type
!==
"directory"
&&
(
{
!
isAllDirectory
&&
(
<
Button
sx=
{
{
position
:
"relative"
,
left
:
"-4px"
,
minWidth
:
"10px"
,
marginRight
:
"10px"
,
visibility
:
item
.
type
!==
"dataSet"
&&
item
.
type
!==
"directory"
?
"visible"
:
"hidden"
,
}
}
variant=
"text"
size=
"small"
...
...
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
5d5ace48
...
...
@@ -50,6 +50,19 @@ const BaseInfo = observer(() => {
const
currentUserName
=
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
).
name
;
const
hasEditAuth
=
useMemo
(()
=>
{
if
(
!
currentUserName
)
{
return
false
;
}
else
if
(
!
projectInfo
.
members
)
{
return
false
;
}
else
{
return
projectInfo
.
members
.
some
((
item
:
any
)
=>
{
return
(
item
.
username
===
currentUserName
&&
item
.
projectRole
===
"OWNER"
);
});
}
},
[
currentUserName
,
projectInfo
]);
const
{
run
,
loading
}
=
useMyRequest
(
getProject
,
{
onSuccess
:
(
result
:
any
)
=>
{
setProjectInfo
(
result
.
data
);
...
...
@@ -236,7 +249,7 @@ const BaseInfo = observer(() => {
<
Loading
/>
</
div
>
);
}
else
if
(
currentUserName
!==
projectInfo
.
owner
)
{
}
else
if
(
!
hasEditAuth
)
{
return
<
InformationDisplay
infoList=
{
infoList
}
/>;
}
else
{
return
(
...
...
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