mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
Add a button to print the replay frame (#814)
This commit is contained in:
parent
c441d83435
commit
98be48d6e4
File diff suppressed because one or more lines are too long
@ -49,6 +49,7 @@
|
|||||||
"Hide calendar":"{{ _Q('Hide calendar') }}",
|
"Hide calendar":"{{ _Q('Hide calendar') }}",
|
||||||
"Previous capture":"{{ _Q('Previous capture') }}",
|
"Previous capture":"{{ _Q('Previous capture') }}",
|
||||||
"Next capture":"{{ _Q('Next capture') }}",
|
"Next capture":"{{ _Q('Next capture') }}",
|
||||||
|
"Print":"{{ _Q('Print') }}",
|
||||||
"Select language":"{{ _Q('Select language') }}",
|
"Select language":"{{ _Q('Select language') }}",
|
||||||
"View capture on {date}":"{{ _Q('View capture on {date}') }}",
|
"View capture on {date}":"{{ _Q('View capture on {date}') }}",
|
||||||
"{count} capture":"{{ _Q('{count} capture') }}",
|
"{count} capture":"{{ _Q('{count} capture') }}",
|
||||||
|
@ -77,6 +77,17 @@
|
|||||||
<i class="far fa-chart-bar"></i>
|
<i class="far fa-chart-bar"></i>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<button
|
||||||
|
class="btn btn-sm"
|
||||||
|
:class="{'btn-outline-light': lightButtons, 'btn-outline-dark': !lightButtons}"
|
||||||
|
:aria-pressed="printReplayFrame"
|
||||||
|
@click="printReplayFrame"
|
||||||
|
v-if="hasReplayFrame()"
|
||||||
|
:title="_('Print')">
|
||||||
|
<i class="fas fa-print"></i>
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
<li class="nav-item dropdown" v-if="localesAreSet">
|
<li class="nav-item dropdown" v-if="localesAreSet">
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm dropdown-toggle"
|
class="btn btn-sm dropdown-toggle"
|
||||||
@ -306,6 +317,14 @@ export default {
|
|||||||
this.showTimelineView = !this.showTimelineView;
|
this.showTimelineView = !this.showTimelineView;
|
||||||
window.localStorage.setItem("showTimelineView", this.showTimelineView ? "1" : "0");
|
window.localStorage.setItem("showTimelineView", this.showTimelineView ? "1" : "0");
|
||||||
},
|
},
|
||||||
|
hasReplayFrame() {
|
||||||
|
return !! window.frames.replay_iframe;
|
||||||
|
},
|
||||||
|
printReplayFrame() {
|
||||||
|
window.frames.replay_iframe.contentWindow.focus();
|
||||||
|
window.frames.replay_iframe.contentWindow.print();
|
||||||
|
return false;
|
||||||
|
},
|
||||||
setData(/** @type {PywbData} data */ data) {
|
setData(/** @type {PywbData} data */ data) {
|
||||||
|
|
||||||
// data-set will usually happen at App INIT (from parent caller)
|
// data-set will usually happen at App INIT (from parent caller)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user