Skip to content

Commit

Permalink
issue #11
Browse files Browse the repository at this point in the history
  • Loading branch information
coulisse committed Jan 20, 2023
1 parent 54c6cb1 commit dd615e0
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 38 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,9 @@ For SSL, I'm using [Cloudflare](https://www.cloudflare.com/). This is a free ser
**Index on MySQL:** if you would to increase speed on callsign search, you could define some index on the table 'spot'. You can see more details on ["create_mysql_index.sql"](scripts/create_mysql_index.sql)


**Cookie settings:** if you don't use https, but you use http, you have to change the following setting in webapp.py:
```
SESSION_COOKIE_SECURE=True,
```
to

```
SESSION_COOKIE_SECURE=False,
```


### Mobile
This application is designed for desktop and mobile phone. It is a [PWA](https://en.wikipedia.org/wiki/Progressive_web_app), so it could be installed and used like an app on mobile.


### API
**Spot list**

Expand Down
2 changes: 1 addition & 1 deletion cfg/webapp_log_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ level=INFO
handlers=stream_handler,file_handler

[logger_webapp]
level=DEBUG
level=INFO
handlers=stream_handler,file_handler
qualname=webapp
propagate=0
Expand Down
3 changes: 2 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Change log
Date: 18/01/2023
Date: 20/01/2023
Release: v2.4.1
- changed dimensions of spots in world dx spost charts
- managed empty data in data providers for charts
Expand All @@ -11,6 +11,7 @@ Release: v2.4.1
- cut comments too long
- charts layout changed
- reduced javascripts
- fixed issue #11 cookie consent request for non-https website

___
Date: 01/01/2023
Expand Down
2 changes: 1 addition & 1 deletion static/css/rel/style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions static/html/rel/offline.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="icon" href="/static/images/icons/spider_ico_master.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/images/icons/icon-apple.png">
<link rel="manifest" href="/static/manifest.webmanifest">
<link rel="stylesheet" href="/static/css/dev/style.css">
<link rel="stylesheet" href="/static/css/rel/style.min.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
Expand Down Expand Up @@ -106,18 +106,18 @@ <h2 class="display-4">No internet connection</h2>
<span id="version">v2.4.1</span>
</div>
</footer>
<script async src="static/js/dev/load-sw.js"></script>
<script async src="static/js/rel/load-sw.min.js"></script>
<!--- <script nonce="sedfGFG32xs"> -->
<script nonce="">


</script>
<script defer src="static/js/dev/common.js"></script>
<script defer src="static/js/rel/common.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
crossorigin="anonymous"></script>

<script async src="static/js/dev/callsign_search.js"></script>
<script async src="static/js/rel/callsign_search.min.js"></script>



Expand Down Expand Up @@ -145,7 +145,7 @@ <h5 class="modal-title" id="exampleModalLabel">We use cookies</h5>
</div>
</div>

<script defer src="static/js/dev/cookie_consent.js"></script>
<script defer src="static/js/rel/cookie_consent.min.js"></script>

</body>

Expand Down
7 changes: 3 additions & 4 deletions static/js/dev/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ function setCookie(cname, cvalue, exdays) {
const d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
let expires = 'expires=' + d.toUTCString();
try {
if (location.protocol == 'https:') {
document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/' + ';Samesite=Strict;Secure=True';
}
catch {
console.log('could not set secure cookie: try with Samsite Lax...');
} else {
console.log('Warning: could not set secure cookie: try with Samsite Lax...');
document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/' + ';Samesite=Lax';
}
}
Expand Down
2 changes: 1 addition & 1 deletion static/js/rel/common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<link rel="icon" href="/static/images/icons/spider_ico_master.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/images/icons/icon-apple.png">
<link rel="manifest" href="/static/manifest.webmanifest">
<link rel="stylesheet" href="/static/css/dev/style.css">
<link rel="stylesheet" href="/static/css/rel/style.min.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
Expand Down Expand Up @@ -103,19 +103,19 @@
<span id="version">v2.4.1</span>
</div>
</footer>
<script async src="static/js/dev/load-sw.js"></script>
<script async src="static/js/rel/load-sw.min.js"></script>
<!--- <script nonce="sedfGFG32xs"> -->
<script nonce="{{ inline_script_nonce }}">
{% block app_data %}
var my_callsign = '{{mycallsign}}';
{% endblock app_data %}
</script>
<script defer src="static/js/dev/common.js"></script>
<script defer src="static/js/rel/common.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
crossorigin="anonymous"></script>
{% block app_scripts %}
<script async src="static/js/dev/callsign_search.js"></script>
<script async src="static/js/rel/callsign_search.min.js"></script>
{% endblock app_scripts %}
{% block inline_scripts %}
{% endblock inline_scripts %}
Expand Down Expand Up @@ -145,7 +145,7 @@ <h5 class="modal-title" id="exampleModalLabel">We use cookies</h5>
</div>
</div>

<script defer src="static/js/dev/cookie_consent.js"></script>
<script defer src="static/js/rel/cookie_consent.min.js"></script>
{% endif %}
</body>

Expand Down
2 changes: 1 addition & 1 deletion templates/callsign.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ <h1 class="display-4 text-white">{{callsign}}</h1>
<div class="row mx-auto">
{% endblock filters %}
{% block inline_scripts %}
<script defer src="static/js/dev/callsign_inline.js"></script>
<script defer src="static/js/rel/callsign_inline.min.js"></script>
{% endblock %}
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ <h1 class="display-4 text-white">WEB DX Cluster</h1>
{% endblock app_data %}
{% block app_scripts %}
{{ super() }}
<script defer src="static/js/dev/table.js"></script>
<script defer src="static/js/rel/table.min.js"></script>
{% endblock %}
{% block inline_scripts %}
<script defer src="static/js/dev/index_inline.js"></script>
<script defer src="static/js/rel/index_inline.min.js"></script>
{% endblock %}
10 changes: 5 additions & 5 deletions templates/plots.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ <h1 class="display-4 text-white">PLOTS & STATS</h1>

{% block app_scripts %}
{{ super() }}
<script defer src="static/js/dev/plot_band_activity.js"></script>
<script defer src="static/js/dev/plot_world_dx_spots_live.js"></script>
<script defer src="static/js/dev/plot_hour_band.js"></script>
<script defer src="static/js/dev/plot_dx_spots_trend.js"></script>
<script defer src="static/js/dev/plot_dx_spots_per_month.js"></script>
<script defer src="static/js/rel/plot_band_activity.min.js"></script>
<script defer src="static/js/rel/plot_world_dx_spots_live.min.js"></script>
<script defer src="static/js/rel/plot_hour_band.min.js"></script>
<script defer src="static/js/rel/plot_dx_spots_trend.min.js"></script>
<script defer src="static/js/rel/plot_dx_spots_per_month.min.js"></script>

{% endblock app_scripts %}

0 comments on commit dd615e0

Please sign in to comment.