mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 00:01:05 +00:00
refactor(pwa): ♻️ sort parameter by W3 draft
https://www.w3.org/TR/appmanifest/
This commit is contained in:
parent
b51b0c2332
commit
d80b91a4a8
|
@ -40,14 +40,9 @@ class ApiWebappManifest extends ApiBase {
|
||||||
|
|
||||||
$config = $this->getConfig();
|
$config = $this->getConfig();
|
||||||
$resultObj = $this->getResult();
|
$resultObj = $this->getResult();
|
||||||
$resultObj->addValue( null, 'name', $config->get( 'Sitename' ) );
|
|
||||||
$resultObj->addValue( null, 'orientation', 'portrait' );
|
|
||||||
$resultObj->addValue( null, 'dir', $services->getContentLanguage()->getDir() );
|
$resultObj->addValue( null, 'dir', $services->getContentLanguage()->getDir() );
|
||||||
$resultObj->addValue( null, 'lang', $config->get( 'LanguageCode' ) );
|
$resultObj->addValue( null, 'lang', $config->get( 'LanguageCode' ) );
|
||||||
$resultObj->addValue( null, 'display', 'minimal-ui' );
|
$resultObj->addValue( null, 'name', $config->get( 'Sitename' ) );
|
||||||
$resultObj->addValue( null, 'theme_color', $config->get( 'CitizenManifestThemeColor' ) );
|
|
||||||
$resultObj->addValue( null, 'background_color', $config->get( 'CitizenManifestBackgroundColor' ) );
|
|
||||||
$resultObj->addValue( null, 'start_url', Title::newMainPage()->getLocalURL() );
|
|
||||||
|
|
||||||
$icons = [];
|
$icons = [];
|
||||||
|
|
||||||
|
@ -72,6 +67,12 @@ class ApiWebappManifest extends ApiBase {
|
||||||
|
|
||||||
$resultObj->addValue( null, 'icons', $icons );
|
$resultObj->addValue( null, 'icons', $icons );
|
||||||
|
|
||||||
|
$resultObj->addValue( null, 'display', 'minimal-ui' );
|
||||||
|
$resultObj->addValue( null, 'orientation', 'portrait' );
|
||||||
|
$resultObj->addValue( null, 'start_url', Title::newMainPage()->getLocalURL() );
|
||||||
|
$resultObj->addValue( null, 'theme_color', $config->get( 'CitizenManifestThemeColor' ) );
|
||||||
|
$resultObj->addValue( null, 'background_color', $config->get( 'CitizenManifestBackgroundColor' ) );
|
||||||
|
|
||||||
$main = $this->getMain();
|
$main = $this->getMain();
|
||||||
$main->setCacheControl( [ 's-maxage' => 86400, 'max-age' => 86400 ] );
|
$main->setCacheControl( [ 's-maxage' => 86400, 'max-age' => 86400 ] );
|
||||||
$main->setCacheMode( 'public' );
|
$main->setCacheMode( 'public' );
|
||||||
|
|
Loading…
Reference in a new issue