add darkfeature "new posting" on rightclick and label on create button

This commit is contained in:
Jakobus Schürz 2023-10-21 15:51:57 +02:00
parent 013bba50bc
commit 486b7caa46
6 changed files with 10 additions and 12 deletions

View file

@ -362,6 +362,7 @@ class Conversation
$tpl = Renderer::getMarkupTemplate('jot.tpl'); $tpl = Renderer::getMarkupTemplate('jot.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$post' => $this->l10n->t($x['content'] ? 'Post to group' : 'Post'),
'$new_post' => $this->l10n->t('New Post'), '$new_post' => $this->l10n->t('New Post'),
'$return_path' => $this->args->getQueryString(), '$return_path' => $this->args->getQueryString(),
'$action' => 'item', '$action' => 'item',

View file

@ -84,8 +84,6 @@ $(document).ready(function () {
let $mentionButton = $("#mention-link-button"); let $mentionButton = $("#mention-link-button");
if ($mentionButton.length) { if ($mentionButton.length) {
$mentionButton.appendTo("#topbar-second > .container > #navbar-button").addClass("pull-right"); $mentionButton.appendTo("#topbar-second > .container > #navbar-button").addClass("pull-right");
$("#mention-link").addClass("btn-sm ");
$("#mention-link > span i").addClass("fa-2x");
if ($mentionButton.hasClass("modal-open")) { if ($mentionButton.hasClass("modal-open")) {
$mentionButton.on("click", function (e) { $mentionButton.on("click", function (e) {
e.preventDefault(); e.preventDefault();

View file

@ -1,5 +1,5 @@
{{* The button to open the jot - in This theme we move the button with js to the second nav bar *}} {{* The button to open the jot - in This theme we move the button with js to the second nav bar *}}
<a class="btn btn-sm btn-primary pull-right{{if !$always_open_compose}} modal-open{{/if}}" id="jotOpen" href="compose/{{$posttype}}{{if $content}}?body={{$content}}{{/if}}" aria-label="{{$new_post}}" title="{{$new_post}}"><i class="fa fa-pencil-square-o fa-2x"></i></a> <a class="btn btn-primary pull-right{{if !$always_open_compose}} modal-open{{/if}}" id="jotOpen" href="compose/{{$posttype}}{{if $content}}?body={{$content}}{{/if}}" aria-label="{{$new_post}}" title="{{$new_post}}"><i class="fa fa-pencil-square-o"></i><span class="">{{$post}}</span></a>
<div id="jot-content"> <div id="jot-content">
<div id="jot-sections"> <div id="jot-sections">

View file

@ -72,10 +72,9 @@
{{/if}} {{/if}}
{{if $profile.addr}} {{if $profile.addr}}
<div id="mention-link-button"> <div id="mention-link-button">
<button type="button" id="mention-link" class="btn btn-labeled btn-primary" onclick="openWallMessage('{{$mention_url}}')"> <button type="button" id="mention-link" class="btn btn-labeled btn-primary" onclick="openWallMessage('{{$mention_url}}')" oncontextmenu="openWallMessage('compose/0'); return false;">
<span class=""><i class="fa fa-pencil-square-o"></i></span> <span class=""><i class="fa fa-pencil-square-o"></i></span>
<span class="">{{$mention_label}}</span> <span class="">{{$mention_label}}</span>
</button>
</div> </div>
{{/if}} {{/if}}
{{if $network_label}} {{if $network_label}}

View file

@ -58,7 +58,7 @@
{{/if}} {{/if}}
{{if $mention_link}} {{if $mention_link}}
<div id="mention-link-button"> <div id="mention-link-button">
<button type="button" id="mention-link" class="btn btn-labeled btn-primary{{if !$always_open_compose}} modal-open{{/if}}" onclick="openWallMessage('{{$mention_link}}')" title="{{$mention}}" aria-label="{{$mention}}"> <button type="button" id="mention-link" class="btn btn-labeled btn-primary{{if !$always_open_compose}} modal-open{{/if}}" onclick="openWallMessage('{{$mention_link}}')" oncontextmenu="openWallMessage('compose/0'); return false;" title="{{$mention}}" aria-label="{{$mention}}">
<span class=""><i class="fa fa-pencil-square-o"></i></span> <span class=""><i class="fa fa-pencil-square-o"></i></span>
<span class="">{{$mention}}</span> <span class="">{{$mention}}</span>
</button> </button>