From b1761913a20e482642251a83163f9f5cf7810375 Mon Sep 17 00:00:00 2001 From: Mert Date: Tue, 24 Mar 2020 06:49:42 +0000 Subject: [PATCH 01/45] Translated using Weblate (Turkish) Currently translated at 34.3% (49 of 143 strings) Translation: Hauk/Android client Translate-URL: https://traduki.varden.info/projects/hauk/android/tr/ --- android/app/src/main/res/values-tr/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/app/src/main/res/values-tr/strings.xml b/android/app/src/main/res/values-tr/strings.xml index c23b645..a8e9d30 100644 --- a/android/app/src/main/res/values-tr/strings.xml +++ b/android/app/src/main/res/values-tr/strings.xml @@ -48,4 +48,5 @@ Paylaşım modu: Paylaşım süresi: Açık kaynak konum paylaşımı + Aktif linkler \ No newline at end of file From f44a7eb36cb14dfa4226a197c42269da31f3f6f6 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Wed, 20 May 2020 22:02:55 +0200 Subject: [PATCH 02/45] Add note relating to #137 --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 976f0d9..f789dc7 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ phone, and you're good to go! to install Hauk in, for example `/var/www/html`. Follow the instructions given by the install script. Make sure to set a secure hashed password and edit your site's domain in the configuration file after installation. -3. Start the web server and make sure Memcached or Redis is running. +3. Start the web server and make sure Memcached or Redis is running and + [properly configured and firewalled](https://github.com/bilde2910/Hauk/wiki/FAQ#how-do-i-securely-configure-memcachedredis). 4. Install the companion Android app (from your favourite store linked above) on your phone and enter your server's settings. @@ -50,7 +51,8 @@ files manually. in your web root, for example `/var/www/html`. 3. Modify `include/config.php` to your liking. Make sure to set a secure hashed password and edit your site's domain in this file. -4. Start the web server and make sure Memcached or Redis is running. +4. Start the web server and make sure Memcached or Redis is running and + [properly configured and firewalled](https://github.com/bilde2910/Hauk/wiki/FAQ#how-do-i-securely-configure-memcachedredis). 5. Install the companion Android app (from your favourite store linked above) on your phone and enter your server's settings. From 6bea156d39799a81772d058d716dc652e6075be7 Mon Sep 17 00:00:00 2001 From: Rick van der Zwet Date: Mon, 25 May 2020 11:29:37 +0000 Subject: [PATCH 03/45] Fix php syntax error --- backend-php/api/new-link.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-php/api/new-link.php b/backend-php/api/new-link.php index 3fe6080..3b37aab 100644 --- a/backend-php/api/new-link.php +++ b/backend-php/api/new-link.php @@ -8,7 +8,7 @@ header("X-Hauk-Version: ".BACKEND_VERSION); requirePOST( "sid", // Existing session ID. - "ado", // Whether or not to allow adoption. + "ado" // Whether or not to allow adoption. ); $memcache = memConnect(); From 3235f789f73cc9e14e0284636e217dcf272f0eac Mon Sep 17 00:00:00 2001 From: Rick van der Zwet Date: Mon, 25 May 2020 11:58:36 +0000 Subject: [PATCH 04/45] Fix unable to connect to redis socket If second argument is given, the connection is always parsed as TCP host. --- backend-php/include/wrapper/redis.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend-php/include/wrapper/redis.php b/backend-php/include/wrapper/redis.php index 81645e9..6eb4d9e 100644 --- a/backend-php/include/wrapper/redis.php +++ b/backend-php/include/wrapper/redis.php @@ -8,8 +8,13 @@ class MemWrapper { function __construct() { $this->redis = new Redis(); - $this->redis->connect(getConfig("redis_host"), getConfig("redis_port")) - or die ("Server could not connect to Redis!\n"); + if(substr(getConfig("redis_host"), 0, 1) === "/") { + $this->redis->connect(getConfig("redis_host")) + or die ("Server could not connect to Redis socket!\n"); + } else { + $this->redis->connect(getConfig("redis_host"), getConfig("redis_port")) + or die ("Server could not connect to Redis!\n"); + } if (getConfig("redis_use_auth")) { $this->redis->auth(getConfig("redis_auth")) or die("Incorrect Redis authentication!"); From a7e241ade15bee6a83b26403214ea3d4151045d2 Mon Sep 17 00:00:00 2001 From: Rick van der Zwet Date: Mon, 25 May 2020 12:37:08 +0000 Subject: [PATCH 05/45] Add FreeBSD support to installer Configuration directory /etc is reserved for system configuration files. /usr/local/etc is reserved for local (user) installed configuation files. --- backend-php/include/inc.php | 1 + install.sh | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/backend-php/include/inc.php b/backend-php/include/inc.php index 13d2643..366a7c2 100644 --- a/backend-php/include/inc.php +++ b/backend-php/include/inc.php @@ -158,6 +158,7 @@ const DEFAULTS = array( // one found from this list. const CONFIG_PATHS = array( "/etc/hauk/config.php", + "/usr/local/etc/hauk/config.php", __DIR__."/config.php" ); diff --git a/install.sh b/install.sh index 7e170db..c52ab9d 100755 --- a/install.sh +++ b/install.sh @@ -14,11 +14,21 @@ hauk_help() { echo "Installs Hauk to the specified web root directory, e.g. /var/www/html" echo "" echo -e "\033[1mOptions:\033[0m" - echo -e "\033[91m-c\t\033[0mInstall config file to /etc/hauk" + echo -e "\033[91m-c\t\033[0mInstall config file to $config" echo -e "\033[91m-f\t\033[0mOverwrite without asking" exit 1 } +# Centralized configuration +if [ "X$(uname -s)" = "XFreeBSD" ]; then + confdir=/usr/local/etc/hauk + config=/usr/local/etc/hauk/config.php +else + confdir=/etc/hauk + config=/etc/hauk/config.php +fi +useconf=0 + # Print help if no arguments given if [ "$#" -eq 0 ]; then hauk_help @@ -32,11 +42,6 @@ if [ "$webroot" = "-f" ] || [ "$webroot" = "-c" ]; then hauk_help fi -# Centralized configuration -confdir=/etc/hauk -config=/etc/hauk/config.php -useconf=0 - hauk_config() { if [ -f "$config" ]; then if [ "$1" != "-f" ] && [ "$2" != "-f" ]; then @@ -46,7 +51,7 @@ hauk_config() { rm "$config" >/dev/null 2>&1 if [ -f "$config" ]; then echo "You do not have permissions to install the configuration file in" - echo "/etc/hauk. Please run this script as root." + echo "${confdir}. Please run this script as root." exit 5 fi ;; @@ -55,7 +60,7 @@ hauk_config() { rm "$config" >/dev/null 2>&1 if [ -f "$config" ]; then echo "You do not have permissions to install the configuration file in" - echo "/etc/hauk. Please run this script as root." + echo "${confdir}. Please run this script as root." exit 5 fi fi @@ -133,9 +138,7 @@ cp -R backend-php/* "$webroot" cp -R frontend/* "$webroot" # Determine the path in which config is saved -if [ "$useconf" -eq 1 ]; then - confpath=/etc/hauk/config.php -else +if [ "$useconf" -eq 0 ]; then confpath="$webroot/include/config.php" cp backend-php/include/config-sample.php "$confpath" >/dev/null 2>&1 fi From 396302a1970e48eac9640afc5720d8660f0919ba Mon Sep 17 00:00:00 2001 From: Rick van der Zwet Date: Mon, 25 May 2020 15:09:03 +0200 Subject: [PATCH 06/45] Update install.sh Old habbits dies slow, explicit guarding is not longer required. Co-authored-by: Marius Lindvall --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c52ab9d..20cd558 100755 --- a/install.sh +++ b/install.sh @@ -20,7 +20,7 @@ hauk_help() { } # Centralized configuration -if [ "X$(uname -s)" = "XFreeBSD" ]; then +if [ "$(uname -s)" = "FreeBSD" ]; then confdir=/usr/local/etc/hauk config=/usr/local/etc/hauk/config.php else From 3ab6f728790a91b68f570f3394f7be4dc4ee13f3 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Thu, 30 Jul 2020 20:00:41 +0200 Subject: [PATCH 07/45] Update Gradle and dependencies --- android/.idea/jarRepositories.xml | 25 +++++++++++++++++++ android/app/build.gradle | 2 +- android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 4 +-- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 android/.idea/jarRepositories.xml diff --git a/android/.idea/jarRepositories.xml b/android/.idea/jarRepositories.xml new file mode 100644 index 0000000..a5f05cd --- /dev/null +++ b/android/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 99e0fd1..601cc2c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,7 +23,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation 'androidx.preference:preference:1.1.0' + implementation 'androidx.preference:preference:1.1.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' diff --git a/android/build.gradle b/android/build.gradle index dcaeef2..95a3996 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -7,7 +7,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.1' + classpath 'com.android.tools.build:gradle:4.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 63a0e6c..fff0b73 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Mar 04 12:19:53 CET 2020 +#Thu Jul 30 19:59:09 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip From bbca5862f37989dd99d63337e5450babbd9e5d89 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Thu, 30 Jul 2020 20:06:59 +0200 Subject: [PATCH 08/45] Handle expired sessions gracefully; fixes #148 --- frontend/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/main.js b/frontend/main.js index e0eebcf..28a582b 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -258,7 +258,7 @@ function getJSON(url, callback, invalid) { if (this.readyState == 4) { var offlineE = document.getElementById("offline"); var notchE = document.getElementById("notch"); - if (this.status === 200 || this.status === 404) { + if (this.status === 200) { // Request successful. Reset offline state and parse the JSON. knownOffline = false; if (offlineE !== null) { @@ -274,6 +274,8 @@ function getJSON(url, callback, invalid) { console.log(ex); invalid(); } + } else if (this.status === 404) { + invalid(); } else { // Requested failed; offline. if (!knownOffline) { From b443bb968935332607e0de7627b6e2a5d9c5a96c Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Thu, 30 Jul 2020 20:11:37 +0200 Subject: [PATCH 09/45] Adoption dialog layout bug; fixes #145 --- android/app/src/main/res/layout/dialog_create_link.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/app/src/main/res/layout/dialog_create_link.xml b/android/app/src/main/res/layout/dialog_create_link.xml index b0c7ee9..0cb3fd1 100644 --- a/android/app/src/main/res/layout/dialog_create_link.xml +++ b/android/app/src/main/res/layout/dialog_create_link.xml @@ -13,6 +13,7 @@ Date: Fri, 31 Jul 2020 22:32:46 +0200 Subject: [PATCH 10/45] Add notes on upgrading; fixes #133 --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index f789dc7..8839672 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,22 @@ server { } ``` +## Upgrading to newer versions + +Hauk is versioned according to [Semantic Versioning 2.0.0](https://semver.org/). Any update that is **not a major update** is guaranteed to be without breaking changes, and you can keep the same configuration file for the updated release. + +- Major updates add breaking changes that either require manual intervention, or breaks backward compatibility. Update instructions for major versions will be listed in the release notes, as well as either this README or in the wiki. To date there have been no major updates. +- Minor updates add functionality, but does not break backward compatibility. You can still use an older client on a newer server, or a newer client on an older server, though some functionality may be missing. This will be dynamically detected by the client and server, which could e.g. lead to some UI elements being disabled in the app, or a notification made if a user tries to use new functionality that the other endpoint does not support. +- Patch updates are primarily bugfixes. + +Aside from certain major changes, you can keep your configuration file. New options may have been added to the config, but these will have sane defaults applied automatically. If you wish to change any new options, you can either reconfigure Hauk from the new config.php template, or copy and paste the relevant options from the new template to your existing file and change the appropriate values. + +Installations done using either the installer (`install.sh`) or via manual file copy can be upgraded simply by pulling the latest version of this repository and running the installer again, or overwriting the installation with the new files. + +Installations done via distribution-specific packages will be updated to the latest version by your package manager. + +Docker installations will be updated whenever you pull the image. If you're using Docker, you can reserve yourself from receiving major updates (which may contain breaking changes) by using the `stable-*` tag instead of `latest`. If you use a specific versioned tag, your installation will be locked at that specific version and you will not receive feature updates or bugfixes unless you manually change the tag and pull. + ## Demo server If you'd like to see what Hauk can do, download the app and insert connection details for the demo server: From f3b94ce567dbcacfa95e9037d3b600260707bf82 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Fri, 31 Jul 2020 23:04:38 +0200 Subject: [PATCH 11/45] Allow logo to be toggled; see #146 --- .../app/src/main/java/info/varden/hauk/Constants.java | 1 + .../main/java/info/varden/hauk/ui/MainActivity.java | 11 +++++++++++ android/app/src/main/res/drawable/ic_image.xml | 10 ++++++++++ android/app/src/main/res/layout/activity_main.xml | 1 + android/app/src/main/res/values/strings.xml | 3 +++ android/app/src/main/res/xml/root_preferences.xml | 7 +++++++ 6 files changed, 33 insertions(+) create mode 100644 android/app/src/main/res/drawable/ic_image.xml diff --git a/android/app/src/main/java/info/varden/hauk/Constants.java b/android/app/src/main/java/info/varden/hauk/Constants.java index 8990d4c..a6909af 100644 --- a/android/app/src/main/java/info/varden/hauk/Constants.java +++ b/android/app/src/main/java/info/varden/hauk/Constants.java @@ -47,6 +47,7 @@ public enum Constants { public static final Preference PREF_ALLOW_ADOPTION = new Preference.Boolean("allowAdoption", true); public static final Preference PREF_NIGHT_MODE = new Preference.Enum<>("nightMode", NightModeStyle.FOLLOW_SYSTEM); public static final Preference PREF_CONFIRM_STOP = new Preference.Boolean("confirmStop", true); + public static final Preference PREF_HIDE_LOGO = new Preference.Boolean("hideLogo", false); @Deprecated // Use PREF_SERVER_ENCRYPTED instead public static final Preference PREF_SERVER = new Preference.String("server", ""); diff --git a/android/app/src/main/java/info/varden/hauk/ui/MainActivity.java b/android/app/src/main/java/info/varden/hauk/ui/MainActivity.java index 0e9c30f..6d20112 100644 --- a/android/app/src/main/java/info/varden/hauk/ui/MainActivity.java +++ b/android/app/src/main/java/info/varden/hauk/ui/MainActivity.java @@ -163,6 +163,15 @@ public final class MainActivity extends AppCompatActivity { super.onDestroy(); } + @Override + protected void onResume() { + super.onResume(); + + // Set app logo visibility. + PreferenceManager prefs = new PreferenceManager(this); + findViewById(R.id.imgLogo).setVisibility(prefs.get(Constants.PREF_HIDE_LOGO) ? View.GONE : View.VISIBLE); + } + /** * On-tap handler for the "start sharing" and "stop sharing" button. */ @@ -332,6 +341,8 @@ public final class MainActivity extends AppCompatActivity { // Set night mode preference. AppCompatDelegate.setDefaultNightMode(prefs.get(Constants.PREF_NIGHT_MODE).resolve()); + // Set app logo visibility. + findViewById(R.id.imgLogo).setVisibility(prefs.get(Constants.PREF_HIDE_LOGO) ? View.GONE : View.VISIBLE); } /** diff --git a/android/app/src/main/res/drawable/ic_image.xml b/android/app/src/main/res/drawable/ic_image.xml new file mode 100644 index 0000000..b9622b1 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_image.xml @@ -0,0 +1,10 @@ + + + + diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml index 5329027..d64333d 100644 --- a/android/app/src/main/res/layout/activity_main.xml +++ b/android/app/src/main/res/layout/activity_main.xml @@ -32,6 +32,7 @@ Confirm before stopping shares Prompt for confirmation when stopping shares in the app Do not prompt for confirmation when stopping shares in the app + Hide logo on main screen + Hide the Hauk logo from the app\'s main screen + Show the Hauk logo at the top of the app\'s main screen About Hauk diff --git a/android/app/src/main/res/xml/root_preferences.xml b/android/app/src/main/res/xml/root_preferences.xml index 0f7e3de..addb5e5 100644 --- a/android/app/src/main/res/xml/root_preferences.xml +++ b/android/app/src/main/res/xml/root_preferences.xml @@ -122,6 +122,13 @@ app:summaryOff="@string/pref_confirmStop_off" app:summaryOn="@string/pref_confirmStop_on" /> + + From 9dcf6a536facc5dd29f534120f47f65575b16c83 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Fri, 31 Jul 2020 23:12:54 +0200 Subject: [PATCH 12/45] Hide keyboard on launch; fixes #146 --- android/app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index cc2d97f..2ff1504 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -30,6 +30,7 @@ android:name=".ui.MainActivity" android:launchMode="singleTop" android:screenOrientation="portrait" + android:windowSoftInputMode="stateHidden" android:theme="@style/HomeTheme"> From 6d7dcc3bfed57f12b5b46dbc6c65cca913cccb9d Mon Sep 17 00:00:00 2001 From: Nick Bouwhuis Date: Tue, 11 Aug 2020 14:48:51 +0000 Subject: [PATCH 13/45] Translated using Weblate (Dutch) Currently translated at 100.0% (25 of 25 strings) Translation: Hauk/PHP backend Translate-URL: https://traduki.varden.info/projects/hauk/backend-php/nl/ --- backend-php/include/lang/nl/texts.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend-php/include/lang/nl/texts.php b/backend-php/include/lang/nl/texts.php index 337c99b..c9add8d 100644 --- a/backend-php/include/lang/nl/texts.php +++ b/backend-php/include/lang/nl/texts.php @@ -18,3 +18,9 @@ $LANG['share_adoption_not_allowed'] = 'De eigenaar van de ingevoerde deling staa $LANG['e2e_adoption_not_allowed'] = 'Deze deling is met wachtwoord beveiligd en kan niet geadopteerd worden!'; $LANG['group_e2e_unsupported'] = 'Groepsdelingen kunnen niet met een wachtwoord beveiligd worden!'; $LANG['username_required'] = 'Gebruikersnaam vereist!'; +$LANG['ldap_search_ambiguous'] = 'Meerdere gebruikers gevonden - het LDAP filter is te breed!'; +$LANG['ldap_user_unauthorized'] = 'Gebruiker niet gevonden, niet geauthoriseerd of wachtwoord onjuist!'; +$LANG['ldap_search_failed'] = 'Fout tijdens het opzoeken van de gebruiker op de LDAP server!'; +$LANG['ldap_connection_failed'] = 'Kan geen verbinding maken met de LDAP server!'; +$LANG['ldap_config_error'] = 'Niet gelukt om LDAP connectieparameters in te stellen!'; +$LANG['ldap_extension_missing'] = 'De LDAP extensie is niet actief in uw PHP configuratie!'; From 3d2c4321b7d3feabd67758ebc1610218b78d9901 Mon Sep 17 00:00:00 2001 From: Nick Bouwhuis Date: Tue, 11 Aug 2020 14:47:10 +0000 Subject: [PATCH 14/45] Translated using Weblate (Dutch) Currently translated at 100.0% (34 of 34 strings) Translation: Hauk/Web frontend Translate-URL: https://traduki.varden.info/projects/hauk/frontend/nl/ --- frontend/assets/lang/nl.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/assets/lang/nl.json b/frontend/assets/lang/nl.json index e78c85a..fd67b17 100644 --- a/frontend/assets/lang/nl.json +++ b/frontend/assets/lang/nl.json @@ -24,5 +24,13 @@ "e2e_incorrect": "Het ingevoerde wachtwoord is incorrect. Probeer het alstublieft nog eens.", "e2e_password_prompt": "Deze deling is met wachtwoord beveiligd. Vul het wachtwoord in om toegang te krijgen tot de deling.", "e2e_placeholder": "Voer wachtwoord in", - "e2e_title": "Beveiligd met wachtwoord" + "e2e_title": "Beveiligd met wachtwoord", + "google_play_badge_text": "Download op Google Play", + "f_droid_badge_text": "Download op F-Droid", + "btn_show_all": "Toon alle", + "btn_close": "Sluiten", + "control_show_self": "Toon mijn locatie", + "dialog_user_navigate": "Navigeer naar", + "dialog_user_follow": "Toon op kaart", + "dialog_active_head": "Actieve gebruikers" } From 0b6defc3824f1bd782ac5c963b7337fcf16f44a2 Mon Sep 17 00:00:00 2001 From: Nick Bouwhuis Date: Tue, 11 Aug 2020 14:44:05 +0000 Subject: [PATCH 15/45] Translated using Weblate (Dutch) Currently translated at 100.0% (143 of 143 strings) Translation: Hauk/Android client Translate-URL: https://traduki.varden.info/projects/hauk/android/nl/ --- .../app/src/main/res/values-nl/strings.xml | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/android/app/src/main/res/values-nl/strings.xml b/android/app/src/main/res/values-nl/strings.xml index 4de8003..2d2f744 100644 --- a/android/app/src/main/res/values-nl/strings.xml +++ b/android/app/src/main/res/values-nl/strings.xml @@ -34,8 +34,8 @@ Locatie delen actief! UW GROEP PIN: Deling adoptatie - Een bestaande deling adopteren - U kunt een bestaande individuele locatiedeling toevoegen aan deze groepsdeling. Voer daarvoor alstublieft de URL of deel ID van de locatie in die u wilt adopteren (bijvoorbeeld %s\?XXXX-XXXX) en wijs een bijnaam toe aan deze locatiedeling. + Een sessie van een andere gebruiker adopteren + U kunt een bestaande individuele locatiedeling toevoegen aan deze groepsdeling. Voer daarvoor alstublieft de URL of deel ID van de persoon in die u wilt adopteren (bijvoorbeeld %s\?XXXX-XXXX) en wijs een bijnaam toe aan deze persoon. Creëer nieuwe deel link U kunt meerdere links creëren waarmee uw locatie bekeken kan worden. Elke link kan individueel uitgezet worden, om op elk moment precieze controle te hebben over wie uw locatie kan zien. \n @@ -70,12 +70,12 @@ Toestemming vereist Link gecreëerd Deze app vereist toegang tot uw locatie om te functioneren, maar deze toestemming is nog niet verleend. Sta alstublieft het volgende toestemmingsverzoek toe, en klik daarna op de startknop om het opnieuw te proberen. - Hauk staat u toe om locatiedelingssessies aan te maken voor uzelf alsook voor een groep. Als iemand een groepsdeling aanmaakt, krijgen zij een groepscode die anderen kunnen gebruiken om aan de groepssessie deel te nemen. -\n -\nMaar de persoon die de groep aanmaakt, krijgt ook een optie om een al bestaande deling toe te voegen aan de groep. Dit proces heet \"adoptie\". -\n -\nU kunt zelf bepalen of anderen uw locatiedeling mogen toevoegen aan een groep of niet middels deze checkbox. -\n + Hauk staat u toe om locatiedelingssessies aan te maken voor uzelf alsook voor een groep. Als iemand een groepsdeling aanmaakt, krijgen zij een groepscode die anderen kunnen gebruiken om aan de groepssessie deel te nemen. +\n +\nMaar de persoon die de groep aanmaakt, krijgt ook een optie om anderen die reeds hun locatie delen toe te voegen aan de groep. Dit proces heet \"adoptie\". +\n +\nU kunt zelf bepalen of anderen uw locatiedeling mogen toevoegen aan een groep of niet middels deze checkbox. +\n \nAls u deze optie aanzet en uw locatie deelt met vrienden of iemand die zijn locatie ook wilt delen, dan kunnen zij een groep aanmaken en uw locatie toevoegen aan de groep. Dan kunnen jullie elkaar op dezelfde gedeelde kaart zien. Dit is bijvoorbeeld handig als u aan het rijden bent, omdat u dan niet zelf uw telefoon hoeft te gebruiken om aan een groep deel te nemen. Agressieve batterijbesparingen Hauwei @@ -97,7 +97,7 @@ \nWilt u deze sessie hervatten\? Toestaan dat anderen mij aan een groep mogen toevoegen De ingevoerde server URL is ongeldig. - Een nieuwe link is succesvol aangemaakt voor uw locatiedeling! klik op de deel knop om de publiek bekijkbare URL voor uw deling te kopiëren. + Een nieuwe link is succesvol aangemaakt voor uw locatiedeling! Klik op de deel knop om de publiek bekijkbare URL voor uw nieuwe deling te kopiëren. Momenteel actieve links Neem deel aan een groepsdeling Wachten op initiële GNSS fix… @@ -148,4 +148,16 @@ weet je zeker dat je wilt stoppen met het delen van je locatie\? Stoppen met delen\? Zoeken naar locatie… + Vraag niet om een bevestiging bij het stoppen van de locatiedeling + Vraag voor bevestinging wanneer een locatiedeling in de app wordt gestopt + Bevestig voor het stoppen van de locatiedelin + Rapporteer een probleem + Broncode + App versie + Over Hauk + Terugvallen op locatiebepaling via netwerk wanneer GNSS niet beschikbaar is (seconden) + Minimale afstand tussen updates (in meters) + Je moet eerst een nickname instellen voordat je lid kan worden van een groep. Stel een nickname is en probeer het opnieuw. + De opgegeven duratie is ongeldig. Geef een nieuwe duratie op. + Niet opnieuw tonen \ No newline at end of file From 3dd594df556b9379194696bfe2ab4c6c3b6c7022 Mon Sep 17 00:00:00 2001 From: Licaon_Kter Date: Wed, 12 Aug 2020 17:45:53 +0000 Subject: [PATCH 16/45] Translated using Weblate (Romanian) Currently translated at 100.0% (146 of 146 strings) Translation: Hauk/Android client Translate-URL: https://traduki.varden.info/projects/hauk/android/ro/ --- android/app/src/main/res/values-ro/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/app/src/main/res/values-ro/strings.xml b/android/app/src/main/res/values-ro/strings.xml index 33c352c..a99a749 100644 --- a/android/app/src/main/res/values-ro/strings.xml +++ b/android/app/src/main/res/values-ro/strings.xml @@ -160,4 +160,7 @@ Folosește localizarea de rețea dacă cea GNSS este indisponibilă timp de (secunde) Nici o adresă activă Se caută locația… + Logoul Hauk va fi afișat în partea de sus a ecranului principal + Logoul Hauk va fi ascuns de pe ecranul principal + Ascunde logoul \ No newline at end of file From cbc12785873cc82c0897c9e2c20814c4ee9d8c45 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 15 Sep 2020 16:55:57 +0000 Subject: [PATCH 17/45] Translated using Weblate (Spanish) Currently translated at 44.5% (65 of 146 strings) Translation: Hauk/Android client Translate-URL: https://traduki.varden.info/projects/hauk/android/es/ --- .../app/src/main/res/values-es/strings.xml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/android/app/src/main/res/values-es/strings.xml b/android/app/src/main/res/values-es/strings.xml index cc3adf1..8ad8436 100644 --- a/android/app/src/main/res/values-es/strings.xml +++ b/android/app/src/main/res/values-es/strings.xml @@ -35,4 +35,34 @@ Crear un nuevo link de seguimiento Parar de compartir [%s] Empezar a compartir + La duración configurada no es válida. Elija una duración diferente. + Aún no has configurado un backend. Ingresa los detalles de tu servidor backend en la configuración y vuelva a intentarlo. + Los servicios de ubicación están desactivados. Habilite los servicios de ubicación de alta precisión para compartir su ubicación. + Se requiere permisos de ubicación para usar esta aplicación. + La URL del servidor no es válida. + Ajustes erroneos + Creando nuevo enlace compartido… + Creando enlace + Aprobando %s… + Aprobando + Resolviendo nombre del proxy… + Conectado con Hauk… + Conectando + Hauk está compartiendo tu localización con %s + Dejar de compartir + Enlace copiado de Hauk + Copiar enlace + No mostrar de nuevo + Descartar + Abrir ajustes + Crear + No + + OK + Compartir ID/URL: + Compartir grupo (host) + Unir a un enlace existente + No se puede acceder al servidor + Ubicación compartida activada! + Ubicación compartida desactivada \ No newline at end of file From aba2be5445faf4a39bb5e583158c5ec65ff46bfb Mon Sep 17 00:00:00 2001 From: bwisn Date: Sat, 19 Sep 2020 10:00:59 +0000 Subject: [PATCH 18/45] Added translation using Weblate (Polish) --- frontend/assets/lang/pl.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 frontend/assets/lang/pl.json diff --git a/frontend/assets/lang/pl.json b/frontend/assets/lang/pl.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/frontend/assets/lang/pl.json @@ -0,0 +1 @@ +{} From a56ddc274ea874ebdd3ab81c49d4cc0c12162dc4 Mon Sep 17 00:00:00 2001 From: bwisn Date: Sat, 19 Sep 2020 10:09:22 +0000 Subject: [PATCH 19/45] Added translation using Weblate (Polish) --- backend-php/include/lang/pl/texts.php | 1 + 1 file changed, 1 insertion(+) create mode 100644 backend-php/include/lang/pl/texts.php diff --git a/backend-php/include/lang/pl/texts.php b/backend-php/include/lang/pl/texts.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/backend-php/include/lang/pl/texts.php @@ -0,0 +1 @@ + Date: Sat, 19 Sep 2020 09:19:09 +0000 Subject: [PATCH 20/45] Translated using Weblate (Polish) Currently translated at 100.0% (146 of 146 strings) Translation: Hauk/Android client Translate-URL: https://traduki.varden.info/projects/hauk/android/pl/ --- .../app/src/main/res/values-pl/strings.xml | 101 ++++++++++++++++-- 1 file changed, 92 insertions(+), 9 deletions(-) diff --git a/android/app/src/main/res/values-pl/strings.xml b/android/app/src/main/res/values-pl/strings.xml index 1a464a1..18a69d9 100644 --- a/android/app/src/main/res/values-pl/strings.xml +++ b/android/app/src/main/res/values-pl/strings.xml @@ -2,7 +2,7 @@ Podaj ten PIN osobom, które mają dołączyć do grupy PIN TWOJEJ GRUPY: - Udostępnianie lokalizacji jest włączone! + Udostępnianie lokalizacji jest aktywne! Oczekiwanie na dokładną lokalizację… Oczekiwanie na sygnał GPS… Udostępnianie lokalizacji jest wyłączone @@ -11,7 +11,7 @@ minut Dołącz do grupy Stwórz grupę - Jedynie moja lokalizacja + Tylko moja lokalizacja Udostępnianie grupowe (członek) Udostępnianie grupowe (gospodarz) Tylko twoja lokalizacja @@ -24,13 +24,13 @@ PIN grupy: Pseudonim: (Co to znaczy\?) - Pozwalam innym na dołączenie mnie do swojej grupy + Pozwól innym na dołączenie siebie do swojej grupy Tryb udostępniania: - Okres aktualizacji pozycji (s): + Interwał między aktualizacjami pozycji (s) Czas udostępniania: Hasło URL serwera - Otwarte oprogramowanie do udostępniania lokalizacji + Otwartoźródłowe oprogramowanie do udostępniania lokalizacji Link został utworzony Potrzebne pozwolenie Ta aplikacja potrzebuje dostępu do twojej lokalizacji, a nie zostało ono udzielone. Udziel pozwolenia i spróbuj ponownie rozpocząć udostępnianie. @@ -40,7 +40,7 @@ Błąd połączenia Błąd serwera Pozwolenie na lokalizację jest wymagane do korzystania z tej aplikacji. - Serwer nie ma zainstalowanych aktualizacji + Wersja Hauk na serwerze jest przestarzała Połączono Dodano %s do twojej grupy! Wznów sesję @@ -49,7 +49,7 @@ ID/URL sesji: Udostępnij Dołącz osobę do grupy - Oszczędzanie baterii + Agresywne oszczędzanie baterii Huawei OnePlus Xiaomi @@ -69,7 +69,8 @@ Łączenie z Hauk… Dołączanie do grupy Dołączanie osoby do grupy - Jeśli udostępniasz swoją lokalizację więcej niż jednej osobie na raz, to warto utworzyć kilka linków, każdy dla jednej osoby. Tym sposobem można wyłączać pojedyncze linki, aby wyłączyć udostępnianie konkretnym osobom. + Jeśli udostępniasz swoją lokalizację więcej niż jednej osobie na raz, to warto utworzyć kilka linków, każdy dla jednej osoby. +\nTym sposobem można wyłączać pojedyncze linki, aby wyłączyć udostępnianie konkretnym osobom. Dołączanie %s do grupy… Wprowadzony URL serwera jest nieprawidłowy. Usługi lokalizacyjne są obecnie wyłączone. Włącz lokalizację w swoim urządzeniu aby korzystać z aplikacji. @@ -77,5 +78,87 @@ Serwer zwrócił odpowiedź o kodzie HTTP %s! Podany serwer nie wspiera udostępniania grupowego. Ta funkcja jest dostępna od wersji %s, a obecna wersja serwera to %s. Sposób udostępniania zostanie zmieniony na udostępnianie indywidualne. Udostępnianie aktualizacji jest aktywne! Skorzystaj z przycisku \"Udostępnij\", aby udostępnić komuś swoją lokalizację. - Udostępnianie podjęty + Dołączono do grupy + Ustawienia + Prośba autoryzacji rozgłoszenia + Hauk pozwala na tworzenie jednoosobowych sesji udostępniania, jak i sesji dla więcej niż jednej osoby jednocześnie. Jeśli ktoś utworzy grupowe udostępnianie, dostaje kod który pozwala na dołączenie innych osób do grupy. +\n +\nOsoba która tworzy grupę ma także opcję dodania wszystkich aktualnie udostępniających lokalizację do swojej grupy. Proces ten nazywany jest adopcją lub dołączaniem do grupy. +\n +\nMożesz decydować czy chcesz pozwolić na dołączanie siebie do swoich grup zaznaczając to pole. +\n +\nJeśli włączysz tą opcję, udostępnisz swoją lokalizację grupie przyjaciół i ktoś będzie chciał również udostępnić swoją lokalizację, może stworzyć grupę i dodać cię do swojej mapy - oboje będziecie widoczni na jednej mapie. Funkcja ta jest użyteczna jeśli przykładowo prowadzisz samochów i nie możesz używać swojego telefonu. Dołączanie do grupy (adopcja) nie wymaga żadnej interakcji z twojej strony. + Czy chcesz zezwolić w przyszłości na tworzenie sesji z rozgłoszeń o tym identyfikatorze\? + Hauk otrzymał i zablokował próbę utworzenia nowej sesji udostępniania ze źródła które identyfikuje się jako + Adres IP skonfigurowanego proxy ($s) nie może zostać rozwiązany! + Rozwiązywanie adresu proxy… + Dołączanie do grupy + Zgłoś problem + Kod źródłowy + Wersja aplikacji + O Hauk + Pokaż logo Hauk na górze głównego ekranu + Ukryj logo Hauk z głównego ekranu + Ukryj logo na głównym ekranie + Nie pytaj przed zatrzymaniem sesji udostępniania + Potwierdź przed zatrzymaniem sesji udostępniania + Potwierdź przed zatrzymaniem udostępniania + Nigdy + Zawsze + Gdy włączone jest osczędzanie baterii + Zgodnie z ustawieniami systemowymi + Tryb nocny + Wygląd + Wyłącz walidację \"Trust anchor\" oraz nazwy hosta dla hostów TOR .onion (niezalecane) + Wyłącz walidację \"Trust anchor\" dla hostów TOR .onion (niezalecane) + Zawsze weryfikuj certyfikaty (zalecane) + Weryfikacja certyfikatu HTTPS + Użyj lokalizacji sieciowej gdy GPS jest niedostępny przez (s) + Limit czasu połączenia (s) + Port proxy + Adres proxy + SOCKS 4/5 + HTTP + Nie używaj proxy + System (domyślne) + Proxy + Hasło szyfrowania + Wyłącz szyfrowanie + Włącz szyfrowanie + Chroń udostępnianie hasłem + <losowo generowane> + Preferowane ID + Minimalna przebyta odległość pomiędzy aktualizacjami (m) + <opcjonalny> + Nazwa użytkownika + Dotknij aby edytować + Połączenie + Ustawienia + Śledź moją aktualną lokalizację na Hauk! + Udostępnij link Hauk przez + "Wygląda na to, że uzywasz urządzenia %s. Te urządzenia mają włączone oszczędzanie baterii, które mogą uniemożliwić Hauk wysyłanie aktualizacji lokalizacji w tle. +\n +\nZalecane jest, żeby wyłączyć oszczędzanie baterii dla aplikacji Hauk, aby aplikacja nagle nie przestała działać. +\n +\nTa wiadomość nie będzie wyświetlana ponownie." + Nowy link został pomyślnie utworzony. Kliknij przycisk udostępniania aby go skopiować. + Masz niezakończoną sesję: +\nAktywnych linków: %d +\nCzas wygaśnięcia: %s +\n +\nChciałbyś wznowić tą sesję\? + "Podany serwer nie wspiera szyfrowania. Ta funkcja jest dostępna od wersji %s, a obecna wersja serwera to %s. Szyfrowanie zostanie wyłączone." + Wystąpił błąd podczas rozwiązywania nazwy hosta proxy: %s + Musisz ustawić pseudonim zanim dołączysz do grupy. Ustaw pseudonim i spróbuj ponownie. + Wprowadzony czas udostępniania jest nieprawidłowe. Proszę wprowadzić poprawny czas. + Nie skonfigurowano danych serwera. Proszę wprowadzić dane serwera w ustawieniach i spróbować ponownie. + Nie pokazuj ponownie + Możesz dołączyć istniejącą sesję udostępniania lokalizacji do tej grupy. Proszę wkleić adres lub ID udostępnianej osoby którą chciałbyś dołączyć (np. %s\?XXXX-XXXX) i przypisz pseudonim do tej osoby. + Brak aktywnych linków + Czy jesteś pewien, że chcesz usunąć ten link\? + Zatrzymać udostępnianie\? + Czy jesteś pewien, że chcesz zatrzymać udostępnianie\? + Błąd serwera + Szukanie lokalizacji… + Zezwól na adopcję: \ No newline at end of file From 1a241900bb108e7083e10f3769c183123be2771a Mon Sep 17 00:00:00 2001 From: bwisn Date: Sat, 19 Sep 2020 10:01:17 +0000 Subject: [PATCH 21/45] Translated using Weblate (Polish) Currently translated at 100.0% (34 of 34 strings) Translation: Hauk/Web frontend Translate-URL: https://traduki.varden.info/projects/hauk/frontend/pl/ --- frontend/assets/lang/pl.json | 37 +++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/frontend/assets/lang/pl.json b/frontend/assets/lang/pl.json index 0967ef4..80f9410 100644 --- a/frontend/assets/lang/pl.json +++ b/frontend/assets/lang/pl.json @@ -1 +1,36 @@ -{} +{ + "google_play_badge_text": "Pobierz z Google Play", + "google_play_badge_url": "https://play.google.com/intl/en_us/badges/static/images/badges/pl_badge_web_generic.png", + "f_droid_badge_text": "Pobierz z F-Droid", + "f_droid_badge_url": "https://fdroid.gitlab.io/artwork/badge/get-it-on-pl.png", + "btn_show_all": "Pokaż wszystko", + "btn_close": "Zamknij", + "btn_decrypt": "Odblokuj", + "btn_cancel": "Anuluj", + "btn_dismiss": "Odrzuć", + "last_update_days": "{{time}} dni temu", + "last_update_hours": "{{time}}h temu", + "last_update_minutes": "{{time}}m temu", + "last_update_seconds": "{{time}s temu", + "control_show_self": "Pokaż moją lokalizację", + "status_offline": "Offline", + "status_expired": "Wygasło", + "dialog_user_navigate": "Nawiguj do", + "dialog_user_follow": "Pokaż na mapie", + "dialog_active_head": "Aktywni użytkownicy", + "dialog_connection_body": "Połączenie z serwerem Hauk zostało utracone. Hauk spróbuje odzyskać połączenie. Proszę sprawdzić swoje połączenie sieciowe.", + "dialog_connection_head": "Błąd połączenia", + "dialog_expired_body": "Ta sesja udostępniania wygasła.", + "dialog_expired_head": "Sesja wygasła", + "point_app_to": "Wprowadź w aplikacji Hauk ten adres serwera:", + "gnss_signal_body": "Nadawca oczekuje na sygnał GPS", + "gnss_signal_head": "Proszę czekać", + "e2e_unsupported": "Ta sesja jest chroniona hasłem. Twoja przeglądarka nie obsługuje funkcji potrzebnych do otwierania takich sesji. Spróbuj użyć innej przeglądarki.", + "e2e_unavailable_secure": "Ta sesja jest chroniona hasłem. Nie można jej odblokować, gdyż nie używasz protokołu HTTPS. Upewnij się, że używasz protokołu HTTPS i spróbuj ponownie.", + "e2e_incorrect": "Niepoprawne hasło. Spróbuj ponownie.", + "e2e_password_prompt": "Ta sesja jest chroniona hasłem. Wprowadź hasło.", + "e2e_placeholder": "Wprowadź hasło", + "e2e_title": "Chronione hasłem", + "expired_body": "Lokalizacja którą próbujesz zobaczyć nie została odnaleziona na serwerze. Jeśli ten link wcześniej działał, oznacza to, że sesja udostępniania mogła wygasnąć.", + "expired_head": "Lokalizacja wygasła" +} From 899e52584422446d8448b25a159d2ebd671a59e6 Mon Sep 17 00:00:00 2001 From: bwisn Date: Sat, 19 Sep 2020 10:09:40 +0000 Subject: [PATCH 22/45] Translated using Weblate (Polish) Currently translated at 100.0% (25 of 25 strings) Translation: Hauk/PHP backend Translate-URL: https://traduki.varden.info/projects/hauk/backend-php/pl/ --- backend-php/include/lang/pl/texts.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/backend-php/include/lang/pl/texts.php b/backend-php/include/lang/pl/texts.php index b3d9bbc..eb658b9 100644 --- a/backend-php/include/lang/pl/texts.php +++ b/backend-php/include/lang/pl/texts.php @@ -1 +1,26 @@ Date: Sun, 8 Nov 2020 14:16:49 +0100 Subject: [PATCH 23/45] Fix showing initial active users --- frontend/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/main.js b/frontend/main.js index 28a582b..3bbda17 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -682,7 +682,6 @@ function processUpdate(data, init) { // Get the last location received. var lastPoint = shares[user].points.length > 0 ? shares[user].points[shares[user].points.length - 1] : null; - if (lastPoint !== null) shares[user].listEntry.style.display = "block"; for (var i = 0; i < users[user].length; i++) { var lat = users[user][i][0]; @@ -744,6 +743,8 @@ function processUpdate(data, init) { } } + if (lastPoint !== null) shares[user].listEntry.style.display = "block"; + var eVelocity = document.getElementById("velocity-" + shares[user].id) var vel = 0; if (lastPoint !== null && lastPoint.spd !== null && eVelocity !== null) { From 1e5217b1d788ab56bc75d9da58c2b23f5dbc49b1 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Sun, 13 Dec 2020 23:49:34 +0000 Subject: [PATCH 24/45] =?UTF-8?q?Translated=20using=20Weblate=20(Norwegian?= =?UTF-8?q?=20Bokm=C3=A5l)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100.0% (146 of 146 strings) Translation: Hauk/Android client Translate-URL: https://traduki.varden.info/projects/hauk/android/nb_NO/ --- android/app/src/main/res/values-nb-rNO/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/app/src/main/res/values-nb-rNO/strings.xml b/android/app/src/main/res/values-nb-rNO/strings.xml index 9dd2bd7..828e95f 100644 --- a/android/app/src/main/res/values-nb-rNO/strings.xml +++ b/android/app/src/main/res/values-nb-rNO/strings.xml @@ -160,4 +160,7 @@ Fall tilbake til nettverksposisjon hvis GNSS er utilgjengelig i (sekunder) Ingen aktive delinger Venter på posisjon… + Vis Hauk-logoen på appens startside + Skjul Hauk-logoen fra appens startside + Skjul logoen på forsiden \ No newline at end of file From 5f671667cf976535db4d66b596b910c16f19cd78 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Sun, 13 Dec 2020 23:50:29 +0000 Subject: [PATCH 25/45] Translated using Weblate (Norwegian Nynorsk) Currently translated at 100.0% (146 of 146 strings) Translation: Hauk/Android client Translate-URL: https://traduki.varden.info/projects/hauk/android/nn/ --- android/app/src/main/res/values-nn/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/res/values-nn/strings.xml b/android/app/src/main/res/values-nn/strings.xml index 51fb636..c9ce259 100644 --- a/android/app/src/main/res/values-nn/strings.xml +++ b/android/app/src/main/res/values-nn/strings.xml @@ -148,7 +148,7 @@ Appversjon Om Hauk Ikkje be om stadfesting når du stoppar delingar i appen - Be om stadfesting når du stoppar delingar i *appen + Be om stadfesting når du stoppar delingar i appen Stadfest før delingar blir avslutta Minste avstand mellom oppdateringar (meter) Du må stilla inn eit kallenamn før du kan bli med i delingsgruppar. Ver vennleg og vel eit kallenamn og prøv igjen. @@ -160,4 +160,7 @@ Fall tilbake til nettverksposisjon viss GNSS er utilgjengeleg i (sekund) Ingen aktive delinger Ventar på posisjon… + Vis Hauk-logoen på appens startside + Skjul Hauk-logoen frå appens startside + Skjul logoen på framsida \ No newline at end of file From eb04608ca54e475ad9f33cb993e7ecedabb1548f Mon Sep 17 00:00:00 2001 From: sanvit Date: Sun, 14 Feb 2021 02:00:12 +0000 Subject: [PATCH 26/45] Added translation using Weblate (Korean) --- frontend/assets/lang/ko.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 frontend/assets/lang/ko.json diff --git a/frontend/assets/lang/ko.json b/frontend/assets/lang/ko.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/frontend/assets/lang/ko.json @@ -0,0 +1 @@ +{} From ce6b064f48a5ebf49e261dc10cbfbeeefe68c9ac Mon Sep 17 00:00:00 2001 From: sanvit Date: Sun, 14 Feb 2021 02:28:33 +0000 Subject: [PATCH 27/45] Added translation using Weblate (Korean) --- backend-php/include/lang/ko/texts.php | 1 + 1 file changed, 1 insertion(+) create mode 100644 backend-php/include/lang/ko/texts.php diff --git a/backend-php/include/lang/ko/texts.php b/backend-php/include/lang/ko/texts.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/backend-php/include/lang/ko/texts.php @@ -0,0 +1 @@ + Date: Sun, 14 Feb 2021 02:00:31 +0000 Subject: [PATCH 28/45] Translated using Weblate (Korean) Currently translated at 100.0% (34 of 34 strings) Translation: Hauk/Web frontend Translate-URL: https://traduki.varden.info/projects/hauk/frontend/ko/ --- frontend/assets/lang/ko.json | 37 +++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/frontend/assets/lang/ko.json b/frontend/assets/lang/ko.json index 0967ef4..411d4e5 100644 --- a/frontend/assets/lang/ko.json +++ b/frontend/assets/lang/ko.json @@ -1 +1,36 @@ -{} +{ + "btn_dismiss": "닫기", + "google_play_badge_text": "Google Play 에서 다운로드", + "google_play_badge_url": "https://play.google.com/intl/en_us/badges/static/images/badges/ko_badge_web_generic.png", + "f_droid_badge_text": "F-Droid 에서 다운로드", + "f_droid_badge_url": "https://fdroid.gitlab.io/artwork/badge/get-it-on-ko.png", + "btn_show_all": "모두 보기", + "btn_close": "닫기", + "btn_decrypt": "잠금 해제", + "btn_cancel": "취소", + "last_update_days": "{{time}}일 전", + "last_update_hours": "{{time}}시간 전", + "last_update_minutes": "{{time}}분 전", + "last_update_seconds": "{{time}}초 전", + "control_show_self": "내 위치 표시하기", + "status_offline": "오프라인", + "status_expired": "만료됨", + "dialog_user_navigate": "이 위치로 안내", + "dialog_user_follow": "지도에서 보기", + "dialog_active_head": "활성 사용자들", + "dialog_connection_body": "Hauk 서버로의 접속이 끊겼습니다. Hauk은 백그라운드에서 재접속을 시도하겠습니다. 네트워크 접속 여부를 확인해주세요.", + "dialog_connection_head": "접속 오류", + "dialog_expired_body": "이 위치 공유가 만료되었습니다.", + "dialog_expired_head": "링크가 만료됨", + "point_app_to": "위치를 공유하기 위해 Hauk 앱을 이 서버로 설정하여 주십시오:", + "gnss_signal_body": "발신자가 GPS 신호를 기다리고 있습니다", + "gnss_signal_head": "잠시만 기다려주세요", + "e2e_unsupported": "이 링크는 비밀번호로 보호되어 있습니다. 사용하고 계시는 브라우저는 잠금을 해제하기 위한 기능을 지원하지 않습니다. 다른 브라우저로 다시 시도해주세요.", + "e2e_unavailable_secure": "이 링크는 비밀번호로 보호되어 있습니다. HTTPS를 사용하고 있지 않기 때문에 보호를 해제할 수 없습니다. HTTPS를 사용중인지 확인하시고 다시 시도해주세요.", + "e2e_incorrect": "입력한 비밀번호가 올바르지 않습니다. 다시 시도해주세요.", + "e2e_password_prompt": "이 링크는 비밀번호로 보호되어 있습니다. 링크에 접근하기 위해 비밀번호를 입력해주세요.", + "e2e_placeholder": "비밀번호를 입력하세요", + "e2e_title": "비밀번호로 보호됨", + "expired_body": "요청하신 위치정보를 서버에서 찾을 수 없습니다. 기존에 작동하던 링크라면, 위치 공유가 만료되었을 수 있습니다.", + "expired_head": "위치 정보가 만료됨" +} From 9d637c5b585e327bf7b0937af77d6136084abb2a Mon Sep 17 00:00:00 2001 From: tuffnerdstuff Date: Mon, 29 Mar 2021 23:16:40 +0200 Subject: [PATCH 29/45] setting accuracy circle also when acc == null --- frontend/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/main.js b/frontend/main.js index 3bbda17..d55b5b0 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -732,8 +732,8 @@ function processUpdate(data, init) { } // Draw an accuracy circle if GPS accuracy was provided by the // client. - if (acc !== null && shares[user].circle == null) { - shares[user].circle = L.circle([lat, lon], {radius: acc, fillColor: iconColor, fillOpacity: 0.25, color: iconColor, opacity: 0.5, interactive: false}).addTo(circleLayer); + if (shares[user].circle == null) { + shares[user].circle = L.circle([lat, lon], {radius: acc != null ? acc : 0, fillColor: iconColor, fillOpacity: 0.25, color: iconColor, opacity: 0.5, interactive: false}).addTo(circleLayer); } else if (shares[user].circle !== null) { shares[user].circle.setLatLng([lat, lon]); if (acc !== null) shares[user].circle.setRadius(acc); From 08a5050b7c327f4833ea1a64f9c6b027ed6211a1 Mon Sep 17 00:00:00 2001 From: tuffnerdstuff Date: Tue, 30 Mar 2021 00:01:28 +0200 Subject: [PATCH 30/45] Implemented incremental fetch --- backend-php/api/fetch.php | 6 ++++-- backend-php/include/inc.php | 20 +++++++++++++++++--- frontend/main.js | 18 +++++++++++++++++- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/backend-php/api/fetch.php b/backend-php/api/fetch.php index d4e7c2f..166f3e6 100644 --- a/backend-php/api/fetch.php +++ b/backend-php/api/fetch.php @@ -20,6 +20,8 @@ if (!$share->exists()) { } else { header("Content-Type: text/json"); + $sinceTime=$_GET["since"] ?? null; + // Solo and group shares have different internal structures. Figure out the // correct type so that it can be output. switch ($share->getType()) { @@ -34,7 +36,7 @@ if (!$share->exists()) { "expire" => $share->getExpirationTime(), "serverTime" => microtime(true), "interval" => $session->getInterval(), - "points" => $session->getPoints(), + "points" => $session->getPoints($sinceTime), "encrypted" => $session->isEncrypted(), "salt" => $session->getEncryptionSalt() )); @@ -46,7 +48,7 @@ if (!$share->exists()) { "expire" => $share->getExpirationTime(), "serverTime" => microtime(true), "interval" => $share->getAutoInterval(), - "points" => $share->getAllPoints() + "points" => $share->getAllPoints($sinceTime) )); break; } diff --git a/backend-php/include/inc.php b/backend-php/include/inc.php index 366a7c2..64b6d16 100644 --- a/backend-php/include/inc.php +++ b/backend-php/include/inc.php @@ -565,12 +565,12 @@ class GroupShare extends Share { } // Returns a map of nicknames and the users' corresponding coordinates. - public function getAllPoints() { + public function getAllPoints($sinceTime) { $points = array(); $hosts = $this->getHosts(); foreach ($hosts as $nick => $host) { if ($host->exists()) { - $points[$nick] = $host->getPoints(); + $points[$nick] = $host->getPoints($sinceTime); } } return $points; @@ -758,8 +758,22 @@ class Client { } // Returns a list of all point arrays for this session. - public function getPoints() { + public function getPoints($sinceTime) { + if (is_null($sinceTime)) { + // return all memcached points return $this->sessionData["points"]; + } else { + $newPoints = []; + // FIXME: use map instead of indices + $timeIndex = $this->isEncrypted() ? 3 : 2; + // only return points which are more recent than $oldestPointTime + foreach ($this->sessionData["points"] as $point) { + if (floatval($point[$timeIndex]) > $sinceTime) { + array_push($newPoints, $point); + } + } + return $newPoints; + } } // Generates a random session ID for new sessions. diff --git a/frontend/main.js b/frontend/main.js index 3bbda17..14581d2 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -437,7 +437,8 @@ function setNewInterval(expire, interval, serverTime) { showMessage(LANG["dialog_expired_head"], LANG["dialog_expired_body"]); } - getJSON("./api/fetch.php?id=" + id, function(data) { + // Start incremental fetch + getJSON("./api/fetch.php?id=" + id + "&since=" + getOldestPointTime(), function(data) { // Recreate the interval timers if the interval or expiration // change. if (data.expire != expire || data.interval != interval) { @@ -456,6 +457,21 @@ function setNewInterval(expire, interval, serverTime) { }, interval * 1000); } +// Scans across all most recent points and returns the time of the oldest one +function getOldestPointTime() { + var oldestTime = Number.MAX_VALUE; + var foundTime = false; + for (var share in shares) { + var points = shares[share].points + if (points && points.length > 0 ) { + var mostRecentTime = points[ points.length-1 ].time + oldestTime = mostRecentTime < oldestTime ? mostRecentTime : oldestTime; + foundTime = true; + } + } + return foundTime ? oldestTime : 0; +} + var noGPS = document.getElementById("searching"); // Whether or not an initial location has been received. From 55d2f8b8fdbebf591d759a72022527c226aad840 Mon Sep 17 00:00:00 2001 From: Marius Lindvall Date: Tue, 30 Mar 2021 18:03:55 +0200 Subject: [PATCH 31/45] Set Content-Security-Policy --- frontend/index.html | 5 +++-- frontend/style.css | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 0c69701..56fc2f7 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,6 +2,7 @@ + @@ -57,13 +58,13 @@