From 1e88bb4b6371cabb43c0f5fa4c59e14870d38593 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 6 Apr 2019 23:02:08 -0600 Subject: [PATCH 01/74] Update network timeline view --- resources/views/timeline/network.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/timeline/network.blade.php b/resources/views/timeline/network.blade.php index 1fc7c639f..1ba58d090 100644 --- a/resources/views/timeline/network.blade.php +++ b/resources/views/timeline/network.blade.php @@ -8,6 +8,7 @@ @push('scripts') + From 11ce7e617d4343053e1ebd933af1910d5a698f4c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 12 Apr 2019 23:28:23 -0600 Subject: [PATCH 34/74] Fixes #658 --- app/Http/Controllers/PublicApiController.php | 4 ++-- app/Http/Controllers/StatusController.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index c764f27cd..263b2a35a 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -180,8 +180,8 @@ class PublicApiController extends Controller if(!$user) { abort(403); } else { - $follows = $profile->followedBy(Auth::user()->profile); - if($follows == false && $profile->id !== $user->profile->id) { + $follows = $profile->followedBy($user->profile); + if($follows == false && $profile->id !== $user->profile->id && $user->is_admin == false) { abort(404); } } diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index ad477fd26..c6e38754b 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -42,11 +42,11 @@ class StatusController extends Controller if($status->visibility == 'private' || $user->is_private) { if(!Auth::check()) { - abort(403); + abort(404); } $pid = Auth::user()->profile; - if($user->followedBy($pid) == false && $user->id !== $pid->id) { - abort(403); + if($user->followedBy($pid) == false && $user->id !== $pid->id && Auth::user()->is_admin == false) { + abort(404); } } From 6fcbace0d8c6ffae00c2f75a0d7199fa9050482e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 13 Apr 2019 14:44:58 -0600 Subject: [PATCH 35/74] Update CommentController, increment reply count --- app/Http/Controllers/CommentController.php | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index 703241ce7..0a8e3b662 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; use Auth; +use DB; use Cache; use App\Comment; @@ -58,14 +59,21 @@ class CommentController extends Controller Cache::forget('transform:status:'.$status->url()); - $autolink = Autolink::create()->autolink($comment); - $reply = new Status(); - $reply->profile_id = $profile->id; - $reply->caption = e($comment); - $reply->rendered = $autolink; - $reply->in_reply_to_id = $status->id; - $reply->in_reply_to_profile_id = $status->profile_id; - $reply->save(); + $reply = DB::transaction(function() use($comment, $status, $profile) { + $autolink = Autolink::create()->autolink($comment); + $reply = new Status(); + $reply->profile_id = $profile->id; + $reply->caption = e($comment); + $reply->rendered = $autolink; + $reply->in_reply_to_id = $status->id; + $reply->in_reply_to_profile_id = $status->profile_id; + $reply->save(); + + $status->reply_count++; + $status->save(); + + return $reply; + }); NewStatusPipeline::dispatch($reply, false); CommentPipeline::dispatch($status, $reply); From 20957afccc3e7ae52012a6a616881b1d43ffc518 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 13 Apr 2019 21:25:34 -0600 Subject: [PATCH 36/74] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 263b2a35a..e49174b36 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -108,6 +108,7 @@ class PublicApiController extends Controller 'max_id' => 'nullable|integer|min:1|max:'.PHP_INT_MAX, 'limit' => 'nullable|integer|min:5|max:50' ]); + $limit = $request->limit ?? 10; $profile = Profile::whereUsername($username)->whereNull('status')->firstOrFail(); $status = Status::whereProfileId($profile->id)->whereCommentsDisabled(false)->findOrFail($postId); @@ -116,7 +117,7 @@ class PublicApiController extends Controller if($request->filled('min_id')) { $replies = $status->comments() ->whereNull('reblog_of_id') - ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'created_at') + ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at') ->where('id', '>=', $request->min_id) ->orderBy('id', 'desc') ->paginate($limit); @@ -124,7 +125,7 @@ class PublicApiController extends Controller if($request->filled('max_id')) { $replies = $status->comments() ->whereNull('reblog_of_id') - ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'created_at') + ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at') ->where('id', '<=', $request->max_id) ->orderBy('id', 'desc') ->paginate($limit); @@ -132,7 +133,7 @@ class PublicApiController extends Controller } else { $replies = $status->comments() ->whereNull('reblog_of_id') - ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'created_at') + ->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at') ->orderBy('id', 'desc') ->paginate($limit); } From 58a9d5af98b2de9188f0db8b436afaa6e9a553f2 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 12:24:02 -0600 Subject: [PATCH 37/74] Update PostComponent --- .../assets/js/components/PostComponent.vue | 48 ++++++++++++++++--- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index c0c157106..eb207c547 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -137,6 +137,18 @@ {{reply.favourites_count == 1 ? '1 like' : reply.favourites_count + ' likes'}} Reply

