whyis-fediverse 0.4.2__py3-none-any.whl → 0.4.4__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.
@@ -30,13 +30,13 @@ export default Vue.component('fedi-comment', {
30
30
  typing_template: `
31
31
  `,
32
32
  template: `
33
- <md-content style="margin-top:1.5em">
34
- <div v-if="value.attachment != null && value.attachment.length != 0">
35
- <fedi-selectable v-bind:uri="a.id" v-for="a in value.attachment" v-bind:key="a.id" v-html="a.embed">
33
+ <md-content style="margin-top:1.5em; width:100%">
34
+ <div class="md-layout" v-if="value.attachment != null && value.attachment.length != 0">
35
+ <fedi-selectable class="md-layout-item md-size-30" v-bind:uri="a.id" v-for="a in value.attachment" v-bind:key="a.id" v-html="a.embed">
36
36
  </fedi-selectable>
37
37
  </div>
38
- <div v-if="value.context != null && value.context.length != 0">
39
- <fedi-selectable v-bind:uri="a.id" v-for="a in value.context" v-bind:key="a.id" v-html="a.embed">
38
+ <div class="md-layout" v-if="value.context != null && value.context.length != 0">
39
+ <fedi-selectable class="md-layout-item md-size-30" v-bind:uri="a.id" v-for="a in value.context" v-bind:key="a.id" v-html="a.embed">
40
40
  </fedi-selectable>
41
41
  </div>
42
42
  <div style="width:fit-content; margin-top:0.5em; border-radius:1em; padding-left:0.75em; padding-right:0.75em; background-color:lightgray">
@@ -14,10 +14,11 @@ export default Vue.component('fedi-discussion', {
14
14
  data() {
15
15
  return {
16
16
  results: [],
17
+ postData: {},
17
18
  loading: false,
18
19
  loadError: false,
19
20
  otherArgs: null,
20
- pageSize: 20
21
+ pageSize: 10
21
22
  }
22
23
  },
23
24
  template: `
@@ -27,11 +28,11 @@ export default Vue.component('fedi-discussion', {
27
28
  <fedi-new-post style="width:40em; margin-top:0.5em; border-radius:0.5em"
28
29
  :entity="entity">
29
30
  </fedi-new-post>
30
- <fedi-post style="width:40em; margin-top:0.5em; border-radius:0.5em"
31
- v-for="(post, index) in results"
32
- :key="post.id"
33
- :entity="entity"
34
- v-bind:value="post">
31
+ <fedi-post style="width:40em; margin-top:0.5em; border-radius:0.5em"
32
+ v-if="postData[post]"
33
+ v-for="post in results"
34
+ :key="post"
35
+ v-bind:value="postData[post]">
35
36
  </fedi-post>
36
37
  </div>
37
38
  </fedi-selection>`,
@@ -53,6 +54,24 @@ export default Vue.component('fedi-discussion', {
53
54
  }
54
55
  })
55
56
  this.results.push(...result.data)
57
+ let that = this;
58
+ await this.results.forEach(function (post) {
59
+ that.loadPostData(post);
60
+ });
61
+ },
62
+ async loadPostData(uri) {
63
+ if (this.postData[uri] == null) {
64
+ let response = await axios.get(`${ROOT_URL}about`,
65
+ {
66
+ params: {
67
+ view: "data",
68
+ uri: uri
69
+ }
70
+ });
71
+ this.postData[uri] = response.data;
72
+ this.$forceUpdate();
73
+ }
74
+ return this.postData[uri];
56
75
  },
57
76
  async scrollBottom () {
58
77
  if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
@@ -121,7 +121,8 @@ export default Vue.component('fedi-new-post', {
121
121
  <md-icon md-size="small">send</md-icon>
122
122
  </md-button>
123
123
  </md-field>
124
- <div style="position:relative"
124
+ <div class="md-layout">
125
+ <div class="md-layout-item md-size-20" style="position:relative"
125
126
  v-for="item in selection"
126
127
  v-bind:key="item"
127
128
  v-on:mouseenter="hovers[item] = true"
@@ -133,6 +134,7 @@ export default Vue.component('fedi-new-post', {
133
134
  <md-icon>delete</md-icon>
134
135
  </md-button>
135
136
  </div>
137
+ </div>
136
138
  <md-field id="media_upload">
137
139
  <label>Add media</label>
138
140
  <md-file name="media_upload" ref="attachments" v-model="attachments" multiple />
@@ -23,9 +23,10 @@ select distinct ?object where {
23
23
  minus { ?object astr:inReplyTo []}
24
24
  } order by desc (?published) ' -%}
25
25
  [
26
- {% for row in context_query | query(limit=args.get('limit', 100),
26
+ {% for row in context_query | query(limit=args.get('limit', 10),
27
27
  offset=args.get('offset',0)) -%}
28
- {{row['object'] | include('data') | safe }}{% if not loop.last %}, {% endif %}
28
+ "{{row['object'] | safe }}"{% if not loop.last %}, {% endif %}
29
+ {#{{row['object'] | include('data') | safe }}{% if not loop.last %}, {% endif %}#}
29
30
  {%- endfor %}
30
31
  ]
31
32
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: whyis-fediverse
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  License-File: LICENSE
5
5
  Requires-Dist: whyis
6
6
 
@@ -4,9 +4,9 @@ whyis_fediverse/test_example.trig,sha256=kcTQ0hmnt8bjsTBrRN58yvzTEtNT5ryrDBWoeRe
4
4
  whyis_fediverse/test_example.ttl,sha256=sD79vPJcFacKMyt9rvLSBZxSRGe5Q06qeoXdHzn3XOQ,3496
5
5
  whyis_fediverse/vocab.ttl,sha256=ZcN5pWzoxBNxeOTfVjs0vVgBnWDvVNCMics_JC8WRWs,2778
6
6
  whyis_fediverse/static/js/#new_post.js#,sha256=7SJRF5yYO9YvWffs77uWKawJPUjXPaxiRwPyWT0-2ww,6749
7
- whyis_fediverse/static/js/comment.js,sha256=tShhdxD3ZxNYms44E36xtJxREbKuXCpEl1vdJ_Kmoz8,3538
8
- whyis_fediverse/static/js/discussion.js,sha256=KrW8h9pUaheJjqhgkmK9PZargoTJoGJun5n91rEk2Jc,2418
9
- whyis_fediverse/static/js/new_post.js,sha256=wCR8-jLzLe4C43-KFRkQ2MQ2fCB7eCLkSX2sG-jFfCY,6811
7
+ whyis_fediverse/static/js/comment.js,sha256=3foTjvh9Zgv8YAL3WfI6PE1c5PlGWDIXc51PShm2XY8,3654
8
+ whyis_fediverse/static/js/discussion.js,sha256=SCvbyqRJydPg52Mat7tqGuRncBugM4OBUdeXJWiO7c4,2977
9
+ whyis_fediverse/static/js/new_post.js,sha256=G_EgA3WP-FKzeWqxFNR5F5Xgz-ZQsG0aInAM2ZkBm0A,6900
10
10
  whyis_fediverse/static/js/post.js,sha256=xmLicaDBnejcbr4vH1cLmVoy-Cplz7PuCKE_mNHjBzk,3266
11
11
  whyis_fediverse/static/js/post_view.js,sha256=vdyvpfFa9ml2ZFqN7d_ANThYyKxAeDQ_KK_AzkKYZHc,4095
12
12
  whyis_fediverse/static/js/selectable.js,sha256=QH4ZYAj-Y6-YAA1l0ylNXXUhU2r5yqBmZ07Sn-3CKME,1129
@@ -16,7 +16,7 @@ whyis_fediverse/static/js/selections.js~,sha256=0R8arrYGwFwic5N4oV-YDVT-V0OCr918
16
16
  whyis_fediverse/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  whyis_fediverse/templates/all_discussion.html,sha256=SMqV8aHS3c_fYjVZEcx0wT_3q2PpXmkkvBeTMce4Fvs,3043
18
18
  whyis_fediverse/templates/all_discussion.html~,sha256=rt07C6wEg17gidDae_a6ZfmcN_W_dkL6fJ6quvOA7Q8,3072
19
- whyis_fediverse/templates/all_discussion.json,sha256=FxZyAvGN8Lgjuda0kszhy5q0Z9U-jqgiPgpfTTlIs3U,750
19
+ whyis_fediverse/templates/all_discussion.json,sha256=SA-t6wz2N6SL3DNFGvIzj1Xc3h9w0K6-4D2tpBYAp-o,820
20
20
  whyis_fediverse/templates/discussion.html,sha256=rt07C6wEg17gidDae_a6ZfmcN_W_dkL6fJ6quvOA7Q8,3072
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
@@ -36,9 +36,9 @@ whyis_fediverse/templates/resource_get.json,sha256=qgKrV5c2IQGWfnv6EIXL_B3xte4UC
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.4.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
- whyis_fediverse-0.4.2.dist-info/METADATA,sha256=3wYEsGerTSBH_oohRC0Ohl7B6IMpRgeX7c96F-OUxAM,103
41
- whyis_fediverse-0.4.2.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
42
- whyis_fediverse-0.4.2.dist-info/entry_points.txt,sha256=e4XLi7wxdcBNLXdbeukTWuVWuprOpYUpFUkOJe4vPdY,58
43
- whyis_fediverse-0.4.2.dist-info/top_level.txt,sha256=s0dGyAZlCNhS-O-Zoqlui3FKCkMAc8VqfK3o6DLsC10,16
44
- whyis_fediverse-0.4.2.dist-info/RECORD,,
39
+ whyis_fediverse-0.4.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
+ whyis_fediverse-0.4.4.dist-info/METADATA,sha256=d6WsOe6sV8tEueNiHMIyo9yTWYhP-5qs84kAz76U7hQ,103
41
+ whyis_fediverse-0.4.4.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
42
+ whyis_fediverse-0.4.4.dist-info/entry_points.txt,sha256=e4XLi7wxdcBNLXdbeukTWuVWuprOpYUpFUkOJe4vPdY,58
43
+ whyis_fediverse-0.4.4.dist-info/top_level.txt,sha256=s0dGyAZlCNhS-O-Zoqlui3FKCkMAc8VqfK3o6DLsC10,16
44
+ whyis_fediverse-0.4.4.dist-info/RECORD,,