diff --git a/resources/assets/js/components/CollectionComponent.vue b/resources/assets/js/components/CollectionComponent.vue index 904471861..1d029ce3b 100644 --- a/resources/assets/js/components/CollectionComponent.vue +++ b/resources/assets/js/components/CollectionComponent.vue @@ -67,8 +67,37 @@
- Edit Photos - + + Edit Photos + + +
+ +
+ +
+ + + +
@@ -161,6 +190,7 @@ export default { data() { return { + collection: {}, config: window.App.config, loaded: false, posts: [], @@ -179,14 +209,21 @@ export default { }, beforeMount() { - this.fetchCurrentUser(); - this.fetchItems(); + this.fetchCollection(); }, mounted() { }, methods: { + fetchCollection() { + axios.get('/api/local/collection/' + this.collectionId) + .then(res => { + this.collection = res.data; + this.fetchCurrentUser(); + }) + }, + fetchCurrentUser() { if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == true) { axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => { @@ -194,9 +231,13 @@ export default { this.owner = this.currentUser.id == this.profileId; window._sharedData.curUser = res.data; window.App.util.navatar(); + this.fetchItems(); }); + } else { + this.fetchItems(); } }, + fetchItems() { axios.get('/api/local/collection/items/' + this.collectionId) .then(res => { @@ -296,6 +337,26 @@ export default { } }, + publishCollection() { + if(this.owner == false) { + return; + } + + let confirmed = window.confirm('Are you sure you want to publish this collection?'); + if(confirmed) { + axios.post('/api/local/collection/' + this.collectionId + '/publish', { + title: this.title, + description: this.description, + visibility: this.visibility + }) + .then(res => { + window.location.href = '/'; + }); + } else { + return; + } + }, + updateCollection() { this.$refs.editModal.hide(); axios.post('/api/local/collection/' + this.collectionId, { @@ -367,4 +428,4 @@ export default { } } } - \ No newline at end of file + diff --git a/resources/assets/js/components/ComposeClassic.vue b/resources/assets/js/components/ComposeClassic.vue index f86363824..75f0ed80b 100644 --- a/resources/assets/js/components/ComposeClassic.vue +++ b/resources/assets/js/components/ComposeClassic.vue @@ -61,7 +61,7 @@ -
+
-
+
@@ -516,4 +516,4 @@ export default { } } } - \ No newline at end of file + diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 20f75e20e..b4463e7fd 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -358,7 +358,7 @@

-
+

-
+
-
-
-
-
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-

Error: Problem rendering preview.

-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
-

-

-

- by {{statusUsername}} - - - Follow - -

-
- avatar -
-
-
-

- {{status.content_text.length ? status.content_text : 'Untitled Post'}} -

-

- by {{statusUsername}} - -

-
- avatar -
-
-
-

- - {{status.place.name}}, {{status.place.country}} - - - {{timeAgo(status.created_at)}} ago - -

- -
-

- {{tag.name}} -

-
-
-
-
-

Comments

-
-
- -

- - {{replyText.length}}/{{config.uploader.max_caption_length}} - - -

- - -
- - -

-
-
-
-
- avatar -
-
- - {{reply.account.username}} - - - - - - - - - - - - -
-
- - - This comment may contain sensitive material - Show - - -
-
-

loading ...

-
-

- - {{timeAgo(reply.created_at)}} - -

-
-
-
-
-
-
-
-
-
@@ -833,19 +661,6 @@ } -