+
+ + {{reply.thread ? 'Hide' : 'View'}} Replies ({{reply.reply_count}}) +
+
+

+ + {{s.account.username}} + + +

+
@@ -331,7 +343,7 @@ } .emoji-reactions .nav-item { font-size: 1.2rem; - padding: 7px; + padding: 9px; cursor: pointer; } .emoji-reactions::-webkit-scrollbar { @@ -372,7 +384,9 @@ export default { showComments: false, warning: false, loaded: false, - loading: null + loading: null, + replyingToId: this.statusId, + emoji: ['😀','😁','😂','🤣','😃','😄','😅','😆','😉','😊','😋','😎','😍','😘','😗','😙','😚','☺️','🙂','🤗','🤩','🤔','🤨','😐','😑','😶','🙄','😏','😣','😥','😮','🤐','😯','😪','😫','😴','😌','😛','😜','😝','🤤','😒','😓','😔','😕','🙃','🤑','😲','☹️','🙁','😖','😞','😟','😤','😢','😭','😦','😧','😨','😩','🤯','😬','😰','😱','😳','🤪','😵','😡','😠','🤬','😷','🤒','🤕','🤢','🤮','🤧','😇','🤠','🤡','🤥','🤫','🤭','🧐','🤓','😈','👿','👹','👺','💀','👻','👽','🤖','💩','😺','😸','😹','😻','😼','😽','🙀','😿','😾','🤲','👐','🙌','👏','🤝','👍','👎','👊','✊','🤛','🤜','🤞','✌️','🤟','🤘','👌','👈','👉','👆','👇','☝️','✋','🤚','🖐','🖖','👋','🤙','💪','🖕','✍️','🙏','💍','💄','💋','👄','👅','👂','👃','👣','👁','👀','🧠','🗣','👤','👥'], } }, @@ -668,16 +682,20 @@ export default { return; } let data = { - item: this.statusId, + item: this.replyingToId, comment: this.replyText } axios.post('/i/comment', data) .then(function(res) { let entity = res.data.entity; - self.results.push(entity); + if(entity.in_reply_to_id == self.status.id) { + self.results.push(entity); + let elem = $('.status-comments')[0]; + elem.scrollTop = elem.clientHeight; + } else { + + } self.replyText = ''; - let elem = $('.status-comments')[0]; - elem.scrollTop = elem.clientHeight; }); }, @@ -699,6 +717,7 @@ export default { }, replyFocus(e) { + this.replyingToId = e.id; this.reply_to_profile_id = e.account.id; this.replyText = '@' + e.account.username + ' '; $('textarea[name="comment"]').focus(); @@ -910,6 +929,23 @@ export default { swal('Private Post', 'This post is only visible to followers.', 'info'); break; } + }, + + toggleReplies(reply) { + if(reply.thread) { + reply.thread = false; + } else { + if(reply.replies.length > 0) { + reply.thread = true; + return; + } + let url = '/api/v2/comments/'+reply.account.username+'/status/'+reply.id; + axios.get(url) + .then(response => { + reply.replies = _.reverse(response.data.data); + reply.thread = true; + }); + } } }, From 5a80c068bd7cd42e84b1a95fdc554efa1b8e97c2 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 12:32:19 -0600 Subject: [PATCH 38/74] Update PostComponent --- resources/assets/js/components/PostComponent.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index eb207c547..5674d1541 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -119,7 +119,7 @@
- +

