mirror of
https://github.com/a2nt/silverstripe-progressivewebapp.git
synced 2024-10-22 11:05:45 +02:00
IMPR: Versioning
This commit is contained in:
parent
db8bb88bbc
commit
e6eff33908
@ -53,7 +53,7 @@ class ManifestController extends Controller
|
|||||||
'theme_color' => $cfg->get('background'),
|
'theme_color' => $cfg->get('background'),
|
||||||
'orientation' => 'portrait-primary',
|
'orientation' => 'portrait-primary',
|
||||||
'serviceworker' => [
|
'serviceworker' => [
|
||||||
'src' => 'sw.js',
|
'src' => 'sw.js?v='.ServiceWorkerController::Version(),
|
||||||
'scope' => '/',
|
'scope' => '/',
|
||||||
'use_cache' => true,
|
'use_cache' => true,
|
||||||
],
|
],
|
||||||
@ -101,7 +101,7 @@ class ManifestController extends Controller
|
|||||||
'type' => 'image/png',
|
'type' => 'image/png',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'src' => self::join_links($icons_path, 'android-chrome-384x384.png'),
|
'src' => self::join_links($icons_path, 'android-chrome-512x512.png'),
|
||||||
'sizes' => '512x512',
|
'sizes' => '512x512',
|
||||||
'type' => 'image/png',
|
'type' => 'image/png',
|
||||||
],
|
],
|
||||||
|
@ -78,8 +78,8 @@ class ServiceWorkerController extends Controller {
|
|||||||
return $this->config()->get('debug_mode');
|
return $this->config()->get('debug_mode');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Version() {
|
public static function Version() {
|
||||||
return $this->config()->get('version').filemtime(self::getScriptPath());
|
return self::config()->get('version').filemtime(self::getScriptPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user