Skip to content

Commit 9a92f7f

Browse files
committed
add info about app
1 parent aa4ce3a commit 9a92f7f

7 files changed

Lines changed: 72 additions & 24 deletions

File tree

config.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget id="io.github.fieldmapper" version="1.0.0-beta" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>FieldMapper</name>
44
<description>
5-
Default description.
5+
Geotagged data collection made easy.
66
</description>
77
<author email="felix-schott@gmx.de">
88
Felix Schott

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const webpack = require('webpack');
33
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
44

55
module.exports = {
6-
mode: 'development',
6+
mode: 'production',
77
entry: './www/main/index.js',
88
output: {
99
path: path.resolve(__dirname, 'www'),
@@ -43,5 +43,5 @@ module.exports = {
4343
ignoreOrder: false, // Enable to remove warnings about conflicting order
4444
}),
4545
],
46-
devtool: 'inline-source-map',
46+
//devtool: 'inline-source-map',
4747
};

www/css/index.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,41 @@ body, button {
99
input[type="checkbox"]:checked {
1010
box-shadow: inset 0 0 0 2px rgba(0,0,0,0.5);
1111
background-color: lightslategray !important;
12+
}
13+
#tabSettings {
14+
height: 100%;
15+
width: 100%;
16+
}
17+
#about {
18+
position: relative;
19+
color: grey;
20+
font-weight: lighter;
21+
}
22+
#about-content {
23+
display: flex;
24+
align-items: center;
25+
justify-content: center;
26+
flex-direction: column;
27+
width: 100%;
28+
height: 100%;
29+
}
30+
#about a {
31+
color: black;
32+
}
33+
#imprint {
34+
display: flex;
35+
align-items: center;
36+
justify-content: center;
37+
flex-direction: column;
38+
width: 100%;
39+
bottom: 0;
40+
left: 0;
41+
right: 0;
42+
position: absolute;
43+
font-size: smaller;
44+
margin-bottom: 5px;
45+
}
46+
#imprint p {
47+
border-top: .5px solid lightgrey;
48+
padding: 5px 2px;
1249
}

www/index.html

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@
2626
<div class="footer grey-900 shadow tab">
2727
<button class="icon ion-android-map active" id="mapBtn" onclick="openTab('map')"> Map</button>
2828
<button class="icon ion-ios-gear" id="settingsBtn" onclick="openTab('tabSettings')"> Settings</button>
29-
<button class="icon ion-ios-information" id="aboutBtn" onclick="openTab('tabAbout')"> About</button>
3029
</div>
3130
<div class="content has-header has-footer">
3231
<div class="tab-content active" id="map"></div>
3332
<div class="tab-content padding" id="tabSettings">
3433

35-
<div class="list radius" style="margin-top: 5px">
34+
<div id="settingsList" class="list radius" style="margin-top: 5px">
3635
<div class="item" onclick="openPage('./main/settings/variables/managevariables')">
3736
<h2>Variable Management</h2>
3837
<div class="right">
@@ -59,16 +58,19 @@ <h2>Reset</h2>
5958
</div>
6059
</div>
6160

62-
</div>
63-
<div class="tab-content padding" id="tabAbout">
64-
<div class="list radius" style="margin-top: 10px">
65-
<div class="item no-border" style="text-align: center">
66-
Thanks for using FieldMapper. Visit the PROJECT WEBSITE for an extensive documentation. The source code is
67-
available ON GITHUB&mdash;contributions welcome!
61+
<div id="about">
62+
<div id="about-content">
63+
<p>Thanks for using FieldMapper.</p>
64+
<p>Visit the <a href="https://fieldmapper.github.io">project website</a> for an
65+
extensive
66+
documentation.</p>
6867
</div>
69-
<div class="item no-border" style="text-align: center">
70-
Do not hesitate to GET IN TOUCH if you encounter bugs or feel like FieldMapper is lacking an important
71-
feature.
68+
<div id="imprint">
69+
<p>FieldMapper v1.0.0-beta | &copy; <a href="mailto:felix-schott@gmx.de">Felix Schott</a> 2020
70+
|
71+
Published
72+
under
73+
<a href="https://github.com/felluksch/FieldMapper/blob/master/LICENSE">GNU GPLv3</a></p>
7274
</div>
7375
</div>
7476
</div>

www/main/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'leaflet-easybutton';
77
import './utils/easybutton-ext';
88

99
import './utils/db';
10-
import { updateStatus, onOnline, onOffline, hideStatus, showStatus } from './utils';
10+
import { updateStatus, onOnline, onOffline, hideStatus, showStatus, onLoadAbout } from './utils';
1111
import { addControls } from './controls/controls';
1212
import { getLayers, getOptions } from './settings/utils';
1313
import { onLoadReset } from './settings/reset/reset';
@@ -120,8 +120,7 @@ window.app = {
120120
let OSM = app.OSM;
121121

122122
document.getElementById('mapBtn').addEventListener('click', showStatus);
123-
document.getElementById('settingsBtn').addEventListener('click', hideStatus);
124-
document.getElementById('aboutBtn').addEventListener('click', hideStatus);
123+
document.getElementById('settingsBtn').addEventListener('click', () => { onLoadAbout(); hideStatus() });
125124

126125
document.getElementById('mapBtn').addEventListener('click', app.loadMap);
127126
document.addEventListener('openPage', function (ev) {

www/main/utils.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,14 @@ export function hideStatus() {
2020

2121
export function showStatus() {
2222
document.getElementById('status').style.display = "inline";
23+
}
24+
25+
export function onLoadAbout() {
26+
let container = document.getElementById('tabSettings').getBoundingClientRect().bottom;
27+
let list = document.getElementById('settingsList').getBoundingClientRect().bottom;
28+
let imprint = document.getElementById('imprint').offsetHeight;
29+
let about = document.getElementById('about');
30+
let content = document.getElementById('about-content');
31+
about.style.height = (container - list).toString() + "px";
32+
content.style.height = (container - list - imprint).toString() + "px";
2333
}

www/main/utils/db.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ window.db = {
4444
this.root.getDirectory('db', { create: false }, dirEntry => {
4545
dirEntry.getFile(key, { create: false }, function (fileEntry) {
4646
fileEntry.remove(resolve())
47-
}, onError);
48-
}, onError);
47+
}, (e) => { onError(e), resolve(null) });
48+
}, (e) => { onError(e), resolve(null) });
4949
})
5050

5151
},
5252
clear: () => {
5353
return new Promise(resolve => {
54-
this.root.getDirectory('db', { create: true }, dirEntry => {
55-
dirEntry.removeRecursively(resolve());
56-
}, onError);
54+
this.root.getDirectory('db', { create: false }, dirEntry => {
55+
dirEntry.removeRecursively(resolve(null));
56+
}, (e) => { onError(e), resolve(null) });
5757
})
5858
},
5959
getSize: () => {
@@ -68,5 +68,5 @@ window.db = {
6868
}
6969

7070
function onError(error) {
71-
console.log(error)
71+
console.log(error.code)
7272
};

0 commit comments

Comments
 (0)