diff --git a/src/templates/watch.eta b/src/templates/watch.eta index 9605b34..3bd9672 100644 --- a/src/templates/watch.eta +++ b/src/templates/watch.eta @@ -42,10 +42,29 @@ <% }) %> <% } %> + + <% if (it.deletion_stage === 'pending_delete') { %> +
+ Heads up — this video is scheduled for deletion. +

Got questions or think this is a mistake? Drop me an email at admin@preservetube.com.

+
+ <% } %>
- - + <% if (it.deletion_stage === 'soft_delete') { %> +
+

This video has been moved to cold storage and will be permanently deleted soon.

+

If you'd like to retrieve it, email me at admin@preservetube.com.

+
+ <% } else if (it.deletion_stage === 'deleted') { %> +
+

This video has been removed.

+

Storage is limited, so I occasionally clear out things like 10-hour blank screens and similar content.

+
+ <% } else { %> + + + <% } %>

<%= it.v_title %>

@@ -220,6 +239,71 @@ pointer-events: none; } + .deletion-banner { + padding: 10px; + margin-top: 5px; + margin-bottom: 0.5rem; + } + + .deletion-banner.pending { + background-color: #ffe0e0; + border: 2px dashed #ff6b6b; + } + + .deletion-title { + font-size: large; + font-weight: 600; + display: block; + margin-bottom: 4px; + } + + .deletion-banner p { + margin: 0; + font-size: medium; + } + + .deletion-banner a { + color: inherit; + text-decoration: underline; + } + + .video-placeholder { + width: 100%; + height: 100%; + min-height: 400px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; + padding: 2rem; + margin-top: 5px; + box-sizing: border-box; + border-radius: 4px; + } + + .video-placeholder.soft-delete { + background-color: #fbf6e3; + border: 2px dashed #ffc107; + } + + .video-placeholder.deleted { + background-color: #f6e8e9; + border: 2px dashed #dc3545; + } + + .video-placeholder p { + font-size: 1.2rem; + margin: 0.5rem 0; + max-width: 80%; + } + + .video-placeholder .deletion-note { + font-size: 1rem; + color: #666; + margin-top: 1rem; + } + @media (max-width: 1100px) { h1 { font-size: 1.65em; @@ -250,13 +334,14 @@ function initVideoLoading() { const video = document.getElementById('video-player'); const loading = document.getElementById('video-loading'); - let hasTheVideoErrored = false - const isIOSOrIPad = /iPad|iPhone|iPod/.test(navigator.userAgent) || - (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); if (!video || !loading) return; loading?.classList.remove("hidden"); + let hasTheVideoErrored = false + const isIOSOrIPad = /iPad|iPhone|iPod/.test(navigator.userAgent) || + (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); + const hide = () => { if (!loading.classList.contains('hidden')) { loading.classList.add('hidden'); diff --git a/src/types.ts b/src/types.ts index 580ae0a..bc22a80 100644 --- a/src/types.ts +++ b/src/types.ts @@ -25,7 +25,8 @@ export interface VideosTable { channelAvatar: string playlist?: string | null disabled: boolean - hasBeenReported: boolean + hasBeenReported: boolean, + deletion_stage: 'pending_delete' | 'soft_delete' | 'deleted' | null } export type Video = Selectable