fix conflicts

This commit is contained in:
Bnyro 2022-09-09 11:22:47 +02:00
commit 416681e477
10 changed files with 67 additions and 24 deletions

View file

@ -1 +1 @@
blank_issues_enabled: true blank_issues_enabled: false

View file

@ -35,7 +35,6 @@ By using Piped, you can freely watch and listen to content without the fear of p
- [x] No connections to Google's servers - [x] No connections to Google's servers
- [x] Playing just audio - [x] Playing just audio
- [x] PWA support - [x] PWA support
- [x] Support for iOS
- [x] Locally saved Preferences - [x] Locally saved Preferences
- [x] [Available in many languages](src/locales), thanks to [our translators](https://hosted.weblate.org/projects/piped/frontend/) - [x] [Available in many languages](src/locales), thanks to [our translators](https://hosted.weblate.org/projects/piped/frontend/)
- [x] Embedded video support - [x] Embedded video support

View file

@ -15,7 +15,7 @@
"@fortawesome/vue-fontawesome": "^3.0.1", "@fortawesome/vue-fontawesome": "^3.0.1",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"dompurify": "^2.4.0", "dompurify": "^2.4.0",
"hotkeys-js": "^3.9.5", "hotkeys-js": "^3.10.0",
"javascript-time-ago": "^2.5.7", "javascript-time-ago": "^2.5.7",
"mux.js": "^6.2.0", "mux.js": "^6.2.0",
"shaka-player": "4.2.1", "shaka-player": "4.2.1",
@ -44,7 +44,7 @@
"unocss": "^0.45.18", "unocss": "^0.45.18",
"vite": "^2.9.14", "vite": "^2.9.14",
"vite-plugin-eslint": "^1.8.1", "vite-plugin-eslint": "^1.8.1",
"vite-plugin-pwa": "^0.12.6" "vite-plugin-pwa": "^0.12.7"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

View file

@ -22,6 +22,19 @@
}" }"
></button> ></button>
<!-- RSS Feed button -->
<a
aria-label="RSS feed"
title="RSS feed"
role="button"
v-if="channel.id"
:href="`https://www.youtube.com/feeds/videos.xml?channel_id=${channel.id}`"
target="_blank"
class="btn flex-col ml-3"
>
<font-awesome-icon icon="rss" />
</a>
<hr /> <hr />
<div class="video-grid"> <div class="video-grid">

View file

@ -1,7 +1,8 @@
<template> <template>
<div class="modal"> <div class="modal">
<div> <div @click="handleClick">
<div class="modal-container"> <div class="modal-container">
<button @click="$emit('close')"><font-awesome-icon icon="xmark" /></button>
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
@ -23,6 +24,10 @@ export default {
} else return; } else return;
event.preventDefault(); event.preventDefault();
}, },
handleClick(event) {
if (event.target !== event.currentTarget) return;
this.$emit("close");
},
}, },
}; };
</script> </script>
@ -37,6 +42,10 @@ export default {
} }
.modal-container { .modal-container {
@apply w-min m-auto min-w-[20vw]; @apply w-min m-auto min-w-[20vw] relative;
}
.modal-container > button {
@apply absolute right-50 top-30;
} }
</style> </style>

View file

@ -1,9 +1,6 @@
<template> <template>
<ModalComponent> <ModalComponent>
<div class="flex pp-playlist-add-modal-top"> <span class="text-2xl w-max inline-block" v-t="'actions.select_playlist'" />
<h6 class="w-max inline-block" v-t="'actions.select_playlist'" />
<button class="ml-3" @click="$emit('close')"><font-awesome-icon icon="xmark" /></button>
</div>
<select class="select w-full mt-3" v-model="selectedPlaylist"> <select class="select w-full mt-3" v-model="selectedPlaylist">
<option v-for="playlist in playlists" :value="playlist.id" :key="playlist.id" v-text="playlist.name" /> <option v-for="playlist in playlists" :value="playlist.id" :key="playlist.id" v-text="playlist.name" />
</select> </select>

View file

