Added link to preview-in-new-tab button

refs 80e2103f1d

- changed button to a link and added necessary attributes
- copied button to the mobile view for consistency
This commit is contained in:
Kevin Ansfield 2021-02-16 11:51:32 +00:00
parent 80e2103f1d
commit cebe43935c
2 changed files with 9 additions and 4 deletions

View File

@ -8,7 +8,7 @@
</div>
<button type="button" {{on "click" (perform this.copyPreviewUrl)}} class="gh-btn gh-btn-green gh-btn-icon gh-post-preview-copy-url-trigger">
<span>
{{#if this.copyPreviewUrl.isRunning}}
{{#if this.copyPreviewUrl.isRunning}}
Copied!
{{else}}
copy
@ -16,8 +16,8 @@
</span>
</button>
<div>
<button type="button" class="gh-btn gh-btn-editor gh-btn-icon gh-btn-icon-right gh-btn-external">
<a href={{@post.previewUrl}} target="_blank" rel="noopener noreferrer" class="gh-btn gh-btn-editor gh-btn-icon gh-btn-icon-right gh-btn-external">
<span>Open in new tab {{svg-jar "external"}}</span>
</button>
</a>
</div>
</div>

View File

@ -12,11 +12,16 @@
</div>
<button type="button" {{on "click" (perform this.copyPreviewUrl)}} class="gh-btn gh-btn-green gh-btn-icon gh-post-preview-copy-url-trigger">
<span>
{{#if this.copyPreviewUrl.isRunning}}
{{#if this.copyPreviewUrl.isRunning}}
Copied!
{{else}}
copy
{{/if}}
</span>
</button>
<div>
<a href={{@post.previewUrl}} target="_blank" rel="noopener noreferrer" class="gh-btn gh-btn-editor gh-btn-icon gh-btn-icon-right gh-btn-external">
<span>Open in new tab {{svg-jar "external"}}</span>
</a>
</div>
</div>