whyis-fediverse 0.3.0__py3-none-any.whl → 0.4.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,7 @@ export default Vue.component('fedi-post-view', {
16
16
  return {
17
17
  post: null,
18
18
  replies: null,
19
+ replyData: {},
19
20
  loading: false,
20
21
  loadError: false,
21
22
  otherArgs: null,
@@ -38,11 +39,13 @@ export default Vue.component('fedi-post-view', {
38
39
  md-label="Reply to this thread"
39
40
  md-description="Reply below to continue this conversation.">
40
41
  </md-empty-state>
41
- <fedi-comment v-else
42
- v-for="reply in replies"
43
- :key="reply.id"
44
- v-bind:value="reply">
45
- </fedi-comment>
42
+ <div v-else>
43
+ <fedi-comment v-if="replyData[reply]"
44
+ v-for="reply in replies"
45
+ :key="reply"
46
+ v-bind:value="replyData[reply]">
47
+ </fedi-comment>
48
+ </div>
46
49
  </div>
47
50
  <fedi-new-post v-if="post != null"
48
51
  :inReplyTo="post.id">
@@ -71,6 +74,19 @@ export default Vue.component('fedi-post-view', {
71
74
  console.log(response.data);
72
75
  this.post = response.data;
73
76
  },
77
+ async loadReplyData(uri) {
78
+ if (this.replyData[uri] == null || this.replyData[uri]['typing'].length > 0) {
79
+ let response = await axios.get(`${ROOT_URL}about`,
80
+ {
81
+ params: {
82
+ view: "data",
83
+ uri: uri
84
+ }
85
+ });
86
+ this.replyData[uri] = response.data;
87
+ }
88
+ return this.replyData[uri];
89
+ },
74
90
  async loadReplies() {
75
91
  let response = await axios.get(`${ROOT_URL}about`,
76
92
  {
@@ -79,6 +95,10 @@ export default Vue.component('fedi-post-view', {
79
95
  uri: this.object
80
96
  }
81
97
  });
98
+ let that = this;
99
+ await response.data.forEach(function (reply) {
100
+ that.loadReplyData(reply);
101
+ });
82
102
  this.replies = response.data;
83
103
  }
84
104
  },
@@ -1 +1,3 @@
1
+ {%- if this.value(app.NS.astr.content) %}
1
2
  {{this.value(app.NS.astr.content).value|markdown|safe}}
3
+ {%- endif %}
@@ -6,6 +6,6 @@ select distinct ?reply where {
6
6
  } order by (?published) ' -%}
7
7
  [
8
8
  {% for row in context_query | query(values={"post":this.identifier}) %}
9
- {{row['reply'] | include('data') | safe }}{% if not loop.last %}, {% endif %}
9
+ {{row['reply'] | tojson }}{% if not loop.last %}, {% endif %}
10
10
  {%- endfor %}
11
11
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: whyis-fediverse
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  License-File: LICENSE
5
5
  Requires-Dist: whyis
6
6
 
@@ -8,7 +8,7 @@ whyis_fediverse/static/js/comment.js,sha256=tShhdxD3ZxNYms44E36xtJxREbKuXCpEl1vd
8
8
  whyis_fediverse/static/js/discussion.js,sha256=KrW8h9pUaheJjqhgkmK9PZargoTJoGJun5n91rEk2Jc,2418
9
9
  whyis_fediverse/static/js/new_post.js,sha256=wCR8-jLzLe4C43-KFRkQ2MQ2fCB7eCLkSX2sG-jFfCY,6811
10
10
  whyis_fediverse/static/js/post.js,sha256=xmLicaDBnejcbr4vH1cLmVoy-Cplz7PuCKE_mNHjBzk,3266
11
- whyis_fediverse/static/js/post_view.js,sha256=0Wpjht9BU3MGS1VtkRhHHqPLFkMlUOOn6-Y-boNdDVs,2686
11
+ whyis_fediverse/static/js/post_view.js,sha256=8sHzUO_tGX4GkwqpBxvs_eHiiWndho0eapWYZcRbxUU,3357
12
12
  whyis_fediverse/static/js/selectable.js,sha256=QH4ZYAj-Y6-YAA1l0ylNXXUhU2r5yqBmZ07Sn-3CKME,1129
13
13
  whyis_fediverse/static/js/selectable.js~,sha256=p17cbCcv26I68zyIl71KOA-Y0zT0AYP1LjOOaof-2JY,459
14
14
  whyis_fediverse/static/js/selections.js,sha256=RKzDvV5qvCIk1QTAgXoLD4GwKbVRxCfTvEhgAT77QRE,737
@@ -21,7 +21,7 @@ whyis_fediverse/templates/discussion.html,sha256=rt07C6wEg17gidDae_a6ZfmcN_W_dkL
21
21
  whyis_fediverse/templates/discussion.json,sha256=6BE9ENbur_eiScePyk8_6Xs4RYIDQNenpMInMiry1ww,821
22
22
  whyis_fediverse/templates/embed_image.html,sha256=7Qh-8WaDusMIqWnzRTTI2AHrW1hIvOr6Zsn13dUMk-g,89
23
23
  whyis_fediverse/templates/embed_image.html~,sha256=6S_FPdMVROGBUpy8YznYbsozajC5rm0eo1YR4cYGTf8,98
24
- whyis_fediverse/templates/embed_object.html,sha256=NNnGYxA3-EcZSmVsUGrBj5XcoFpj4xYKp1-ayMumvRk,56
24
+ whyis_fediverse/templates/embed_object.html,sha256=LR22aBlO2H11B1aOdZ1O3nmWUFfznlLupwsb7OmW9es,111
25
25
  whyis_fediverse/templates/embed_object.html~,sha256=Y3T_8SHco3Yiau9E68AeiyXHHtfZPV4hzVqgJP0cwCA,259
26
26
  whyis_fediverse/templates/embed_resource.html,sha256=0doDpaSAE7T-BXo8cTciM9h2-6wJGVadTS3BQ6XMwNc,226
27
27
  whyis_fediverse/templates/embed_resource.html~,sha256=XB0NLhfH7KIZ8GU3vXdO8hMKhzoMuM0P6aYG3SBwyWE,258
@@ -30,15 +30,15 @@ whyis_fediverse/templates/embed_video.html~,sha256=Y3T_8SHco3Yiau9E68AeiyXHHtfZP
30
30
  whyis_fediverse/templates/image_embed.html,sha256=ovmUMO-ZSTCIMEmtvXX9sC-mr6wTJrKzA_jsBYvJIF0,116
31
31
  whyis_fediverse/templates/image_embed.svg,sha256=ovmUMO-ZSTCIMEmtvXX9sC-mr6wTJrKzA_jsBYvJIF0,116
32
32
  whyis_fediverse/templates/object_data.json,sha256=4KpglgRQvV2AUBmeMOrA3_GzzmhU83p1jODJMIFphBE,3204
33
- whyis_fediverse/templates/object_replies.json,sha256=W2Ch-s6Lh-yjw3tBY9KtzCMGSlezTHSuJxCLxZcx1Q0,392
33
+ whyis_fediverse/templates/object_replies.json,sha256=SudBbaV-g0hA4PIcKlNUw2HtHexRg3v78uH-m5OGBug,376
34
34
  whyis_fediverse/templates/object_view.html,sha256=ZhEAD3kvLoBrDT7CtmJd27n70vMZ4pcqsaTxjUq3raA,796
35
35
  whyis_fediverse/templates/resource_get.json,sha256=qgKrV5c2IQGWfnv6EIXL_B3xte4UC7PQ1uv1VOO5v38,131
36
36
  whyis_fediverse/templates/resource_search.json,sha256=BXOsOdM7rJ2MV1_7tMthXLuc_aye6Ig9_3jYXXSxiP0,230
37
37
  whyis_fediverse/templates/space_get.json,sha256=QYxOUQjW7Asyvla-C0-Dv9mj0Tww1MdecxqUMuOH1mg,132
38
38
  whyis_fediverse/templates/space_search.json,sha256=PMzIraMldZrb7jrCsBhJRbQ_vB76nxz24cS9Bcgx-gk,193
39
- whyis_fediverse-0.3.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
- whyis_fediverse-0.3.0.dist-info/METADATA,sha256=x4tklRB5qeLQVFTfmrgTEWF6d1fTQBMZJIdFwmGbdtg,103
41
- whyis_fediverse-0.3.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
42
- whyis_fediverse-0.3.0.dist-info/entry_points.txt,sha256=e4XLi7wxdcBNLXdbeukTWuVWuprOpYUpFUkOJe4vPdY,58
43
- whyis_fediverse-0.3.0.dist-info/top_level.txt,sha256=s0dGyAZlCNhS-O-Zoqlui3FKCkMAc8VqfK3o6DLsC10,16
44
- whyis_fediverse-0.3.0.dist-info/RECORD,,
39
+ whyis_fediverse-0.4.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
+ whyis_fediverse-0.4.1.dist-info/METADATA,sha256=3YgbUuVqPeZrgwzwcSLyT2LrX6k7PCZWQntqa7vY50A,103
41
+ whyis_fediverse-0.4.1.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
42
+ whyis_fediverse-0.4.1.dist-info/entry_points.txt,sha256=e4XLi7wxdcBNLXdbeukTWuVWuprOpYUpFUkOJe4vPdY,58
43
+ whyis_fediverse-0.4.1.dist-info/top_level.txt,sha256=s0dGyAZlCNhS-O-Zoqlui3FKCkMAc8VqfK3o6DLsC10,16
44
+ whyis_fediverse-0.4.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.5.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5