[IMP] web_pwa_oca: black, isort, prettier

pre-commit fixes

pre-commit fixes 2
This commit is contained in:
AntoniRomera
2020-06-19 12:42:27 +02:00
committed by sergio-teruel
parent 4ec8d1ab8b
commit 402ca37b14
5 changed files with 128 additions and 127 deletions

View File

@@ -1,29 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="web_layout_pwa" name="Web layout PWA" inherit_id="web.layout">
<xpath expr="//meta[@name='viewport']" position="after">
<!-- Add link rel manifest -->
<link rel="manifest" href="/web_pwa_oca/manifest.json"/>
<link rel="manifest" href="/web_pwa_oca/manifest.json" />
<!-- Add iOS meta tags and icons -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="apple-mobile-web-app-title" content="Odoo PWA"/>
<link rel="apple-touch-icon" href="/web_pwa_oca/static/img/icons/icon-152x152.png"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="Odoo PWA" />
<link
rel="apple-touch-icon"
href="/web_pwa_oca/static/img/icons/icon-152x152.png"
/>
<!-- Add meta theme-color -->
<meta name="theme-color" content="#2E69B5" />
</xpath>
</template>
<template id="assets_backend" name="PWA assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_pwa_oca/static/src/js/pwa_install.js"/>
<script
type="text/javascript"
src="/web_pwa_oca/static/src/js/pwa_install.js"
/>
</xpath>
</template>
<template id="service_worker" name="PWA service worker">
'use strict';
const CACHE_NAME = '<t t-esc="pwa_cache_name"/>';
const CACHE_NAME = '<t t-esc="pwa_cache_name" />';
const FILES_TO_CACHE = [
<t t-foreach="pwa_files_to_cache" t-as="file_to_cache">
'<t t-esc="file_to_cache"/>',
'<t t-esc="file_to_cache" />',
</t>
];
self.addEventListener('install', function (evt) {
@@ -65,41 +71,39 @@ self.addEventListener('fetch', function(evt) {
);
});
</template>
<template id="manifest" name="PWA manifest">
{
"name": "<t t-esc="pwa_name"/>",
"short_name": "<t t-esc="pwa_short_name"/>",
"name": "<t t-esc="pwa_name" />",
"short_name": "<t t-esc="pwa_short_name" />",
"icons": [{
"src": "<t t-esc="icon128x128"/>",
"src": "<t t-esc="icon128x128" />",
"sizes": "128x128",
"type": "image/png"
}, {
"src": "<t t-esc="icon144x144"/>",
"src": "<t t-esc="icon144x144" />",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "<t t-esc="icon152x152"/>",
"src": "<t t-esc="icon152x152" />",
"sizes": "152x152",
"type": "image/png"
}, {
"src": "<t t-esc="icon192x192"/>",
"src": "<t t-esc="icon192x192" />",
"sizes": "192x192",
"type": "image/png"
}, {
"src": "<t t-esc="icon256x256"/>",
"src": "<t t-esc="icon256x256" />",
"sizes": "256x256",
"type": "image/png"
}, {
"src": "<t t-esc="icon512x512"/>",
"src": "<t t-esc="icon512x512" />",
"sizes": "512x512",
"type": "image/png"
}],
"start_url": "/web",
"display": "standalone",
"background_color": "<t t-esc="background_color"/>",
"theme_color": "<t t-esc="theme_color"/>"
"background_color": "<t t-esc="background_color" />",
"theme_color": "<t t-esc="theme_color" />"
}
</template>
</odoo>