Skip to content

Commit

Permalink
Merge pull request #1 from PabloSR06/ResourceManager
Browse files Browse the repository at this point in the history
fix: resourceManager copyUrl
  • Loading branch information
PabloSR06 authored Sep 20, 2023
2 parents a201425 + cad07e9 commit 0d3022d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ export class DnnActionCopyUrl {
@Prop() items!: Item[];

private handleClick(): void {
const url = `${window.location.protocol}//${window.location.host}${this.items[0].path}`;
navigator.clipboard.writeText(url);
let t;
if (this.items[0].path.includes(":")) {
t = `${this.items[0].path}`;
} else {
t = `${window.location.protocol}//${window.location.host}${this.items[0].path}`;
}
navigator.clipboard.writeText(t);
}

render() {
Expand Down

0 comments on commit 0d3022d

Please sign in to comment.