visual notice when user is remote user or visitor

This commit is contained in:
rabuzarus 2016-04-20 18:03:22 +02:00
parent 9b0e625685
commit dbecf73df1
3 changed files with 30 additions and 7 deletions

View File

@ -464,11 +464,12 @@ nav.navbar a {
width: 32px;
border-radius: 3px;
}
/* The Top Nav Bar user menu */
#topbar-first .account .user-title {
text-align: right
}
#topbar-first .account .user-title span {
color: #d7d7d7
color: $nav_icon_color;
}
#topbar-first .account #main-menu .nav-notify {
position: absolute;
@ -481,11 +482,24 @@ nav.navbar a {
background-color: $nav_bg;
color: $nav_icon_color;
}
#myNavmenu li.nav-sitename {
font-weight: bold;
}
#topbar-first .dropdown.account>a,
#topbar-first .dropdown.account.open>a,
#topbar-first .dropdown.account>a:hover,
#topbar-first .dropdown.account.open>a:hover {
background-color: $nav_bg
background-color: $nav_bg;
}
#topbar-first .dropdown.account li#nav-sitename {
padding-left: 15px;
padding-right: 15px;
font-weight: bold;
word-break: break-word;
}
#topbar-first .dropdown.account li#nav-sitename:hover {
border: none;
background-color: $nav_bg;
}
/* Nav Search */
#topbar-first #search-box .navbar-form {

View File

@ -117,7 +117,8 @@
<li id="nav-user-linkmenu" class="dropdown account nav-menu hidden-xs">
<a href="#" id="main-menu" class="dropdown-toggle nav-avatar " data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<div class="user-title pull-left hidden-xs hidden-sm hidden-md">
<strong>{{$nav.userinfo.name}}</strong>
<strong>{{$nav.userinfo.name}}</strong><br>
{{if $nav.remote}}<span class="trunctate">{{$nav.remote}}</span>{{/if}}
<span id="intro-update" class="nav-intro-badge badge nav-notify"></span>
</div>
@ -128,6 +129,10 @@
{{* The list of available usermenu links *}}
<ul id="nav-user-menu" class="dropdown-menu pull-right menu-popup" role="menu" aria-labelledby="main-menu">
{{if $nav.remote}}{{if $nav.sitename}}
<li id="nav-sitename" role="menuitem">{{$nav.sitename}}</li>
<li class="divider"></li>
{{/if}}{{/if}}
{{foreach $nav.usermenu as $usermenu}}
<li role="menuitem"><a class="{{$usermenu.2}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a></li>
{{/foreach}}
@ -151,8 +156,8 @@
<li class="divider"></li>
{{if $nav.apps}}
<li role="menuitem"><a id="nav-apps-link" class="nav-link {{$nav.apps.2}} {{$sel.manage}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}" ><i class="fa fa-puzzle-piece fa-fw"></i> {{$nav.apps.1}}</a>
{{/if}}
<li class="divider"></li>
{{/if}}
{{if $nav.help}}
<li role="menuitem"><a id="nav-help-link" class="nav-link {{$nav.help.2}}" target="friendica-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" ><i class="fa fa-question-circle fa-fw"></i> {{$nav.help.3}}</a></li>
{{/if}}
@ -182,7 +187,10 @@
<div id="myNavmenu" class="navmenu navmenu-default navmenu-fixed-right offcanvas">
<div class="nav-container">
<div class="list-group">
<li class="list-group-item"><img src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:15px; max-height:15px; min-width:15px; min-height:15px; width:15px; height:15px;"> {{$nav.userinfo.name}}</li>
{{if $nav.remote}}{{if $nav.sitename}}
<li class="nav-sitename list-group-item" role="menuitem">{{$nav.sitename}}</li>
{{/if}}{{/if}}
<li class="list-group-item"><img src="{{$nav.userinfo.icon}}" alt="{{$nav.userinfo.name}}" style="max-width:15px; max-height:15px; min-width:15px; min-height:15px; width:15px; height:15px;"> {{$nav.userinfo.name}}{{if $nav.remote}} ({{$nav.remote}}){{/if}}</li>
{{foreach $nav.usermenu as $usermenu}}
<a class="{{$usermenu.2}} list-group-item" href="{{$usermenu.0}}" title="{{$usermenu.3}}">{{$usermenu.1}}</a>
{{/foreach}}

View File

@ -158,13 +158,13 @@ function frio_remote_nav($a,&$nav) {
} elseif(!local_user() && remote_user()) {
$r = q("SELECT `name`, `nick`, `micro` AS `photo` FROM `contact` WHERE `id` = %d", intval(remote_user()));
$nav['remote'] = 1;
$nav['remote'] = t("Remote");
} elseif(get_my_url ()) {
$r = q("SELECT `name`, `nick`, `photo` FROM `gcontact`
WHERE `addr` = '%s' AND `network` = 'dfrn'",
dbesc($webbie));
$nav['remote'] = 1;
$nav['remote'] = t("Visitor");
}
if(count($r)){
@ -190,5 +190,6 @@ function frio_remote_nav($a,&$nav) {
$nav['messages'] = array($server_url . '/message', t('Messages'), "", t('Private mail'));
$nav['settings'] = array($server_url . '/settings', t('Settings'),"", t('Account settings'));
$nav['contacts'] = array($server_url . '/contacts', t('Contacts'),"", t('Manage/edit friends and contacts'));
$nav['sitename'] = $a->config['sitename'];
}
}