mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 03:42:26 +00:00
Add for-you view wiring
This commit is contained in:
1 parent
64e66be204
commit
a846da13c0
3 files changed
+33
-2
No files matched your search
@@ -40,14 +40,14 @@
|
||||
</button>
|
||||
</div>
|
||||
<nav class="sidebar-nav" aria-label="Primary">
|
||||
<a href="#view=most-recent-videos" class="sidebar-nav-link" title="Recent">
|
||||
<a href="#view=for-you" class="sidebar-nav-link" title="For You">
|
||||
<img
|
||||
src="assets/svg/recent-icon.svg"
|
||||
alt=""
|
||||
aria-hidden="true"
|
||||
class="sidebar-icon"
|
||||
/>
|
||||
<span class="sidebar-text">Recent</span>
|
||||
<span class="sidebar-text">For You</span>
|
||||
</a>
|
||||
<a href="#view=explore" class="sidebar-nav-link" title="Explore">
|
||||
<img
|
||||
|
||||
@@ -92,6 +92,20 @@ export const viewInitRegistry = {
|
||||
refreshApp.forceRefreshAllProfiles();
|
||||
}
|
||||
},
|
||||
"for-you": () => {
|
||||
const app = getApplication();
|
||||
if (app && typeof app.loadVideos === "function") {
|
||||
if (typeof app.mountVideoListView === "function") {
|
||||
app.mountVideoListView();
|
||||
}
|
||||
app.loadVideos();
|
||||
}
|
||||
// Force profile updates after the new view is in place.
|
||||
const refreshApp = getApplication();
|
||||
if (refreshApp && typeof refreshApp.forceRefreshAllProfiles === "function") {
|
||||
refreshApp.forceRefreshAllProfiles();
|
||||
}
|
||||
},
|
||||
explore: () => {
|
||||
devLogger.log("Explore view loaded.");
|
||||
},
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<!-- views/for-you.html -->
|
||||
<section data-ds="new">
|
||||
<h2 class="mb-4 text-xl font-semibold text-text">For You</h2>
|
||||
|
||||
<div id="recentVideoTags" class="mb-4" hidden></div>
|
||||
<div id="videoList" class="bv-grid-video">
|
||||
<div class="sidebar-loading-wrapper" role="status" aria-live="polite">
|
||||
<div class="sidebar-loading-indicator">
|
||||
<span
|
||||
class="status-spinner status-spinner--inline"
|
||||
aria-hidden="true"
|
||||
></span>
|
||||
<span class="sidebar-loading-text">Loading for you…</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
Reference in new issue
Block a user