From d7dbe7fee362d587dfc334135d9581b6216a4295 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 23 Nov 2025 04:13:56 +0000
Subject: [PATCH] =Timeline block, and feed block updated. DataStore.js refactored to not block rendering

---
 inc/helpers/ui.php |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/inc/helpers/ui.php b/inc/helpers/ui.php
index 85f276d..0039a73 100644
--- a/inc/helpers/ui.php
+++ b/inc/helpers/ui.php
@@ -1,6 +1,7 @@
 <?php
 
 use JVBase\utility\Features;
+use JVBase\utility\Image;
 
 if (!defined('ABSPATH')) {
 	exit;
@@ -53,8 +54,7 @@
 				?>
 			</nav>
 		</div>
-		<div class="qitems col">
-			<!-- Operations will be listed here -->
+		<div class="qitems col a-start">
 		</div>
 		<div class="queue-actions row btw">
 			<button class="dismiss-all">Clear Completed</button>
@@ -245,19 +245,10 @@
  *
  * @return string
  */
-function jvbFormatImage(int|string $imgID, string $start = 'tiny', string $end = 'large'):string
+function jvbFormatImage(int $imgID, string $start = 'tiny', string $end = 'large', bool $addLink = true, ?string $postSlug = null):string
 {
-    $block = new \JVBase\blocks\CustomBlocks();
-    if ($imgID === '' || $imgID === 0) {
-        $imgID = $block->imageID($imgID);
-    }
-    if ($imgID === '' || $imgID === 0 || $imgID === false) {
-        return '';
-    }
-
-	$imgID = (int)$imgID;
-
-    return $block->formatImage($imgID, $start, $end);
+    $image = new Image();
+    return $image->formatImage($imgID, $start, $end, $addLink, $postSlug);
 }
 
 /**
@@ -265,8 +256,6 @@
  * @return void
  */
 add_action('wp_footer', 'jvbToastContainer');
-
-
 function jvbToastContainer():void
 {
     ?>
@@ -332,11 +321,12 @@
 add_action('wp_footer', 'jvbLoadingScreen');
 function jvbLoadingScreen():string
 {
+	$icon = apply_filters('jvbLoadingIcon', 'drop-simple');
 	return '<dialog class="loading">
 		<div class="col">
 			<div class="spinner"></div>
 			<div class="status col">
-				<div class="icon">'.apply_filters('jvbLoadingIcon', jvbIcon('drop-simple')).'</div>
+				<div class="icon">'.jvbIcon($icon).'</div>
 				<h3>Loading</h3>
 				<p class="typeText">Please wait...</p>
 			</div>

--
Gitblit v1.10.0