diff --git a/CHANGELOG.md b/CHANGELOG.md index d556e9a20..bfc6646db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.10.10...dev) ### Added +- Autocomplete Support (hashtags + mentions) ([de514f7d](https://github.com/pixelfed/pixelfed/commit/de514f7d)) ### Updated - Updated AdminController, fix variable name in updateSpam method. ([6edaf940](https://github.com/pixelfed/pixelfed/commit/6edaf940)) diff --git a/public/css/app.css b/public/css/app.css index 4d055ba6e..656f96425 100644 Binary files a/public/css/app.css and b/public/css/app.css differ diff --git a/public/css/appdark.css b/public/css/appdark.css index 4316e2ca4..7282b7de3 100644 Binary files a/public/css/appdark.css and b/public/css/appdark.css differ diff --git a/public/css/landing.css b/public/css/landing.css index 39b77f2c9..792cd0372 100644 Binary files a/public/css/landing.css and b/public/css/landing.css differ diff --git a/public/js/compose.js b/public/js/compose.js index f8aebda6d..1f3ff9799 100644 Binary files a/public/js/compose.js and b/public/js/compose.js differ diff --git a/public/js/status.js b/public/js/status.js index 78bfd4b41..f42352fe8 100644 Binary files a/public/js/status.js and b/public/js/status.js differ diff --git a/public/js/timeline.js b/public/js/timeline.js index e9adcae1d..9da486201 100644 Binary files a/public/js/timeline.js and b/public/js/timeline.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index ca9caa6e0..c57e5e887 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index a98028efe..e2c054ac3 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -295,7 +295,9 @@
- + + +

{{composeTextLength}}/{{config.uploader.max_caption_length}}

@@ -647,11 +649,14 @@ import VueCropper from 'vue-cropperjs'; import 'cropperjs/dist/cropper.css'; import Autocomplete from '@trevoreyre/autocomplete-vue' import '@trevoreyre/autocomplete-vue/dist/style.css' +import VueTribute from 'vue-tribute' export default { + components: { VueCropper, - Autocomplete + Autocomplete, + VueTribute }, data() { @@ -707,7 +712,39 @@ export default { cameraRollMedia: [], taggedUsernames: [], taggedPeopleSearch: null, - textMode: false + textMode: false, + tributeSettings: { + collection: [ + { + trigger: '@', + menuShowMinLength: 2, + values: (function (text, cb) { + let url = '/api/compose/v0/search/mention'; + axios.get(url, { params: { q: text }}) + .then(res => { + cb(res.data); + }) + .catch(err => { + console.log(err); + }) + }) + }, + { + trigger: '#', + menuShowMinLength: 2, + values: (function (text, cb) { + let url = '/api/compose/v0/search/hashtag'; + axios.get(url, { params: { q: text }}) + .then(res => { + cb(res.data); + }) + .catch(err => { + console.log(err); + }) + }) + } + ] + } } }, diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 7525db9c9..b9302f9ba 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -643,8 +643,10 @@ size="md" body-class="p-2 rounded">
- + + +