OSDN Git Service

hide 'share' button in comment preview (#7681)
authorhylom <hylom@users.sourceforge.jp>
Thu, 25 Apr 2019 09:55:31 +0000 (18:55 +0900)
committerhylom <hylom@users.sourceforge.jp>
Thu, 25 Apr 2019 09:55:31 +0000 (18:55 +0900)
src/newslash_web/public/js/comment-tree.js
src/newslash_web/templates/common/comment/comment.html.tt2
src/newslash_web/templates/common/components/comment_tree.html.tt2

index 3df6fdf..581c637 100644 (file)
@@ -112,6 +112,7 @@ commentTree.run = function (params) {
     },
     props: {
       comment: Object,
+      preview: { type: Boolean, default: false },
     },
     created: function () {
       if (this.comment._displayForce) {
index ba95167..bf5695d 100644 (file)
@@ -84,7 +84,7 @@
           <span class="glyphicon glyphicon-share-alt rotate180deg" aria-hidden="true"></span> <span>ここに返信</span>
         </button>
 
-        <span :class="['dropdown', { open: showShareButtons }]">
+        <span v-if="!preview" :class="['dropdown', { open: showShareButtons }]">
           <button title="share" @click="toggleShareButtons">
             <span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> <span>共有</span>
           </button>
index a89eddf..db12cc0 100644 (file)
 <script type="text/x-template" id="comment-form-template">
   <div class="comment-form">
     <div class="preview" v-if="isPreviewVisible">
-      <comment :comment="preview"></comment>
+      <comment :comment="preview" :preview="true"></comment>
     </div>
     [%- INCLUDE common/comment/comment_form -%]
   </div>