Skip to content

Commit

Permalink
Merge pull request #1081 from ruanhan/hotfix_0704
Browse files Browse the repository at this point in the history
fix share edit permission ctrl
  • Loading branch information
ruanhan authored Jul 4, 2019
2 parents 098aea5 + 4863efd commit 784ac33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function<T> (project?: IProject, type?: string) {
const projectPermission = project.permission
for (const attr in projectPermission) {
if (`${type}Permission` === attr) {
permission = projectPermission [attr]
permission = projectPermission[attr]
break
}
}
Expand Down
8 changes: 6 additions & 2 deletions webapp/app/containers/Dashboard/components/DashboardItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ export class DashboardItem extends React.PureComponent<IDashboardItemProps, IDas
</Tooltip>
)

const ShareButton = ShareDownloadPermission<IconProps>(currentProject, 'download')(Icon)
const ShareButton = ShareDownloadPermission<IconProps>(currentProject, 'share')(Icon)
shareButton = (
<Tooltip title="分享">
<Popover
Expand All @@ -753,9 +753,13 @@ export class DashboardItem extends React.PureComponent<IDashboardItemProps, IDas
</Tooltip>
)

const EditButton = ModulePermission<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>(currentProject, 'viz', false)(Span)
widgetButton = (
<Tooltip title="编辑widget">
<i className="iconfont icon-edit-2" onClick={this.toWorkbench} />
{/* <i className="iconfont icon-edit-2" onClick={this.toWorkbench} /> */}
<i>
<EditButton className="iconfont icon-edit-2" onClick={this.toWorkbench} />
</i>
</Tooltip>
)
}
Expand Down

0 comments on commit 784ac33

Please sign in to comment.