mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
* Enh #68: Online Indicator Position * Enh #68: Online Indicator Position --------- Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
parent
64a5099897
commit
36791347cd
@ -6,10 +6,11 @@ HumHub Changelog
|
||||
- Fix #6472: Initialization of account profile field type "Markdown"
|
||||
- Fix #6471: Wording "Default Homepage" in Space Default Settings
|
||||
- Fix #6468: Module Administration - Marketplace Links broken without Pretty URLs
|
||||
- Enh #6469: Added Info text for Marketplace page
|
||||
- Enh #6469: Added Info text for Marketplace page
|
||||
- Fix #112: Reorder Table Rows
|
||||
- Fix #6476: Fix module disabling in queue
|
||||
- Enh #6469: Implement conditions for `fixed-settings` in config
|
||||
- Enh #68: Online Indicator Position
|
||||
- Fix #6492: Fix module form "Set as default"
|
||||
- Fix #6457: Regression with membership cache. Also move cache to `Membership::findMembership`.
|
||||
|
||||
|
@ -35,9 +35,12 @@ class IsOnlineService
|
||||
}
|
||||
}
|
||||
|
||||
public function getStatus(): bool
|
||||
public function getStatus(bool $showSelfStatus = false): bool
|
||||
{
|
||||
return $this->isEnabled() && Yii::$app->cache->exists($this->getCacheKey());
|
||||
return
|
||||
$this->isEnabled()
|
||||
&& Yii::$app->cache->exists($this->getCacheKey())
|
||||
&& ($showSelfStatus || $this->user->id !== Yii::$app->user->id);
|
||||
}
|
||||
|
||||
public function isEnabled(): bool
|
||||
|
@ -34,6 +34,8 @@ class Image extends BaseImage
|
||||
|
||||
public bool $hideOnlineStatus = false;
|
||||
|
||||
public bool $showSelfOnlineStatus = false;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@ -72,7 +74,7 @@ class Image extends BaseImage
|
||||
} else {
|
||||
Html::addCssClass($this->htmlOptions, ['has-online-status', $imgSize]);
|
||||
}
|
||||
$userIsOnline = $isOnlineService->getStatus();
|
||||
$userIsOnline = $isOnlineService->getStatus($this->showSelfOnlineStatus);
|
||||
$html .= Html::tag('span', '', [
|
||||
'class' => ['tt user-online-status', $userIsOnline ? 'user-is-online' : 'user-is-offline'],
|
||||
'title' => $userIsOnline ?
|
||||
|
@ -44,7 +44,7 @@ $userModel = Yii::$app->user->identity;
|
||||
'link' => false,
|
||||
'width' => 32,
|
||||
'htmlOptions' => ['id' => 'user-account-image'],
|
||||
'hideOnlineStatus' => true,
|
||||
'showSelfOnlineStatus' => true,
|
||||
]) ?>
|
||||
|
||||
<b class="caret"></b>
|
||||
|
@ -94,6 +94,10 @@
|
||||
span {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#user-account-image {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,13 +213,16 @@
|
||||
|
||||
.dropdown-footer {
|
||||
margin: 10px 10px 5px;
|
||||
|
||||
.btn.btn-default {
|
||||
border: 1px solid @default;
|
||||
box-shadow: none;
|
||||
|
||||
&:hover {
|
||||
border-color: @background3;
|
||||
background: @background3;
|
||||
}
|
||||
|
||||
&:active {
|
||||
border-color: @text-color-secondary;
|
||||
background: white;
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user