diff --git a/partials/desktop/shell.php b/partials/desktop/shell.php index f64069be..1fb1422e 100644 --- a/partials/desktop/shell.php +++ b/partials/desktop/shell.php @@ -8,6 +8,18 @@ $baseSkinProfile = $desktopPayload['meta']['base_skin_profile']; $skinProfile = $desktopPayload['meta']['skin_profile']; $wallpaper = $desktopPayload['desktop']['wallpaper']; +$assetVersion = static function (string $publicPath): string { + $filesystemPath = dirname(__DIR__, 2) . '/public' . $publicPath; + + if (!is_file($filesystemPath)) { + return $publicPath; + } + + $mtime = filemtime($filesystemPath); + + return $mtime === false ? $publicPath : $publicPath . '?v=' . $mtime; +}; + $renderStartIcon = static function (array $profile): string { $style = (string) ($profile['taskbar_icon_style'] ?? 'label'); @@ -24,12 +36,12 @@ $renderStartIcon = static function (array $profile): string {