Compare commits

...
Author SHA1 Message Date
bence 75bea7c05c Merge pull request 'MAPG-229 make .controlItem relative so it's children can be sized more properly' (#45) from bugfix/MAPG-229-circle-controls-won-t-show-up-in-firefox into develop
default-pipeline default-pipeline #204
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/45
2021-05-09 17:22:13 +02:00
bence 1c3238e64e Merge pull request 'MAPG-230 renew session cookie if it already exists' (#44) from bugfix/MAPG-230-session-s-cookie-is-not-renewed into develop
default-pipeline default-pipeline #203
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/44
2021-05-09 17:21:46 +02:00
bence 6cb9e17ddf Merge pull request 'give example for LEAFLET_TILESERVER_ATTRIBUTION' (#46) from feature/extend-leaflet-env-examples into develop
default-pipeline default-pipeline #202
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/46
2021-05-09 17:17:18 +02:00
bence 88ad6e9d61 give example for LEAFLET_TILESERVER_ATTRIBUTION
default-pipeline default-pipeline #197
2021-05-09 17:11:51 +02:00
bence 2fb807c479 MAPG-229 make .controlItem relative so it's children can be sized more properly
default-pipeline default-pipeline #196
2021-05-09 16:15:29 +02:00
bence 8e9e5b08f9 MAPG-230 renew session cookie if it already exists
default-pipeline default-pipeline #194
2021-05-09 15:49:27 +02:00
bence 94624d5b2c Merge pull request 'reverted removal of preference for outdoor panorama in the front end' (#43) from feature/preference-for-outdoor-panorama-in-the-frontend into develop
default-pipeline default-pipeline #195
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/43
Reviewed-by: Pőcze Bence <bence@pocze.ch>
2021-05-09 13:34:36 +02:00
balazs 71c728d56c reverted removal of preference for outdoor panorama in the front end
default-pipeline default-pipeline #190
2021-05-09 11:46:03 +02:00
4 changed files with 23 additions and 4 deletions

No files matched your search

+1
View File
@@ -70,6 +70,7 @@ Example:
``` ```
LEAFLET_TILESERVER_URL=https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png LEAFLET_TILESERVER_URL=https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
LEAFLET_TILESERVER_SUBDOMAINS=abc LEAFLET_TILESERVER_SUBDOMAINS=abc
LEAFLET_TILESERVER_ATTRIBUTION="&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors"
``` ```
### (Production only) Create cron job ### (Production only) Create cron job
+3 -1
View File
@@ -451,6 +451,7 @@ div.box {
} }
.circleControl .controlItem { .circleControl .controlItem {
position: relative;
height: 60px; height: 60px;
margin-top: 10px; margin-top: 10px;
opacity: 70%; opacity: 70%;
@@ -463,6 +464,8 @@ div.box {
.circleControl .controlItem div { .circleControl .controlItem div {
position: absolute; position: absolute;
width: 100%;
height: 100%;
} }
.circleControl .controlBackground { .circleControl .controlBackground {
@@ -477,7 +480,6 @@ div.box {
margin: auto; margin: auto;
margin-top: 50%; margin-top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
-ms-transform: translateY(-50%);
} }
@media screen and (max-width: 599px) { @media screen and (max-width: 599px) {
+7 -1
View File
@@ -80,16 +80,22 @@
MapEditor.panorama.setPano(panoLocationData.pano); MapEditor.panorama.setPano(panoLocationData.pano);
}, },
requestPanoData: function (location) { requestPanoData: function (location, canBeIndoor) {
var sv = new google.maps.StreetViewService(); var sv = new google.maps.StreetViewService();
sv.getPanorama({ sv.getPanorama({
location: location, location: location,
preference: google.maps.StreetViewPreference.NEAREST, preference: google.maps.StreetViewPreference.NEAREST,
radius: MapEditor.map.getSearchRadius(location), radius: MapEditor.map.getSearchRadius(location),
source: canBeIndoor ? google.maps.StreetViewSource.DEFAULT : google.maps.StreetViewSource.OUTDOOR
}, function (data, status) { }, function (data, status) {
var panoLocationData = status === google.maps.StreetViewStatus.OK ? data.location : null; var panoLocationData = status === google.maps.StreetViewStatus.OK ? data.location : null;
if (panoLocationData === null && !canBeIndoor) {
MapEditor.requestPanoData(location, true);
return;
}
document.getElementById('loading').style.visibility = 'hidden'; document.getElementById('loading').style.visibility = 'hidden';
MapEditor.loadPanoForNewPlace(panoLocationData); MapEditor.loadPanoForNewPlace(panoLocationData);
+12 -2
View File
@@ -74,13 +74,23 @@ if (isset($_COOKIE['COOKIES_CONSENT'])) {
session_set_save_handler(Container::$sessionHandler, true); session_set_save_handler(Container::$sessionHandler, true);
session_start([ session_start([
'gc_maxlifetime' => 604800,
'gc_probability' => 0, // old sessions are deleted by MaintainDatabaseCommand 'gc_probability' => 0, // old sessions are deleted by MaintainDatabaseCommand
'cookie_lifetime' => 604800, // TODO: cookie is not renewed so session can be lost 'cookie_lifetime' => 604800,
'cookie_path' => '/',
'cookie_httponly' => true, 'cookie_httponly' => true,
'cookie_samesite' => 'Lax' 'cookie_samesite' => 'Lax'
]); ]);
if (isset($_COOKIE[session_name()])) {
// extend session cookie lifetime is cookie already exists
setcookie(session_name(), session_id(), [
'expires' => time() + 604800,
'path' => '/',
'httponly' => true,
'samesite' => 'Lax'
]);
}
// this is needed to handle old type of session IDs // this is needed to handle old type of session IDs
if (!Container::$sessionHandler->validateId(session_id())) { if (!Container::$sessionHandler->validateId(session_id())) {
session_regenerate_id(true); session_regenerate_id(true);