From e86b8ef782c784b578740660078c3907a23a9da6 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 3 Jan 2019 20:42:29 -0500 Subject: [PATCH 01/15] Use nickname instead of email for Login Name --- mod/admin.php | 2 +- mod/lostpass.php | 8 ++++---- src/Model/User.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index c0ad281d3b..1cbe24e71d 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1752,7 +1752,7 @@ function admin_page_users_post(App $a) Thank you and welcome to %4$s.')); $preamble = sprintf($preamble, $user['username'], Config::get('config', 'sitename')); - $body = sprintf($body, System::baseUrl(), $user['email'], $result['password'], Config::get('config', 'sitename')); + $body = sprintf($body, System::baseUrl(), $user['nickname'], $result['password'], Config::get('config', 'sitename')); notification([ 'type' => SYSTEM_EMAIL, diff --git a/mod/lostpass.php b/mod/lostpass.php index 39209af951..d36d32963d 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -21,7 +21,7 @@ function lostpass_post(App $a) } $condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame]; - $user = DBA::selectFirst('user', ['uid', 'username', 'email', 'language'], $condition); + $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'language'], $condition); if (!DBA::isResult($user)) { notice(L10n::t('No valid account found.') . EOL); $a->internalRedirect(); @@ -63,7 +63,7 @@ function lostpass_post(App $a) The login details are as follows: Site Location: %2$s - Login Name: %3$s', $resetlink, System::baseUrl(), $user['email'])); + Login Name: %3$s', $resetlink, System::baseUrl(), $user['nickname'])); notification([ 'type' => SYSTEM_EMAIL, @@ -85,7 +85,7 @@ function lostpass_content(App $a) if ($a->argc > 1) { $pwdreset_token = $a->argv[1]; - $user = DBA::selectFirst('user', ['uid', 'username', 'email', 'pwdreset_time', 'language'], ['pwdreset' => $pwdreset_token]); + $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'pwdreset_time', 'language'], ['pwdreset' => $pwdreset_token]); if (!DBA::isResult($user)) { notice(L10n::t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.")); @@ -161,7 +161,7 @@ function lostpass_generate_password($user) Password: %3$s You may change that password from your account settings page after logging in. - ', System::baseUrl(), $user['email'], $new_password)); + ', System::baseUrl(), $user['nickname'], $new_password)); notification([ 'type' => SYSTEM_EMAIL, diff --git a/src/Model/User.php b/src/Model/User.php index c71ae475e9..a1a722f4cc 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -771,7 +771,7 @@ class User If you ever want to delete your account, you can do so at %3$s/removeme Thank you and welcome to %2$s.', - $user['email'], $sitename, $siteurl, $user['username'], $password + $user['nickname'], $sitename, $siteurl, $user['username'], $password )); return notification([ From 73882ff58f7b8aa4b9e95a8fce018cfe7370548f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 3 Jan 2019 23:07:03 -0500 Subject: [PATCH 02/15] [vier] Add message icon link in header nav --- view/theme/vier/mobile.css | 4 ++-- view/theme/vier/style.css | 29 +++++++++++-------------- view/theme/vier/templates/nav.tpl | 35 +++++++++++++++++++++++-------- 3 files changed, 40 insertions(+), 28 deletions(-) diff --git a/view/theme/vier/mobile.css b/view/theme/vier/mobile.css index b528ca4bd0..bf79222876 100644 --- a/view/theme/vier/mobile.css +++ b/view/theme/vier/mobile.css @@ -60,8 +60,8 @@ nav ul { .wall-item-container .wall-item-content .type-link img.attachment-image, .type-link img.attachment-image, .type-video img.attachment-image { max-width: 350px; } - a.desktop-view { display: none; } - a.mobile-view { display: initial; } + .desktop-view { display: none; } + .mobile-view { display: initial; } #nav-apps-link { display: none; } .wall-item-container .wall-item-info { width: auto; } diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 6c4f2b20f3..eedbe09a45 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -365,10 +365,12 @@ pre code { box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } +.desktop-view { display: none; } + /* some settings for different form-factors */ @media (min-width: 601px) { - a.mobile-view { display: none }; - a.desktop-view { display: initial }; + .mobile-view { display: none!important; } + .desktop-view { display: initial; } } /* tool */ @@ -685,8 +687,11 @@ nav .nav-menu img { margin-right: 4px; } -nav .nav-menu-icon .nav-notify { +nav .nav-menu > a > .nav-notify, +nav .nav-menu-icon > a > .nav-notify { + position: absolute; top: 3px; + right: -5px; } nav .nav-menu-label { margin: 3px 5px 0px; @@ -738,33 +743,27 @@ nav .nav-menu:hover { nav .nav-notify { display: none; - position: absolute; - /* background-color: #36c; */ - background-color: #F80; - /* background-color: #19aeff; */ + background-color: #F80; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; font-size: 10px; padding: 1px 3px; - top: 0px; - /* right: -10px; */ - right: -5px; min-width: 15px; - /* text-align: right; */ text-align: center; color: white; } - nav .nav-notify.show { - display: block; + display: inline-block; } + nav #nav-help-link, nav #nav-search-link, nav #nav-directory-link, nav #nav-apps-link, nav #nav-apps-link, nav #nav-login-link, +nav #nav-messages-linkmenu, nav #nav-notifications-linkmenu, nav #nav-site-linkmenu, nav #nav-contacts-linkmenu, @@ -845,10 +844,6 @@ nav #nav-user-linkmenu { padding: 5px 10px; */ } -#mail-update { - top: 56px; -} - .notify-unseen {background-color: #FFF; } .notify-seen { diff --git a/view/theme/vier/templates/nav.tpl b/view/theme/vier/templates/nav.tpl index 777df44cd2..5f62773dbb 100644 --- a/view/theme/vier/templates/nav.tpl +++ b/view/theme/vier/templates/nav.tpl @@ -14,16 +14,20 @@ {{if $nav.home}} {{/if}} {{if $nav.network}} {{/if}} {{if $nav.events}} @@ -48,9 +52,22 @@ + {{if $nav.messages}} + + {{/if}} + + {{if $nav.notifications}} -