@@ -47,13 +47,13 @@ var BebopComments = Vue.component("bebop-comments", {
47
47
48
48
<div class="avatar-block">
49
49
<div class="cqldb comment">
50
- <a target="_blank" :href="comment.createdAt | getCommentSQLRequestHref" v-bind:class="{ disabled: isCommentSQLRequestHrefEmpty (comment.createdAt ) }">
51
- <img src="https://developers.covenantsql.io/img/logo .svg" alt="logo" style="width: 19px;">CovenantSQL
50
+ <a target="_blank" :href="comment.requestHash | getCommentSQLRequestHref" v-bind:class="{ disabled: isCommentHashEmpty (comment) }">
51
+ <img src="https://raw.githubusercontent.com/CovenantSQL/logos/master/logo_icon_white .svg" alt="logo" style="width: 19px;">CovenantSQL
52
52
</a>
53
53
</div>
54
54
<div class="avatar-block-l">
55
- <img v-if="users[comment.authorId].avatar" class="img-circle" :src="users[comment.authorId].avatar" width="35" height="35">
56
- <img v-else class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" width="35" height="35">
55
+ <img v-if="users[comment.authorId].avatar" class="img-circle" :src="users[comment.authorId].avatar" width="35" height="35">
56
+ <img v-else class="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" width="35" height="35">
57
57
</div>
58
58
<div class="avatar-block-r">
59
59
<div class="comments-comment-author">{{users[comment.authorId].name}}</div>
@@ -71,7 +71,6 @@ var BebopComments = Vue.component("bebop-comments", {
71
71
<span v-if="topic.commentCount > 1" class="info-separator"> | </span>
72
72
<router-link :to="'/u/' + users[comment.authorId].id" class="a-tool"><i class="fa fa-user" aria-hidden="true"></i> user profile</router-link>
73
73
</div>
74
-
75
74
</div>
76
75
77
76
<div v-if="auth.authenticated && page === lastPage" class="comments-comment-new">
@@ -176,9 +175,8 @@ var BebopComments = Vue.component("bebop-comments", {
176
175
} ,
177
176
178
177
filters : {
179
- getCommentSQLRequestHref : function ( createdAt ) {
180
- let hash = findCommentHashByCreatedAt ( createdAt )
181
- console . log ( '// found hash:' , hash )
178
+ getCommentSQLRequestHref : function ( hash ) {
179
+ // let hash = findCommentHashByCreatedAt(createdAt)
182
180
return ! ! hash ? `${ window . API_HOST } /dbs/${ window . DBID } /requests/${ hash } ` : ''
183
181
} ,
184
182
} ,
@@ -200,16 +198,18 @@ var BebopComments = Vue.component("bebop-comments", {
200
198
this . getComments ( ) . then ( this . getCommentSQLQueries ) ;
201
199
} ,
202
200
203
- isCommentSQLRequestHrefEmpty : function ( createdAt ) {
204
- return findCommentHashByCreatedAt ( createdAt ) === ''
201
+ // if comment.requestHash is empty, disable the button
202
+ isCommentHashEmpty : function ( comment ) {
203
+ return comment . requestHash === ''
205
204
} ,
206
205
getCommentSQLQueries : function ( ) {
207
206
this . comments . forEach ( comment => {
208
207
const timestamp = ( new Date ( comment . createdAt ) ) . getTime ( )
209
208
const possibleHeight = this . computeTimeHeight ( timestamp )
210
209
console . log ( '// -- current comment possible height:' , possibleHeight )
211
210
212
- this . getTimeRelatedBlocks ( possibleHeight )
211
+ // DEPRECATED find possible height by Chenxi 2019-04-24
212
+ // this.getTimeRelatedBlocks(possibleHeight)
213
213
} )
214
214
} ,
215
215
writeSQL : function ( block ) {
0 commit comments