From d1b3458604166fdf3efa2ba3721cea28f15c167a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 12:56:45 -0600 Subject: [PATCH 39/74] Update composer deps --- composer.json | 1 + composer.lock | 172 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 172 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6a3cd9451..7b2b87284 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "fideloper/proxy": "^4.0", "greggilbert/recaptcha": "dev-master", "intervention/image": "^2.4", + "jenssegers/agent": "^2.6", "laravel/framework": "5.8.*", "laravel/horizon": "^3.0", "laravel/passport": "^7.0", diff --git a/composer.lock b/composer.lock index 841418418..f8741864b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "188c87638a863fd575f41213e72976f5", + "content-hash": "702a3ed0b8499d50323723eb4fb41965", "packages": [ { "name": "alchemy/binary-driver", @@ -1558,6 +1558,124 @@ "description": "Highlight PHP code in terminal", "time": "2018-09-29T18:48:56+00:00" }, + { + "name": "jaybizzle/crawler-detect", + "version": "v1.2.80", + "source": { + "type": "git", + "url": "https://github.com/JayBizzle/Crawler-Detect.git", + "reference": "af6a36e6d69670df3f0a3ed8e21d4b8cc67a7847" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/af6a36e6d69670df3f0a3ed8e21d4b8cc67a7847", + "reference": "af6a36e6d69670df3f0a3ed8e21d4b8cc67a7847", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.5|^6.5", + "satooshi/php-coveralls": "1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Jaybizzle\\CrawlerDetect\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Beech", + "email": "m@rkbee.ch", + "role": "Developer" + } + ], + "description": "CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent", + "homepage": "https://github.com/JayBizzle/Crawler-Detect/", + "keywords": [ + "crawler", + "crawler detect", + "crawler detector", + "crawlerdetect", + "php crawler detect" + ], + "time": "2019-04-05T19:52:02+00:00" + }, + { + "name": "jenssegers/agent", + "version": "v2.6.3", + "source": { + "type": "git", + "url": "https://github.com/jenssegers/agent.git", + "reference": "bcb895395e460478e101f41cdab139c48dc721ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jenssegers/agent/zipball/bcb895395e460478e101f41cdab139c48dc721ce", + "reference": "bcb895395e460478e101f41cdab139c48dc721ce", + "shasum": "" + }, + "require": { + "jaybizzle/crawler-detect": "^1.2", + "mobiledetect/mobiledetectlib": "^2.7.6", + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5.0|^6.0|^7.0" + }, + "suggest": { + "illuminate/support": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "laravel": { + "providers": [ + "Jenssegers\\Agent\\AgentServiceProvider" + ], + "aliases": { + "Agent": "Jenssegers\\Agent\\Facades\\Agent" + } + } + }, + "autoload": { + "psr-4": { + "Jenssegers\\Agent\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jens Segers", + "homepage": "https://jenssegers.com" + } + ], + "description": "Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect", + "homepage": "https://github.com/jenssegers/agent", + "keywords": [ + "Agent", + "browser", + "desktop", + "laravel", + "mobile", + "platform", + "user agent", + "useragent" + ], + "time": "2019-01-19T21:32:55+00:00" + }, { "name": "laravel/framework", "version": "v5.8.10", @@ -2270,6 +2388,58 @@ ], "time": "2019-03-29T18:19:35+00:00" }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "2.8.33", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/cd385290f9a0d609d2eddd165a1e44ec1bf12102", + "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.35||~5.7" + }, + "type": "library", + "autoload": { + "classmap": [ + "Mobile_Detect.php" + ], + "psr-0": { + "Detection": "namespaced/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "time": "2018-09-01T15:05:15+00:00" + }, { "name": "monolog/monolog", "version": "1.24.0", From 44fb6fa062a298fb9957061c89debafcc625b9d5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 13:21:33 -0600 Subject: [PATCH 40/74] Update UserDevice model --- app/UserDevice.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/UserDevice.php b/app/UserDevice.php index 0ef037a35..58e29d49c 100644 --- a/app/UserDevice.php +++ b/app/UserDevice.php @@ -3,6 +3,7 @@ namespace App; use Illuminate\Database\Eloquent\Model; +use Jenssegers\Agent\Agent; class UserDevice extends Model { @@ -20,4 +21,14 @@ class UserDevice extends Model { return $this->belongsTo(User::class); } + + public function getUserAgent() + { + if(!$this->user_agent) { + return 'Unknown'; + } + $agent = new Agent(); + $agent->setUserAgent($this->user_agent); + return $agent; + } } From 6b95266fddc864053397ba006bbba2c2441dbe04 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 13:22:24 -0600 Subject: [PATCH 41/74] Add user device panel to security settings --- .../settings/security/device-panel.blade.php | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 resources/views/settings/security/device-panel.blade.php diff --git a/resources/views/settings/security/device-panel.blade.php b/resources/views/settings/security/device-panel.blade.php new file mode 100644 index 000000000..27846050e --- /dev/null +++ b/resources/views/settings/security/device-panel.blade.php @@ -0,0 +1,47 @@ +

+

Devices

+
+
    + @foreach($devices as $device) +
  • +
    +
    + @if($device->getUserAgent()->isMobile()) + + @else + + @endif +
    +
    +

    + IP: + {{$device->ip}} +

    +

    + Device: + {{$device->getUserAgent()->device()}} +

    +

    + Browser: + {{$device->getUserAgent()->browser()}} +

    + {{--

    + Country: + Canada +

    --}} +

    + Last Login: + {{$device->updated_at->diffForHumans()}} +

    +
    +
    +
    + {{-- Trust + Remove Device --}} +
    +
    +
    +
  • + @endforeach +
+
\ No newline at end of file From 0bb665460af63d8a81251a6344d9b2655cd46500 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 13:22:49 -0600 Subject: [PATCH 42/74] Update security settings view --- resources/views/settings/security.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/settings/security.blade.php b/resources/views/settings/security.blade.php index 67dfaadd3..5ebc6786c 100644 --- a/resources/views/settings/security.blade.php +++ b/resources/views/settings/security.blade.php @@ -24,6 +24,8 @@
@include('settings.security.log-panel') + + @include('settings.security.device-panel') @endsection \ No newline at end of file From e3c425e22275883f024659b064703221700afec8 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 19:19:41 -0600 Subject: [PATCH 43/74] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index e49174b36..2a9610a92 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -457,10 +457,11 @@ class PublicApiController extends Controller )->where('id', $dir, $id) ->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) ->whereNotIn('profile_id', $filtered) + ->whereNotNull('uri') ->whereNull('in_reply_to_id') ->whereNull('reblog_of_id') ->whereVisibility('public') - ->orderBy('created_at', 'desc') + ->latest() ->limit($limit) ->get(); } else { @@ -484,8 +485,9 @@ class PublicApiController extends Controller ->whereNotIn('profile_id', $filtered) ->whereNull('in_reply_to_id') ->whereNull('reblog_of_id') + ->whereNotNull('uri') ->whereVisibility('public') - ->orderBy('created_at', 'desc') + ->latest() ->simplePaginate($limit); } From 7a379267035c182beea3e691a0a2c25dfc3b8e0f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 19:39:54 -0600 Subject: [PATCH 44/74] Update ComposeModal.vue component --- .../assets/js/components/ComposeModal.vue | 97 +++++++++++-------- 1 file changed, 57 insertions(+), 40 deletions(-) diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 4d200647a..0ff342d84 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -25,43 +25,53 @@
-
-

