feat(web): better UX when creating a new album (#8270)

* feat(web): ask user before going to newly created album

* feat(web): add button option to notification cards

* feat(web): allow html messages in notification cards

* show album -> view album

* remove 'link' action from notifications

* remove unused type
This commit is contained in:
Ethan Margaillan 2024-03-27 20:47:42 +01:00 committed by GitHub
parent 613b544bf0
commit 8bf571bf48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 134 additions and 54 deletions

View file

@ -0,0 +1,16 @@
export const removeAccents = (str: string) => {
return str.normalize('NFD').replaceAll(/[\u0300-\u036F]/g, '');
};
export const normalizeSearchString = (str: string) => {
return removeAccents(str.toLocaleLowerCase());
};
export const encodeHTMLSpecialChars = (str: string) => {
return str
.replaceAll('&', '&')
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;')
.replaceAll('"', '&quot;')
.replaceAll("'", '&#39;');
};