mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2025-09-08 06:58:43 +00:00
updated gear icon on profile page and removed "make private" option until i can get it working correctly
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
class="mt-1 block w-full rounded-md border-gray-700 bg-gray-800 text-gray-100 focus:border-blue-500 focus:ring-blue-500"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="flex items-center space-x-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -116,7 +116,7 @@
|
||||
>Private Listing (Encrypt Magnet)</span
|
||||
>
|
||||
</div>
|
||||
|
||||
-->
|
||||
<button
|
||||
type="submit"
|
||||
class="bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
|
||||
|
@@ -2,8 +2,31 @@
|
||||
|
||||
> ⚠️ **Note:** If you find a new bug thats not listed here. Please submit a [Bug Report](https://bitvid.network/?modal=bug).
|
||||
|
||||
- Speed up loading in subscriptions. Save to local cache?
|
||||
- Fix "Dev Mode" publishing "Live Mode" notes—add a flag for dev mode posts.
|
||||
- Fix issue with video post set to private.
|
||||
- Disable "private video" until I can make it work better.
|
||||
- Make "private video" work better using nip-04 encryption for magnet field.
|
||||
- Fix slow back button issues on Firefox.
|
||||
- Add Amber login support for mobile.
|
||||
- Add settings (three dots) button for all videos, not the same as gear menu. Only show delete and edit gear for logged-in users videos.
|
||||
- Add support for "Playlist" lists and other custom lists (named whatever) and also "Watch Later" list and "Watch History".
|
||||
- Add an "add to playlist" button to the edit button.
|
||||
- Add "add to watch later" option to edit button.
|
||||
- Add block button to settings button.
|
||||
- Add report button to settings button.
|
||||
- Fix autoplay broken on iPhone chrome.
|
||||
- Fix playback broken on Safari on iPhone.
|
||||
- Update note spec v3 transition to include new fields that have been added like "has previous" or "videoRootID" or enentID if null.
|
||||
- Change "explore" view to "kids" view and add flag to all notes to see if they are for kids.
|
||||
- Add "seed" lists.
|
||||
- Make "edit" video a form modal rather than a browser pop-up.
|
||||
- Add "upload thumbnail" as option to add/edit video form. (use https://apidocs.imgur.com/)
|
||||
- Fix issue where page refreshes when pulling up a video in the video modal.
|
||||
- Fix sidebar media query settings on medium-sized screens. (tablet/laptops)
|
||||
- Fix various "text wrap" issues causing scroll left and right on profile and modal pages.
|
||||
- Add zaps to profile and video modal pages.
|
||||
- Add comments to video modal pages.
|
||||
|
||||
## Feature Additions
|
||||
|
||||
|
36
js/app.js
36
js/app.js
@@ -718,7 +718,7 @@ class bitvidApp {
|
||||
try {
|
||||
// Query each relay
|
||||
const results = await Promise.all(
|
||||
nostrClient.relays.map(relayUrl =>
|
||||
nostrClient.relays.map((relayUrl) =>
|
||||
nostrClient.pool.list([relayUrl], [filter])
|
||||
)
|
||||
);
|
||||
@@ -727,8 +727,10 @@ class bitvidApp {
|
||||
// Keep only the newest per author
|
||||
const newestEvents = new Map();
|
||||
for (const evt of allProfileEvents) {
|
||||
if (!newestEvents.has(evt.pubkey) ||
|
||||
evt.created_at > newestEvents.get(evt.pubkey).created_at) {
|
||||
if (
|
||||
!newestEvents.has(evt.pubkey) ||
|
||||
evt.created_at > newestEvents.get(evt.pubkey).created_at
|
||||
) {
|
||||
newestEvents.set(evt.pubkey, evt);
|
||||
}
|
||||
}
|
||||
@@ -791,7 +793,7 @@ class bitvidApp {
|
||||
thumbnail: thumbEl?.value.trim() || "",
|
||||
description: descEl?.value.trim() || "",
|
||||
mode: isDevMode ? "dev" : "live",
|
||||
isPrivate: privEl?.checked || false,
|
||||
// isPrivate: privEl?.checked || false,
|
||||
};
|
||||
|
||||
if (!formData.title || !formData.magnet) {
|
||||
@@ -1023,10 +1025,10 @@ class bitvidApp {
|
||||
});
|
||||
|
||||
if (this.videoSubscription) {
|
||||
|
||||
console.log("[loadVideos] subscription remains open to get live updates.");
|
||||
console.log(
|
||||
"[loadVideos] subscription remains open to get live updates."
|
||||
);
|
||||
}
|
||||
|
||||
} else {
|
||||
// Already subscribed: just show what's cached
|
||||
const allCached = nostrClient.getActiveVideos();
|
||||
@@ -1121,7 +1123,9 @@ class bitvidApp {
|
||||
authorSet.add(video.pubkey);
|
||||
|
||||
const nevent = window.NostrTools.nip19.neventEncode({ id: video.id });
|
||||
const shareUrl = `${window.location.pathname}?v=${encodeURIComponent(nevent)}`;
|
||||
const shareUrl = `${window.location.pathname}?v=${encodeURIComponent(
|
||||
nevent
|
||||
)}`;
|
||||
const canEdit = video.pubkey === this.pubkey;
|
||||
const highlightClass =
|
||||
video.isPrivate && canEdit
|
||||
@@ -1252,7 +1256,9 @@ class bitvidApp {
|
||||
lazyEls.forEach((el) => this.mediaLoader.observe(el));
|
||||
|
||||
// GEAR MENU / button event listeners...
|
||||
const gearButtons = this.videoList.querySelectorAll("[data-settings-dropdown]");
|
||||
const gearButtons = this.videoList.querySelectorAll(
|
||||
"[data-settings-dropdown]"
|
||||
);
|
||||
gearButtons.forEach((button) => {
|
||||
button.addEventListener("click", () => {
|
||||
const index = button.getAttribute("data-settings-dropdown");
|
||||
@@ -1275,7 +1281,9 @@ class bitvidApp {
|
||||
});
|
||||
|
||||
// Revert button
|
||||
const revertButtons = this.videoList.querySelectorAll("[data-revert-index]");
|
||||
const revertButtons = this.videoList.querySelectorAll(
|
||||
"[data-revert-index]"
|
||||
);
|
||||
revertButtons.forEach((button) => {
|
||||
button.addEventListener("click", () => {
|
||||
const index = button.getAttribute("data-revert-index");
|
||||
@@ -1286,7 +1294,9 @@ class bitvidApp {
|
||||
});
|
||||
|
||||
// Delete All button
|
||||
const deleteAllButtons = this.videoList.querySelectorAll("[data-delete-all-index]");
|
||||
const deleteAllButtons = this.videoList.querySelectorAll(
|
||||
"[data-delete-all-index]"
|
||||
);
|
||||
deleteAllButtons.forEach((button) => {
|
||||
button.addEventListener("click", () => {
|
||||
const index = button.getAttribute("data-delete-all-index");
|
||||
@@ -1416,7 +1426,7 @@ class bitvidApp {
|
||||
"New Description? (blank=keep existing)",
|
||||
video.description
|
||||
);
|
||||
const wantPrivate = confirm("Make this video private? OK=Yes, Cancel=No");
|
||||
// const wantPrivate = confirm("Make this video private? OK=Yes, Cancel=No");
|
||||
|
||||
// 4) Build final updated fields (or fallback to existing)
|
||||
const title =
|
||||
@@ -1431,7 +1441,7 @@ class bitvidApp {
|
||||
// 5) Create an object with the new data
|
||||
const updatedData = {
|
||||
version: video.version || 2,
|
||||
isPrivate: wantPrivate,
|
||||
// isPrivate: wantPrivate,
|
||||
title,
|
||||
magnet,
|
||||
thumbnail,
|
||||
|
@@ -276,15 +276,16 @@ async function loadUserVideos(pubkey) {
|
||||
<div class="relative inline-block ml-3 overflow-visible">
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex items-center p-2 rounded-full text-gray-400
|
||||
hover:text-gray-200 hover:bg-gray-800 focus:outline-none focus:ring-2
|
||||
focus:ring-blue-500"
|
||||
class="inline-flex items-center justify-center
|
||||
w-10 h-10 p-2
|
||||
rounded-full text-gray-400 hover:text-gray-200 hover:bg-gray-800
|
||||
focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||
data-settings-dropdown="${index}"
|
||||
>
|
||||
<img
|
||||
src="assets/svg/video-settings-gear.svg"
|
||||
alt="Settings"
|
||||
class="w-5 h-5"
|
||||
class="w-5 h-5 object-contain"
|
||||
/>
|
||||
</button>
|
||||
<div
|
||||
|
Reference in New Issue
Block a user