Click here to add photos.

+
+
+
+ +

Uploading...

+
+
-
- - - -
- -
-
-
-
-
- + + +
+
+ +
@@ -84,7 +94,7 @@
-
+

@@ -101,7 +111,7 @@

-
+
@@ -234,7 +247,9 @@ export default { carouselCursor: 0, visibility: 'public', mediaDrawer: false, - composeState: 'publish' + composeState: 'publish', + uploading: false, + uploadProgress: 0 } }, @@ -323,6 +338,7 @@ export default { $(document).on('change', '.file-input', function(e) { let io = document.querySelector('.file-input'); Array.prototype.forEach.call(io.files, function(io, i) { + self.uploading = true; if(self.media && self.media.length + i >= self.config.uploader.album_limit) { swal('Error', 'You can only upload ' + self.config.uploader.album_limit + ' photos per album', 'error'); return; @@ -341,6 +357,7 @@ export default { let xhrConfig = { onUploadProgress: function(e) { let progress = Math.round( (e.loaded * 100) / e.total ); + self.uploadProgress = progress; } }; @@ -349,8 +366,8 @@ export default { self.ids.push(e.data.id); self.media.push(e.data); setTimeout(function() { - self.mediaDrawer = true; - }, 1000); + self.uploading = false; + }, 500); }).catch(function(e) { swal('Oops, something went wrong!', 'An unexpected error occurred.', 'error'); }); From 3789ebf736dea8b8ab0c48ff93308efdf165571b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 21:35:58 -0600 Subject: [PATCH 45/74] Update notifications view --- resources/views/account/activity.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/account/activity.blade.php b/resources/views/account/activity.blade.php index a8c0879ad..f8fe5d2b8 100644 --- a/resources/views/account/activity.blade.php +++ b/resources/views/account/activity.blade.php @@ -6,13 +6,8 @@
-@endsection \ No newline at end of file +@endsection + +@push('scripts') + + +@endpush \ No newline at end of file From c58af88d4ade27a9797e10350cf341fc999280c3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 15 Apr 2019 23:32:15 -0600 Subject: [PATCH 47/74] Update ComposeModal.vue component --- .../assets/js/components/ComposeModal.vue | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 0ff342d84..0424895cc 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -29,13 +29,16 @@
-

Uploading...

+

Uploading ... ({{uploadProgress}}%)

+
+

Add Photo

+
-

Click here to add photos.

+

Click here to add photos

@@ -48,7 +51,7 @@ v-model="carouselCursor" > -
+
@@ -94,20 +97,9 @@
-
+
-

- -

-
-
-
-
-

- - Draft - -

+
@@ -363,15 +355,19 @@ export default { axios.post('/api/v1/media', form, xhrConfig) .then(function(e) { + self.uploadProgress = 100; self.ids.push(e.data.id); self.media.push(e.data); setTimeout(function() { self.uploading = false; - }, 500); + }, 1000); }).catch(function(e) { + self.uploading = false; + io.value = null; swal('Oops, something went wrong!', 'An unexpected error occurred.', 'error'); }); io.value = null; + self.uploadProgress = 0; }); }); }, From 798c81914e88df1aa450fac79e4a5e2f2d6dd2b1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 16 Apr 2019 00:46:47 -0600 Subject: [PATCH 48/74] Update PhotoAlbumPresenter --- .../js/components/presenter/PhotoAlbumPresenter.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue index 27de1e7cc..b6d2260ef 100644 --- a/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue +++ b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue @@ -7,14 +7,14 @@ -
- +
+
@@ -26,13 +26,13 @@
-
+
From bcc9c6916aa7d6700a2b89114c9df8af27335ee5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 16 Apr 2019 12:54:42 -0600 Subject: [PATCH 49/74] Add new migration --- ...16_184644_add_layout_to_profiles_table.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 database/migrations/2019_04_16_184644_add_layout_to_profiles_table.php diff --git a/database/migrations/2019_04_16_184644_add_layout_to_profiles_table.php b/database/migrations/2019_04_16_184644_add_layout_to_profiles_table.php new file mode 100644 index 000000000..b0631bed3 --- /dev/null +++ b/database/migrations/2019_04_16_184644_add_layout_to_profiles_table.php @@ -0,0 +1,39 @@ +getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + } + + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('profiles', function (Blueprint $table) { + $table->string('profile_layout')->nullable()->after('website'); + $table->string('post_layout')->nullable()->after('profile_layout'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('profiles', function (Blueprint $table) { + $table->dropColumn('profile_layout'); + $table->dropColumn('post_layout'); + }); + } +} From bdcdb7b2496e19769a04e8d2482df65904510781 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 16 Apr 2019 12:58:38 -0600 Subject: [PATCH 50/74] Update profile view, add layout prop --- resources/views/profile/show.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php index c995adf93..5190a1ffb 100644 --- a/resources/views/profile/show.blade.php +++ b/resources/views/profile/show.blade.php @@ -7,7 +7,7 @@
@endif - + @if($profile->website) {{$profile->website}} @endif From 842574acd174cb8932e21b1b0333e026ba17e24d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 17 Apr 2019 13:05:53 -0600 Subject: [PATCH 51/74] Update Profile.vue component, add MomentUI --- resources/assets/js/components/Profile.vue | 555 +++++++++++---------- 1 file changed, 305 insertions(+), 250 deletions(-) diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue index 6cee8c7b9..f1eaa2dfc 100644 --- a/resources/assets/js/components/Profile.vue +++ b/resources/assets/js/components/Profile.vue @@ -10,284 +10,338 @@
-
-
-
-
-
-
-
-
- -
-
-

- - {{profile.username}} - - - -

-

- Edit Profile -

-
-

- +

+
+
+
+
+
+
+
+
+ +
+
+

+ + {{profile.username}} + + +

-

- +

+ Edit Profile

+
+

+ +

+

+ +

+
+
+ +
-
- +
+
+
+
+ {{profile.username}} + + ADMIN + + + + + + + + + + + + + + + + + + +
+ +

+ {{profile.display_name}} +

+
+

{{profile.website}}

-
-
-
- {{profile.username}} - - ADMIN - - - - - - - - - - - - - - - - - - +
+
+
+ +
+
+ +
+ +
+
+ +
+
+
+ + + +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+

Error: Problem rendering preview.

+
+
+ +
+
+

+

+

+
+ + + +
+
+
+

+ + + +

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

Error: Problem rendering preview.

-
-
- -
-
-

-

-

-
- - - -
-
-
-

- - - -

-
-
- - +
+
+
+
-
-
-
- - - +
+ +
+
+
-
- -
-
-
-
@@ -422,7 +476,8 @@ export default { props: [ 'profile-id', - 'profile-settings' + 'profile-settings', + 'profile-layout' ], data() { return { From 55dd89790256c3369570247b4866ad58344917a6 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 17 Apr 2019 18:58:21 -0600 Subject: [PATCH 52/74] Update PostComponent --- .../assets/js/components/PostComponent.vue | 92 ++++++++++++++++++- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 5674d1541..13725a547 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -7,7 +7,7 @@
-
+
@@ -209,6 +209,76 @@
+ +
+
+
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+

Error: Problem rendering preview.

+
+
+
+
+
+
+
+
+
+

+

+

+
+
+ + likes + + + shares + +
+
+
+ avatar + +
+
+
+

{{timestampFormat()}}

+
+
+
+
+
+

Comments have been disabled on this post.

+
+
+
+
+
+
+