Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename web_pwa -> pwa #1612

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions web_pwa/controllers/main.py → pwa/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,36 @@ def service_worker(self):
version_list.append(url.split('/')[3])
cache_version = '-'.join(version_list)
mimetype = 'text/javascript;charset=utf-8'
content = qweb.render('web_pwa.service_worker', {
content = qweb.render('pwa.service_worker', {
'pwa_cache_name': cache_version,
'pwa_files_to_cache': urls,
})
return request.make_response(content, [('Content-Type', mimetype)])

@route('/web_pwa/manifest.json', type='http', auth="public")
@route('/pwa/manifest.json', type='http', auth="public")
def manifest(self):
qweb = request.env['ir.qweb'].sudo()
config_param = request.env['ir.config_parameter'].sudo()
pwa_name = config_param.get_param("pwa.manifest.name", "Odoo PWA")
pwa_short_name = config_param.get_param("pwa.manifest.short_name", "Odoo PWA")
icon128x128 = config_param.get_param(
"pwa.manifest.icon128x128", "/web_pwa/static/img/icons/icon-128x128.png")
"pwa.manifest.icon128x128", "/pwa/static/img/icons/icon-128x128.png")
icon144x144 = config_param.get_param(
"pwa.manifest.icon144x144", "/web_pwa/static/img/icons/icon-144x144.png")
"pwa.manifest.icon144x144", "/pwa/static/img/icons/icon-144x144.png")
icon152x152 = config_param.get_param(
"pwa.manifest.icon152x152", "/web_pwa/static/img/icons/icon-152x152.png")
"pwa.manifest.icon152x152", "/pwa/static/img/icons/icon-152x152.png")
icon192x192 = config_param.get_param(
"pwa.manifest.icon192x192", "/web_pwa/static/img/icons/icon-192x192.png")
"pwa.manifest.icon192x192", "/pwa/static/img/icons/icon-192x192.png")
icon256x256 = config_param.get_param(
"pwa.manifest.icon256x256", "/web_pwa/static/img/icons/icon-256x256.png")
"pwa.manifest.icon256x256", "/pwa/static/img/icons/icon-256x256.png")
icon512x512 = config_param.get_param(
"pwa.manifest.icon512x512", "/web_pwa/static/img/icons/icon-512x512.png")
"pwa.manifest.icon512x512", "/pwa/static/img/icons/icon-512x512.png")
background_color = config_param.get_param(
"pwa.manifest.background_color", "#2E69B5")
theme_color = config_param.get_param(
"pwa.manifest.theme_color", "#2E69B5")
mimetype = 'application/json;charset=utf-8'
content = qweb.render('web_pwa.manifest', {
content = qweb.render('pwa.manifest', {
'pwa_name': pwa_name,
'pwa_short_name': pwa_short_name,
'icon128x128': icon128x128,
Expand Down
10 changes: 10 additions & 0 deletions pwa/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The following system parameters con be set to customize the appearance of the application

* pwa.manifest.name (defaults to "Odoo PWA")
* pwa.manifest.short_name (defaults to "Odoo PWA")
* pwa.manifest.icon128x128 (defaults to "/pwa/static/img/icons/icon-128x128.png")
* pwa.manifest.icon144x144 (defaults to "/pwa/static/img/icons/icon-144x144.png")
* pwa.manifest.icon152x152 (defaults to "/pwa/static/img/icons/icon-152x152.png")
* pwa.manifest.icon192x192 (defaults to "/pwa/static/img/icons/icon-192x192.png")
* pwa.manifest.icon256x256 (defaults to "/pwa/static/img/icons/icon-256x256.png")
* pwa.manifest.icon512x512 (defaults to "/pwa/static/img/icons/icon-512x512.png")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
odoo.define('web_pwa.systray.install', function (require) {
odoo.define('pwa.systray.install', function (require) {
"use strict";

var core = require('web.core');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>

<t t-name="web_pwa.systray.install">
<t t-name="pwa.systray.install">
<a href="#" role="menuitem" id="pwa_install_button" data-menu="installpwa" class="dropdown-item" hidden="1">Install PWA</a>
</t>

<t t-extend="UserMenu.Actions">
<t t-jquery="a[data-menu='settings']" t-operation="after">
<t t-call="web_pwa.systray.install"/>
<t t-call="pwa.systray.install"/>
</t>
</t>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
<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/manifest.json"/>
<link rel="manifest" href="/pwa/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/static/img/icons/icon-152x152.png"/>
<link rel="apple-touch-icon" href="/pwa/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/static/src/js/pwa_install.js"/>
<script type="text/javascript" src="/pwa/static/src/js/pwa_install.js"/>
</xpath>
</template>
<template id="service_worker" name="PWA service worker">
Expand Down
127 changes: 0 additions & 127 deletions web_pwa/README.rst

This file was deleted.

160 changes: 0 additions & 160 deletions web_pwa/i18n/da.po

This file was deleted.