Browse Source

Fix upload service detection for some cases

Fix nav-bar colors for light theme
Fix disabled features in PublishBrief when upload is not detected
pull/978/head
Timothée Jaussoin 5 years ago
parent
commit
67193cdfb9
  1. 5
      app/Session.php
  2. 2
      app/widgets/Post/_post.tpl
  3. 16
      app/widgets/PublishBrief/_publishbrief_embed_default.tpl
  4. 7
      public/theme/css/color.css

5
app/Session.php

@ -103,7 +103,10 @@ class Session extends Model
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%')

2
app/widgets/Post/_post.tpl

@ -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>

16
app/widgets/PublishBrief/_publishbrief_embed_default.tpl

@ -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')}"
@ -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="#"

7
public/theme/css/color.css

@ -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),

Loading…
Cancel
Save