forked from mirror/pixelfed
Compare commits
27 Commits
dev
...
pixelfed.d
Author | SHA1 | Date |
---|---|---|
hnrd | 17a6c3931d | |
hnrd | e860abb64b | |
hnrd | 13995f0612 | |
hnrd | 812e130d0e | |
hnrd | 2e602bea61 | |
hnrd | 983309a3f9 | |
Daniel Supernault | 6f6ebe7d43 | |
Daniel Supernault | 0b43367a2a | |
Daniel Supernault | 8d24020dc5 | |
Daniel Supernault | 4ff229bce0 | |
Daniel Supernault | 1c92daf925 | |
Daniel Supernault | 18004040aa | |
Daniel Supernault | 92e030de86 | |
Daniel Supernault | 97d5aea697 | |
Daniel Supernault | fd766b00cb | |
Daniel Supernault | 536912d237 | |
Daniel Supernault | 925f5e8df2 | |
Daniel Supernault | ec335288df | |
Daniel Supernault | e15cb221db | |
Daniel Supernault | bf2b1a003d | |
Daniel Supernault | 45bdd410fb | |
Daniel Supernault | 40b875e21e | |
Daniel Supernault | e1255c07fb | |
Daniel Supernault | 0bc4b457f5 | |
Daniel Supernault | 0632034c40 | |
Daniel Supernault | 4ad484d691 | |
Daniel Supernault | 0e72d557fe |
|
@ -6,6 +6,7 @@
|
||||||
- Import from Instagram ([#4466](https://github.com/pixelfed/pixelfed/pull/4466)) ([cf3078c5](https://github.com/pixelfed/pixelfed/commit/cf3078c5))
|
- Import from Instagram ([#4466](https://github.com/pixelfed/pixelfed/pull/4466)) ([cf3078c5](https://github.com/pixelfed/pixelfed/commit/cf3078c5))
|
||||||
- Sign-in with Mastodon ([#4545](https://github.com/pixelfed/pixelfed/pull/4545)) ([45b9404e](https://github.com/pixelfed/pixelfed/commit/45b9404e))
|
- Sign-in with Mastodon ([#4545](https://github.com/pixelfed/pixelfed/pull/4545)) ([45b9404e](https://github.com/pixelfed/pixelfed/commit/45b9404e))
|
||||||
- Health check endpoint at /api/service/health-check ([ff58f970](https://github.com/pixelfed/pixelfed/commit/ff58f970))
|
- Health check endpoint at /api/service/health-check ([ff58f970](https://github.com/pixelfed/pixelfed/commit/ff58f970))
|
||||||
|
- Reblogs in home feed ([#4563](https://github.com/pixelfed/pixelfed/pull/4563)) ([b86d47bf](https://github.com/pixelfed/pixelfed/commit/b86d47bf))
|
||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
- Update Notifications.vue component, fix filtering logic to prevent endless spinner ([3df9b53f](https://github.com/pixelfed/pixelfed/commit/3df9b53f))
|
- Update Notifications.vue component, fix filtering logic to prevent endless spinner ([3df9b53f](https://github.com/pixelfed/pixelfed/commit/3df9b53f))
|
||||||
|
@ -42,6 +43,13 @@
|
||||||
- Update FanoutDeletePipeline, fix AP object ([0d802c31](https://github.com/pixelfed/pixelfed/commit/0d802c31))
|
- Update FanoutDeletePipeline, fix AP object ([0d802c31](https://github.com/pixelfed/pixelfed/commit/0d802c31))
|
||||||
- Update Remote Auth feature, fix custom domain bug and enforce banned domains ([acabf603](https://github.com/pixelfed/pixelfed/commit/acabf603))
|
- Update Remote Auth feature, fix custom domain bug and enforce banned domains ([acabf603](https://github.com/pixelfed/pixelfed/commit/acabf603))
|
||||||
- Update StatusService, reduce cache ttl from 7 days to 6 hours ([59b64378](https://github.com/pixelfed/pixelfed/commit/59b64378))
|
- Update StatusService, reduce cache ttl from 7 days to 6 hours ([59b64378](https://github.com/pixelfed/pixelfed/commit/59b64378))
|
||||||
|
- Update ProfileController, allow albums in atom feed. Closes #4561. Fixes #4526 ([1c105a6c](https://github.com/pixelfed/pixelfed/commit/1c105a6c))
|
||||||
|
- Update admin users view, fix website value. Closes #4557 ([c469d475](https://github.com/pixelfed/pixelfed/commit/c469d475))
|
||||||
|
- Update StatusStatelessTransformer, allow unlisted reblogs ([1c13b518](https://github.com/pixelfed/pixelfed/commit/1c13b518))
|
||||||
|
- Update ApiV1Controller, hydrate reblog state in home timeline ([13bdaa2e](https://github.com/pixelfed/pixelfed/commit/13bdaa2e))
|
||||||
|
- Update Timeline component, improve reblog support ([29de91e5](https://github.com/pixelfed/pixelfed/commit/29de91e5))
|
||||||
|
- Update timeline settings, add photo reblogs only option ([e2705b9a](https://github.com/pixelfed/pixelfed/commit/e2705b9a))
|
||||||
|
- Update PostContent, add text cw warning ([911504fa](https://github.com/pixelfed/pixelfed/commit/911504fa))
|
||||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.8 (2023-05-29)](https://github.com/pixelfed/pixelfed/compare/v0.11.7...v0.11.8)
|
## [v0.11.8 (2023-05-29)](https://github.com/pixelfed/pixelfed/compare/v0.11.7...v0.11.8)
|
||||||
|
|
|
@ -2199,6 +2199,14 @@ class ApiV1Controller extends Controller
|
||||||
->filter(function($status) {
|
->filter(function($status) {
|
||||||
return $status && isset($status['account']);
|
return $status && isset($status['account']);
|
||||||
})
|
})
|
||||||
|
->map(function($status) use($pid) {
|
||||||
|
if(!empty($status['reblog'])) {
|
||||||
|
$status['reblog']['favourited'] = (bool) LikeService::liked($pid, $status['reblog']['id']);
|
||||||
|
$status['reblog']['reblogged'] = (bool) ReblogService::get($pid, $status['reblog']['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $status;
|
||||||
|
})
|
||||||
->take($limit)
|
->take($limit)
|
||||||
->values();
|
->values();
|
||||||
} else {
|
} else {
|
||||||
|
@ -2242,6 +2250,14 @@ class ApiV1Controller extends Controller
|
||||||
->filter(function($status) {
|
->filter(function($status) {
|
||||||
return $status && isset($status['account']);
|
return $status && isset($status['account']);
|
||||||
})
|
})
|
||||||
|
->map(function($status) use($pid) {
|
||||||
|
if(!empty($status['reblog'])) {
|
||||||
|
$status['reblog']['favourited'] = (bool) LikeService::liked($pid, $status['reblog']['id']);
|
||||||
|
$status['reblog']['reblogged'] = (bool) ReblogService::get($pid, $status['reblog']['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $status;
|
||||||
|
})
|
||||||
->take($limit)
|
->take($limit)
|
||||||
->values();
|
->values();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ use App\Report;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use App\StatusArchived;
|
use App\StatusArchived;
|
||||||
use App\User;
|
use App\User;
|
||||||
|
use App\UserSetting;
|
||||||
use App\Services\AccountService;
|
use App\Services\AccountService;
|
||||||
use App\Services\StatusService;
|
use App\Services\StatusService;
|
||||||
use App\Services\ProfileStatusService;
|
use App\Services\ProfileStatusService;
|
||||||
|
@ -845,4 +846,41 @@ class ApiV1Dot1Controller extends Controller
|
||||||
|
|
||||||
return StatusService::get($status->id, false);
|
return StatusService::get($status->id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getWebSettings(Request $request)
|
||||||
|
{
|
||||||
|
abort_if(!$request->user(), 403);
|
||||||
|
$uid = $request->user()->id;
|
||||||
|
$settings = UserSetting::firstOrCreate([
|
||||||
|
'user_id' => $uid
|
||||||
|
]);
|
||||||
|
if(!$settings->other) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return $settings->other;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setWebSettings(Request $request)
|
||||||
|
{
|
||||||
|
abort_if(!$request->user(), 403);
|
||||||
|
$this->validate($request, [
|
||||||
|
'field' => 'required|in:enable_reblogs,hide_reblog_banner',
|
||||||
|
'value' => 'required'
|
||||||
|
]);
|
||||||
|
$field = $request->input('field');
|
||||||
|
$value = $request->input('value');
|
||||||
|
$settings = UserSetting::firstOrCreate([
|
||||||
|
'user_id' => $request->user()->id
|
||||||
|
]);
|
||||||
|
if(!$settings->other) {
|
||||||
|
$other = [];
|
||||||
|
} else {
|
||||||
|
$other = $settings->other;
|
||||||
|
}
|
||||||
|
$other[$field] = $value;
|
||||||
|
$settings->other = $other;
|
||||||
|
$settings->save();
|
||||||
|
|
||||||
|
return [200];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,8 +108,8 @@ class LoginController extends Controller
|
||||||
$log->action = 'auth.login';
|
$log->action = 'auth.login';
|
||||||
$log->message = 'Account Login';
|
$log->message = 'Account Login';
|
||||||
$log->link = null;
|
$log->link = null;
|
||||||
$log->ip_address = $request->ip();
|
$log->ip_address = "127.0.0.23";
|
||||||
$log->user_agent = $request->userAgent();
|
$log->user_agent = "Pixelfed.de";
|
||||||
$log->save();
|
$log->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ class RegisterController extends Controller
|
||||||
$usernameRules = [
|
$usernameRules = [
|
||||||
'required',
|
'required',
|
||||||
'min:2',
|
'min:2',
|
||||||
'max:15',
|
'max:30',
|
||||||
'unique:users',
|
'unique:users',
|
||||||
function ($attribute, $value, $fail) {
|
function ($attribute, $value, $fail) {
|
||||||
$dash = substr_count($value, '-');
|
$dash = substr_count($value, '-');
|
||||||
|
|
|
@ -279,16 +279,16 @@ class DiscoverController extends Controller
|
||||||
}
|
}
|
||||||
return [
|
return [
|
||||||
'hashtags' => [
|
'hashtags' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'memories' => [
|
'memories' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'insights' => [
|
'insights' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'friends' => [
|
'friends' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'server' => [
|
'server' => [
|
||||||
'enabled' => false,
|
'enabled' => false,
|
||||||
|
|
|
@ -139,8 +139,8 @@ trait HomeSettings
|
||||||
$log->action = 'account.edit.password';
|
$log->action = 'account.edit.password';
|
||||||
$log->message = 'Password changed';
|
$log->message = 'Password changed';
|
||||||
$log->link = null;
|
$log->link = null;
|
||||||
$log->ip_address = $request->ip();
|
$log->ip_address = "127.0.0.23";
|
||||||
$log->user_agent = $request->userAgent();
|
$log->user_agent = "Pixelfed.de";
|
||||||
$log->save();
|
$log->save();
|
||||||
|
|
||||||
Mail::to($request->user())->send(new PasswordChange($user));
|
Mail::to($request->user())->send(new PasswordChange($user));
|
||||||
|
@ -185,8 +185,8 @@ trait HomeSettings
|
||||||
$log->action = 'account.edit.email';
|
$log->action = 'account.edit.email';
|
||||||
$log->message = 'Email changed';
|
$log->message = 'Email changed';
|
||||||
$log->link = null;
|
$log->link = null;
|
||||||
$log->ip_address = $request->ip();
|
$log->ip_address = "127.0.0.23";
|
||||||
$log->user_agent = $request->userAgent();
|
$log->user_agent = "Pixelfed.de";
|
||||||
$log->save();
|
$log->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -230,29 +230,51 @@ class SettingsController extends Controller
|
||||||
|
|
||||||
public function timelineSettings(Request $request)
|
public function timelineSettings(Request $request)
|
||||||
{
|
{
|
||||||
|
$uid = $request->user()->id;
|
||||||
$pid = $request->user()->profile_id;
|
$pid = $request->user()->profile_id;
|
||||||
$top = Redis::zscore('pf:tl:top', $pid) != false;
|
$top = Redis::zscore('pf:tl:top', $pid) != false;
|
||||||
$replies = Redis::zscore('pf:tl:replies', $pid) != false;
|
$replies = Redis::zscore('pf:tl:replies', $pid) != false;
|
||||||
return view('settings.timeline', compact('top', 'replies'));
|
$userSettings = UserSetting::firstOrCreate([
|
||||||
|
'user_id' => $uid
|
||||||
|
]);
|
||||||
|
if(!$userSettings || !$userSettings->other) {
|
||||||
|
$userSettings = [
|
||||||
|
'enable_reblogs' => false,
|
||||||
|
'photo_reblogs_only' => false
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$userSettings = array_merge([
|
||||||
|
'enable_reblogs' => false,
|
||||||
|
'photo_reblogs_only' => false
|
||||||
|
],
|
||||||
|
$userSettings->other);
|
||||||
|
}
|
||||||
|
return view('settings.timeline', compact('top', 'replies', 'userSettings'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateTimelineSettings(Request $request)
|
public function updateTimelineSettings(Request $request)
|
||||||
{
|
{
|
||||||
$pid = $request->user()->profile_id;
|
$pid = $request->user()->profile_id;
|
||||||
$top = $request->has('top') && $request->input('top') === 'on';
|
$uid = $request->user()->id;
|
||||||
$replies = $request->has('replies') && $request->input('replies') === 'on';
|
$this->validate($request, [
|
||||||
|
'enable_reblogs' => 'sometimes',
|
||||||
if($top) {
|
'photo_reblogs_only' => 'sometimes'
|
||||||
Redis::zadd('pf:tl:top', $pid, $pid);
|
]);
|
||||||
} else {
|
Redis::zrem('pf:tl:top', $pid);
|
||||||
Redis::zrem('pf:tl:top', $pid);
|
Redis::zrem('pf:tl:replies', $pid);
|
||||||
}
|
$userSettings = UserSetting::firstOrCreate([
|
||||||
|
'user_id' => $uid
|
||||||
if($replies) {
|
]);
|
||||||
Redis::zadd('pf:tl:replies', $pid, $pid);
|
if($userSettings->other) {
|
||||||
} else {
|
$other = $userSettings->other;
|
||||||
Redis::zrem('pf:tl:replies', $pid);
|
$other['enable_reblogs'] = $request->has('enable_reblogs');
|
||||||
}
|
$other['photo_reblogs_only'] = $request->has('photo_reblogs_only');
|
||||||
|
} else {
|
||||||
|
$other['enable_reblogs'] = $request->has('enable_reblogs');
|
||||||
|
$other['photo_reblogs_only'] = $request->has('photo_reblogs_only');
|
||||||
|
}
|
||||||
|
$userSettings->other = $other;
|
||||||
|
$userSettings->save();
|
||||||
return redirect(route('settings'))->with('status', 'Timeline settings successfully updated!');
|
return redirect(route('settings'))->with('status', 'Timeline settings successfully updated!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,10 @@ class SharePipeline implements ShouldQueue
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$status = $this->status;
|
$status = $this->status;
|
||||||
$parent = $this->status->parent();
|
$parent = Status::find($this->status->reblog_of_id);
|
||||||
|
if(!$parent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$actor = $status->profile;
|
$actor = $status->profile;
|
||||||
$target = $parent->profile;
|
$target = $parent->profile;
|
||||||
|
|
||||||
|
@ -84,7 +87,7 @@ class SharePipeline implements ShouldQueue
|
||||||
|
|
||||||
public function remoteAnnounceDeliver()
|
public function remoteAnnounceDeliver()
|
||||||
{
|
{
|
||||||
if(config_cache('federation.activitypub.enabled') == false) {
|
if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$status = $this->status;
|
$status = $this->status;
|
||||||
|
|
|
@ -61,7 +61,7 @@ class UndoSharePipeline implements ShouldQueue
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config_cache('federation.activitypub.enabled') == false) {
|
if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) {
|
||||||
return $status->delete();
|
return $status->delete();
|
||||||
} else {
|
} else {
|
||||||
return $this->remoteAnnounceDeliver();
|
return $this->remoteAnnounceDeliver();
|
||||||
|
@ -70,7 +70,8 @@ class UndoSharePipeline implements ShouldQueue
|
||||||
|
|
||||||
public function remoteAnnounceDeliver()
|
public function remoteAnnounceDeliver()
|
||||||
{
|
{
|
||||||
if(config_cache('federation.activitypub.enabled') == false) {
|
if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) {
|
||||||
|
$status->delete();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,8 +122,8 @@ class AuthLogin
|
||||||
$device = DB::transaction(function() use($user) {
|
$device = DB::transaction(function() use($user) {
|
||||||
return UserDevice::firstOrCreate([
|
return UserDevice::firstOrCreate([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'ip' => request()->ip(),
|
'ip' => "127.0.0.23",
|
||||||
'user_agent' => str_limit(request()->userAgent(), 180),
|
'user_agent' => "Pixelfed.de",
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,8 @@ class LogFailedLogin
|
||||||
$log->action = 'auth.failed';
|
$log->action = 'auth.failed';
|
||||||
$log->message = 'Failed login attempt';
|
$log->message = 'Failed login attempt';
|
||||||
$log->link = null;
|
$log->link = null;
|
||||||
$log->ip_address = $request->ip();
|
$log->ip_address = "127.0.0.23";
|
||||||
$log->user_agent = $request->userAgent();
|
$log->user_agent = "Pixelfed.de";
|
||||||
$log->save();
|
$log->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,7 @@ class RemoteAuthService
|
||||||
}
|
}
|
||||||
|
|
||||||
return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) {
|
return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) {
|
||||||
|
return true;
|
||||||
try {
|
try {
|
||||||
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain);
|
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain);
|
||||||
if(!$res->ok()) {
|
if(!$res->ok()) {
|
||||||
|
@ -144,6 +145,7 @@ class RemoteAuthService
|
||||||
|
|
||||||
public static function lookupWebfingerUses($wf)
|
public static function lookupWebfingerUses($wf)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
try {
|
try {
|
||||||
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf);
|
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf);
|
||||||
if(!$res->ok()) {
|
if(!$res->ok()) {
|
||||||
|
@ -166,6 +168,7 @@ class RemoteAuthService
|
||||||
|
|
||||||
public static function submitToBeagle($ow, $ou, $dw, $du)
|
public static function submitToBeagle($ow, $ou, $dw, $du)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
|
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
|
||||||
$res = Http::throw()->timeout(10)->get($url, [
|
$res = Http::throw()->timeout(10)->get($url, [
|
||||||
|
|
|
@ -33,7 +33,7 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
|
||||||
'url' => $status->url(),
|
'url' => $status->url(),
|
||||||
'in_reply_to_id' => $status->in_reply_to_id ? (string) $status->in_reply_to_id : null,
|
'in_reply_to_id' => $status->in_reply_to_id ? (string) $status->in_reply_to_id : null,
|
||||||
'in_reply_to_account_id' => $status->in_reply_to_profile_id ? (string) $status->in_reply_to_profile_id : null,
|
'in_reply_to_account_id' => $status->in_reply_to_profile_id ? (string) $status->in_reply_to_profile_id : null,
|
||||||
'reblog' => $status->reblog_of_id ? StatusService::get($status->reblog_of_id) : null,
|
'reblog' => $status->reblog_of_id ? StatusService::get($status->reblog_of_id, false) : null,
|
||||||
'content' => $status->rendered ?? $status->caption,
|
'content' => $status->rendered ?? $status->caption,
|
||||||
'content_text' => $status->caption,
|
'content_text' => $status->caption,
|
||||||
'created_at' => str_replace('+00:00', 'Z', $status->created_at->format(DATE_RFC3339_EXTENDED)),
|
'created_at' => str_replace('+00:00', 'Z', $status->created_at->format(DATE_RFC3339_EXTENDED)),
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
(()=>{"use strict";var e,r,n,o={},t={};function c(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,c),n.loaded=!0,n.exports}c.m=o,e=[],c.O=(r,n,o,t)=>{if(!n){var d=1/0;for(f=0;f<e.length;f++){for(var[n,o,t]=e[f],i=!0,a=0;a<n.length;a++)(!1&t||d>=t)&&Object.keys(c.O).every((e=>c.O[e](n[a])))?n.splice(a--,1):(i=!1,t<d&&(d=t));if(i){e.splice(f--,1);var s=o();void 0!==s&&(r=s)}}return r}t=t||0;for(var f=e.length;f>0&&e[f-1][2]>t;f--)e[f]=e[f-1];e[f]=[n,o,t]},c.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return c.d(r,{a:r}),r},c.d=(e,r)=>{for(var n in r)c.o(r,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((r,n)=>(c.f[n](e,r),r)),[])),c.u=e=>"js/"+{1084:"profile~followers.bundle",2470:"home.chunk",2530:"discover~myhashtags.chunk",2586:"compose.chunk",2732:"dms~message.chunk",3351:"discover~settings.chunk",3365:"dms.chunk",3623:"discover~findfriends.chunk",4028:"error404.bundle",4958:"discover.chunk",4965:"discover~memories.chunk",5865:"post.chunk",6053:"notifications.chunk",6869:"profile.chunk",7019:"discover~hashtag.bundle",8250:"i18n.bundle",8517:"daci.chunk",8600:"changelog.bundle",8625:"profile~following.bundle",8900:"discover~serverfeed.chunk"}[e]+"."+{1084:"f088062414c3b014",2470:"2d93b527d492e6de",2530:"70e91906f0ce857a",2586:"6464688bf5b5ef97",2732:"990c68dfc266b0cf",3351:"72cc15c7b87b662d",3365:"98e12cf9137ddd87",3623:"006f0079e9f5a3eb",4028:"182d0aaa2da9ed23",4958:"56d2d8cfbbecc761",4965:"4c0973f4400f25b4",5865:"cd535334efc77c34",6053:"bf0c641eb1fd9cde",6869:"2fefc77fa8b9e0d3",7019:"54f2ac43c55bf328",8250:"4a5ff18de549ac4e",8517:"914d307d69fcfcd4",8600:"c4c82057f9628c72",8625:"57cbb89efa73e324",8900:"017fd16f00c55e60"}[e]+".js",c.miniCssF=e=>({138:"css/spa",703:"css/admin",1242:"css/appdark",6170:"css/app",8737:"css/portfolio",9994:"css/landing"}[e]+".css"),c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},n="pixelfed:",c.l=(e,o,t,d)=>{if(r[e])r[e].push(o);else{var i,a;if(void 0!==t)for(var s=document.getElementsByTagName("script"),f=0;f<s.length;f++){var l=s[f];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==n+t){i=l;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,c.nc&&i.setAttribute("nonce",c.nc),i.setAttribute("data-webpack",n+t),i.src=e),r[e]=[o];var u=(n,o)=>{i.onerror=i.onload=null,clearTimeout(b);var t=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),t&&t.forEach((e=>e(o))),n)return n(o)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),a&&document.head.appendChild(i)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.p="/",(()=>{var e={8929:0,1242:0,6170:0,8737:0,703:0,9994:0,138:0};c.f.j=(r,n)=>{var o=c.o(e,r)?e[r]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^(1242|138|6170|703|8737|8929|9994)$/.test(r))e[r]=0;else{var t=new Promise(((n,t)=>o=e[r]=[n,t]));n.push(o[2]=t);var d=c.p+c.u(r),i=new Error;c.l(d,(n=>{if(c.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var t=n&&("load"===n.type?"missing":n.type),d=n&&n.target&&n.target.src;i.message="Loading chunk "+r+" failed.\n("+t+": "+d+")",i.name="ChunkLoadError",i.type=t,i.request=d,o[1](i)}}),"chunk-"+r,r)}},c.O.j=r=>0===e[r];var r=(r,n)=>{var o,t,[d,i,a]=n,s=0;if(d.some((r=>0!==e[r]))){for(o in i)c.o(i,o)&&(c.m[o]=i[o]);if(a)var f=a(c)}for(r&&r(n);s<d.length;s++)t=d[s],c.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return c.O(f)},n=self.webpackChunkpixelfed=self.webpackChunkpixelfed||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),c.nc=void 0})();
|
(()=>{"use strict";var e,r,n,o={},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,e=[],a.O=(r,n,o,t)=>{if(!n){var d=1/0;for(f=0;f<e.length;f++){for(var[n,o,t]=e[f],c=!0,i=0;i<n.length;i++)(!1&t||d>=t)&&Object.keys(a.O).every((e=>a.O[e](n[i])))?n.splice(i--,1):(c=!1,t<d&&(d=t));if(c){e.splice(f--,1);var s=o();void 0!==s&&(r=s)}}return r}t=t||0;for(var f=e.length;f>0&&e[f-1][2]>t;f--)e[f]=e[f-1];e[f]=[n,o,t]},a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var n in r)a.o(r,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,n)=>(a.f[n](e,r),r)),[])),a.u=e=>"js/"+{1084:"profile~followers.bundle",2470:"home.chunk",2530:"discover~myhashtags.chunk",2586:"compose.chunk",2732:"dms~message.chunk",3351:"discover~settings.chunk",3365:"dms.chunk",3623:"discover~findfriends.chunk",4028:"error404.bundle",4958:"discover.chunk",4965:"discover~memories.chunk",5865:"post.chunk",6053:"notifications.chunk",6869:"profile.chunk",7019:"discover~hashtag.bundle",8250:"i18n.bundle",8517:"daci.chunk",8600:"changelog.bundle",8625:"profile~following.bundle",8900:"discover~serverfeed.chunk"}[e]+"."+{1084:"f088062414c3b014",2470:"bd623a430a5584c2",2530:"ee5af357937cad2f",2586:"6464688bf5b5ef97",2732:"990c68dfc266b0cf",3351:"909aa0316f43235e",3365:"98e12cf9137ddd87",3623:"6bd4ddbabd979778",4028:"182d0aaa2da9ed23",4958:"56d2d8cfbbecc761",4965:"400f9f019bdb9fdf",5865:"729ca668f46545cb",6053:"bf0c641eb1fd9cde",6869:"029572d9018fc65f",7019:"54f2ac43c55bf328",8250:"4a5ff18de549ac4e",8517:"bfa9e4f459fec835",8600:"c4c82057f9628c72",8625:"57cbb89efa73e324",8900:"fbe31eedcdafc87e"}[e]+".js",a.miniCssF=e=>({138:"css/spa",703:"css/admin",1242:"css/appdark",6170:"css/app",8737:"css/portfolio",9994:"css/landing"}[e]+".css"),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},n="pixelfed:",a.l=(e,o,t,d)=>{if(r[e])r[e].push(o);else{var c,i;if(void 0!==t)for(var s=document.getElementsByTagName("script"),f=0;f<s.length;f++){var l=s[f];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==n+t){c=l;break}}c||(i=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,a.nc&&c.setAttribute("nonce",a.nc),c.setAttribute("data-webpack",n+t),c.src=e),r[e]=[o];var u=(n,o)=>{c.onerror=c.onload=null,clearTimeout(b);var t=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),t&&t.forEach((e=>e(o))),n)return n(o)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=u.bind(null,c.onerror),c.onload=u.bind(null,c.onload),i&&document.head.appendChild(c)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.p="/",(()=>{var e={8929:0,1242:0,6170:0,8737:0,703:0,9994:0,138:0};a.f.j=(r,n)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^(1242|138|6170|703|8737|8929|9994)$/.test(r))e[r]=0;else{var t=new Promise(((n,t)=>o=e[r]=[n,t]));n.push(o[2]=t);var d=a.p+a.u(r),c=new Error;a.l(d,(n=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var t=n&&("load"===n.type?"missing":n.type),d=n&&n.target&&n.target.src;c.message="Loading chunk "+r+" failed.\n("+t+": "+d+")",c.name="ChunkLoadError",c.type=t,c.request=d,o[1](c)}}),"chunk-"+r,r)}},a.O.j=r=>0===e[r];var r=(r,n)=>{var o,t,[d,c,i]=n,s=0;if(d.some((r=>0!==e[r]))){for(o in c)a.o(c,o)&&(a.m[o]=c[o]);if(i)var f=i(a)}for(r&&r(n);s<d.length;s++)t=d[s],a.o(e,t)&&e[t]&&e[t][0](),e[t]=0;return a.O(f)},n=self.webpackChunkpixelfed=self.webpackChunkpixelfed||[];n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))})(),a.nc=void 0})();
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -22,19 +22,19 @@
|
||||||
"/js/portfolio.js": "/js/portfolio.js?id=646ebcbb4cab1dc0942dde3f8126940d",
|
"/js/portfolio.js": "/js/portfolio.js?id=646ebcbb4cab1dc0942dde3f8126940d",
|
||||||
"/js/account-import.js": "/js/account-import.js?id=00ea9b73c8e17dff27e4a7767d9553d7",
|
"/js/account-import.js": "/js/account-import.js?id=00ea9b73c8e17dff27e4a7767d9553d7",
|
||||||
"/js/admin_invite.js": "/js/admin_invite.js?id=307a53250701e3b12164af9495e88447",
|
"/js/admin_invite.js": "/js/admin_invite.js?id=307a53250701e3b12164af9495e88447",
|
||||||
"/js/landing.js": "/js/landing.js?id=7e3ab65813c4bf28182f5bdf0825774c",
|
"/js/landing.js": "/js/landing.js?id=e0cd637b653c19ed9db93950602cfbab",
|
||||||
"/js/remote_auth.js": "/js/remote_auth.js?id=0840f85f648319858b72c299b8c51f9e",
|
"/js/remote_auth.js": "/js/remote_auth.js?id=0840f85f648319858b72c299b8c51f9e",
|
||||||
"/js/manifest.js": "/js/manifest.js?id=1a9e092e7f4051b3ce0af3c638c8d2c5",
|
"/js/manifest.js": "/js/manifest.js?id=9e74c2381399d1777d5e43f647b53d5b",
|
||||||
"/js/home.chunk.2d93b527d492e6de.js": "/js/home.chunk.2d93b527d492e6de.js?id=809ef226cf2383e3a8973f65d4269d1c",
|
"/js/home.chunk.bd623a430a5584c2.js": "/js/home.chunk.bd623a430a5584c2.js?id=92e89d40bac4f4cda7f7ab62470bc46d",
|
||||||
"/js/compose.chunk.6464688bf5b5ef97.js": "/js/compose.chunk.6464688bf5b5ef97.js?id=45753d769a16276c2d3ad8d7d6bf3e88",
|
"/js/compose.chunk.6464688bf5b5ef97.js": "/js/compose.chunk.6464688bf5b5ef97.js?id=45753d769a16276c2d3ad8d7d6bf3e88",
|
||||||
"/js/post.chunk.cd535334efc77c34.js": "/js/post.chunk.cd535334efc77c34.js?id=73e7e49b1dbdb75d2a128d21e6e3e9f4",
|
"/js/post.chunk.729ca668f46545cb.js": "/js/post.chunk.729ca668f46545cb.js?id=fe886fd2acd959b0afb6f64f752dfb3b",
|
||||||
"/js/profile.chunk.2fefc77fa8b9e0d3.js": "/js/profile.chunk.2fefc77fa8b9e0d3.js?id=ff489b9c2880c30e5d3f993220b43305",
|
"/js/profile.chunk.029572d9018fc65f.js": "/js/profile.chunk.029572d9018fc65f.js?id=1f010c37345d15e1a55f4f0f6700ff9c",
|
||||||
"/js/discover~memories.chunk.4c0973f4400f25b4.js": "/js/discover~memories.chunk.4c0973f4400f25b4.js?id=6eb8a14fe9aa1d4fe3f0264022793b12",
|
"/js/discover~memories.chunk.400f9f019bdb9fdf.js": "/js/discover~memories.chunk.400f9f019bdb9fdf.js?id=711043fa1b045b7b4a5163dfc2b9a9d2",
|
||||||
"/js/discover~myhashtags.chunk.70e91906f0ce857a.js": "/js/discover~myhashtags.chunk.70e91906f0ce857a.js?id=5639e162321efa8b13f23b125c632bab",
|
"/js/discover~myhashtags.chunk.ee5af357937cad2f.js": "/js/discover~myhashtags.chunk.ee5af357937cad2f.js?id=5fca6e01d5cbed3dce27cd7f5dc81a12",
|
||||||
"/js/daci.chunk.914d307d69fcfcd4.js": "/js/daci.chunk.914d307d69fcfcd4.js?id=c843c795b8551593eb19dffe1e08e694",
|
"/js/daci.chunk.bfa9e4f459fec835.js": "/js/daci.chunk.bfa9e4f459fec835.js?id=a7a5281b3ddde5b5a6308dc6963acf42",
|
||||||
"/js/discover~findfriends.chunk.006f0079e9f5a3eb.js": "/js/discover~findfriends.chunk.006f0079e9f5a3eb.js?id=22613dff39488d0ad0c443bb6f437f5c",
|
"/js/discover~findfriends.chunk.6bd4ddbabd979778.js": "/js/discover~findfriends.chunk.6bd4ddbabd979778.js?id=57a85190564956d681151b00dd68a08d",
|
||||||
"/js/discover~serverfeed.chunk.017fd16f00c55e60.js": "/js/discover~serverfeed.chunk.017fd16f00c55e60.js?id=79ced2608439f8959b2fd6a84aa071dd",
|
"/js/discover~serverfeed.chunk.fbe31eedcdafc87e.js": "/js/discover~serverfeed.chunk.fbe31eedcdafc87e.js?id=f1b19651bb66cb2be1a99e372f734cdf",
|
||||||
"/js/discover~settings.chunk.72cc15c7b87b662d.js": "/js/discover~settings.chunk.72cc15c7b87b662d.js?id=71342f3e1b333d80962e9e4b81fbe773",
|
"/js/discover~settings.chunk.909aa0316f43235e.js": "/js/discover~settings.chunk.909aa0316f43235e.js?id=83e6390aca1a7a07a05694aecccb7942",
|
||||||
"/js/discover.chunk.56d2d8cfbbecc761.js": "/js/discover.chunk.56d2d8cfbbecc761.js?id=25a401188e2fd2a43dec8011d9d62044",
|
"/js/discover.chunk.56d2d8cfbbecc761.js": "/js/discover.chunk.56d2d8cfbbecc761.js?id=25a401188e2fd2a43dec8011d9d62044",
|
||||||
"/js/notifications.chunk.bf0c641eb1fd9cde.js": "/js/notifications.chunk.bf0c641eb1fd9cde.js?id=5a6628e276da9c85244770910f817c0d",
|
"/js/notifications.chunk.bf0c641eb1fd9cde.js": "/js/notifications.chunk.bf0c641eb1fd9cde.js?id=5a6628e276da9c85244770910f817c0d",
|
||||||
"/js/dms.chunk.98e12cf9137ddd87.js": "/js/dms.chunk.98e12cf9137ddd87.js?id=527795bd736f56ff7d0addb623f0d60b",
|
"/js/dms.chunk.98e12cf9137ddd87.js": "/js/dms.chunk.98e12cf9137ddd87.js?id=527795bd736f56ff7d0addb623f0d60b",
|
||||||
|
@ -50,6 +50,6 @@
|
||||||
"/css/portfolio.css": "/css/portfolio.css?id=d98e354f173c6a8b729626384dceaa90",
|
"/css/portfolio.css": "/css/portfolio.css?id=d98e354f173c6a8b729626384dceaa90",
|
||||||
"/css/admin.css": "/css/admin.css?id=0a66549bf79b75a0ca8cb83d11a4e2f4",
|
"/css/admin.css": "/css/admin.css?id=0a66549bf79b75a0ca8cb83d11a4e2f4",
|
||||||
"/css/landing.css": "/css/landing.css?id=589f3fa192867727925921b0f68ce022",
|
"/css/landing.css": "/css/landing.css?id=589f3fa192867727925921b0f68ce022",
|
||||||
"/css/spa.css": "/css/spa.css?id=f6bef1e343335ee2b5cf4e9fc074856f",
|
"/css/spa.css": "/css/spa.css?id=1bdfa6eb676f51cb5931729abfa6dfd8",
|
||||||
"/js/vendor.js": "/js/vendor.js?id=a0cc6867663084472494dceda20c3392"
|
"/js/vendor.js": "/js/vendor.js?id=a0cc6867663084472494dceda20c3392"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="spacer">·</div>
|
<div class="spacer">·</div>
|
||||||
<a href="/site/privacy">Privacy</a>
|
<a href="/site/privacy">Privacy</a>
|
||||||
<div class="spacer">·</div>
|
<div class="spacer">·</div>
|
||||||
<a href="https://pixelfed.org/mobile-apps" target="_blank">Mobile Apps</a>
|
<a href="/site/legal-notice">Impressum / Legal Notice</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer-component-attribution">
|
<div class="footer-component-attribution">
|
||||||
|
|
|
@ -3,18 +3,20 @@
|
||||||
<div class="card shadow-sm" style="border-radius: 15px;">
|
<div class="card shadow-sm" style="border-radius: 15px;">
|
||||||
<post-header
|
<post-header
|
||||||
:profile="profile"
|
:profile="profile"
|
||||||
:status="status"
|
:status="shadowStatus"
|
||||||
|
:is-reblog="isReblog"
|
||||||
|
:reblog-account="reblogAccount"
|
||||||
@menu="openMenu"
|
@menu="openMenu"
|
||||||
@follow="follow"
|
@follow="follow"
|
||||||
@unfollow="unfollow" />
|
@unfollow="unfollow" />
|
||||||
|
|
||||||
<post-content
|
<post-content
|
||||||
:profile="profile"
|
:profile="profile"
|
||||||
:status="status" />
|
:status="shadowStatus" />
|
||||||
|
|
||||||
<post-reactions
|
<post-reactions
|
||||||
v-if="reactionBar"
|
v-if="reactionBar"
|
||||||
:status="status"
|
:status="shadowStatus"
|
||||||
:profile="profile"
|
:profile="profile"
|
||||||
:admin="admin"
|
:admin="admin"
|
||||||
v-on:like="like"
|
v-on:like="like"
|
||||||
|
@ -29,7 +31,7 @@
|
||||||
|
|
||||||
<div v-if="showCommentDrawer" class="card-footer rounded-bottom border-0" style="background: rgba(0,0,0,0.02);z-index: 3;">
|
<div v-if="showCommentDrawer" class="card-footer rounded-bottom border-0" style="background: rgba(0,0,0,0.02);z-index: 3;">
|
||||||
<comment-drawer
|
<comment-drawer
|
||||||
:status="status"
|
:status="shadowStatus"
|
||||||
:profile="profile"
|
:profile="profile"
|
||||||
v-on:handle-report="handleReport"
|
v-on:handle-report="handleReport"
|
||||||
v-on:counter-change="counterChange"
|
v-on:counter-change="counterChange"
|
||||||
|
@ -58,8 +60,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
reactionBar: {
|
reactionBar: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
|
||||||
useDropdownMenu: {
|
useDropdownMenu: {
|
||||||
|
@ -90,14 +92,14 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.license = this.status.media_attachments && this.status.media_attachments.length ?
|
this.license = this.shadowStatus.media_attachments && this.shadowStatus.media_attachments.length ?
|
||||||
this.status
|
this.shadowStatus
|
||||||
.media_attachments
|
.media_attachments
|
||||||
.filter(m => m.hasOwnProperty('license') && m.license && m.license.hasOwnProperty('id'))
|
.filter(m => m.hasOwnProperty('license') && m.license && m.license.hasOwnProperty('id'))
|
||||||
.map(m => m.license)[0] : false;
|
.map(m => m.license)[0] : false;
|
||||||
this.admin = window._sharedData.user.is_admin;
|
this.admin = window._sharedData.user.is_admin;
|
||||||
this.owner = this.status.account.id == window._sharedData.user.id;
|
this.owner = this.shadowStatus.account.id == window._sharedData.user.id;
|
||||||
if(this.status.reply_count && this.autoloadComments && this.status.comments_disabled === false) {
|
if(this.shadowStatus.reply_count && this.autoloadComments && this.shadowStatus.comments_disabled === false) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.showCommentDrawer = true;
|
this.showCommentDrawer = true;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -127,6 +129,24 @@
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.newReactions;
|
return this.$store.state.newReactions;
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
isReblog: {
|
||||||
|
get() {
|
||||||
|
return this.status.reblog != null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
reblogAccount: {
|
||||||
|
get() {
|
||||||
|
return this.status.reblog ? this.status.account : null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
shadowStatus: {
|
||||||
|
get() {
|
||||||
|
return this.status.reblog ? this.status.reblog : this.status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -137,7 +157,7 @@
|
||||||
handler: function(o, n) {
|
handler: function(o, n) {
|
||||||
this.isBookmarking = false;
|
this.isBookmarking = false;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -138,7 +138,18 @@
|
||||||
<mixed-album-presenter :status="status" v-on:lightbox="toggleLightbox" v-on:togglecw="status.sensitive = false" style="border-radius:15px !important;object-fit: contain;background-color: #000;overflow: hidden;align-items:center" :class="{ fixedHeight: fixedHeight }"></mixed-album-presenter>
|
<mixed-album-presenter :status="status" v-on:lightbox="toggleLightbox" v-on:togglecw="status.sensitive = false" style="border-radius:15px !important;object-fit: contain;background-color: #000;overflow: hidden;align-items:center" :class="{ fixedHeight: fixedHeight }"></mixed-album-presenter>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="status.pf_type === 'text'"></div>
|
<div v-else-if="status.pf_type === 'text'">
|
||||||
|
<div v-if="status.sensitive" class="border m-3 p-5 rounded-lg">
|
||||||
|
<p class="text-center">
|
||||||
|
<i class="far fa-eye-slash fa-2x"></i>
|
||||||
|
</p>
|
||||||
|
<p class="text-center lead font-weight-bold mb-0">Sensitive Content</p>
|
||||||
|
<p class="text-center">{{ status.spoiler_text && status.spoiler_text.length ? status.spoiler_text : 'This post may contain sensitive content' }}</p>
|
||||||
|
<p class="text-center mb-0">
|
||||||
|
<button class="btn btn-primary btn-sm font-weight-bold" @click="status.sensitive = false">See post</button>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-else class="bg-light rounded-lg d-flex align-items-center justify-content-center" style="height: 400px;">
|
<div v-else class="bg-light rounded-lg d-flex align-items-center justify-content-center" style="height: 400px;">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,348 +1,382 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="card-header border-0" style="border-top-left-radius: 15px;border-top-right-radius: 15px;">
|
<div>
|
||||||
<div class="media align-items-center">
|
<div v-if="isReblog" class="card-header bg-light border-0" style="border-top-left-radius: 15px;border-top-right-radius: 15px;">
|
||||||
<a :href="status.account.url" @click.prevent="goToProfile()" style="margin-right: 10px;">
|
<div class="media align-items-center" style="height:10px;">
|
||||||
<img :src="getStatusAvatar()" style="border-radius:15px;" width="44" height="44" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0';">
|
<a :href="reblogAccount.url" class="mx-2" @click.prevent="goToProfileById(reblogAccount.id)">
|
||||||
</a>
|
<img :src="reblogAccount.avatar" style="border-radius:10px;" width="24" height="24" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0';">
|
||||||
|
</a>
|
||||||
|
<div style="font-size:12px;font-weight:bold">
|
||||||
|
<i class="far fa-retweet text-warning mr-1"></i> Reblogged by <a :href="reblogAccount.url" class="text-dark" @click.prevent="goToProfileById(reblogAccount.id)">@{{ reblogAccount.acct }}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-header border-0" style="border-top-left-radius: 15px;border-top-right-radius: 15px;">
|
||||||
|
<div class="media align-items-center">
|
||||||
|
<a :href="status.account.url" @click.prevent="goToProfile()" style="margin-right: 10px;">
|
||||||
|
<img :src="getStatusAvatar()" style="border-radius:15px;" width="44" height="44" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0';">
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<p class="font-weight-bold username">
|
<p class="font-weight-bold username">
|
||||||
<a :href="status.account.url" class="text-dark" :id="'apop_'+status.id" @click.prevent="goToProfile">
|
<a :href="status.account.url" class="text-dark" :id="'apop_'+status.id" @click.prevent="goToProfile">
|
||||||
{{ status.account.acct }}
|
{{ status.account.acct }}
|
||||||
</a>
|
</a>
|
||||||
<b-popover :target="'apop_'+status.id" triggers="hover" placement="bottom" custom-class="shadow border-0 rounded-px">
|
<b-popover :target="'apop_'+status.id" triggers="hover" placement="bottom" custom-class="shadow border-0 rounded-px">
|
||||||
<profile-hover-card
|
<profile-hover-card
|
||||||
:profile="status.account"
|
:profile="status.account"
|
||||||
v-on:follow="follow"
|
v-on:follow="follow"
|
||||||
v-on:unfollow="unfollow" />
|
v-on:unfollow="unfollow" />
|
||||||
</b-popover>
|
</b-popover>
|
||||||
</p>
|
</p>
|
||||||
<p class="text-lighter mb-0" style="font-size: 13px;">
|
<p class="text-lighter mb-0" style="font-size: 13px;">
|
||||||
<span v-if="status.account.is_admin" class="d-none d-md-inline-block">
|
<span v-if="status.account.is_admin" class="d-none d-md-inline-block">
|
||||||
<span class="badge badge-light text-danger user-select-none" title="Admin account">ADMIN</span>
|
<span class="badge badge-light text-danger user-select-none" title="Admin account">ADMIN</span>
|
||||||
<span class="mx-1 text-lighter">·</span>
|
<span class="mx-1 text-lighter">·</span>
|
||||||
</span>
|
</span>
|
||||||
<a class="timestamp text-lighter" :href="status.url" @click.prevent="goToPost()" :title="status.created_at">
|
<a class="timestamp text-lighter" :href="status.url" @click.prevent="goToPost()" :title="status.created_at">
|
||||||
{{ timeago(status.created_at) }}
|
{{ timeago(status.created_at) }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<span v-if="config.ab.pue && status.hasOwnProperty('edited_at') && status.edited_at">
|
<span v-if="config.ab.pue && status.hasOwnProperty('edited_at') && status.edited_at">
|
||||||
<span class="mx-1 text-lighter">·</span>
|
<span class="mx-1 text-lighter">·</span>
|
||||||
<a class="text-lighter" href="#" @click.prevent="openEditModal">Edited</a>
|
<a class="text-lighter" href="#" @click.prevent="openEditModal">Edited</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="mx-1 text-lighter">·</span>
|
<span class="mx-1 text-lighter">·</span>
|
||||||
<span class="visibility text-lighter" :title="scopeTitle(status.visibility)"><i :class="scopeIcon(status.visibility)"></i></span>
|
<span class="visibility text-lighter" :title="scopeTitle(status.visibility)"><i :class="scopeIcon(status.visibility)"></i></span>
|
||||||
|
|
||||||
<span v-if="status.place && status.place.hasOwnProperty('name')" class="d-none d-md-inline-block">
|
<span v-if="status.place && status.place.hasOwnProperty('name')" class="d-none d-md-inline-block">
|
||||||
<span class="mx-1 text-lighter">·</span>
|
<span class="mx-1 text-lighter">·</span>
|
||||||
<span class="location text-lighter"><i class="far fa-map-marker-alt"></i> {{ status.place.name }}, {{ status.place.country }}</span>
|
<span class="location text-lighter"><i class="far fa-map-marker-alt"></i> {{ status.place.name }}, {{ status.place.country }}</span>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button v-if="!useDropdownMenu" class="btn btn-link text-lighter" @click="openMenu">
|
<button v-if="!useDropdownMenu" class="btn btn-link text-lighter" @click="openMenu">
|
||||||
<i class="far fa-ellipsis-v fa-lg"></i>
|
<i class="far fa-ellipsis-v fa-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<b-dropdown
|
<b-dropdown
|
||||||
v-else
|
v-else
|
||||||
no-caret
|
no-caret
|
||||||
right
|
right
|
||||||
variant="link"
|
variant="link"
|
||||||
toggle-class="text-lighter"
|
toggle-class="text-lighter"
|
||||||
html="<i class='far fa-ellipsis-v fa-lg px-3'></i>"
|
html="<i class='far fa-ellipsis-v fa-lg px-3'></i>"
|
||||||
>
|
>
|
||||||
<b-dropdown-item>
|
<b-dropdown-item>
|
||||||
<p class="mb-0 font-weight-bold">{{ $t('menu.viewPost') }}</p>
|
<p class="mb-0 font-weight-bold">{{ $t('menu.viewPost') }}</p>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item>
|
<b-dropdown-item>
|
||||||
<p class="mb-0 font-weight-bold">{{ $t('common.copyLink') }}</p>
|
<p class="mb-0 font-weight-bold">{{ $t('common.copyLink') }}</p>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item v-if="status.local">
|
<b-dropdown-item v-if="status.local">
|
||||||
<p class="mb-0 font-weight-bold">{{ $t('menu.embed') }}</p>
|
<p class="mb-0 font-weight-bold">{{ $t('menu.embed') }}</p>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-divider v-if="!owner"></b-dropdown-divider>
|
<b-dropdown-divider v-if="!owner"></b-dropdown-divider>
|
||||||
<b-dropdown-item v-if="!owner">
|
<b-dropdown-item v-if="!owner">
|
||||||
<p class="mb-0 font-weight-bold">{{ $t('menu.report') }}</p>
|
<p class="mb-0 font-weight-bold">{{ $t('menu.report') }}</p>
|
||||||
<p class="small text-muted mb-0">Report content that violate our rules</p>
|
<p class="small text-muted mb-0">Report content that violate our rules</p>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item v-if="!owner && status.hasOwnProperty('relationship')">
|
<b-dropdown-item v-if="!owner && status.hasOwnProperty('relationship')">
|
||||||
<p class="mb-0 font-weight-bold">{{ status.relationship.muting ? 'Unmute' : 'Mute' }}</p>
|
<p class="mb-0 font-weight-bold">{{ status.relationship.muting ? 'Unmute' : 'Mute' }}</p>
|
||||||
<p class="small text-muted mb-0">Hide posts from this account in your feeds</p>
|
<p class="small text-muted mb-0">Hide posts from this account in your feeds</p>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-item v-if="!owner && status.hasOwnProperty('relationship')">
|
<b-dropdown-item v-if="!owner && status.hasOwnProperty('relationship')">
|
||||||
<p class="mb-0 font-weight-bold text-danger">{{ status.relationship.blocking ? 'Unblock' : 'Block' }}</p>
|
<p class="mb-0 font-weight-bold text-danger">{{ status.relationship.blocking ? 'Unblock' : 'Block' }}</p>
|
||||||
<p class="small text-muted mb-0">Restrict all content from this account</p>
|
<p class="small text-muted mb-0">Restrict all content from this account</p>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
<b-dropdown-divider v-if="owner || admin"></b-dropdown-divider>
|
<b-dropdown-divider v-if="owner || admin"></b-dropdown-divider>
|
||||||
<b-dropdown-item v-if="owner || admin">
|
<b-dropdown-item v-if="owner || admin">
|
||||||
<p class="mb-0 font-weight-bold text-danger">
|
<p class="mb-0 font-weight-bold text-danger">
|
||||||
{{ $t('common.delete') }}
|
{{ $t('common.delete') }}
|
||||||
</p>
|
</p>
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<edit-history-modal ref="editModal" :status="status" />
|
<edit-history-modal ref="editModal" :status="status" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
import ProfileHoverCard from './../profile/ProfileHoverCard.vue';
|
import ProfileHoverCard from './../profile/ProfileHoverCard.vue';
|
||||||
import EditHistoryModal from './EditHistoryModal.vue';
|
import EditHistoryModal from './EditHistoryModal.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
status: {
|
status: {
|
||||||
type: Object
|
type: Object
|
||||||
},
|
},
|
||||||
|
|
||||||
profile: {
|
profile: {
|
||||||
type: Object
|
type: Object
|
||||||
},
|
},
|
||||||
|
|
||||||
useDropdownMenu: {
|
useDropdownMenu: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
},
|
||||||
},
|
|
||||||
|
|
||||||
components: {
|
isReblog: {
|
||||||
"profile-hover-card": ProfileHoverCard,
|
type: Boolean,
|
||||||
"edit-history-modal": EditHistoryModal
|
default: false
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
reblogAccount: {
|
||||||
return {
|
type: Object
|
||||||
config: window.App.config,
|
}
|
||||||
menuLoading: true,
|
},
|
||||||
owner: false,
|
|
||||||
admin: false,
|
|
||||||
license: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
components: {
|
||||||
timeago(ts) {
|
"profile-hover-card": ProfileHoverCard,
|
||||||
let short = App.util.format.timeAgo(ts);
|
"edit-history-modal": EditHistoryModal
|
||||||
if(
|
},
|
||||||
short.endsWith('s') ||
|
|
||||||
short.endsWith('m') ||
|
|
||||||
short.endsWith('h')
|
|
||||||
) {
|
|
||||||
return short;
|
|
||||||
}
|
|
||||||
const intl = new Intl.DateTimeFormat(undefined, {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'short',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: 'numeric',
|
|
||||||
minute: 'numeric'
|
|
||||||
});
|
|
||||||
return intl.format(new Date(ts));
|
|
||||||
},
|
|
||||||
|
|
||||||
openMenu() {
|
data() {
|
||||||
this.$emit('menu');
|
return {
|
||||||
},
|
config: window.App.config,
|
||||||
|
menuLoading: true,
|
||||||
|
owner: false,
|
||||||
|
admin: false,
|
||||||
|
license: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
scopeIcon(scope) {
|
methods: {
|
||||||
switch(scope) {
|
timeago(ts) {
|
||||||
case 'public':
|
let short = App.util.format.timeAgo(ts);
|
||||||
return 'far fa-globe';
|
if(
|
||||||
break;
|
short.endsWith('s') ||
|
||||||
|
short.endsWith('m') ||
|
||||||
|
short.endsWith('h')
|
||||||
|
) {
|
||||||
|
return short;
|
||||||
|
}
|
||||||
|
const intl = new Intl.DateTimeFormat(undefined, {
|
||||||
|
year: 'numeric',
|
||||||
|
month: 'short',
|
||||||
|
day: 'numeric',
|
||||||
|
hour: 'numeric',
|
||||||
|
minute: 'numeric'
|
||||||
|
});
|
||||||
|
return intl.format(new Date(ts));
|
||||||
|
},
|
||||||
|
|
||||||
case 'unlisted':
|
openMenu() {
|
||||||
return 'far fa-lock-open';
|
this.$emit('menu');
|
||||||
break;
|
},
|
||||||
|
|
||||||
case 'private':
|
scopeIcon(scope) {
|
||||||
return 'far fa-lock';
|
switch(scope) {
|
||||||
break;
|
case 'public':
|
||||||
|
return 'far fa-globe';
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
case 'unlisted':
|
||||||
return 'far fa-globe';
|
return 'far fa-lock-open';
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
scopeTitle(scope) {
|
case 'private':
|
||||||
switch(scope) {
|
return 'far fa-lock';
|
||||||
case 'public':
|
break;
|
||||||
return 'Visible to everyone';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'unlisted':
|
default:
|
||||||
return 'Hidden from public feeds';
|
return 'far fa-globe';
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
case 'private':
|
scopeTitle(scope) {
|
||||||
return 'Only visible to followers';
|
switch(scope) {
|
||||||
break;
|
case 'public':
|
||||||
|
return 'Visible to everyone';
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
case 'unlisted':
|
||||||
return '';
|
return 'Hidden from public feeds';
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
goToPost() {
|
case 'private':
|
||||||
if(location.pathname.split('/').pop() == this.status.id) {
|
return 'Only visible to followers';
|
||||||
location.href = this.status.local ? this.status.url + '?fs=1' : this.status.url;
|
break;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$router.push({
|
default:
|
||||||
name: 'post',
|
return '';
|
||||||
path: `/i/web/post/${this.status.id}`,
|
break;
|
||||||
params: {
|
}
|
||||||
id: this.status.id,
|
},
|
||||||
cachedStatus: this.status,
|
|
||||||
cachedProfile: this.profile
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
goToProfile() {
|
goToPost() {
|
||||||
this.$nextTick(() => {
|
if(location.pathname.split('/').pop() == this.status.id) {
|
||||||
this.$router.push({
|
location.href = this.status.local ? this.status.url + '?fs=1' : this.status.url;
|
||||||
name: 'profile',
|
return;
|
||||||
path: `/i/web/profile/${this.status.account.id}`,
|
}
|
||||||
params: {
|
|
||||||
id: this.status.account.id,
|
|
||||||
cachedProfile: this.status.account,
|
|
||||||
cachedUser: this.profile
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleContentWarning() {
|
this.$router.push({
|
||||||
this.key++;
|
name: 'post',
|
||||||
this.sensitive = true;
|
path: `/i/web/post/${this.status.id}`,
|
||||||
this.status.sensitive = !this.status.sensitive;
|
params: {
|
||||||
},
|
id: this.status.id,
|
||||||
|
cachedStatus: this.status,
|
||||||
|
cachedProfile: this.profile
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
like() {
|
goToProfileById(id) {
|
||||||
event.currentTarget.blur();
|
this.$nextTick(() => {
|
||||||
if(this.status.favourited) {
|
this.$router.push({
|
||||||
this.$emit('unlike');
|
name: 'profile',
|
||||||
} else {
|
path: `/i/web/profile/${id}`,
|
||||||
this.$emit('like');
|
params: {
|
||||||
}
|
id: id,
|
||||||
},
|
cachedUser: this.profile
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
toggleMenu(bvEvent) {
|
goToProfile() {
|
||||||
setTimeout(() => {
|
this.$nextTick(() => {
|
||||||
this.menuLoading = false;
|
this.$router.push({
|
||||||
}, 500);
|
name: 'profile',
|
||||||
},
|
path: `/i/web/profile/${this.status.account.id}`,
|
||||||
|
params: {
|
||||||
|
id: this.status.account.id,
|
||||||
|
cachedProfile: this.status.account,
|
||||||
|
cachedUser: this.profile
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
closeMenu(bvEvent) {
|
toggleContentWarning() {
|
||||||
setTimeout(() => {
|
this.key++;
|
||||||
bvEvent.target.parentNode.firstElementChild.blur();
|
this.sensitive = true;
|
||||||
}, 100);
|
this.status.sensitive = !this.status.sensitive;
|
||||||
},
|
},
|
||||||
|
|
||||||
showLikes() {
|
like() {
|
||||||
event.currentTarget.blur();
|
event.currentTarget.blur();
|
||||||
this.$emit('likes-modal');
|
if(this.status.favourited) {
|
||||||
},
|
this.$emit('unlike');
|
||||||
|
} else {
|
||||||
|
this.$emit('like');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
showShares() {
|
toggleMenu(bvEvent) {
|
||||||
event.currentTarget.blur();
|
setTimeout(() => {
|
||||||
this.$emit('shares-modal');
|
this.menuLoading = false;
|
||||||
},
|
}, 500);
|
||||||
|
},
|
||||||
|
|
||||||
showComments() {
|
closeMenu(bvEvent) {
|
||||||
event.currentTarget.blur();
|
setTimeout(() => {
|
||||||
this.showCommentDrawer = !this.showCommentDrawer;
|
bvEvent.target.parentNode.firstElementChild.blur();
|
||||||
},
|
}, 100);
|
||||||
|
},
|
||||||
|
|
||||||
copyLink() {
|
showLikes() {
|
||||||
event.currentTarget.blur();
|
event.currentTarget.blur();
|
||||||
App.util.clipboard(this.status.url);
|
this.$emit('likes-modal');
|
||||||
},
|
},
|
||||||
|
|
||||||
shareToOther() {
|
showShares() {
|
||||||
if (navigator.canShare) {
|
event.currentTarget.blur();
|
||||||
navigator.share({
|
this.$emit('shares-modal');
|
||||||
url: this.status.url
|
},
|
||||||
})
|
|
||||||
.then(() => console.log('Share was successful.'))
|
|
||||||
.catch((error) => console.log('Sharing failed', error));
|
|
||||||
} else {
|
|
||||||
swal('Not supported', 'Your current device does not support native sharing.', 'error');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
counterChange(type) {
|
showComments() {
|
||||||
this.$emit('counter-change', type);
|
event.currentTarget.blur();
|
||||||
},
|
this.showCommentDrawer = !this.showCommentDrawer;
|
||||||
|
},
|
||||||
|
|
||||||
showCommentLikes(post) {
|
copyLink() {
|
||||||
this.$emit('comment-likes-modal', post);
|
event.currentTarget.blur();
|
||||||
},
|
App.util.clipboard(this.status.url);
|
||||||
|
},
|
||||||
|
|
||||||
shareStatus() {
|
shareToOther() {
|
||||||
this.$emit('share');
|
if (navigator.canShare) {
|
||||||
},
|
navigator.share({
|
||||||
|
url: this.status.url
|
||||||
|
})
|
||||||
|
.then(() => console.log('Share was successful.'))
|
||||||
|
.catch((error) => console.log('Sharing failed', error));
|
||||||
|
} else {
|
||||||
|
swal('Not supported', 'Your current device does not support native sharing.', 'error');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
unshareStatus() {
|
counterChange(type) {
|
||||||
this.$emit('unshare');
|
this.$emit('counter-change', type);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleReport(post) {
|
showCommentLikes(post) {
|
||||||
this.$emit('handle-report', post);
|
this.$emit('comment-likes-modal', post);
|
||||||
},
|
},
|
||||||
|
|
||||||
follow() {
|
shareStatus() {
|
||||||
this.$emit('follow');
|
this.$emit('share');
|
||||||
},
|
},
|
||||||
|
|
||||||
unfollow() {
|
unshareStatus() {
|
||||||
this.$emit('unfollow');
|
this.$emit('unshare');
|
||||||
},
|
},
|
||||||
|
|
||||||
handleReblog() {
|
handleReport(post) {
|
||||||
this.isReblogging = true;
|
this.$emit('handle-report', post);
|
||||||
if(this.status.reblogged) {
|
},
|
||||||
this.$emit('unshare');
|
|
||||||
} else {
|
|
||||||
this.$emit('share');
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(() => {
|
follow() {
|
||||||
this.isReblogging = false;
|
this.$emit('follow');
|
||||||
}, 5000);
|
},
|
||||||
},
|
|
||||||
|
|
||||||
handleBookmark() {
|
unfollow() {
|
||||||
event.currentTarget.blur();
|
this.$emit('unfollow');
|
||||||
this.isBookmarking = true;
|
},
|
||||||
this.$emit('bookmark');
|
|
||||||
|
|
||||||
setTimeout(() => {
|
handleReblog() {
|
||||||
this.isBookmarking = false;
|
this.isReblogging = true;
|
||||||
}, 5000);
|
if(this.status.reblogged) {
|
||||||
},
|
this.$emit('unshare');
|
||||||
|
} else {
|
||||||
|
this.$emit('share');
|
||||||
|
}
|
||||||
|
|
||||||
getStatusAvatar() {
|
setTimeout(() => {
|
||||||
if(window._sharedData.user.id == this.status.account.id) {
|
this.isReblogging = false;
|
||||||
return window._sharedData.user.avatar;
|
}, 5000);
|
||||||
}
|
},
|
||||||
|
|
||||||
return this.status.account.avatar;
|
handleBookmark() {
|
||||||
},
|
event.currentTarget.blur();
|
||||||
|
this.isBookmarking = true;
|
||||||
|
this.$emit('bookmark');
|
||||||
|
|
||||||
openModTools() {
|
setTimeout(() => {
|
||||||
this.$emit('mod-tools');
|
this.isBookmarking = false;
|
||||||
},
|
}, 5000);
|
||||||
|
},
|
||||||
|
|
||||||
openEditModal() {
|
getStatusAvatar() {
|
||||||
this.$refs.editModal.open();
|
if(window._sharedData.user.id == this.status.account.id) {
|
||||||
}
|
return window._sharedData.user.avatar;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
return this.status.account.avatar;
|
||||||
|
},
|
||||||
|
|
||||||
|
openModTools() {
|
||||||
|
this.$emit('mod-tools');
|
||||||
|
},
|
||||||
|
|
||||||
|
openEditModal() {
|
||||||
|
this.$refs.editModal.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,6 +8,30 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
<transition name="fade">
|
||||||
|
<div v-if="showReblogBanner && getScope() === 'home'" class="card bg-g-amin card-body shadow-sm mb-3" style="border-radius: 15px;">
|
||||||
|
<div class="d-flex justify-content-around align-items-center">
|
||||||
|
<div class="flex-grow-1 ft-std">
|
||||||
|
<h2 class="font-weight-bold text-white mb-0">Introducing Reblogs in feeds</h2>
|
||||||
|
<hr />
|
||||||
|
<p class="lead text-white mb-0">
|
||||||
|
See reblogs from accounts you follow in your home feed!
|
||||||
|
</p>
|
||||||
|
<p class="text-white small mb-1" style="opacity:0.6">
|
||||||
|
You can disable reblogs in feeds on the Timeline Settings page.
|
||||||
|
</p>
|
||||||
|
<hr />
|
||||||
|
<div class="d-flex">
|
||||||
|
<button class="btn btn-light rounded-pill font-weight-bold btn-block mr-2" @click.prevent="enableReblogs()">
|
||||||
|
<template v-if="!enablingReblogs">Show reblogs in home feed</template>
|
||||||
|
<b-spinner small v-else />
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-outline-light rounded-pill font-weight-bold px-5" @click.prevent="hideReblogs()">Hide</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
<status
|
<status
|
||||||
v-for="(status, index) in feed"
|
v-for="(status, index) in feed"
|
||||||
:key="'pf_feed:' + status.id + ':idx:' + index + ':fui:' + forceUpdateIdx"
|
:key="'pf_feed:' + status.id + ':idx:' + index + ':fui:' + forceUpdateIdx"
|
||||||
|
@ -140,6 +164,7 @@
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
settings: [],
|
||||||
isLoaded: false,
|
isLoaded: false,
|
||||||
feed: [],
|
feed: [],
|
||||||
ids: [],
|
ids: [],
|
||||||
|
@ -159,7 +184,9 @@
|
||||||
reportedStatusId: 0,
|
reportedStatusId: 0,
|
||||||
showSharesModal: false,
|
showSharesModal: false,
|
||||||
sharesModalPost: {},
|
sharesModalPost: {},
|
||||||
forceUpdateIdx: 0
|
forceUpdateIdx: 0,
|
||||||
|
showReblogBanner: false,
|
||||||
|
enablingReblogs: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -174,7 +201,7 @@
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.fetchTimeline();
|
this.fetchSettings();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -194,13 +221,48 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchTimeline(scrollToTop = false) {
|
fetchSettings() {
|
||||||
let url = `/api/pixelfed/v1/timelines/${this.getScope()}`;
|
axios.get('/api/pixelfed/v1/web/settings')
|
||||||
axios.get(url, {
|
.then(res => {
|
||||||
params: {
|
this.settings = res.data;
|
||||||
max_id: this.max_id,
|
|
||||||
limit: 6
|
if(!res.data) {
|
||||||
|
this.showReblogBanner = true;
|
||||||
|
} else {
|
||||||
|
if(res.data.hasOwnProperty('hide_reblog_banner')) {
|
||||||
|
} else if(res.data.hasOwnProperty('enable_reblogs')) {
|
||||||
|
if(!res.data.enable_reblogs) {
|
||||||
|
this.showReblogBanner = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.showReblogBanner = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.fetchTimeline();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
fetchTimeline(scrollToTop = false) {
|
||||||
|
let url, params;
|
||||||
|
if(this.getScope() === 'home' && this.settings && this.settings.hasOwnProperty('enable_reblogs') && this.settings.enable_reblogs) {
|
||||||
|
url = `/api/v1/timelines/home`;
|
||||||
|
params = {
|
||||||
|
'_pe': 1,
|
||||||
|
max_id: this.max_id,
|
||||||
|
limit: 6,
|
||||||
|
include_reblogs: true,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
url = `/api/pixelfed/v1/timelines/${this.getScope()}`;
|
||||||
|
params = {
|
||||||
|
max_id: this.max_id,
|
||||||
|
limit: 6,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
axios.get(url, {
|
||||||
|
params: params
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
let ids = res.data.map(p => {
|
let ids = res.data.map(p => {
|
||||||
if(p && p.hasOwnProperty('relationship')) {
|
if(p && p.hasOwnProperty('relationship')) {
|
||||||
|
@ -242,12 +304,24 @@
|
||||||
|
|
||||||
this.isFetchingMore = true;
|
this.isFetchingMore = true;
|
||||||
|
|
||||||
let url = `/api/pixelfed/v1/timelines/${this.getScope()}`;
|
let url, params;
|
||||||
axios.get(url, {
|
if(this.getScope() === 'home' && this.settings && this.settings.hasOwnProperty('enable_reblogs') && this.settings.enable_reblogs) {
|
||||||
params: {
|
url = `/api/v1/timelines/home`;
|
||||||
|
params = {
|
||||||
|
'_pe': 1,
|
||||||
max_id: this.max_id,
|
max_id: this.max_id,
|
||||||
limit: 6
|
limit: 6,
|
||||||
|
include_reblogs: true,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
url = `/api/pixelfed/v1/timelines/${this.getScope()}`;
|
||||||
|
params = {
|
||||||
|
max_id: this.max_id,
|
||||||
|
limit: 6,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
axios.get(url, {
|
||||||
|
params: params
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(!res.data.length) {
|
if(!res.data.length) {
|
||||||
this.endFeedReached = true;
|
this.endFeedReached = true;
|
||||||
|
@ -287,17 +361,30 @@
|
||||||
|
|
||||||
likeStatus(index) {
|
likeStatus(index) {
|
||||||
let status = this.feed[index];
|
let status = this.feed[index];
|
||||||
let state = status.favourited;
|
if(status.reblog) {
|
||||||
let count = status.favourites_count;
|
status = status.reblog;
|
||||||
this.feed[index].favourites_count = count + 1;
|
let state = status.favourited;
|
||||||
this.feed[index].favourited = !status.favourited;
|
let count = status.favourites_count;
|
||||||
|
this.feed[index].reblog.favourites_count = count + 1;
|
||||||
|
this.feed[index].reblog.favourited = !status.favourited;
|
||||||
|
} else {
|
||||||
|
let state = status.favourited;
|
||||||
|
let count = status.favourites_count;
|
||||||
|
this.feed[index].favourites_count = count + 1;
|
||||||
|
this.feed[index].favourited = !status.favourited;
|
||||||
|
}
|
||||||
|
|
||||||
axios.post('/api/v1/statuses/' + status.id + '/favourite')
|
axios.post('/api/v1/statuses/' + status.id + '/favourite')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
//
|
//
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.feed[index].favourites_count = count;
|
if(status.reblog) {
|
||||||
this.feed[index].favourited = false;
|
this.feed[index].reblog.favourites_count = count;
|
||||||
|
this.feed[index].reblog.favourited = false;
|
||||||
|
} else {
|
||||||
|
this.feed[index].favourites_count = count;
|
||||||
|
this.feed[index].favourited = false;
|
||||||
|
}
|
||||||
|
|
||||||
let el = document.createElement('p');
|
let el = document.createElement('p');
|
||||||
el.classList.add('text-left');
|
el.classList.add('text-left');
|
||||||
|
@ -339,17 +426,30 @@
|
||||||
|
|
||||||
unlikeStatus(index) {
|
unlikeStatus(index) {
|
||||||
let status = this.feed[index];
|
let status = this.feed[index];
|
||||||
let state = status.favourited;
|
if(status.reblog) {
|
||||||
let count = status.favourites_count;
|
status = status.reblog;
|
||||||
this.feed[index].favourites_count = count - 1;
|
let state = status.favourited;
|
||||||
this.feed[index].favourited = !status.favourited;
|
let count = status.favourites_count;
|
||||||
|
this.feed[index].reblog.favourites_count = count - 1;
|
||||||
|
this.feed[index].reblog.favourited = !status.favourited;
|
||||||
|
} else {
|
||||||
|
let state = status.favourited;
|
||||||
|
let count = status.favourites_count;
|
||||||
|
this.feed[index].favourites_count = count - 1;
|
||||||
|
this.feed[index].favourited = !status.favourited;
|
||||||
|
}
|
||||||
|
|
||||||
axios.post('/api/v1/statuses/' + status.id + '/unfavourite')
|
axios.post('/api/v1/statuses/' + status.id + '/unfavourite')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
//
|
//
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.feed[index].favourites_count = count;
|
if(status.reblog && status.pf_type == 'share') {
|
||||||
this.feed[index].favourited = false;
|
this.feed[index].reblog.favourites_count = count;
|
||||||
|
this.feed[index].reblog.favourited = false;
|
||||||
|
} else {
|
||||||
|
this.feed[index].favourites_count = count;
|
||||||
|
this.feed[index].favourited = false;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -371,7 +471,8 @@
|
||||||
|
|
||||||
openLikesModal(idx) {
|
openLikesModal(idx) {
|
||||||
this.postIndex = idx;
|
this.postIndex = idx;
|
||||||
this.likesModalPost = this.feed[this.postIndex];
|
let post = this.feed[this.postIndex];
|
||||||
|
this.likesModalPost = post.reblog ? post.reblog : post;
|
||||||
this.showLikesModal = true;
|
this.showLikesModal = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.likesModal.open();
|
this.$refs.likesModal.open();
|
||||||
|
@ -380,7 +481,8 @@
|
||||||
|
|
||||||
openSharesModal(idx) {
|
openSharesModal(idx) {
|
||||||
this.postIndex = idx;
|
this.postIndex = idx;
|
||||||
this.sharesModalPost = this.feed[this.postIndex];
|
let post = this.feed[this.postIndex];
|
||||||
|
this.sharesModalPost = post.reblog ? post.reblog : post;
|
||||||
this.showSharesModal = true;
|
this.showSharesModal = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.sharesModal.open();
|
this.$refs.sharesModal.open();
|
||||||
|
@ -418,19 +520,32 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
counterChange(index, type) {
|
counterChange(index, type) {
|
||||||
|
let post = this.feed[index];
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 'comment-increment':
|
case 'comment-increment':
|
||||||
this.feed[index].reply_count = this.feed[index].reply_count + 1;
|
if(post.reblog != null) {
|
||||||
|
this.feed[index].reblog.reply_count = this.feed[index].reblog.reply_count + 1;
|
||||||
|
} else {
|
||||||
|
this.feed[index].reply_count = this.feed[index].reply_count + 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'comment-decrement':
|
case 'comment-decrement':
|
||||||
this.feed[index].reply_count = this.feed[index].reply_count - 1;
|
if(post.reblog != null) {
|
||||||
|
this.feed[index].reblog.reply_count = this.feed[index].reblog.reply_count - 1;
|
||||||
|
} else {
|
||||||
|
this.feed[index].reply_count = this.feed[index].reply_count - 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
openCommentLikesModal(post) {
|
openCommentLikesModal(post) {
|
||||||
this.likesModalPost = post;
|
if(post.reblog != null) {
|
||||||
|
this.likesModalPost = post.reblog;
|
||||||
|
} else {
|
||||||
|
this.likesModalPost = post;
|
||||||
|
}
|
||||||
this.showLikesModal = true;
|
this.showLikesModal = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.likesModal.open();
|
this.$refs.likesModal.open();
|
||||||
|
@ -439,33 +554,59 @@
|
||||||
|
|
||||||
shareStatus(index) {
|
shareStatus(index) {
|
||||||
let status = this.feed[index];
|
let status = this.feed[index];
|
||||||
let state = status.reblogged;
|
if(status.reblog) {
|
||||||
let count = status.reblogs_count;
|
status = status.reblog;
|
||||||
this.feed[index].reblogs_count = count + 1;
|
let state = status.reblogged;
|
||||||
this.feed[index].reblogged = !status.reblogged;
|
let count = status.reblogs_count;
|
||||||
|
this.feed[index].reblog.reblogs_count = count + 1;
|
||||||
|
this.feed[index].reblog.reblogged = !status.reblogged;
|
||||||
|
} else {
|
||||||
|
let state = status.reblogged;
|
||||||
|
let count = status.reblogs_count;
|
||||||
|
this.feed[index].reblogs_count = count + 1;
|
||||||
|
this.feed[index].reblogged = !status.reblogged;
|
||||||
|
}
|
||||||
|
|
||||||
axios.post('/api/v1/statuses/' + status.id + '/reblog')
|
axios.post('/api/v1/statuses/' + status.id + '/reblog')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
//
|
//
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.feed[index].reblogs_count = count;
|
if(status.reblog) {
|
||||||
this.feed[index].reblogged = false;
|
this.feed[index].reblog.reblogs_count = count;
|
||||||
|
this.feed[index].reblog.reblogged = false;
|
||||||
|
} else {
|
||||||
|
this.feed[index].reblogs_count = count;
|
||||||
|
this.feed[index].reblogged = false;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
unshareStatus(index) {
|
unshareStatus(index) {
|
||||||
let status = this.feed[index];
|
let status = this.feed[index];
|
||||||
let state = status.reblogged;
|
if(status.reblog) {
|
||||||
let count = status.reblogs_count;
|
status = status.reblog;
|
||||||
this.feed[index].reblogs_count = count - 1;
|
let state = status.reblogged;
|
||||||
this.feed[index].reblogged = !status.reblogged;
|
let count = status.reblogs_count;
|
||||||
|
this.feed[index].reblog.reblogs_count = count - 1;
|
||||||
|
this.feed[index].reblog.reblogged = !status.reblogged;
|
||||||
|
} else {
|
||||||
|
let state = status.reblogged;
|
||||||
|
let count = status.reblogs_count;
|
||||||
|
this.feed[index].reblogs_count = count - 1;
|
||||||
|
this.feed[index].reblogged = !status.reblogged;
|
||||||
|
}
|
||||||
|
|
||||||
axios.post('/api/v1/statuses/' + status.id + '/unreblog')
|
axios.post('/api/v1/statuses/' + status.id + '/unreblog')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
//
|
//
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.feed[index].reblogs_count = count;
|
if(status.reblog) {
|
||||||
this.feed[index].reblogged = false;
|
this.feed[index].reblog.reblogs_count = count;
|
||||||
|
this.feed[index].reblog.reblogged = false;
|
||||||
|
} else {
|
||||||
|
this.feed[index].reblogs_count = count;
|
||||||
|
this.feed[index].reblogged = false;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -480,11 +621,19 @@
|
||||||
handleBookmark(index) {
|
handleBookmark(index) {
|
||||||
let p = this.feed[index];
|
let p = this.feed[index];
|
||||||
|
|
||||||
|
if(p.reblog) {
|
||||||
|
p = p.reblog;
|
||||||
|
}
|
||||||
|
|
||||||
axios.post('/i/bookmark', {
|
axios.post('/i/bookmark', {
|
||||||
item: p.id
|
item: p.id
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.feed[index].bookmarked = !p.bookmarked;
|
if(this.feed[index].reblog) {
|
||||||
|
this.feed[index].reblog.bookmarked = !p.bookmarked;
|
||||||
|
} else {
|
||||||
|
this.feed[index].bookmarked = !p.bookmarked;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
// this.feed[index].bookmarked = false;
|
// this.feed[index].bookmarked = false;
|
||||||
|
@ -497,31 +646,51 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
follow(index) {
|
follow(index) {
|
||||||
// this.feed[index].relationship.following = true;
|
if(this.feed[index].reblog) {
|
||||||
|
axios.post('/api/v1/accounts/' + this.feed[index].reblog.account.id + '/follow')
|
||||||
axios.post('/api/v1/accounts/' + this.feed[index].account.id + '/follow')
|
.then(res => {
|
||||||
.then(res => {
|
this.$store.commit('updateRelationship', [res.data]);
|
||||||
this.$store.commit('updateRelationship', [res.data]);
|
this.updateProfile({ following_count: this.profile.following_count + 1 });
|
||||||
this.updateProfile({ following_count: this.profile.following_count + 1 });
|
this.feed[index].reblog.account.followers_count = this.feed[index].reblog.account.followers_count + 1;
|
||||||
this.feed[index].account.followers_count = this.feed[index].account.followers_count + 1;
|
}).catch(err => {
|
||||||
}).catch(err => {
|
swal('Oops!', 'An error occured when attempting to follow this account.', 'error');
|
||||||
swal('Oops!', 'An error occured when attempting to follow this account.', 'error');
|
this.feed[index].reblog.relationship.following = false;
|
||||||
this.feed[index].relationship.following = false;
|
});
|
||||||
});
|
} else {
|
||||||
|
axios.post('/api/v1/accounts/' + this.feed[index].account.id + '/follow')
|
||||||
|
.then(res => {
|
||||||
|
this.$store.commit('updateRelationship', [res.data]);
|
||||||
|
this.updateProfile({ following_count: this.profile.following_count + 1 });
|
||||||
|
this.feed[index].account.followers_count = this.feed[index].account.followers_count + 1;
|
||||||
|
}).catch(err => {
|
||||||
|
swal('Oops!', 'An error occured when attempting to follow this account.', 'error');
|
||||||
|
this.feed[index].relationship.following = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
unfollow(index) {
|
unfollow(index) {
|
||||||
// this.feed[index].relationship.following = false;
|
if(this.feed[index].reblog) {
|
||||||
|
axios.post('/api/v1/accounts/' + this.feed[index].reblog.account.id + '/unfollow')
|
||||||
axios.post('/api/v1/accounts/' + this.feed[index].account.id + '/unfollow')
|
.then(res => {
|
||||||
.then(res => {
|
this.$store.commit('updateRelationship', [res.data]);
|
||||||
this.$store.commit('updateRelationship', [res.data]);
|
this.updateProfile({ following_count: this.profile.following_count - 1 });
|
||||||
this.updateProfile({ following_count: this.profile.following_count - 1 });
|
this.feed[index].reblog.account.followers_count = this.feed[index].reblog.account.followers_count - 1;
|
||||||
this.feed[index].account.followers_count = this.feed[index].account.followers_count - 1;
|
}).catch(err => {
|
||||||
}).catch(err => {
|
swal('Oops!', 'An error occured when attempting to unfollow this account.', 'error');
|
||||||
swal('Oops!', 'An error occured when attempting to unfollow this account.', 'error');
|
this.feed[index].reblog.relationship.following = true;
|
||||||
this.feed[index].relationship.following = true;
|
});
|
||||||
});
|
} else {
|
||||||
|
axios.post('/api/v1/accounts/' + this.feed[index].account.id + '/unfollow')
|
||||||
|
.then(res => {
|
||||||
|
this.$store.commit('updateRelationship', [res.data]);
|
||||||
|
this.updateProfile({ following_count: this.profile.following_count - 1 });
|
||||||
|
this.feed[index].account.followers_count = this.feed[index].account.followers_count - 1;
|
||||||
|
}).catch(err => {
|
||||||
|
swal('Oops!', 'An error occured when attempting to unfollow this account.', 'error');
|
||||||
|
this.feed[index].relationship.following = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateProfile(delta) {
|
updateProfile(delta) {
|
||||||
|
@ -568,7 +737,31 @@
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.forceUpdateIdx++;
|
this.forceUpdateIdx++;
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
enableReblogs() {
|
||||||
|
this.enablingReblogs = true;
|
||||||
|
|
||||||
|
axios.post('/api/pixelfed/v1/web/settings', {
|
||||||
|
field: 'enable_reblogs',
|
||||||
|
value: true
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.reload();
|
||||||
|
}, 1000);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
hideReblogs() {
|
||||||
|
this.showReblogBanner = false;
|
||||||
|
axios.post('/api/pixelfed/v1/web/settings', {
|
||||||
|
field: 'hide_reblog_banner',
|
||||||
|
value: true
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -1,166 +1,172 @@
|
||||||
@import "lib/ibmplexsans";
|
@import "lib/ibmplexsans";
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--light: #fff;
|
--light: #fff;
|
||||||
--dark: #000;
|
--dark: #000;
|
||||||
--body-bg: rgba(243,244,246,1);
|
--body-bg: rgba(243,244,246,1);
|
||||||
--body-color: #212529;
|
--body-color: #212529;
|
||||||
--nav-bg: #fff;
|
--nav-bg: #fff;
|
||||||
--bg-light: #f8f9fa;
|
--bg-light: #f8f9fa;
|
||||||
|
|
||||||
--primary: #3B82F6;
|
--primary: #3B82F6;
|
||||||
--light-gray: #f8f9fa;
|
--light-gray: #f8f9fa;
|
||||||
--text-lighter: #94a3b8;
|
--text-lighter: #94a3b8;
|
||||||
|
|
||||||
--card-bg: #fff;
|
--card-bg: #fff;
|
||||||
--light-hover-bg: #f9fafb;
|
--light-hover-bg: #f9fafb;
|
||||||
--btn-light-border: #fff;
|
--btn-light-border: #fff;
|
||||||
--input-border: #e2e8f0;
|
--input-border: #e2e8f0;
|
||||||
--comment-bg: #eff2f5;
|
--comment-bg: #eff2f5;
|
||||||
--border-color: #dee2e6;
|
--border-color: #dee2e6;
|
||||||
--card-header-accent: #f9fafb;
|
--card-header-accent: #f9fafb;
|
||||||
|
|
||||||
--dropdown-item-hover-bg: #e9ecef;
|
--dropdown-item-hover-bg: #e9ecef;
|
||||||
--dropdown-item-hover-color: #16181b;
|
--dropdown-item-hover-color: #16181b;
|
||||||
--dropdown-item-color: #64748b;
|
--dropdown-item-color: #64748b;
|
||||||
--dropdown-item-active-color: #334155;
|
--dropdown-item-active-color: #334155;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--light: #000;
|
--light: #000;
|
||||||
--dark: #fff;
|
--dark: #fff;
|
||||||
--body-bg: #000;
|
--body-bg: #000;
|
||||||
--body-color: #9ca3af;
|
--body-color: #9ca3af;
|
||||||
--nav-bg: #000;
|
--nav-bg: #000;
|
||||||
--bg-light: #212124;
|
--bg-light: #212124;
|
||||||
|
|
||||||
--light-gray: #212124;
|
--light-gray: #212124;
|
||||||
--text-lighter: #818181;
|
--text-lighter: #818181;
|
||||||
|
|
||||||
--card-bg: #161618;
|
--card-bg: #161618;
|
||||||
--light-hover-bg: #212124;
|
--light-hover-bg: #212124;
|
||||||
--btn-light-border: #161618;
|
--btn-light-border: #161618;
|
||||||
--input-border: #161618;
|
--input-border: #161618;
|
||||||
--comment-bg: #212124;
|
--comment-bg: #212124;
|
||||||
--border-color: #212124;
|
--border-color: #212124;
|
||||||
--card-header-accent: #212124;
|
--card-header-accent: #212124;
|
||||||
|
|
||||||
--dropdown-item-hover-bg: #000;
|
--dropdown-item-hover-bg: #000;
|
||||||
--dropdown-item-hover-color: #818181;
|
--dropdown-item-hover-color: #818181;
|
||||||
--dropdown-item-color: #64748b;
|
--dropdown-item-color: #64748b;
|
||||||
--dropdown-item-active-color: #fff;
|
--dropdown-item-active-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.force-light-mode {
|
.force-light-mode {
|
||||||
--light: #fff;
|
--light: #fff;
|
||||||
--dark: #000;
|
--dark: #000;
|
||||||
--body-bg: rgba(243,244,246,1);
|
--body-bg: rgba(243,244,246,1);
|
||||||
--body-color: #212529;
|
--body-color: #212529;
|
||||||
--nav-bg: #fff;
|
--nav-bg: #fff;
|
||||||
--bg-light: #f8f9fa;
|
--bg-light: #f8f9fa;
|
||||||
|
|
||||||
--primary: #3B82F6;
|
--primary: #3B82F6;
|
||||||
--light-gray: #f8f9fa;
|
--light-gray: #f8f9fa;
|
||||||
--text-lighter: #94a3b8;
|
--text-lighter: #94a3b8;
|
||||||
|
|
||||||
--card-bg: #fff;
|
--card-bg: #fff;
|
||||||
--light-hover-bg: #f9fafb;
|
--light-hover-bg: #f9fafb;
|
||||||
--btn-light-border: #fff;
|
--btn-light-border: #fff;
|
||||||
--input-border: #e2e8f0;
|
--input-border: #e2e8f0;
|
||||||
--comment-bg: #eff2f5;
|
--comment-bg: #eff2f5;
|
||||||
--border-color: #dee2e6;
|
--border-color: #dee2e6;
|
||||||
--card-header-accent: #f9fafb;
|
--card-header-accent: #f9fafb;
|
||||||
|
|
||||||
--dropdown-item-hover-bg: #e9ecef;
|
--dropdown-item-hover-bg: #e9ecef;
|
||||||
--dropdown-item-hover-color: #16181b;
|
--dropdown-item-hover-color: #16181b;
|
||||||
--dropdown-item-color: #64748b;
|
--dropdown-item-color: #64748b;
|
||||||
--dropdown-item-active-color: #334155;
|
--dropdown-item-active-color: #334155;
|
||||||
}
|
}
|
||||||
|
|
||||||
.force-dark-mode {
|
.force-dark-mode {
|
||||||
--light: #000;
|
--light: #000;
|
||||||
--dark: #fff;
|
--dark: #fff;
|
||||||
--body-bg: #000;
|
--body-bg: #000;
|
||||||
--body-color: #9ca3af;
|
--body-color: #9ca3af;
|
||||||
--nav-bg: #000;
|
--nav-bg: #000;
|
||||||
--bg-light: #212124;
|
--bg-light: #212124;
|
||||||
|
|
||||||
--light-gray: #212124;
|
--light-gray: #212124;
|
||||||
--text-lighter: #818181;
|
--text-lighter: #818181;
|
||||||
|
|
||||||
--card-bg: #161618;
|
--card-bg: #161618;
|
||||||
--light-hover-bg: #212124;
|
--light-hover-bg: #212124;
|
||||||
--btn-light-border: #161618;
|
--btn-light-border: #161618;
|
||||||
--input-border: #161618;
|
--input-border: #161618;
|
||||||
--comment-bg: #212124;
|
--comment-bg: #212124;
|
||||||
--border-color: #212124;
|
--border-color: #212124;
|
||||||
--card-header-accent: #212124;
|
--card-header-accent: #212124;
|
||||||
|
|
||||||
--dropdown-item-hover-bg: #000;
|
--dropdown-item-hover-bg: #000;
|
||||||
--dropdown-item-hover-color: #818181;
|
--dropdown-item-hover-color: #818181;
|
||||||
--dropdown-item-color: #64748b;
|
--dropdown-item-color: #64748b;
|
||||||
--dropdown-item-active-color: #b3b3b3;
|
--dropdown-item-active-color: #b3b3b3;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--body-bg);
|
background: var(--body-bg);
|
||||||
font-family: 'IBM Plex Sans', sans-serif;
|
font-family: 'IBM Plex Sans', sans-serif;
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.web-wrapper {
|
.web-wrapper {
|
||||||
margin-bottom: 10rem;
|
margin-bottom: 10rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-fluid {
|
.container-fluid {
|
||||||
max-width: 1440px !important;
|
max-width: 1440px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jumbotron {
|
.jumbotron {
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rounded-px {
|
.rounded-px {
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.doc-body {
|
.doc-body {
|
||||||
p:last-child {
|
p:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-laravel {
|
.navbar-laravel {
|
||||||
background-color: var(--nav-bg);
|
background-color: var(--nav-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sticky-top {
|
.sticky-top {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-light .navbar-brand {
|
.navbar-light .navbar-brand {
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.primary {
|
.primary {
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-g-amin {
|
||||||
|
background: #8E2DE2;
|
||||||
|
background: -webkit-linear-gradient(to right, #4A00E0, #8E2DE2);
|
||||||
|
background: linear-gradient(to left, #4A00E0, #8E2DE2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-lighter {
|
.text-lighter {
|
||||||
color: var(--text-lighter) !important;
|
color: var(--text-lighter) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-dark {
|
.text-dark {
|
||||||
color: var(--body-color) !important;
|
color: var(--body-color) !important;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--dark) !important;
|
color: var(--dark) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,16 +175,16 @@ a.text-dark:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-primary {
|
.badge-primary {
|
||||||
background-color: var(--primary);
|
background-color: var(--primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background-color: var(--primary);
|
background-color: var(--primary);
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-light {
|
.btn-outline-light {
|
||||||
border-color: var(--light-gray);
|
border-color: var(--light-gray);
|
||||||
}
|
}
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
|
@ -187,51 +193,51 @@ a.text-dark:hover {
|
||||||
|
|
||||||
.bg-white,
|
.bg-white,
|
||||||
.bg-light {
|
.bg-light {
|
||||||
background-color: var(--bg-light) !important;
|
background-color: var(--bg-light) !important;
|
||||||
border-color: var(--bg-light) !important;
|
border-color: var(--bg-light) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-light {
|
.btn-light {
|
||||||
background-color: var(--light-gray);
|
background-color: var(--light-gray);
|
||||||
border-color: var(--btn-light-border);
|
border-color: var(--btn-light-border);
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
background-color: var(--card-bg);
|
background-color: var(--card-bg);
|
||||||
border-color: var(--btn-light-border);
|
border-color: var(--btn-light-border);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-input {
|
.autocomplete-input {
|
||||||
border: 1px solid var(--light-gray) !important;
|
border: 1px solid var(--light-gray) !important;
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-result-list {
|
.autocomplete-result-list {
|
||||||
background: var(--light) !important;
|
background: var(--light) !important;
|
||||||
z-index: 2 !important;
|
z-index: 2 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-menu,
|
.dropdown-menu,
|
||||||
span.twitter-typeahead .tt-menu,
|
span.twitter-typeahead .tt-menu,
|
||||||
.form-control {
|
.form-control {
|
||||||
border: 1px solid var(--border-color) !important;
|
border: 1px solid var(--border-color) !important;
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
background-color: var(--card-bg);
|
background-color: var(--card-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tribute-container li,
|
.tribute-container li,
|
||||||
.dropdown-item,
|
.dropdown-item,
|
||||||
span.twitter-typeahead .tt-suggestion {
|
span.twitter-typeahead .tt-suggestion {
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item:hover,
|
.dropdown-item:hover,
|
||||||
span.twitter-typeahead .tt-suggestion:hover,
|
span.twitter-typeahead .tt-suggestion:hover,
|
||||||
.dropdown-item:focus,
|
.dropdown-item:focus,
|
||||||
span.twitter-typeahead .tt-suggestion:focus {
|
span.twitter-typeahead .tt-suggestion:focus {
|
||||||
color: var(--dropdown-item-hover-color);
|
color: var(--dropdown-item-hover-color);
|
||||||
background-color: var(--dropdown-item-hover-bg);
|
background-color: var(--dropdown-item-hover-bg);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
@ -245,7 +251,7 @@ span.twitter-typeahead .tt-suggestion:focus {
|
||||||
.card-header,
|
.card-header,
|
||||||
.card-footer,
|
.card-footer,
|
||||||
.ph-item {
|
.ph-item {
|
||||||
background-color: var(--card-bg);
|
background-color: var(--card-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-light,
|
.badge-light,
|
||||||
|
@ -253,143 +259,147 @@ span.twitter-typeahead .tt-suggestion:focus {
|
||||||
.ph-avatar,
|
.ph-avatar,
|
||||||
.ph-picture,
|
.ph-picture,
|
||||||
.ph-row div {
|
.ph-row div {
|
||||||
background-color: var(--light-gray);
|
background-color: var(--light-gray);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header,
|
.card-header,
|
||||||
.border-top,
|
.border-top,
|
||||||
.border-bottom {
|
.border-bottom {
|
||||||
border-color: var(--border-color) !important;
|
border-color: var(--border-color) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-header,
|
.modal-header,
|
||||||
.modal-footer {
|
.modal-footer {
|
||||||
border-color: var(--border-color);
|
border-color: var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.compose-action:hover {
|
.compose-action:hover {
|
||||||
background-color: var(--light-gray) !important;
|
background-color: var(--light-gray) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-divider {
|
.dropdown-divider {
|
||||||
border-color: var(--dropdown-item-hover-bg);
|
border-color: var(--dropdown-item-hover-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.metro-nav {
|
.metro-nav {
|
||||||
&.flex-column {
|
&.flex-column {
|
||||||
background-color: var(--card-bg);
|
background-color: var(--card-bg);
|
||||||
|
|
||||||
.nav-item {
|
.nav-item {
|
||||||
.nav-link:hover {
|
.nav-link:hover {
|
||||||
background-color: var(--light-hover-bg);
|
background-color: var(--light-hover-bg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.child-reply-form {
|
.child-reply-form {
|
||||||
.form-control {
|
.form-control {
|
||||||
border-color: var(--input-border);
|
border-color: var(--input-border);
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-menu {
|
.ui-menu {
|
||||||
.btn-group {
|
.btn-group {
|
||||||
.btn:first-child {
|
.btn:first-child {
|
||||||
border-top-left-radius: 50rem;
|
border-top-left-radius: 50rem;
|
||||||
border-bottom-left-radius: 50rem;
|
border-bottom-left-radius: 50rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:last-child {
|
.btn:last-child {
|
||||||
border-top-right-radius: 50rem;
|
border-top-right-radius: 50rem;
|
||||||
border-bottom-right-radius: 50rem;
|
border-bottom-right-radius: 50rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.b-custom-control-lg {
|
.b-custom-control-lg {
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-label {
|
.content-label {
|
||||||
&-wrapper {
|
&-wrapper {
|
||||||
div:not(.content-label) {
|
div:not(.content-label) {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-text {
|
&-text {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.compose-modal-component {
|
.compose-modal-component {
|
||||||
.form-control:focus {
|
.form-control:focus {
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body {
|
.modal-body {
|
||||||
.nav-tabs .nav-link.active,
|
.nav-tabs .nav-link.active,
|
||||||
.nav-tabs .nav-item.show .nav-link {
|
.nav-tabs .nav-item.show .nav-link {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-color: var(--border-color);
|
border-color: var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tabs .nav-link:hover,
|
.nav-tabs .nav-link:hover,
|
||||||
.nav-tabs .nav-link:focus {
|
.nav-tabs .nav-link:focus {
|
||||||
border-color: var(--border-color);
|
border-color: var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control:focus {
|
.form-control:focus {
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tribute-container {
|
.tribute-container {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
border-color: var(--border-color);
|
border-color: var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.highlight,
|
&.highlight,
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--body-color);
|
color: var(--body-color);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: rgba(44, 120, 191, 0.25);
|
background: rgba(44, 120, 191, 0.25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ft-std {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-status-component {
|
.timeline-status-component {
|
||||||
.username {
|
.username {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
margin-bottom: -3px;
|
margin-bottom: -3px;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="font-weight-bold text-muted">Website</label>
|
<label class="font-weight-bold text-muted">Website</label>
|
||||||
<input type="text" class="form-control" name="website" value="{{$user->website}}" placeholder="No website added">
|
<input type="text" class="form-control" name="website" value="{{$profile->website}}" placeholder="No website added">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="font-weight-bold text-muted">Admin</label>
|
<label class="font-weight-bold text-muted">Admin</label>
|
||||||
|
@ -97,4 +97,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
<a href="{{route('site.terms')}}" class="text-dark p-2">{{__('site.terms')}}</a>
|
<a href="{{route('site.terms')}}" class="text-dark p-2">{{__('site.terms')}}</a>
|
||||||
<a href="{{route('site.privacy')}}" class="text-dark p-2">{{__('site.privacy')}}</a>
|
<a href="{{route('site.privacy')}}" class="text-dark p-2">{{__('site.privacy')}}</a>
|
||||||
<a href="{{route('site.language')}}" class="text-dark p-2">{{__('site.language')}}</a>
|
<a href="{{route('site.language')}}" class="text-dark p-2">{{__('site.language')}}</a>
|
||||||
@if(config_cache('instance.has_legal_notice'))
|
<a href="/site/legal-notice" class="text-dark p-2">Legal Notice</a>
|
||||||
<a href="/site/legal-notice" class="text-dark p-2">Legal Notice</a>
|
|
||||||
@endif
|
|
||||||
</p>
|
</p>
|
||||||
<p class="text-center text-muted small mb-0">
|
<p class="text-center text-muted small mb-0">
|
||||||
<span class="text-muted">© {{date('Y')}} {{config('pixelfed.domain.app')}}</span>
|
<span class="text-muted">© {{date('Y')}} {{config('pixelfed.domain.app')}}</span>
|
||||||
|
|
|
@ -8,17 +8,29 @@
|
||||||
<hr>
|
<hr>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
@csrf
|
@csrf
|
||||||
<div class="form-check pb-3">
|
<div class="form-check pb-3 d-none">
|
||||||
<input class="form-check-input" type="checkbox" name="top" {{$top ? 'checked':''}}>
|
<input class="form-check-input" type="checkbox" name="top" {{$top ? 'checked':''}}>
|
||||||
<label class="form-check-label font-weight-bold" for="">Show text-only posts</label>
|
<label class="form-check-label font-weight-bold" for="">Show text-only posts</label>
|
||||||
<p class="text-muted small help-text">Show text-only posts from accounts you follow. (Home timeline only)</p>
|
<p class="text-muted small help-text">Show text-only posts from accounts you follow. (Home timeline only)</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check pb-3">
|
<div class="form-check pb-3 d-none">
|
||||||
<input class="form-check-input" type="checkbox" name="replies" {{$replies ? 'checked':''}}>
|
<input class="form-check-input" type="checkbox" name="replies" {{$replies ? 'checked':''}}>
|
||||||
<label class="form-check-label font-weight-bold" for="">Show replies</label>
|
<label class="form-check-label font-weight-bold" for="">Show replies</label>
|
||||||
<p class="text-muted small help-text">Show replies from accounts you follow. (Home timeline only)</p>
|
<p class="text-muted small help-text">Show replies from accounts you follow. (Home timeline only)</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-check pb-3">
|
||||||
|
<input class="form-check-input" type="checkbox" name="enable_reblogs" {{$userSettings['enable_reblogs'] ? 'checked':''}}>
|
||||||
|
<label class="form-check-label font-weight-bold" for="">Show reblogs</label>
|
||||||
|
<p class="text-muted small help-text">See reblogs from accounts you follow in your home feed. (Home timeline only)</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-check pb-3">
|
||||||
|
<input class="form-check-input" type="checkbox" name="photo_reblogs_only" {{$userSettings['photo_reblogs_only'] ? 'checked':''}}>
|
||||||
|
<label class="form-check-label font-weight-bold" for="">Photo reblogs only</label>
|
||||||
|
<p class="text-muted small help-text">Only see reblogs of photos or photo albums. (Home timeline only)</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group row mt-5 pt-5">
|
<div class="form-group row mt-5 pt-5">
|
||||||
<div class="col-12 text-right">
|
<div class="col-12 text-right">
|
||||||
<hr>
|
<hr>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<section>
|
<section>
|
||||||
<p class="lead">The software that powers this website is called <a href="https://pixelfed.org">Pixelfed</a> and anyone can <a href="https://github.com/pixelfed/pixelfed">download</a> or <a href="https://github.com/pixelfed/pixelfed">view</a> the source code and run their own instance!</p>
|
<p class="lead">This website runs a modified version of the Pixelfed software, which you can find on <a href="https://git.zknt.org/chris/pixelfed/">Git</a> (original, unmodified software: <a href="https://github.com/pixelfed/pixelfed/">here on Github</a></p>
|
||||||
</section>
|
</section>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,8 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
|
||||||
Route::get('posts/{id}/{slug}', 'Api\ApiV1Dot1Controller@placesById')->middleware($middleware);
|
Route::get('posts/{id}/{slug}', 'Api\ApiV1Dot1Controller@placesById')->middleware($middleware);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::get('web/settings', 'Api\ApiV1Dot1Controller@getWebSettings')->middleware($middleware);
|
||||||
|
Route::post('web/settings', 'Api\ApiV1Dot1Controller@setWebSettings')->middleware($middleware);
|
||||||
Route::get('app/settings', 'UserAppSettingsController@get')->middleware($middleware);
|
Route::get('app/settings', 'UserAppSettingsController@get')->middleware($middleware);
|
||||||
Route::post('app/settings', 'UserAppSettingsController@store')->middleware($middleware);
|
Route::post('app/settings', 'UserAppSettingsController@store')->middleware($middleware);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue