Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 7ed8c22

Browse files
committed
Use original_path for header if present in metadata.
1 parent 1c7e947 commit 7ed8c22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/src/plugins/action.share/res/react/ShareDialog.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,16 @@
187187
var HeaderPanel = React.createClass({
188188
mixins:[ContextConsumerMixin],
189189
render: function(){
190+
191+
let nodePath = this.props.shareModel.getNode().getPath();
192+
if(this.props.shareModel.getNode().getMetadata().get("original_path")){
193+
nodePath = this.props.shareModel.getNode().getMetadata().get("original_path");
194+
}
190195
return (
191196
<div className="headerPanel">
192197
<div
193198
style={{fontSize: 24, color:'white', padding:'20px 16px 14px', wordBreak:'break-all'}}
194-
>{this.context.getMessage('44').replace('%s', PathUtils.getBasename(this.props.shareModel.getNode().getPath()))}</div>
199+
>{this.context.getMessage('44').replace('%s', PathUtils.getBasename(nodePath))}</div>
195200
</div>
196201
);
197202
}

0 commit comments

Comments
 (0)