mirror of https://github.com/pixelfed/pixelfed.git
commit
231d9aa162
|
@ -24,8 +24,11 @@ use App\{
|
||||||
FollowRequest,
|
FollowRequest,
|
||||||
Hashtag,
|
Hashtag,
|
||||||
HashtagFollow,
|
HashtagFollow,
|
||||||
|
ImportData,
|
||||||
|
ImportJob,
|
||||||
Like,
|
Like,
|
||||||
Media,
|
Media,
|
||||||
|
MediaTag,
|
||||||
Mention,
|
Mention,
|
||||||
Notification,
|
Notification,
|
||||||
OauthClient,
|
OauthClient,
|
||||||
|
@ -81,10 +84,29 @@ class DeleteAccountPipeline implements ShouldQueue
|
||||||
|
|
||||||
$id = $user->profile_id;
|
$id = $user->profile_id;
|
||||||
|
|
||||||
Bookmark::whereProfileId($user->profile_id)->forceDelete();
|
ImportData::whereProfileId($id)
|
||||||
|
->cursor()
|
||||||
|
->each(function($data) {
|
||||||
|
$path = storage_path('app/'.$data->path);
|
||||||
|
if(is_file($path)) {
|
||||||
|
unlink($path);
|
||||||
|
}
|
||||||
|
$data->delete();
|
||||||
|
});
|
||||||
|
ImportJob::whereProfileId($id)
|
||||||
|
->cursor()
|
||||||
|
->each(function($data) {
|
||||||
|
$path = storage_path('app/'.$data->media_json);
|
||||||
|
if(is_file($path)) {
|
||||||
|
unlink($path);
|
||||||
|
}
|
||||||
|
$data->delete();
|
||||||
|
});
|
||||||
|
MediaTag::whereProfileId($id)->delete();
|
||||||
|
Bookmark::whereProfileId($id)->forceDelete();
|
||||||
EmailVerification::whereUserId($user->id)->forceDelete();
|
EmailVerification::whereUserId($user->id)->forceDelete();
|
||||||
StatusHashtag::whereProfileId($id)->delete();
|
StatusHashtag::whereProfileId($id)->delete();
|
||||||
DirectMessage::whereFromId($user->profile_id)->delete();
|
DirectMessage::whereFromId($id)->delete();
|
||||||
FollowRequest::whereFollowingId($id)
|
FollowRequest::whereFollowingId($id)
|
||||||
->orWhere('follower_id', $id)
|
->orWhere('follower_id', $id)
|
||||||
->forceDelete();
|
->forceDelete();
|
||||||
|
@ -143,7 +165,14 @@ class DeleteAccountPipeline implements ShouldQueue
|
||||||
});
|
});
|
||||||
|
|
||||||
DB::transaction(function() use ($user) {
|
DB::transaction(function() use ($user) {
|
||||||
Status::whereProfileId($user->profile_id)->forceDelete();
|
Status::whereProfileId($user->profile_id)
|
||||||
|
->cursor()
|
||||||
|
->each(function($status) {
|
||||||
|
AccountInterstitial::where('item_type', 'App\Status')
|
||||||
|
->where('item_id', $status->id)
|
||||||
|
->delete();
|
||||||
|
$status->forceDelete();
|
||||||
|
});
|
||||||
Report::whereUserId($user->id)->forceDelete();
|
Report::whereUserId($user->id)->forceDelete();
|
||||||
$this->deleteProfile($user);
|
$this->deleteProfile($user);
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Jobs\StatusPipeline;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use App\{
|
use App\{
|
||||||
|
AccountInterstitial,
|
||||||
MediaTag,
|
MediaTag,
|
||||||
Notification,
|
Notification,
|
||||||
Report,
|
Report,
|
||||||
|
@ -113,7 +114,11 @@ class StatusDelete implements ShouldQueue
|
||||||
->where('item_id', $tag->id)
|
->where('item_id', $tag->id)
|
||||||
->forceDelete();
|
->forceDelete();
|
||||||
$tag->delete();
|
$tag->delete();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AccountInterstitial::where('item_type', 'App\Status')
|
||||||
|
->where('item_id', $status->id)
|
||||||
|
->delete();
|
||||||
|
|
||||||
$status->forceDelete();
|
$status->forceDelete();
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,5 +29,5 @@
|
||||||
"/js/status.js": "/js/status.js?id=c64d7542738b57eff9a7",
|
"/js/status.js": "/js/status.js?id=c64d7542738b57eff9a7",
|
||||||
"/js/story-compose.js": "/js/story-compose.js?id=13f9606a3c4ce7acf17b",
|
"/js/story-compose.js": "/js/story-compose.js?id=13f9606a3c4ce7acf17b",
|
||||||
"/js/theme-monokai.js": "/js/theme-monokai.js?id=8842103833ba4861bcfa",
|
"/js/theme-monokai.js": "/js/theme-monokai.js?id=8842103833ba4861bcfa",
|
||||||
"/js/timeline.js": "/js/timeline.js?id=72c1ad1f8fd6f995682e"
|
"/js/timeline.js": "/js/timeline.js?id=f8859af911cef06e3d8e"
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<button class="btn btn-dark px-4 rounded-pill font-weight-bold shadow" @click="syncNewPosts">Load New Posts</button>
|
<button class="btn btn-dark px-4 rounded-pill font-weight-bold shadow" @click="syncNewPosts">Load New Posts</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-none d-md-block col-12 pl-3 pl-md-0 pt-3 pl-0">
|
<div class="d-none col-12 pl-3 pl-md-0 pt-3 pl-0">
|
||||||
<div class="d-none d-md-flex justify-content-between align-items-center">
|
<div class="d-none d-md-flex justify-content-between align-items-center">
|
||||||
<p class="lead text-muted mb-0"><i :class="[scope == 'home' ? 'fas fa-home':'fas fa-stream']"></i> {{scope == 'local' ? 'Public' : 'Home'}} Timeline</p>
|
<p class="lead text-muted mb-0"><i :class="[scope == 'home' ? 'fas fa-home':'fas fa-stream']"></i> {{scope == 'local' ? 'Public' : 'Home'}} Timeline</p>
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :data-status-id="status.id" v-for="(status, index) in feed" :key="`${index}-${status.id}`">
|
<div :data-status-id="status.id" v-for="(status, index) in feed" :key="`${index}-${status.id}`">
|
||||||
<div v-if="index == 0 && showTips && !loading" class="mb-4 card-tips">
|
<div v-if="index == 0 && showTips && !loading" class="my-4 card-tips">
|
||||||
<announcements-card v-on:show-tips="showTips = $event"></announcements-card>
|
<announcements-card v-on:show-tips="showTips = $event"></announcements-card>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="index == 2 && showSuggestions == true && suggestions.length" class="card mb-sm-4 status-card card-md-rounded-0 shadow-none border">
|
<div v-if="index == 2 && showSuggestions == true && suggestions.length" class="card mb-sm-4 status-card card-md-rounded-0 shadow-none border">
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mb-sm-4 status-card card-md-rounded-0 shadow-none border">
|
<div :class="index == 0 ? 'card mb-sm-4 status-card card-md-rounded-0 shadow-none border mt-md-4' : 'card mb-sm-4 status-card card-md-rounded-0 shadow-none border'">
|
||||||
<div v-if="status" class="card-header d-inline-flex align-items-center bg-white">
|
<div v-if="status" class="card-header d-inline-flex align-items-center bg-white">
|
||||||
<!-- <img v-bind:src="status.account.avatar" width="38px" height="38px" class="cursor-pointer" style="border-radius: 38px;" @click="profileUrl(status)" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=2'"> -->
|
<!-- <img v-bind:src="status.account.avatar" width="38px" height="38px" class="cursor-pointer" style="border-radius: 38px;" @click="profileUrl(status)" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=2'"> -->
|
||||||
<!-- <div v-if="hasStory" class="has-story has-story-sm cursor-pointer shadow-sm" @click="profileUrl(status)">
|
<!-- <div v-if="hasStory" class="has-story has-story-sm cursor-pointer shadow-sm" @click="profileUrl(status)">
|
||||||
|
|
|
@ -33,40 +33,45 @@
|
||||||
<div class="ml-auto">
|
<div class="ml-auto">
|
||||||
<ul class="navbar-nav align-items-center">
|
<ul class="navbar-nav align-items-center">
|
||||||
<li class="nav-item px-md-2 d-none d-md-block">
|
<li class="nav-item px-md-2 d-none d-md-block">
|
||||||
<a class="nav-link font-weight-bold text-muted" href="{{route('discover')}}" title="Discover" data-toggle="tooltip" data-placement="bottom">
|
<a class="nav-link font-weight-bold text-dark" href="/" title="Home" data-toggle="tooltip" data-placement="bottom">
|
||||||
<i class="far fa-compass fa-lg"></i>
|
<i class="fas fa-home fa-lg"></i>
|
||||||
<span class="sr-only">Discover</span>
|
<span class="sr-only">Home</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item px-md-2 d-none d-md-block">
|
||||||
|
<a class="nav-link font-weight-bold text-dark" href="/?a=co" title="Compose" data-toggle="tooltip" data-placement="bottom">
|
||||||
|
<i class="far fa-plus-square fa-lg"></i>
|
||||||
|
<span class="sr-only">Compose</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item px-md-2">
|
<li class="nav-item px-md-2">
|
||||||
<a class="nav-link font-weight-bold text-muted" href="/account/direct" title="Direct" data-toggle="tooltip" data-placement="bottom">
|
<a class="nav-link font-weight-bold text-dark" href="/account/direct" title="Direct" data-toggle="tooltip" data-placement="bottom">
|
||||||
<i class="far fa-comment-dots fa-lg"></i>
|
<i class="far fa-comment-dots fa-lg"></i>
|
||||||
<span class="sr-only">Direct</span>
|
<span class="sr-only">Direct</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item px-md-2 d-none d-md-block">
|
<li class="nav-item px-md-2 d-none d-md-block">
|
||||||
<a class="nav-link font-weight-bold text-muted" href="/account/activity" title="Notifications" data-toggle="tooltip" data-placement="bottom">
|
<a class="nav-link font-weight-bold text-dark" href="/account/activity" title="Notifications" data-toggle="tooltip" data-placement="bottom">
|
||||||
<i class="far fa-bell fa-lg"></i>
|
<i class="far fa-bell fa-lg"></i>
|
||||||
<span class="sr-only">Notifications</span>
|
<span class="sr-only">Notifications</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown ml-2">
|
<li class="nav-item dropdown ml-2">
|
||||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="User Menu" data-toggle="tooltip" data-placement="bottom">
|
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="User Menu" data-toggle="tooltip" data-placement="bottom">
|
||||||
<i class="far fa-user fa-lg text-muted"></i>
|
<i class="far fa-user fa-lg text-dark"></i>
|
||||||
<span class="sr-only">User Menu</span>
|
<span class="sr-only">User Menu</span>
|
||||||
<img class="d-none" src="/storage/avatars/default.png?v=0" class="rounded-circle border shadow" width="34" height="34" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0';">
|
<img class="d-none" src="/storage/avatars/default.png?v=0" class="rounded-circle border shadow" width="34" height="34" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0';">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||||
<div class="dropdown-item font-weight-bold cursor-pointer" onclick="App.util.compose.post()">
|
<a class="d-block d-md-none dropdown-item font-weight-bold" href="/">
|
||||||
<span class="fas fa-camera pr-2 text-primary"></span>
|
|
||||||
New Post
|
|
||||||
</div>
|
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item font-weight-bold" href="/">
|
|
||||||
<span class="fas fa-home pr-2 text-lighter"></span>
|
<span class="fas fa-home pr-2 text-lighter"></span>
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
|
<a class="dropdown-item font-weight-bold" href="{{route('discover')}}">
|
||||||
|
<span class="far fa-compass pr-2 text-lighter"></span>
|
||||||
|
{{__('navmenu.discover')}}
|
||||||
|
</a>
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
||||||
<span class="fas fa-stream pr-2 text-lighter"></span>
|
<span class="fas fa-stream pr-2 text-lighter"></span>
|
||||||
Public
|
Public
|
||||||
|
@ -75,33 +80,16 @@
|
||||||
<span class="fas fa-history text-lighter pr-2"></span>
|
<span class="fas fa-history text-lighter pr-2"></span>
|
||||||
Stories
|
Stories
|
||||||
</a>
|
</a>
|
||||||
{{-- <a class="dropdown-item font-weight-bold" href="#">
|
|
||||||
<span class="fas fa-circle-notch pr-2 text-lighter"></span>
|
|
||||||
Circles
|
|
||||||
</a> --}}
|
|
||||||
{{-- <a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
|
||||||
<span class="fas fa-project-diagram fa-sm pr-2 text-lighter"></span>
|
|
||||||
Network
|
|
||||||
</a> --}}
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item font-weight-bold" href="/i/me">
|
<a class="dropdown-item font-weight-bold" href="/i/me">
|
||||||
<span class="far fa-user pr-2 text-lighter"></span>
|
<span class="far fa-user pr-2 text-lighter"></span>
|
||||||
{{__('navmenu.myProfile')}}
|
{{__('navmenu.myProfile')}}
|
||||||
</a>
|
</a>
|
||||||
<a class="d-block d-md-none dropdown-item font-weight-bold" href="{{route('discover')}}">
|
|
||||||
<span class="far fa-compass pr-2 text-lighter"></span>
|
|
||||||
{{__('navmenu.discover')}}
|
|
||||||
</a>
|
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('notifications')}}">
|
|
||||||
<span class="far fa-bell pr-2 text-lighter"></span>
|
|
||||||
Notifications
|
|
||||||
</a>
|
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('settings')}}">
|
<a class="dropdown-item font-weight-bold" href="{{route('settings')}}">
|
||||||
<span class="fas fa-cog pr-2 text-lighter"></span>
|
<span class="fas fa-cog pr-2 text-lighter"></span>
|
||||||
{{__('navmenu.settings')}}
|
{{__('navmenu.settings')}}
|
||||||
</a>
|
</a>
|
||||||
@if(Auth::user()->is_admin == true)
|
@if(Auth::user()->is_admin == true)
|
||||||
<div class="dropdown-divider"></div>
|
|
||||||
<a class="dropdown-item font-weight-bold" href="{{ route('admin.home') }}">
|
<a class="dropdown-item font-weight-bold" href="{{ route('admin.home') }}">
|
||||||
<span class="fas fa-shield-alt fa-sm pr-2 text-lighter"></span>
|
<span class="fas fa-shield-alt fa-sm pr-2 text-lighter"></span>
|
||||||
{{__('navmenu.admin')}}
|
{{__('navmenu.admin')}}
|
||||||
|
|
Loading…
Reference in New Issue