@ -16,7 +16,8 @@
v-text="playlist.name" v-text="playlist.name"
/> />
</router-link> </router-link>
<button class="btn h-auto" @click="deletePlaylist(playlist.id)" v-t="'actions.delete_playlist'" /> <button class="btn h-auto" @click="renamePlaylist(playlist.id)" v-t="'actions.rename_playlist'" />
<button class="btn h-auto ml-2" @click="deletePlaylist(playlist.id)" v-t="'actions.delete_playlist'" />
</div> </div>
</div> </div>
<br /> <br />
@ -46,6 +47,31 @@ export default {
this.playlists = json; this.playlists = json;
}); });
}, },
renamePlaylist(id) {
const newName = prompt(this.$t("actions.new_playlist_name"));
if (!newName) return;
this.fetchJson(this.authApiUrl() + "/user/playlists/rename", null, {
method: "POST",
body: JSON.stringify({
playlistId: id,
newName: newName,
}),
headers: {
Authorization: this.getAuthToken(),
"Content-Type": "application/json",
},
}).then(json => {
if (json.error) alert(json.error);
else {
this.playlists.forEach((playlist, index) => {
if (playlist.id == id) {
this.playlists[index].name = newName;
return;
}
});
}
});
},
deletePlaylist(id) { deletePlaylist(id) {
if (confirm(this.$t("actions.delete_playlist_confirm"))) if (confirm(this.$t("actions.delete_playlist_confirm")))
this.fetchJson(this.authApiUrl() + "/user/playlists/delete", null, { this.fetchJson(this.authApiUrl() + "/user/playlists/delete", null, {

View file

@ -1,9 +1,6 @@
<template> <template>
<ModalComponent> <ModalComponent>
<div class="flex justify-between"> <h2 v-t="'actions.share'" />
<h3 v-t="'actions.share'" />
<button class="ml-3" @click="$emit('close')"><font-awesome-icon icon="xmark" /></button>
</div>
<div class="flex justify-between mt-4"> <div class="flex justify-between mt-4">
<label v-t="'actions.with_timecode'" for="withTimeCode" /> <label v-t="'actions.with_timecode'" for="withTimeCode" />
<input id="withTimeCode" type="checkbox" v-model="withTimeCode" /> <input id="withTimeCode" type="checkbox" v-model="withTimeCode" />
@ -16,7 +13,7 @@
<label v-t="'actions.time_code'" /> <label v-t="'actions.time_code'" />
<input class="input w-300" type="text" v-model="timeStamp" /> <input class="input w-300" type="text" v-model="timeStamp" />
</div> </div>
<h6 class="mb-2" v-text="generatedLink" /> <a :href="generatedLink" target="_blank"><h6 class="mb-2" v-text="generatedLink" /></a>
<div class="flex justify-end mt-4"> <div class="flex justify-end mt-4">
<button class="btn" style="margin-right: 15rem" v-t="'actions.follow_link'" @click="followLink()" /> <button class="btn" style="margin-right: 15rem" v-t="'actions.follow_link'" @click="followLink()" />
<button class="btn" v-t="'actions.copy_link'" @click="copyLink()" /> <button class="btn" v-t="'actions.copy_link'" @click="copyLink()" />

View file

@ -98,6 +98,8 @@
"backup_preferences": "Backup preferences", "backup_preferences": "Backup preferences",
"restore_preferences": "Restore preferences", "restore_preferences": "Restore preferences",
"back_to_home": "Back to home", "back_to_home": "Back to home",
"rename_playlist": "Rename playlist",
"new_playlist_name": "New playlist name",
"share": "Share", "share": "Share",
"with_timecode": "Share with time code", "with_timecode": "Share with time code",
"piped_link": "Piped link", "piped_link": "Piped link",

View file

@ -2599,10 +2599,10 @@ has@^1.0.3:
dependencies: dependencies:
function-bind "^1.1.1" function-bind "^1.1.1"
hotkeys-js@^3.9.5: hotkeys-js@^3.10.0:
version "3.9.5" version "3.10.0"
resolved "https://registry.yarnpkg.com/hotkeys-js/-/hotkeys-js-3.9.5.tgz#8314d0522bf2601e36003213047e9dc7d56d19fe" resolved "https://registry.yarnpkg.com/hotkeys-js/-/hotkeys-js-3.10.0.tgz#2bbd13de4aa002fa916c34e3859239924311e35a"
integrity sha512-T0G8CUZ6Q1IOgPnLK1hDXR8DqgKF/VWEsHvZgi6CM7Ub9oOAzvWuJ3Qhc/9nFQaR26MfFOZSwULHrtCnsUX7zA== integrity sha512-20xeVdOqcgTkMox0+BqFwADZP7+5dy/9CFPpAinSMh2d0s3b0Hs2V2D+lMh4Hphkf7VE9pwnOl58eP1te+REcg==
human-signals@^2.1.0: human-signals@^2.1.0:
version "2.1.0" version "2.1.0"
@ -3826,10 +3826,10 @@ vite-plugin-eslint@^1.8.1:
"@types/eslint" "^8.4.5" "@types/eslint" "^8.4.5"
rollup "^2.77.2" rollup "^2.77.2"
vite-plugin-pwa@^0.12.6: vite-plugin-pwa@^0.12.7:
version "0.12.6" version "0.12.7"
resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.12.6.tgz#89d3dc3841337b14ac5f90847fb19735b8ca7d7a" resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.12.7.tgz#ff4de762926809c56aca43aad8b49a4c6727230e"
integrity sha512-qRxx1zUlwKq2QD20nDZVL449wV+dflRVeDMLa2k4LZiHfWRfHWwmdhnDZOlMEgni0Zss1DkhyTmuzLYuO6aO3A== integrity sha512-salSwS1wWc1niNWfhX2W6gtfXmk+XESMz62w95EHLq6fSM2bDgDm1APmvq1nkDcxH6Onky7HxysCBKMzvOHXYg==
dependencies: dependencies:
debug "^4.3.4" debug "^4.3.4"
fast-glob "^3.2.11" fast-glob "^3.2.11"