Resolve issue with non-ASCII names in frontend

This commit is contained in:
Florine W. Dekker 2022-12-17 18:34:13 +01:00
parent e090eb3bac
commit f6dea3e283
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
7 changed files with 6 additions and 7 deletions

View File

@ -1,7 +1,7 @@
{
"name": "fwdekker/death-notifier",
"description": "Get notified when a famous person dies.",
"version": "0.19.14", "_comment_version": "Also update version in `package.json`!",
"version": "0.19.15", "_comment_version": "Also update version in `package.json`!",
"type": "project",
"license": "MIT",
"homepage": "https://git.fwdekker.com/tools/death-notifier",

BIN
composer.lock generated

Binary file not shown.

BIN
package-lock.json generated

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "death-notifier",
"version": "0.19.14", "_comment_version": "Also update version in `composer.json`!",
"version": "0.19.15", "_comment_version": "Also update version in `composer.json`!",
"description": "Get notified when a famous person dies.",
"author": "Florine W. Dekker",
"browser": "dist/bundle.js",

View File

@ -82,6 +82,7 @@
<hgroup>
<h2>Log in</h2>
<h3>Already have an account? Welcome back!</h3>
<!-- TODO: Add link to registration form, for on mobile devices -->
</hgroup>
</header>
<div class="article-contents">

View File

@ -78,11 +78,11 @@ function refreshTrackings(): void {
if (tracking.is_deleted) {
statusText = "article not found";
} else {
switch (window.btoa(tracking.name)) {
case "QWRvbGYgSGl0bGVy":
switch (window.btoa(encodeURIComponent(tracking.name))) {
case "QWRvbGYlMjBIaXRsZXI=":
statusText = "dead 🥳";
break;
case "VmxhZGltaXIgUHV0aW4=":
case "VmxhZGltaXIlMjBQdXRpbg==":
statusText = tracking.status === "alive" ? "alive ☹️" : "dead 🥳";
break;
default:

View File

@ -155,7 +155,6 @@ class UserList
*
* @param string $uuid the UUID of the user to return the data of
* @return User|null all data of the user with the given UUID, or `null` if the user could not be found
* @noinspection PhpUndefinedClassInspection defined with `@phpstan-type`
*/
public function get_user_by_uuid(string $uuid): ?array
{
@ -181,7 +180,6 @@ class UserList
*
* @param string $email the email address of the user to return the data of
* @return User|null all data of the user with the given email address, or `null` if the user could not be found
* @noinspection PhpUndefinedClassInspection defined with `@phpstan-type`
*/
public function get_user_by_email(string $email): ?array
{