From 11c563a7cd94bc48bc990fc0d1c2bd7b37141400 Mon Sep 17 00:00:00 2001
From: lalka2018 <99399973+lalka2016@users.noreply.github.com>
Date: Thu, 9 Nov 2023 21:29:35 +0300
Subject: [PATCH] .
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Добавлен тур по аудиозаписям, но пока без скриншотов.
- "Мои Аудиозаписи" в меню теперь располагаются под Моими Видеозаписями для канона
- В настройках приватности "кто может видеть мои аудиозаписи" теперь располагаются под "кто может видеть мои видеозаписи"
- В настройках внешнего вида мои аудиозаписи тоже под видео
- Изменён
на странице аудиозаписей. Теперь показывается "Аудиозаписи" + имя пользователя в родительном падеже. А если это группа, то "Аудиозаписи группы". То же самое с плейлистами
- Исправлены ссылка в ссылке на странице с плейлистами
- При наведении на название песни больше не сносится иконка explicit
- Добавлена максимальная длина названия и описания плейлиста при редактировании.
---
Web/Models/Entities/User.php | 2 +-
Web/Presenters/AudioPresenter.php | 8 +--
Web/Presenters/templates/@layout.xml | 2 +-
Web/Presenters/templates/About/Tour.xml | 24 +++++++--
.../templates/Audio/EditPlaylist.xml | 4 +-
Web/Presenters/templates/Audio/List.xml | 33 +++++++-----
.../templates/Audio/NewPlaylist.xml | 4 +-
Web/Presenters/templates/Audio/Upload.xml | 4 +-
Web/Presenters/templates/Audio/player.xml | 4 +-
Web/Presenters/templates/User/Settings.xml | 48 +++++++++---------
Web/static/img/tour/audios.png | Bin 0 -> 6234 bytes
Web/static/img/tour/audios_playlists.png | Bin 0 -> 6234 bytes
Web/static/img/tour/audios_search.png | Bin 0 -> 6234 bytes
Web/static/img/tour/audios_upload.png | Bin 0 -> 6234 bytes
Web/static/js/al_music.js | 12 ++---
locales/en.strings | 23 +++++----
locales/ru.strings | 17 ++++---
17 files changed, 107 insertions(+), 78 deletions(-)
create mode 100644 Web/static/img/tour/audios.png
create mode 100644 Web/static/img/tour/audios_playlists.png
create mode 100644 Web/static/img/tour/audios_search.png
create mode 100644 Web/static/img/tour/audios_upload.png
diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php
index f669b08f..9152e64e 100644
--- a/Web/Models/Entities/User.php
+++ b/Web/Models/Entities/User.php
@@ -190,7 +190,7 @@ class User extends RowModel
function getMorphedName(string $case = "genitive", bool $fullName = true): string
{
$name = $fullName ? ($this->getLastName() . " " . $this->getFirstName()) : $this->getFirstName();
- if(!preg_match("%^[А-яё\-]+$%", $name))
+ if(!preg_match("%[А-яё\-]+$%", $name))
return $name; # name is probably not russian
$inflected = inflectName($name, $case, $this->isFemale() ? Gender::FEMALE : Gender::MALE);
diff --git a/Web/Presenters/AudioPresenter.php b/Web/Presenters/AudioPresenter.php
index 76a56eeb..9b9b20c8 100644
--- a/Web/Presenters/AudioPresenter.php
+++ b/Web/Presenters/AudioPresenter.php
@@ -311,8 +311,8 @@ final class AudioPresenter extends OpenVKPresenter
$playlist = new Playlist;
$playlist->setOwner($owner);
- $playlist->setName(substr($title, 0, 128));
- $playlist->setDescription(substr($description, 0, 2048));
+ $playlist->setName(substr($title, 0, 125));
+ $playlist->setDescription(substr($description, 0, 2045));
if($_FILES["cover"]["error"] === UPLOAD_ERR_OK) {
if(!str_starts_with($_FILES["cover"]["type"], "image"))
@@ -432,8 +432,8 @@ final class AudioPresenter extends OpenVKPresenter
if(empty($title) || iconv_strlen($title) < 1)
$this->flashFail("err", tr("error"), tr("set_playlist_name"));
- $playlist->setName(ovk_proc_strtr($title, 128));
- $playlist->setDescription(ovk_proc_strtr($description, 2048));
+ $playlist->setName(ovk_proc_strtr($title, 125));
+ $playlist->setDescription(ovk_proc_strtr($description, 2045));
$playlist->setEdited(time());
$playlist->resetLength();
diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml
index d8a415de..31e0bc5c 100644
--- a/Web/Presenters/templates/@layout.xml
+++ b/Web/Presenters/templates/@layout.xml
@@ -184,8 +184,8 @@
{_my_photos}
- {_my_audios}{_my_videos}
+ {_my_audios}{_my_messages}
+
+
+
diff --git a/locales/en.strings b/locales/en.strings
index 6921651f..e3615fd6 100644
--- a/locales/en.strings
+++ b/locales/en.strings
@@ -833,6 +833,8 @@
"broadcast_audio" = "Broadcast audio to status";
"sure_delete_playlist" = "Do you sure want to delete this playlist?";
"edit_audio" = "Edit audio";
+"audios_group" = "Audios from group";
+"playlists_group" = "Playlists from group";
/* Notifications */
@@ -1755,17 +1757,16 @@
"tour_section_5_text_3" = "In addition to uploading videos directly, the site also supports embedding videos from YouTube";
-"tour_section_6_title_1" = "Listen to audios";
-"tour_section_6_text_1" = "Вы можете слушать аудиозаписи в разделе \"Мои Аудиозаписи\".";
-"tour_section_6_text_2" = "Этот раздел также регулируется настройками приватности.";
-"tour_section_6_text_3" = "Самые прослушиваемые песни находятся во вкладке \"Популярное\", а недавно загруженные — во вкладке \"Новое\"";
-"tour_section_6_text_4" = "Найти нужную песню можно в поиске.";
-"tour_section_6_text_5" = "Чтобы добавить песню в свою коллекцию, наведите на неё и нажмите на плюс.";
-"tour_section_6_text_6" = "Если вы не можете найти нужную песню, вы можете загрузить её самостоятельно.";
-"tour_section_6_bottom_text_1" = "Важно: песня не должна нарушать авторские права";
-"tour_section_6_title_1" = "Создавайте плейлисты";
-"tour_section_6_text_7" = "Вы можете создавать сборники треков во вкладке \"Мои плейлисты\".";
-"tour_section_6_text_8" = "Можно также добавлять чужие плейлисты в свою коллекцию.";
+"tour_section_6_title_1" = "Listen to music";
+"tour_section_6_text_1" = "You can listen to music in \"My Audios\"";
+"tour_section_6_text_2" = "This section is also controlled by the privacy settings.";
+"tour_section_6_text_3" = "The most listened songs are in \"Popular\", and recently uploaded songs are in \"New\"";
+"tour_section_6_text_4" = "To add a song to your collection, hover over it and click on the \"plus\". You can search for the song you want.";
+"tour_section_6_text_5" = "If you can't find the song you want, you can upload it yourself";
+"tour_section_6_bottom_text_1" = "Important: the song must not infringe copyright";
+"tour_section_6_title_2" = "Create playlists";
+"tour_section_6_text_6" = "You can create playlists in the \"My Playlists\" tab";
+"tour_section_6_text_7" = "You can also add another's playlists to your collection";
"tour_section_7_title_1" = "Follow what your friends write";
diff --git a/locales/ru.strings b/locales/ru.strings
index cfb46b75..282d8d3f 100644
--- a/locales/ru.strings
+++ b/locales/ru.strings
@@ -788,6 +788,8 @@
"broadcast_audio" = "Транслировать аудио в статус";
"sure_delete_playlist" = "Вы действительно хотите удалить этот плейлист?";
"edit_audio" = "Редактировать аудиозапись";
+"audios_group" = "Аудиозаписи группы";
+"playlists_group" = "Плейлисты группы";
/* Notifications */
@@ -1645,16 +1647,15 @@
"tour_section_6_title_1" = "Слушайте аудиозаписи";
-"tour_section_6_text_1" = "Вы можете слушать аудиозаписи в разделе \"Мои Аудиозаписи\".";
-"tour_section_6_text_2" = "Этот раздел также регулируется настройками приватности.";
+"tour_section_6_text_1" = "Вы можете слушать аудиозаписи в разделе \"Мои Аудиозаписи\"";
+"tour_section_6_text_2" = "Этот раздел также регулируется настройками приватности";
"tour_section_6_text_3" = "Самые прослушиваемые песни находятся во вкладке \"Популярное\", а недавно загруженные — во вкладке \"Новое\"";
-"tour_section_6_text_4" = "Найти нужную песню можно в поиске.";
-"tour_section_6_text_5" = "Чтобы добавить песню в свою коллекцию, наведите на неё и нажмите на плюс.";
-"tour_section_6_text_6" = "Если вы не можете найти нужную песню, вы можете загрузить её самостоятельно.";
+"tour_section_6_text_4" = "Чтобы добавить песню в свою коллекцию, наведите на неё и нажмите на плюс. Найти нужную песню можно в поиске";
+"tour_section_6_text_5" = "Если вы не можете найти нужную песню, вы можете загрузить её самостоятельно";
"tour_section_6_bottom_text_1" = "Важно: песня не должна нарушать авторские права";
-"tour_section_6_title_1" = "Создавайте плейлисты";
-"tour_section_6_text_7" = "Вы можете создавать сборники треков во вкладке \"Мои плейлисты\".";
-"tour_section_6_text_8" = "Можно также добавлять чужие плейлисты в свою коллекцию.";
+"tour_section_6_title_2" = "Создавайте плейлисты";
+"tour_section_6_text_6" = "Вы можете создавать сборники треков во вкладке \"Мои плейлисты\"";
+"tour_section_6_text_7" = "Можно также добавлять чужие плейлисты в свою коллекцию";
"tour_section_7_title_1" = "Следите за тем, что пишут ваши друзья";