mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-26 15:37:24 +00:00
add ability to modify the time stamp
This commit is contained in:
parent
4af8256a98
commit
d360a52797
@ -11,6 +11,10 @@
|
||||
<label v-t="'actions.piped_link'" />
|
||||
<input type="checkbox" v-model="pipedLink" />
|
||||
</div>
|
||||
<div class="flex justify-between mt-2">
|
||||
<label v-t="'actions.time_code'" />
|
||||
<input class="input w-12" type="text" v-model="timeStamp" />
|
||||
</div>
|
||||
<h3 class="mt-4" v-text="generatedLink" />
|
||||
<div class="flex justify-end mt-4">
|
||||
<button class="btn" v-t="'actions.follow_link'" @click="followLink()" />
|
||||
@ -37,11 +41,12 @@ export default {
|
||||
return {
|
||||
withTimeCode: true,
|
||||
pipedLink: true,
|
||||
timeStamp: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener("keydown", this.handleKeyDown);
|
||||
console.log(parseInt(this.currentTime));
|
||||
this.timeStamp = parseInt(this.currentTime);
|
||||
},
|
||||
unmounted() {
|
||||
window.removeEventListener("keydown", this.handleKeyDown);
|
||||
@ -73,7 +78,7 @@ export default {
|
||||
var href = this.pipedLink
|
||||
? window.location.origin + "/watch?v=" + this.videoId
|
||||
: "https://youtu.be/" + this.videoId;
|
||||
if (this.withTimeCode) href += "?t=" + this.currentTime;
|
||||
if (this.withTimeCode && this.timeStamp) href += "?t=" + this.timeStamp;
|
||||
return href;
|
||||
},
|
||||
},
|
||||
|
@ -102,7 +102,8 @@
|
||||
"with_timecode": "Share with time code",
|
||||
"piped_link": "Piped link",
|
||||
"follow_link": "Follow link",
|
||||
"copy_link": "Copy link"
|
||||
"copy_link": "Copy link",
|
||||
"time_code": "Time code (in seconds)"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Pinned by",
|
||||
|
Loading…
Reference in New Issue
Block a user