Skip to content

Commit

Permalink
Fix upload service detection for some cases
Browse files Browse the repository at this point in the history
Fix nav-bar colors for light theme
Fix disabled features in PublishBrief when upload is not detected
  • Loading branch information
edhelas committed Sep 8, 2020
1 parent 7bfdcee commit 67193cd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
5 changes: 4 additions & 1 deletion app/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ public function init($username, $password, $host)

public function getUploadService()
{
return Info::where('parent', $this->host)
return Info::where(function($query) {
$query->where('parent', $this->host)
->orWhere('server', $this->host);
})
->whereCategory('store')
->whereType('file')
->where('features', 'like', '%urn:xmpp:http:upload:0%')
Expand Down
2 changes: 1 addition & 1 deletion app/widgets/Post/_post.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
</ul>
{/if}

{if="$post->pictures()->count() > 0 && !$post->isBrief() && !$post->isShort()"}
{if="$post->pictures()->count() > 0 && !$post->isBrief() && !$post->isShort() && !$public"}
<ul class="list">
<li class="subheader">
<div>
Expand Down
16 changes: 8 additions & 8 deletions app/widgets/PublishBrief/_publishbrief_embed_default.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a
class="button narrow flat icon gray"
title="{$c->__('publishbrief.add_link')}"
href="#"
onclick="PublishBrief_ajaxLink()">
<i class="material-icons">link</i>
</a>
{if="$c->getUser()->hasUpload()"}
<a
class="button narrow flat icon gray"
title="{$c->__('publishbrief.add_snap')}"
Expand All @@ -12,14 +20,6 @@
onclick="Draw.init()">
<i class="material-icons">gesture</i>
</a>
<a
class="button narrow flat icon gray"
title="{$c->__('publishbrief.add_link')}"
href="#"
onclick="PublishBrief_ajaxLink()">
<i class="material-icons">link</i>
</a>
{if="$c->getUser()->hasUpload()"}
<a
class="button narrow flat icon gray"
href="#"
Expand Down
7 changes: 6 additions & 1 deletion public/theme/css/color.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ table tr th {
background-color: var(--movim-gray);
}

.color.dark *.divided > *:not(:last-child) {
.color.dark *.divided > *:not(:last-child),
.color.dark hr {
border-color: rgba(255, 255, 255, 0.05);
}

body:not(.nightmode) .color.dark ul.list.active li:hover:not(.subheader) {
background-color: rgba(var(--movim-font), 0.3);
}

ul li.date > div > p.normal,
.dialog, .drawer, ul.context_menu,
ul li div.bubble:not(.sticker):not(.file),
Expand Down

0 comments on commit 67193cd

Please sign in to comment.