Просмотр исходного кода

Update relationships view, fix unfollow hashtag bug. Fixes #5008

Daniel Supernault 1 год назад
Родитель
Сommit
8c6936409d
1 измененных файлов с 9 добавлено и 15 удалено
  1. 9 15
      resources/views/settings/relationships/home.blade.php

+ 9 - 15
resources/views/settings/relationships/home.blade.php

@@ -6,18 +6,14 @@
 	<h3 class="font-weight-bold">Relationships</h3>
 	<h3 class="font-weight-bold">Relationships</h3>
 </div>
 </div>
 <hr>
 <hr>
-<ul class="nav nav-pills">
-	<li class="nav-item">
-		<a class="nav-link font-weight-bold {{!request()->has('mode') || $mode == 'followers' ? 'active' : ''}}" href="?mode=followers&page=1">Followers</a>
-	</li>
-	<li class="nav-item">
-		<a class="nav-link font-weight-bold {{$mode == 'following' ? 'active' : ''}}" href="?mode=following&page=1">Following</a>
-	</li>
-	<li class="nav-item">
-		<a class="nav-link font-weight-bold {{$mode == 'hashtags' ? 'active' : ''}}" href="?mode=hashtags&page=1">Hashtags</a>
-	</li>
-</ul>
-<hr>
+<div class="form-group pb-1">
+    <p>
+        <a class="btn py-0 btn-link {{!request()->has('mode') || $mode == 'followers' ? 'font-weight-bold' : 'text-muted'}}" href="?mode=followers&page=1">Followers</a>
+        <a class="btn btn-link py-0  {{$mode == 'following' ? 'font-weight-bold' : 'text-muted'}}" href="?mode=following&page=1">Following</a>
+        <a class="btn btn-link py-0 {{$mode == 'hashtags' ? 'font-weight-bold' : 'text-muted'}}" href="?mode=hashtags&page=1">Hashtags</a>
+    </p>
+</div>
+
 @if(empty($data))
 @if(empty($data))
 <p class="text-center lead pt-5 mt-5">You are not {{$mode == 'hashtags' ? 'following any hashtags.' : ($mode == 'following' ? 'following anyone.' : 'followed by anyone.')}}</p>
 <p class="text-center lead pt-5 mt-5">You are not {{$mode == 'hashtags' ? 'following any hashtags.' : ($mode == 'following' ? 'following anyone.' : 'followed by anyone.')}}</p>
 @else
 @else
@@ -149,9 +145,7 @@
 				break;
 				break;
 
 
 				case 'unfollowhashtag':
 				case 'unfollowhashtag':
-				axios.post('/api/local/discover/tag/subscribe', {
-					name: id
-				}).then(res => {
+				axios.post('/api/v1/tags/' + id + '/unfollow').then(res => {
 					swal(
 					swal(
 						'Unfollow Successful',
 						'Unfollow Successful',
 						'You have successfully unfollowed that hashtag',
 						'You have successfully unfollowed that hashtag',