mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
commit
0b6287755b
51 changed files with 844 additions and 433 deletions
17
.env.example
17
.env.example
|
@ -48,19 +48,6 @@ MAX_CAPTION_LENGTH=150
|
|||
MAX_ALBUM_LENGTH=4
|
||||
|
||||
ACTIVITY_PUB=false
|
||||
REMOTE_FOLLOW=false
|
||||
ACTIVITYPUB_INBOX=false
|
||||
ACTIVITYPUB_SHAREDINBOX=false
|
||||
# Set these "true" to enable federation.
|
||||
# You might need to also run:
|
||||
# php artisan cache:clear
|
||||
# php artisan config:cache
|
||||
|
||||
AP_REMOTE_FOLLOW=false
|
||||
AP_INBOX=false
|
||||
PF_COSTAR_ENABLED=false
|
||||
CS_BLOCKED_DOMAINS='gab.com,gab.ai,develop.gab.com'
|
||||
CS_CW_DOMAINS='switter.at'
|
||||
CS_UNLISTED_DOMAINS='example.org,example.net,example.com'
|
||||
|
||||
## Optional
|
||||
#HORIZON_DARKMODE=false # Horizon theme darkmode
|
||||
#HORIZON_EMBED=false # Single Docker Container mode
|
||||
|
|
35
CHANGELOG.md
35
CHANGELOG.md
|
@ -3,20 +3,33 @@
|
|||
## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.10.3...dev)
|
||||
|
||||
### Added
|
||||
- Added Welsh translations [#1706](https://github.com/pixelfed/pixelfed/pull/1706)
|
||||
- Added Api v1 controller [85835f5a](https://github.com/pixelfed/pixelfed/commit/85835f5a6712dea0562df4be897087de5305750f)
|
||||
- Added database migration that adds a language column to the users table [c87d8c16](https://github.com/pixelfed/pixelfed/commit/c87d8c16)
|
||||
- Added persistent preferred language [18bc9c30](https://github.com/pixelfed/pixelfed/commit/18bc9c30)
|
||||
|
||||
### Fixed
|
||||
- Fixed count bug in StatusHashtagService [#1694](https://github.com/pixelfed/pixelfed/pull/1694)
|
||||
- Fixed private account bug [#1699](https://github.com/pixelfed/pixelfed/pull/1699)
|
||||
- Fixed comments on MomentUI posts [#1704](https://github.com/pixelfed/pixelfed/pull/1704)
|
||||
|
||||
### Changed
|
||||
- Updated EmailService, added new domains [#1690](https://github.com/pixelfed/pixelfed/pull/1690)
|
||||
- Updated quill.js to v1.3.7 [#1692](https://github.com/pixelfed/pixelfed/pull/1690)
|
||||
- Updated quill.js to v1.3.7 [#1692](https://github.com/pixelfed/pixelfed/pull/1692)
|
||||
- Cache ProfileController [#1700](https://github.com/pixelfed/pixelfed/pull/1700)
|
||||
- Updated ComposeUI v4, made cropping optional [#1702](https://github.com/pixelfed/pixelfed/pull/1702)
|
||||
- Updated DiscoverController, limit Loops to local only posts [#1703](https://github.com/pixelfed/pixelfed/pull/1703)
|
||||
- Namespaced internal apis [3c306c5e](https://github.com/pixelfed/pixelfed/commit/3c306c5e179d35dbe19a6a1bd9533350e4b96524)
|
||||
- Updated .env.example with proper remote follow variable [0697f780](https://github.com/pixelfed/pixelfed/commit/0697f780d3a5cba72148f0a767d5a35124a3d9b4)
|
||||
- Updated show all comments view [0a5eaa31](https://github.com/pixelfed/pixelfed/pull/1708/commits/0a5eaa3118cb09c61d3e5442fe3bf8439a2a12af)
|
||||
- Updated language page layout [01fb5af](https://github.com/pixelfed/pixelfed/pull/1708/commits/01fb5af19e803488c5794b545d218771f6fce6d7)
|
||||
- Updated privacy policy page layout [a4229d5](https://github.com/pixelfed/pixelfed/pull/1708/commits/a4229d5d30faea11e7a72d122c4a5762d867aaf3)
|
||||
- Updated terms page layout [4f8c5e5](https://github.com/pixelfed/pixelfed/pull/1708/commits/4f8c5e5519949c63c702c724a00d8575db4e0014)
|
||||
- Update v1 API, added /api/v1/instance endpoint [951b6fa0](https://github.com/pixelfed/pixelfed/commit/951b6fa0) [9dc2234b](https://github.com/pixelfed/pixelfed/commit/99dc2234b)
|
||||
|
||||
## Deprecated
|
||||
- Remove deprecated profile following/followers [#1697](https://github.com/pixelfed/pixelfed/pull/1697)
|
||||
- Remove old comment permalink [05f6598](https://github.com/pixelfed/pixelfed/pull/1708/commits/05f659896d903e1ff41dba810f125d721fa057e7)
|
||||
|
||||
|
||||
## [v0.10.3 (2019-09-08)](https://github.com/pixelfed/pixelfed/compare/v0.10.2...v0.10.3)
|
||||
|
@ -43,7 +56,7 @@
|
|||
|
||||
### Fixed
|
||||
|
||||
- Typo in Inbox prevented proper federation support
|
||||
- Typo in Inbox prevented proper federation support [#1664](https://github.com/pixelfed/pixelfed/pull/1664)
|
||||
|
||||
|
||||
## [v0.10.1 (2019-09-06)](https://github.com/pixelfed/pixelfed/compare/v0.10.0...v0.10.1)
|
||||
|
@ -53,19 +66,19 @@
|
|||
- Compose UI v4: a rework of the v3 flow to allow basic cropping and better support future post types
|
||||
- Profile badges show if a user is following you or is an admin
|
||||
- Show confirmation message when muting or blocking a user from a post
|
||||
- Allow "read more" to be disabled on posts
|
||||
- Allow "read more" to be disabled on posts [#1545](https://github.com/pixelfed/pixelfed/pull/1545)
|
||||
- Loops! Discover short videos
|
||||
- Preliminary support for profile PropertyValue metadata
|
||||
- Preliminary support for Direct Messages
|
||||
- Places! Run the artisan task `import:cities`
|
||||
- Emails are now validated and banned email domains are disallowed at signup. Artisan task `email:bancheck` will validate existing users.
|
||||
- .env vars `REDIS_SCHEME` and `REDIS_PATH` allow for using Redis over a Unix socket instead of TCP
|
||||
- .env vars `REDIS_SCHEME` and `REDIS_PATH` allow for using Redis over a Unix socket instead of TCP [#1602](https://github.com/pixelfed/pixelfed/pull/1602)
|
||||
- .env var `IMAGE_DRIVER` allows using imagick instead of gd
|
||||
|
||||
### Fixed
|
||||
- Show delete button while composing video posts
|
||||
- Show delete button while composing video posts [#1529](https://github.com/pixelfed/pixelfed/pull/1529)
|
||||
- Show pending follow requests on private profiles
|
||||
- Allow muted users to comment on your posts
|
||||
- Allow muted users to comment on your posts [#1537](https://github.com/pixelfed/pixelfed/pull/1537)
|
||||
- Bugs with carousel cursor and tooltips
|
||||
- Collections can now be deleted from collection page
|
||||
- Compose modal now indicates album media limits
|
||||
|
@ -73,7 +86,7 @@
|
|||
- Don't show Register link in navbar when registrations are closed
|
||||
|
||||
### Changed
|
||||
- Use vue-masonry for Moment UI layout
|
||||
- Use vue-masonry for Moment UI layout [#1536](https://github.com/pixelfed/pixelfed/pull/1536)
|
||||
- User post limit changed from 20/hr to 50/hr
|
||||
- Better mobile profile layout
|
||||
- Dark mode is now a bit bluer
|
||||
|
@ -85,17 +98,17 @@
|
|||
## [v0.10.0 (2019-07-17)](https://github.com/pixelfed/pixelfed/compare/v0.9.6...v0.10.0)
|
||||
|
||||
### Added
|
||||
- Collections! Add posts to Collections, similar to categories.
|
||||
- Profile donate links: add links to Patreon, Liberapay, and OpenCollective on your profile
|
||||
- Collections! Add posts to Collections, similar to categories. [#1511](https://github.com/pixelfed/pixelfed/pull/1511)
|
||||
- Profile donate links: add links to Patreon, Liberapay, and OpenCollective on your profile [#1500](https://github.com/pixelfed/pixelfed/pull/1500)
|
||||
|
||||
### Fixed
|
||||
- Show correct mode when viewing followers / following
|
||||
|
||||
### Changed
|
||||
- Profile model now uses snowflake id
|
||||
- Profile model now uses snowflake id [#1502](https://github.com/pixelfed/pixelfed/pull/1502)
|
||||
|
||||
### Removed
|
||||
- OStatus legacy code has been removed
|
||||
- OStatus legacy code has been removed [#1510](https://github.com/pixelfed/pixelfed/pull/1510)
|
||||
|
||||
## [v0.9.6 (2019-07-10)](https://github.com/pixelfed/pixelfed/compare/v0.9.5...v0.9.6)
|
||||
|
||||
|
|
128
app/Http/Controllers/Api/ApiV1Controller.php
Normal file
128
app/Http/Controllers/Api/ApiV1Controller.php
Normal file
|
@ -0,0 +1,128 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Jobs\StatusPipeline\StatusDelete;
|
||||
use Laravel\Passport\Passport;
|
||||
use Auth, Cache, DB;
|
||||
use App\{
|
||||
Like,
|
||||
Media,
|
||||
Profile,
|
||||
Status
|
||||
};
|
||||
use League\Fractal;
|
||||
use App\Transformer\Api\{
|
||||
AccountTransformer,
|
||||
RelationshipTransformer,
|
||||
StatusTransformer,
|
||||
};
|
||||
use League\Fractal\Serializer\ArraySerializer;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
|
||||
use App\Services\NotificationService;
|
||||
|
||||
class ApiV1Controller extends Controller
|
||||
{
|
||||
protected $fractal;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->fractal = new Fractal\Manager();
|
||||
$this->fractal->setSerializer(new ArraySerializer());
|
||||
}
|
||||
public function apps(Request $request)
|
||||
{
|
||||
abort_if(!config('pixelfed.oauth_enabled'), 404);
|
||||
|
||||
$this->validate($request, [
|
||||
'client_name' => 'required',
|
||||
'redirect_uris' => 'required',
|
||||
'scopes' => 'nullable',
|
||||
'website' => 'nullable'
|
||||
]);
|
||||
|
||||
$client = Passport::client()->forceFill([
|
||||
'user_id' => null,
|
||||
'name' => e($request->client_name),
|
||||
'secret' => Str::random(40),
|
||||
'redirect' => $request->redirect_uris,
|
||||
'personal_access_client' => false,
|
||||
'password_client' => false,
|
||||
'revoked' => false,
|
||||
]);
|
||||
|
||||
$client->save();
|
||||
|
||||
$res = [
|
||||
'id' => $client->id,
|
||||
'name' => $client->name,
|
||||
'website' => null,
|
||||
'redirect_uri' => $client->redirect,
|
||||
'client_id' => $client->id,
|
||||
'client_secret' => $client->secret,
|
||||
'vapid_key' => null
|
||||
];
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function accountById(Request $request, $id)
|
||||
{
|
||||
$profile = Profile::whereNull('status')->findOrFail($id);
|
||||
$resource = new Fractal\Resource\Item($profile, new AccountTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
public function statusById(Request $request, $id)
|
||||
{
|
||||
$status = Status::whereVisibility('public')->findOrFail($id);
|
||||
$resource = new Fractal\Resource\Item($status, new StatusTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
public function instance(Request $request)
|
||||
{
|
||||
$res = [
|
||||
'description' => 'Pixelfed - Photo sharing for everyone',
|
||||
'email' => config('instance.email'),
|
||||
'languages' => ['en'],
|
||||
'max_toot_chars' => config('pixelfed.max_caption_length'),
|
||||
'registrations' => config('pixelfed.open_registration'),
|
||||
'stats' => [
|
||||
'user_count' => 0,
|
||||
'status_count' => 0,
|
||||
'domain_count' => 0
|
||||
],
|
||||
'thumbnail' => config('app.url') . '/img/pixelfed-icon-color.png',
|
||||
'title' => 'Pixelfed (' . config('pixelfed.domain.app') . ')',
|
||||
'uri' => config('app.url'),
|
||||
'urls' => [],
|
||||
'version' => '2.7.2 (compatible; Pixelfed ' . config('pixelfed.version') . ')'
|
||||
];
|
||||
return response()->json($res, 200, [], JSON_PRETTY_PRINT);
|
||||
}
|
||||
|
||||
public function filters(Request $request)
|
||||
{
|
||||
// Pixelfed does not yet support keyword filters
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
public function context(Request $request)
|
||||
{
|
||||
// todo
|
||||
$res = [
|
||||
'ancestors' => [],
|
||||
'descendants' => []
|
||||
];
|
||||
|
||||
return response()->json($res);
|
||||
}
|
||||
}
|
|
@ -40,40 +40,34 @@ class BaseApiController extends Controller
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
// $this->middleware('auth');
|
||||
$this->fractal = new Fractal\Manager();
|
||||
$this->fractal->setSerializer(new ArraySerializer());
|
||||
}
|
||||
|
||||
public function notifications(Request $request)
|
||||
{
|
||||
$pid = Auth::user()->profile->id;
|
||||
$pg = $request->input('pg');
|
||||
if($pg == true) {
|
||||
$timeago = Carbon::now()->subMonths(6);
|
||||
$notifications = Notification::whereProfileId($pid)
|
||||
->whereDate('created_at', '>', $timeago)
|
||||
->latest()
|
||||
->simplePaginate(10);
|
||||
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
} else {
|
||||
$this->validate($request, [
|
||||
'page' => 'nullable|integer|min:1|max:10',
|
||||
'limit' => 'nullable|integer|min:1|max:10'
|
||||
]);
|
||||
$limit = $request->input('limit') ?? 10;
|
||||
$page = $request->input('page') ?? 1;
|
||||
$end = (int) $page * $limit;
|
||||
$start = (int) $end - $limit;
|
||||
$res = NotificationService::get($pid, $start, $end);
|
||||
}
|
||||
abort_if(!$request->user(), 403);
|
||||
$pid = $request->user()->profile_id;
|
||||
$this->validate($request, [
|
||||
'page' => 'nullable|integer|min:1|max:10',
|
||||
'limit' => 'nullable|integer|min:1|max:40'
|
||||
]);
|
||||
$limit = $request->input('limit') ?? 10;
|
||||
$timeago = Carbon::now()->subMonths(6);
|
||||
$notifications = Notification::whereProfileId($pid)
|
||||
->whereDate('created_at', '>', $timeago)
|
||||
->latest()
|
||||
->simplePaginate($limit);
|
||||
$resource = new Fractal\Resource\Collection($notifications, new NotificationTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
public function accounts(Request $request, $id)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$profile = Profile::findOrFail($id);
|
||||
$resource = new Fractal\Resource\Item($profile, new AccountTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
|
@ -83,6 +77,7 @@ class BaseApiController extends Controller
|
|||
|
||||
public function accountFollowers(Request $request, $id)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$profile = Profile::findOrFail($id);
|
||||
$followers = $profile->followers;
|
||||
$resource = new Fractal\Resource\Collection($followers, new AccountTransformer());
|
||||
|
@ -93,6 +88,7 @@ class BaseApiController extends Controller
|
|||
|
||||
public function accountFollowing(Request $request, $id)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$profile = Profile::findOrFail($id);
|
||||
$following = $profile->following;
|
||||
$resource = new Fractal\Resource\Collection($following, new AccountTransformer());
|
||||
|
@ -103,6 +99,7 @@ class BaseApiController extends Controller
|
|||
|
||||
public function accountStatuses(Request $request, $id)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$this->validate($request, [
|
||||
'only_media' => 'nullable',
|
||||
'pinned' => 'nullable',
|
||||
|
@ -152,6 +149,7 @@ class BaseApiController extends Controller
|
|||
|
||||
public function avatarUpdate(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$this->validate($request, [
|
||||
'upload' => 'required|mimes:jpeg,png,gif|max:'.config('pixelfed.max_avatar_size'),
|
||||
]);
|
||||
|
@ -188,6 +186,7 @@ class BaseApiController extends Controller
|
|||
|
||||
public function showTempMedia(Request $request, int $profileId, $mediaId)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
abort_if(!$request->hasValidSignature(), 404);
|
||||
abort_if(Auth::user()->profile_id !== $profileId, 404);
|
||||
$media = Media::whereProfileId(Auth::user()->profile_id)->findOrFail($mediaId);
|
||||
|
@ -197,6 +196,7 @@ class BaseApiController extends Controller
|
|||
|
||||
public function uploadMedia(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$this->validate($request, [
|
||||
'file.*' => function() {
|
||||
return [
|
||||
|
@ -278,6 +278,7 @@ class BaseApiController extends Controller
|
|||
|
||||
public function deleteMedia(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$this->validate($request, [
|
||||
'id' => 'required|integer|min:1|exists:media,id'
|
||||
]);
|
||||
|
@ -299,12 +300,21 @@ class BaseApiController extends Controller
|
|||
|
||||
public function verifyCredentials(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
$id = Auth::id();
|
||||
|
||||
$res = Cache::remember('user:account:id:'.$id, now()->addHours(6), function() use($id) {
|
||||
$profile = Profile::whereNull('status')->whereUserId($id)->firstOrFail();
|
||||
$resource = new Fractal\Resource\Item($profile, new AccountTransformer());
|
||||
return $this->fractal->createData($resource)->toArray();
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
$res['source'] = [
|
||||
'privacy' => $profile->is_private ? 'private' : 'public',
|
||||
'sensitive' => $profile->cw ? true : false,
|
||||
'language' => 'en',
|
||||
'note' => '',
|
||||
'fields' => []
|
||||
];
|
||||
return $res;
|
||||
});
|
||||
|
||||
return response()->json($res);
|
||||
|
|
|
@ -21,21 +21,13 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
|||
|
||||
class CommentController extends Controller
|
||||
{
|
||||
public function show(Request $request, $username, int $id, int $cid)
|
||||
{
|
||||
$user = Profile::whereUsername($username)->firstOrFail();
|
||||
$status = Status::whereProfileId($user->id)->whereInReplyToId($id)->findOrFail($cid);
|
||||
|
||||
return view('status.reply', compact('user', 'status'));
|
||||
}
|
||||
|
||||
public function showAll(Request $request, $username, int $id)
|
||||
{
|
||||
$user = Profile::whereUsername($username)->firstOrFail();
|
||||
$status = Status::whereProfileId($user->id)->findOrFail($id);
|
||||
$replies = Status::whereInReplyToId($id)->paginate(40);
|
||||
$profile = Profile::whereNull(['status', 'domain'])->whereUsername($username)->firstOrFail();
|
||||
$status = Status::whereProfileId($profile->id)->findOrFail($id);
|
||||
$replies = Status::whereInReplyToId($id)->simplePaginate(40);
|
||||
|
||||
return view('status.comments', compact('user', 'status', 'replies'));
|
||||
return view('status.comments', compact('profile', 'status', 'replies'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
|
|
|
@ -129,7 +129,7 @@ class FederationController extends Controller
|
|||
$res['openRegistrations'] = config('pixelfed.open_registration');
|
||||
return response()->json($res, 200, [
|
||||
'Access-Control-Allow-Origin' => '*'
|
||||
]);
|
||||
], JSON_PRETTY_PRINT);
|
||||
}
|
||||
|
||||
public function webfinger(Request $request)
|
||||
|
|
|
@ -38,7 +38,6 @@ class FollowerController extends Controller
|
|||
{
|
||||
$user = Auth::user()->profile;
|
||||
|
||||
|
||||
$target = Profile::where('id', '!=', $user->id)->whereNull('status')->findOrFail($item);
|
||||
$private = (bool) $target->is_private;
|
||||
$remote = (bool) $target->domain;
|
||||
|
@ -54,7 +53,7 @@ class FollowerController extends Controller
|
|||
|
||||
$isFollowing = Follower::whereProfileId($user->id)->whereFollowingId($target->id)->exists();
|
||||
|
||||
if($private == true && $isFollowing == 0 || $remote == true) {
|
||||
if($private == true && $isFollowing == 0 && $remote == true) {
|
||||
if($user->following()->count() >= Follower::MAX_FOLLOWING) {
|
||||
abort(400, 'You cannot follow more than ' . Follower::MAX_FOLLOWING . ' accounts');
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ class PublicApiController extends Controller
|
|||
'page' => 'nullable|integer|max:40',
|
||||
'min_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX,
|
||||
'max_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX,
|
||||
'limit' => 'nullable|integer|max:20'
|
||||
'limit' => 'nullable|integer|max:30'
|
||||
]);
|
||||
|
||||
if(config('instance.timeline.local.is_public') == false && !Auth::check()) {
|
||||
|
@ -332,7 +332,7 @@ class PublicApiController extends Controller
|
|||
'page' => 'nullable|integer|max:40',
|
||||
'min_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX,
|
||||
'max_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX,
|
||||
'limit' => 'nullable|integer|max:20'
|
||||
'limit' => 'nullable|integer|max:40'
|
||||
]);
|
||||
|
||||
$page = $request->input('page');
|
||||
|
|
|
@ -38,12 +38,14 @@ trait HomeSettings
|
|||
'name' => 'required|string|max:'.config('pixelfed.max_name_length'),
|
||||
'bio' => 'nullable|string|max:'.config('pixelfed.max_bio_length'),
|
||||
'website' => 'nullable|url',
|
||||
'language' => 'nullable|string|min:2|max:5'
|
||||
]);
|
||||
|
||||
$changes = false;
|
||||
$name = strip_tags(Purify::clean($request->input('name')));
|
||||
$bio = $request->filled('bio') ? strip_tags(Purify::clean($request->input('bio'))) : null;
|
||||
$website = $request->input('website');
|
||||
$language = $request->input('language');
|
||||
$user = Auth::user();
|
||||
$profile = $user->profile;
|
||||
$layout = $request->input('profile_layout');
|
||||
|
@ -51,10 +53,10 @@ trait HomeSettings
|
|||
$layout = !in_array($layout, ['metro', 'moment']) ? 'metro' : $layout;
|
||||
}
|
||||
|
||||
$validate = config('pixelfed.enforce_email_verification');
|
||||
$enforceEmailVerification = config('pixelfed.enforce_email_verification');
|
||||
|
||||
// Only allow email to be updated if not yet verified
|
||||
if (!$validate || !$changes && $user->email_verified_at) {
|
||||
if (!$enforceEmailVerification || !$changes && $user->email_verified_at) {
|
||||
if ($profile->name != $name) {
|
||||
$changes = true;
|
||||
$user->name = $name;
|
||||
|
@ -71,9 +73,12 @@ trait HomeSettings
|
|||
$profile->bio = $bio;
|
||||
}
|
||||
|
||||
if ($profile->profile_layout != $layout) {
|
||||
if($user->language != $language &&
|
||||
in_array($language, \App\Util\Localization\Localization::languages())
|
||||
) {
|
||||
$changes = true;
|
||||
$profile->profile_layout = $layout;
|
||||
$user->language = $language;
|
||||
session()->put('locale', $language);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,11 @@ class SiteController extends Controller
|
|||
// todo: add other locales after pushing new l10n strings
|
||||
$locales = Localization::languages();
|
||||
if(in_array($locale, $locales)) {
|
||||
if($request->user()) {
|
||||
$user = $request->user();
|
||||
$user->language = $locale;
|
||||
$user->save();
|
||||
}
|
||||
session()->put('locale', $locale);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class AuthLogin
|
|||
$this->userState($user);
|
||||
$this->userDevice($user);
|
||||
$this->userProfileId($user);
|
||||
$this->userLanguage($user);
|
||||
}
|
||||
|
||||
protected function userProfile($user)
|
||||
|
@ -132,4 +133,9 @@ class AuthLogin
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected function userLanguage($user)
|
||||
{
|
||||
session()->put('locale', $user->language ?? 'en');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Providers;
|
|||
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
use Laravel\Passport\Passport;
|
||||
use Gate;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -32,14 +33,22 @@ class AuthServiceProvider extends ServiceProvider
|
|||
Passport::enableImplicitGrant();
|
||||
|
||||
Passport::setDefaultScope([
|
||||
'user:read',
|
||||
'user:write'
|
||||
'read',
|
||||
'write',
|
||||
'follow',
|
||||
'push'
|
||||
]);
|
||||
|
||||
Passport::tokensCan([
|
||||
'user:read' => 'Read a user’s profile info and media',
|
||||
'user:write' => 'This scope lets an app "Change your profile information"',
|
||||
'read' => 'Full read access to your account',
|
||||
'write' => 'Full write access to your account',
|
||||
'follow' => 'Ability to follow other profiles',
|
||||
'push' => ''
|
||||
]);
|
||||
}
|
||||
|
||||
Gate::define('viewWebSocketsDashboard', function ($user = null) {
|
||||
return $user->is_admin;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,29 +14,32 @@ class AccountTransformer extends Fractal\TransformerAbstract
|
|||
|
||||
public function transform(Profile $profile)
|
||||
{
|
||||
$is_admin = $profile->domain ? false : $profile->user->is_admin;
|
||||
$local = $profile->domain == null;
|
||||
$is_admin = !$local ? false : $profile->user->is_admin;
|
||||
$acct = $local ? $profile->username : substr($profile->username, 1);
|
||||
$username = $local ? $profile->username : explode('@', $acct)[0];
|
||||
return [
|
||||
'id' => (string) $profile->id,
|
||||
'username' => $profile->username,
|
||||
'acct' => $profile->username,
|
||||
'username' => $username,
|
||||
'acct' => $acct,
|
||||
'display_name' => $profile->name,
|
||||
'locked' => (bool) $profile->is_private,
|
||||
'created_at' => null,
|
||||
'created_at' => $profile->created_at->format('c'),
|
||||
'followers_count' => $profile->followerCount(),
|
||||
'following_count' => $profile->followingCount(),
|
||||
'statuses_count' => (int) $profile->statusCount(),
|
||||
'note' => $profile->bio,
|
||||
'note' => $profile->bio ?? '',
|
||||
'url' => $profile->url(),
|
||||
'avatar' => $profile->avatarUrl(),
|
||||
'avatar_static' => $profile->avatarUrl(),
|
||||
'header' => null,
|
||||
'header_static' => null,
|
||||
'header' => '',
|
||||
'header_static' => '',
|
||||
'header_bg' => $profile->header_bg,
|
||||
'emojis' => [],
|
||||
'moved' => null,
|
||||
'fields' => null,
|
||||
'bot' => null,
|
||||
'fields' => [],
|
||||
'bot' => false,
|
||||
'website' => $profile->website,
|
||||
'software' => 'pixelfed',
|
||||
'is_admin' => (bool) $is_admin,
|
||||
];
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ class NotificationTransformer extends Fractal\TransformerAbstract
|
|||
'id' => (string) $notification->id,
|
||||
'type' => $this->replaceTypeVerb($notification->action),
|
||||
'created_at' => (string) $notification->created_at->format('c'),
|
||||
'account' => null,
|
||||
'status' => null
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLanguageToUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('language')->nullable()->index()->after('status');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('language');
|
||||
});
|
||||
}
|
||||
}
|
BIN
public/img/pixelfed-icon-color.png
Normal file
BIN
public/img/pixelfed-icon-color.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 195 KiB |
BIN
public/js/activity.js
vendored
BIN
public/js/activity.js
vendored
Binary file not shown.
BIN
public/js/collectioncompose.js
vendored
BIN
public/js/collectioncompose.js
vendored
Binary file not shown.
BIN
public/js/collections.js
vendored
BIN
public/js/collections.js
vendored
Binary file not shown.
BIN
public/js/compose-classic.js
vendored
BIN
public/js/compose-classic.js
vendored
Binary file not shown.
BIN
public/js/compose.js
vendored
BIN
public/js/compose.js
vendored
Binary file not shown.
BIN
public/js/profile.js
vendored
BIN
public/js/profile.js
vendored
Binary file not shown.
BIN
public/js/status.js
vendored
BIN
public/js/status.js
vendored
Binary file not shown.
BIN
public/js/timeline.js
vendored
BIN
public/js/timeline.js
vendored
Binary file not shown.
Binary file not shown.
|
@ -115,7 +115,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
fetchNotifications() {
|
||||
axios.get('/api/v1/notifications')
|
||||
axios.get('/api/pixelfed/v1/notifications')
|
||||
.then(res => {
|
||||
let data = res.data.filter(n => {
|
||||
if(n.type == 'share' && !status) {
|
||||
|
@ -136,7 +136,7 @@ export default {
|
|||
$state.complete();
|
||||
return;
|
||||
}
|
||||
axios.get('/api/v1/notifications', {
|
||||
axios.get('/api/pixelfed/v1/notifications', {
|
||||
params: {
|
||||
page: this.notificationCursor
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ export default {
|
|||
methods: {
|
||||
fetchCurrentUser() {
|
||||
if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == true) {
|
||||
axios.get('/api/v1/accounts/verify_credentials').then(res => {
|
||||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||
this.currentUser = res.data;
|
||||
this.owner = this.currentUser.id == this.profileId;
|
||||
});
|
||||
|
|
|
@ -201,7 +201,7 @@ export default {
|
|||
},
|
||||
|
||||
fetchRecentPosts() {
|
||||
axios.get('/api/v1/accounts/' + this.profileId + '/statuses', {
|
||||
axios.get('/api/local/accounts/' + this.profileId + '/statuses', {
|
||||
params: {
|
||||
only_media: true,
|
||||
min_id: 1,
|
||||
|
|
|
@ -295,7 +295,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
fetchProfile() {
|
||||
axios.get('/api/v1/accounts/verify_credentials').then(res => {
|
||||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||
this.profile = res.data;
|
||||
if(res.data.locked == true) {
|
||||
this.visibility = 'private';
|
||||
|
@ -341,7 +341,7 @@ export default {
|
|||
}
|
||||
};
|
||||
|
||||
axios.post('/api/v1/media', form, xhrConfig)
|
||||
axios.post('/api/pixelfed/v1/media', form, xhrConfig)
|
||||
.then(function(e) {
|
||||
self.uploadProgress = 100;
|
||||
self.ids.push(e.data.id);
|
||||
|
@ -373,7 +373,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
let id = this.media[this.carouselCursor].id;
|
||||
axios.delete('/api/v1/media', {
|
||||
axios.delete('/api/pixelfed/v1/media', {
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
|
|
|
@ -400,7 +400,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
fetchProfile() {
|
||||
axios.get('/api/v1/accounts/verify_credentials').then(res => {
|
||||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||
this.profile = res.data;
|
||||
window.pixelfed.currentUser = res.data;
|
||||
if(res.data.locked == true) {
|
||||
|
@ -454,7 +454,7 @@ export default {
|
|||
}
|
||||
};
|
||||
|
||||
axios.post('/api/v1/media', form, xhrConfig)
|
||||
axios.post('/api/pixelfed/v1/media', form, xhrConfig)
|
||||
.then(function(e) {
|
||||
self.uploadProgress = 100;
|
||||
self.ids.push(e.data.id);
|
||||
|
@ -516,7 +516,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
let id = this.media[this.carouselCursor].id;
|
||||
axios.delete('/api/v1/media', {
|
||||
axios.delete('/api/pixelfed/v1/media', {
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
|
||||
methods: {
|
||||
fetchNotifications() {
|
||||
axios.get('/api/v1/notifications')
|
||||
axios.get('/api/pixelfed/v1/notifications')
|
||||
.then(res => {
|
||||
let data = res.data.filter(n => {
|
||||
if(n.type == 'share' && !status) {
|
||||
|
@ -103,7 +103,7 @@
|
|||
$state.complete();
|
||||
return;
|
||||
}
|
||||
axios.get('/api/v1/notifications', {
|
||||
axios.get('/api/pixelfed/v1/notifications', {
|
||||
params: {
|
||||
page: this.notificationCursor
|
||||
}
|
||||
|
@ -171,7 +171,7 @@
|
|||
let interval = this.notifications.length > 5 ? 15000 : 120000;
|
||||
let self = this;
|
||||
setInterval(function() {
|
||||
axios.get('/api/v1/notifications')
|
||||
axios.get('/api/pixelfed/v1/notifications')
|
||||
.then(res => {
|
||||
let data = res.data.filter(n => {
|
||||
if(n.type == 'share' || self.notificationMaxId >= n.id) {
|
||||
|
|
|
@ -370,7 +370,7 @@
|
|||
<a class="text-lighter text-decoration-none" :href="reply.url">{{timeAgo(reply.created_at)}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<p v-html="reply.content" style="word-break: break-all;"></p>
|
||||
<p v-html="reply.content"></p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="media mb-3">
|
||||
|
@ -1106,7 +1106,7 @@ export default {
|
|||
this.fetchData();
|
||||
return;
|
||||
} else {
|
||||
axios.get('/api/v1/accounts/relationships', {
|
||||
axios.get('/api/pixelfed/v1/accounts/relationships', {
|
||||
params: {
|
||||
'id[]': this.statusProfileId
|
||||
}
|
||||
|
|
|
@ -583,7 +583,7 @@
|
|||
this.followingModal();
|
||||
}
|
||||
if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == true) {
|
||||
axios.get('/api/v1/accounts/verify_credentials').then(res => {
|
||||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||
this.user = res.data;
|
||||
});
|
||||
}
|
||||
|
@ -595,7 +595,7 @@
|
|||
|
||||
methods: {
|
||||
fetchProfile() {
|
||||
axios.get('/api/v1/accounts/' + this.profileId).then(res => {
|
||||
axios.get('/api/pixelfed/v1/accounts/' + this.profileId).then(res => {
|
||||
this.profile = res.data;
|
||||
}).then(res => {
|
||||
this.fetchPosts();
|
||||
|
@ -603,7 +603,7 @@
|
|||
},
|
||||
|
||||
fetchPosts() {
|
||||
let apiUrl = '/api/v1/accounts/' + this.profileId + '/statuses';
|
||||
let apiUrl = '/api/pixelfed/v1/accounts/' + this.profileId + '/statuses';
|
||||
axios.get(apiUrl, {
|
||||
params: {
|
||||
only_media: true,
|
||||
|
@ -641,7 +641,7 @@
|
|||
$state.complete();
|
||||
return;
|
||||
}
|
||||
let apiUrl = '/api/v1/accounts/' + this.profileId + '/statuses';
|
||||
let apiUrl = '/api/pixelfed/v1/accounts/' + this.profileId + '/statuses';
|
||||
axios.get(apiUrl, {
|
||||
params: {
|
||||
only_media: true,
|
||||
|
@ -800,7 +800,7 @@
|
|||
if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == false) {
|
||||
return;
|
||||
}
|
||||
axios.get('/api/v1/accounts/relationships', {
|
||||
axios.get('/api/pixelfed/v1/accounts/relationships', {
|
||||
params: {
|
||||
'id[]': this.profileId
|
||||
}
|
||||
|
@ -935,7 +935,7 @@
|
|||
this.$refs.followingModal.show();
|
||||
return;
|
||||
} else {
|
||||
axios.get('/api/v1/accounts/'+this.profileId+'/following', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profileId+'/following', {
|
||||
params: {
|
||||
page: this.followingCursor
|
||||
}
|
||||
|
@ -964,7 +964,7 @@
|
|||
this.$refs.followerModal.show();
|
||||
return;
|
||||
} else {
|
||||
axios.get('/api/v1/accounts/'+this.profileId+'/followers', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profileId+'/followers', {
|
||||
params: {
|
||||
page: this.followerCursor
|
||||
}
|
||||
|
@ -986,7 +986,7 @@
|
|||
window.location.href = encodeURI('/login?next=/' + this.profile.username + '/');
|
||||
return;
|
||||
}
|
||||
axios.get('/api/v1/accounts/'+this.profile.id+'/following', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profile.id+'/following', {
|
||||
params: {
|
||||
page: this.followingCursor
|
||||
}
|
||||
|
@ -1007,7 +1007,7 @@
|
|||
if($('body').hasClass('loggedIn') == false) {
|
||||
return;
|
||||
}
|
||||
axios.get('/api/v1/accounts/'+this.profile.id+'/followers', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profile.id+'/followers', {
|
||||
params: {
|
||||
page: this.followerCursor
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@
|
|||
<a href="/site/language" class="text-dark pr-2">Language</a>
|
||||
<a href="/site/terms" class="text-dark pr-2">Terms</a>
|
||||
<a href="/site/privacy" class="text-dark pr-2">Privacy</a>
|
||||
<a href="/site/platform" class="text-dark pr-2">API</a>
|
||||
<a href="/discover/places" class="text-dark pr-2">Places</a>
|
||||
</p>
|
||||
<p class="mb-0 text-uppercase font-weight-bold text-muted small">
|
||||
<a href="http://pixelfed.org" class="text-muted" rel="noopener" title="" data-toggle="tooltip">Powered by Pixelfed</a>
|
||||
|
@ -353,70 +353,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <b-modal ref="followingModal"
|
||||
id="following-modal"
|
||||
hide-footer
|
||||
centered
|
||||
title="Following"
|
||||
body-class="list-group-flush p-0">
|
||||
<div class="list-group">
|
||||
<div class="list-group-item border-0" v-for="(user, index) in following" :key="'following_'+index">
|
||||
<div class="media">
|
||||
<a :href="user.url">
|
||||
<img class="mr-3 rounded-circle box-shadow" :src="user.avatar" :alt="user.username + '’s avatar'" width="30px">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<p class="mb-0" style="font-size: 14px">
|
||||
<a :href="user.url" class="font-weight-bold text-dark">
|
||||
{{user.username}}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-muted mb-0" style="font-size: 14px">
|
||||
{{user.display_name}}
|
||||
</p>
|
||||
</div>
|
||||
<a class="btn btn-outline-secondary btn-sm" href="#" @click.prevent="followModalAction(user.id, index, 'following')">Unfollow</a>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="following.length == 0" class="list-group-item border-0">
|
||||
<div class="list-group-item border-0">
|
||||
<p class="p-3 text-center mb-0 lead">You are not following anyone.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="following.length != 0 && followingMore" class="list-group-item text-center" v-on:click="followingLoadMore()">
|
||||
<p class="mb-0 small text-muted font-weight-light cursor-pointer">Load more</p>
|
||||
</div>
|
||||
</div>
|
||||
</b-modal>
|
||||
<b-modal ref="followerModal"
|
||||
id="follower-modal"
|
||||
hide-footer
|
||||
centered
|
||||
title="Followers"
|
||||
body-class="list-group-flush p-0">
|
||||
<div class="list-group">
|
||||
<div class="list-group-item border-0" v-for="(user, index) in followers" :key="'follower_'+index">
|
||||
<div class="media">
|
||||
<a :href="user.url">
|
||||
<img class="mr-3 rounded-circle box-shadow" :src="user.avatar" :alt="user.username + '’s avatar'" width="30px">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<p class="mb-0" style="font-size: 14px">
|
||||
<a :href="user.url" class="font-weight-bold text-dark">
|
||||
{{user.username}}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-muted mb-0" style="font-size: 14px">
|
||||
{{user.display_name}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="followerMore" class="list-group-item text-center" v-on:click="followersLoadMore()">
|
||||
<p class="mb-0 small text-muted font-weight-light cursor-pointer">Load more</p>
|
||||
</div>
|
||||
</div>
|
||||
</b-modal> -->
|
||||
<b-modal ref="ctxModal"
|
||||
id="ctx-modal"
|
||||
hide-header
|
||||
|
@ -581,13 +517,6 @@
|
|||
beforeMount() {
|
||||
this.fetchProfile();
|
||||
this.fetchTimelineApi();
|
||||
|
||||
// if(this.config.announcement.enabled == true) {
|
||||
// let msg = $('<div>')
|
||||
// .addClass('alert alert-warning mb-0 rounded-0 text-center font-weight-bold')
|
||||
// .html(this.config.announcement.message);
|
||||
// $('body').prepend(msg);
|
||||
// }
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
@ -630,7 +559,7 @@
|
|||
|
||||
methods: {
|
||||
fetchProfile() {
|
||||
axios.get('/api/v1/accounts/verify_credentials').then(res => {
|
||||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||
this.profile = res.data;
|
||||
if(this.profile.is_admin == true) {
|
||||
this.modes.mod = true;
|
||||
|
@ -652,21 +581,21 @@
|
|||
let apiUrl = false;
|
||||
switch(this.scope) {
|
||||
case 'home':
|
||||
apiUrl = '/api/v1/timelines/home';
|
||||
apiUrl = '/api/pixelfed/v1/timelines/home';
|
||||
break;
|
||||
|
||||
case 'local':
|
||||
apiUrl = '/api/v1/timelines/public';
|
||||
apiUrl = '/api/pixelfed/v1/timelines/public';
|
||||
break;
|
||||
|
||||
case 'network':
|
||||
apiUrl = '/api/v1/timelines/network';
|
||||
apiUrl = '/api/pixelfed/v1/timelines/network';
|
||||
break;
|
||||
}
|
||||
axios.get(apiUrl, {
|
||||
params: {
|
||||
max_id: this.max_id,
|
||||
limit: 6
|
||||
limit: 4
|
||||
}
|
||||
}).then(res => {
|
||||
let data = res.data;
|
||||
|
@ -675,15 +604,20 @@
|
|||
this.ids = ids;
|
||||
this.min_id = Math.max(...ids);
|
||||
this.max_id = Math.min(...ids);
|
||||
$('.timeline .pagination').removeClass('d-none');
|
||||
this.loading = false;
|
||||
if(this.feed.length == 6) {
|
||||
this.fetchHashtagPosts();
|
||||
$('.timeline .pagination').removeClass('d-none');
|
||||
if(this.feed.length == 4) {
|
||||
this.fetchTimelineApi();
|
||||
} else {
|
||||
}
|
||||
if(this.hashtagPosts.length == 0) {
|
||||
this.fetchHashtagPosts();
|
||||
}
|
||||
}).catch(err => {
|
||||
swal(
|
||||
'Oops, something went wrong',
|
||||
'Please reload the page.',
|
||||
'error'
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -695,21 +629,21 @@
|
|||
let apiUrl = false;
|
||||
switch(this.scope) {
|
||||
case 'home':
|
||||
apiUrl = '/api/v1/timelines/home';
|
||||
apiUrl = '/api/pixelfed/v1/timelines/home';
|
||||
break;
|
||||
|
||||
case 'local':
|
||||
apiUrl = '/api/v1/timelines/public';
|
||||
apiUrl = '/api/pixelfed/v1/timelines/public';
|
||||
break;
|
||||
|
||||
case 'network':
|
||||
apiUrl = '/api/v1/timelines/network';
|
||||
apiUrl = '/api/pixelfed/v1/timelines/network';
|
||||
break;
|
||||
}
|
||||
axios.get(apiUrl, {
|
||||
params: {
|
||||
max_id: this.max_id,
|
||||
limit: 9
|
||||
limit: 6
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.data.length && this.loading == false) {
|
||||
|
@ -735,32 +669,6 @@
|
|||
});
|
||||
},
|
||||
|
||||
loadMore(event) {
|
||||
let homeTimeline = '/api/v1/timelines/home';
|
||||
let localTimeline = '/api/v1/timelines/public';
|
||||
let apiUrl = this.scope == 'home' ? homeTimeline : localTimeline;
|
||||
event.target.innerText = 'Loading...';
|
||||
axios.get(apiUrl, {
|
||||
params: {
|
||||
page: this.page,
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.data.length && this.loading == false) {
|
||||
let data = res.data;
|
||||
let ids = data.map(status => status.id);
|
||||
this.min_id = Math.min(...ids);
|
||||
if(this.page == 1) {
|
||||
this.max_id = Math.max(...ids);
|
||||
}
|
||||
this.feed.push(...data);
|
||||
this.page += 1;
|
||||
this.loading = false;
|
||||
event.target.innerText = 'Load more posts';
|
||||
} else {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
reportUrl(status) {
|
||||
let type = status.in_reply_to ? 'comment' : 'post';
|
||||
let id = status.id;
|
||||
|
@ -816,27 +724,11 @@
|
|||
return ts.toDateString() + ' ' + ts.toLocaleTimeString();
|
||||
},
|
||||
|
||||
editUrl(status) {
|
||||
return status.url + '/edit';
|
||||
},
|
||||
|
||||
redirect(url) {
|
||||
window.location.href = url;
|
||||
return;
|
||||
},
|
||||
|
||||
replyUrl(status) {
|
||||
let username = this.profile.username;
|
||||
let id = status.account.id == this.profile.id ? status.id : status.in_reply_to_id;
|
||||
return '/p/' + username + '/' + id;
|
||||
},
|
||||
|
||||
mentionUrl(status) {
|
||||
let username = status.account.username;
|
||||
let id = status.id;
|
||||
return '/p/' + username + '/' + id;
|
||||
},
|
||||
|
||||
statusOwner(status) {
|
||||
let sid = status.account.id;
|
||||
let uid = this.profile.id;
|
||||
|
@ -1068,7 +960,7 @@
|
|||
this.$refs.followingModal.show();
|
||||
return;
|
||||
}
|
||||
axios.get('/api/v1/accounts/'+this.profile.id+'/following', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profile.id+'/following', {
|
||||
params: {
|
||||
page: this.followingCursor
|
||||
}
|
||||
|
@ -1088,7 +980,7 @@
|
|||
this.$refs.followerModal.show();
|
||||
return;
|
||||
}
|
||||
axios.get('/api/v1/accounts/'+this.profile.id+'/followers', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profile.id+'/followers', {
|
||||
params: {
|
||||
page: this.followerCursor
|
||||
}
|
||||
|
@ -1104,7 +996,7 @@
|
|||
},
|
||||
|
||||
followingLoadMore() {
|
||||
axios.get('/api/v1/accounts/'+this.profile.id+'/following', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profile.id+'/following', {
|
||||
params: {
|
||||
page: this.followingCursor
|
||||
}
|
||||
|
@ -1121,7 +1013,7 @@
|
|||
},
|
||||
|
||||
followersLoadMore() {
|
||||
axios.get('/api/v1/accounts/'+this.profile.id+'/followers', {
|
||||
axios.get('/api/pixelfed/v1/accounts/'+this.profile.id+'/followers', {
|
||||
params: {
|
||||
page: this.followerCursor
|
||||
}
|
||||
|
@ -1153,6 +1045,8 @@
|
|||
},
|
||||
|
||||
expRec() {
|
||||
return;
|
||||
|
||||
if(this.config.ab.rec == false) {
|
||||
return;
|
||||
}
|
||||
|
@ -1163,6 +1057,8 @@
|
|||
},
|
||||
|
||||
expRecFollow(id, index) {
|
||||
return;
|
||||
|
||||
if(this.config.ab.rec == false) {
|
||||
return;
|
||||
}
|
||||
|
@ -1234,6 +1130,8 @@
|
|||
},
|
||||
|
||||
refreshSuggestions() {
|
||||
return;
|
||||
|
||||
let el = event.target.parentNode;
|
||||
if(el.classList.contains('disabled') == true) {
|
||||
return;
|
||||
|
@ -1290,14 +1188,14 @@
|
|||
|
||||
ctxMenu(status) {
|
||||
this.ctxMenuStatus = status;
|
||||
let payload = '<div class="pixlfed-media" data-id="'+ this.ctxMenuStatus.id + '"></div><script ';
|
||||
payload += 'src="https://pixelfed.dev/js/embed.js" async><';
|
||||
payload += '/script>';
|
||||
this.ctxEmbedPayload = payload;
|
||||
// let payload = '<div class="pixlfed-media" data-id="'+ this.ctxMenuStatus.id + '"></div><script ';
|
||||
// payload += 'src="https://pixelfed.dev/js/embed.js" async><';
|
||||
// payload += '/script>';
|
||||
// this.ctxEmbedPayload = payload;
|
||||
if(status.account.id == this.profile.id) {
|
||||
this.$refs.ctxModal.show();
|
||||
} else {
|
||||
axios.get('/api/v1/accounts/relationships', {
|
||||
axios.get('/api/pixelfed/v1/accounts/relationships', {
|
||||
params: {
|
||||
'id[]': status.account.id
|
||||
}
|
||||
|
@ -1411,8 +1309,7 @@
|
|||
|
||||
hideTips() {
|
||||
this.showTips = false;
|
||||
let ls = window.localStorage;
|
||||
ls.setItem('metro-tips', false);
|
||||
window.localStorage.setItem('metro-tips', false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
18
resources/lang/cy/auth.php
Normal file
18
resources/lang/cy/auth.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
'failed' => 'Nid yw\'r manylion mewngofnodi hyn yn cyd-fynd â\'n cofnodion.',
|
||||
'throttle' => 'Gormod o ymdrechion mewngofnodi. Rhowch gynnig arall arni mewn :seconds eiliadau.',
|
||||
|
||||
];
|
26
resources/lang/cy/helpcenter.php
Normal file
26
resources/lang/cy/helpcenter.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'helpcenter' => 'Canolfan Cymorth',
|
||||
'whatsnew' => 'Beth Sy\'n Newydd',
|
||||
|
||||
'gettingStarted' => 'Cychwyn Arni',
|
||||
'sharingMedia' => 'Rhannu Cyfryngau',
|
||||
'profile' => 'Proffil',
|
||||
'stories' => 'Straeon',
|
||||
'hashtags' => 'Hashnodau',
|
||||
'discover' => 'Darganfod',
|
||||
'directMessages' => 'Negeseuon Uniongyrchol',
|
||||
'timelines' => 'Llinellau Amser',
|
||||
'embed' => 'Gwreiddio',
|
||||
|
||||
'communityGuidelines' => 'Canllawiau Cymunedol',
|
||||
'whatIsTheFediverse' => 'Beth yw\'r Fediverse?',
|
||||
'controllingVisibility' => 'Rheoli Gwelededd',
|
||||
'blockingAccounts' => 'Cyfrifon Blocio',
|
||||
'safetyTips' => 'Awgrymiadau Diogelwch',
|
||||
'reportSomething' => 'Riportio Rhywbeth',
|
||||
'dataPolicy' => 'Polisi Data'
|
||||
|
||||
];
|
20
resources/lang/cy/navmenu.php
Normal file
20
resources/lang/cy/navmenu.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'search' => 'Chwilio',
|
||||
'home' => 'Hafan',
|
||||
'local' => 'Lleol',
|
||||
'network' => 'Rhwydwaith',
|
||||
'discover' => 'Darganfod',
|
||||
'viewMyProfile' => 'Gweld fy mhroffil',
|
||||
'myProfile' => 'Fy Mhroffil',
|
||||
'myTimeline' => 'Fy Llinell Amser',
|
||||
'publicTimeline' => 'Llinell Amser Gyhoeddus',
|
||||
'remoteFollow' => 'Dilyn o Bell',
|
||||
'settings' => 'Gosodiadau',
|
||||
'admin' => 'Admin',
|
||||
'logout' => 'Allgofnodi',
|
||||
'directMessages' => 'Negeseuon Uniongyrchol',
|
||||
|
||||
];
|
12
resources/lang/cy/notification.php
Normal file
12
resources/lang/cy/notification.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'likedPhoto' => 'wedi hoffi eich post.',
|
||||
'likedComment' => 'wedi hoffi eich sylw.',
|
||||
'startedFollowingYou' => 'wedi dechrau eich dilyn .',
|
||||
'commented' => 'gwnaeth sylwadau ar eich swydd.',
|
||||
'mentionedYou' => 'soniodd amdanoch chi.',
|
||||
'shared' => 'wedi rhannu eich post.',
|
||||
|
||||
];
|
19
resources/lang/cy/pagination.php
Normal file
19
resources/lang/cy/pagination.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Blaenorol',
|
||||
'next' => 'Nesaf »',
|
||||
|
||||
];
|
22
resources/lang/cy/passwords.php
Normal file
22
resources/lang/cy/passwords.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'Rhaid i\'r cyfrineiriau fod o leiaf chwe nod ac yn cyfateb i\'r cadarnhad.',
|
||||
'reset' => 'Mae eich cyfrinair wedi\'i ailosod!',
|
||||
'sent' => 'Os yw\'ch cyfeiriad e-bost yn bodoli yn ein cronfa ddata, byddwch yn derbyn dolen adfer cyfrinair yn eich cyfeiriad e-bost mewn ychydig funudau. Gwiriwch eich ffolder sbam os na dderbynioch yr e-bost hwn.',
|
||||
'token' => 'Mae\'r tocyn ailosod cyfrinair hwn yn annilys.',
|
||||
'user' => 'Os yw\'ch cyfeiriad e-bost yn bodoli yn ein cronfa ddata, byddwch yn derbyn dolen adfer cyfrinair yn eich cyfeiriad e-bost mewn ychydig funudau. Gwiriwch eich ffolder sbam os na dderbynioch yr e-bost hwn.',
|
||||
|
||||
];
|
17
resources/lang/cy/profile.php
Normal file
17
resources/lang/cy/profile.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'emptyTimeline' => 'Nid oes gan y defnyddiwr hwn swyddi eto!',
|
||||
'emptyFollowers' => 'Nid oes gan y defnyddiwr hwn ddilynwyr eto!',
|
||||
'emptyFollowing' => 'Nid yw\'r defnyddiwr hwn yn dilyn unrhyw un eto!',
|
||||
'emptySaved' => 'Nid ydych wedi arbed unrhyw bostiadau eto!',
|
||||
'savedWarning' => 'Dim ond chi sy\'n gallu gweld beth rydych chi wedi\'i arbed',
|
||||
'privateProfileWarning' => 'Mae\'r Cyfrif hwn yn Breifat',
|
||||
'alreadyFollow' => 'Eisoes yn dilyn :username?',
|
||||
'loginToSeeProfile' => 'i weld eu lluniau a\'u fideos.',
|
||||
|
||||
'status.disabled.header' => 'Proffil Ddim ar Gael',
|
||||
'status.disabled.body' => 'Mae\'n ddrwg gennym, nid yw\'r proffil hwn ar gael ar hyn o bryd. Rhowch gynnig arall arni cyn bo hir.',
|
||||
|
||||
];
|
18
resources/lang/cy/site.php
Normal file
18
resources/lang/cy/site.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'about' => 'Amdamon',
|
||||
'help' => 'Help',
|
||||
'language' => 'Iaith',
|
||||
'fediverse' => 'Ffedirasiwn',
|
||||
'opensource' => 'Ffynhonnell Agor',
|
||||
'terms' => 'Termau',
|
||||
'privacy' => 'Preifatrwydd',
|
||||
'l10nWip' => 'Rydym yn dal i weithio ar gymorth lleoleiddio',
|
||||
'currentLocale' => 'Locale Cyfredol',
|
||||
'selectLocale' => 'Dewiswch un o\'r ieithoedd a gefnogir',
|
||||
'contact' => 'Cysylltu',
|
||||
'contact-us' => 'Cysylltu â Ni',
|
||||
|
||||
];
|
7
resources/lang/cy/timeline.php
Normal file
7
resources/lang/cy/timeline.php
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'emptyPersonalTimeline' => 'Mae eich llinell amser yn wag.',
|
||||
|
||||
];
|
122
resources/lang/cy/validation.php
Normal file
122
resources/lang/cy/validation.php
Normal file
|
@ -0,0 +1,122 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'Rhaid derbyn y :attribute.',
|
||||
'active_url' => 'Nid yw\'r :attribute yn URL dilys.',
|
||||
'after' => 'Rhaid i\'r :attribute fod yn ddyddiad ar ôl :date.',
|
||||
'after_or_equal' => 'Rhaid i\'r :attribute fod yn ddyddiad ar ôl neu\'n hafal i :date.',
|
||||
'alpha' => 'Dim ond llythyrau y gall y :attribute eu cynnwys.',
|
||||
'alpha_dash' => 'Dim ond llythrennau, rhifau a thaenau y gall y :attribute eu cynnwys.',
|
||||
'alpha_num' => 'Dim ond llythrennau a rhifau y gall y :attribute eu cynnwys.',
|
||||
'array' => 'Rhaid i\'r :attribute fod yn arae.',
|
||||
'before' => 'Rhaid i\'r :attribute fod yn ddyddiad cyn :date.',
|
||||
'before_or_equal' => 'Rhaid i\'r :attribute fod yn ddyddiad cyn neu\'n hafal i :date.',
|
||||
'between' => [
|
||||
'numeric' => 'Rhaid i\'r :attribute fod rhwng :min a :max.',
|
||||
'file' => 'Rhaid i\'r :attribute fod rhwng :min a :max cilobytes.',
|
||||
'string' => 'Rhaid i\'r :attribute fod rhwng :min a :max nodau.',
|
||||
'array' => 'Rhaid i\'r :attribute fod rhwng :min a :max eitem.',
|
||||
],
|
||||
'boolean' => 'Rhaid i\'r maes :attribute fod yn wir neu\'n anwir.',
|
||||
'confirmed' => 'Nid yw\'r cadarnhad :attribute yn cyfateb.',
|
||||
'date' => 'Nid yw\'r :attribute yn ddyddiad dilys.',
|
||||
'date_format' => 'Nid yw\'r :attribute yn cyd-fynd â\'r fformat :format.',
|
||||
'different' => 'Rhaid i\'r :attribute a\'r :other fod yn wahanol.',
|
||||
'digits' => 'Rhaid i\'r :attribute fod yn :digits digid.',
|
||||
'digits_between' => 'Rhaid i\'r :attribute fod rhwng :min a :max digid.',
|
||||
'dimensions' => 'Mae gan y :attribute ddimensiynau delwedd annilys.',
|
||||
'distinct' => 'Mae gan y maes :attribute werthoedd dyblyg.',
|
||||
'email' => 'Rhaid i\'r :attribute fod yn gyfeiriad e-bost dilys.',
|
||||
'exists' => 'Mae\'r :attribute a ddewiswyd yn annilys.',
|
||||
'file' => 'Rhaid i\'r :attribute fod yn ffeil.',
|
||||
'filled' => 'Rhaid bod gwerth i\'r maes :attribute.',
|
||||
'image' => 'Rhaid i\'r :attribute fod yn ddelwedd.',
|
||||
'in' => 'Mae\'r :attribute a ddewiswyd yn annilys.',
|
||||
'in_array' => 'Nid yw\'r maes :attribute yn bodoli yn :other.',
|
||||
'integer' => 'Rhaid i\'r :attribute fod yn gyfanrif.',
|
||||
'ip' => 'Rhaid i\'r :attribute fod yn gyfeiriad IP dilys.',
|
||||
'ipv4' => 'Rhaid i\'r :attribute fod yn gyfeiriad IPv4 dilys.',
|
||||
'ipv6' => 'Rhaid i\'r :attribute fod yn gyfeiriad IPv6 dilys.',
|
||||
'json' => 'Rhaid i\'r :attribute fod yn llinyn JSON dilys.',
|
||||
'max' => [
|
||||
'numeric' => 'Efallai na fydd y :attribute yn fwy na :max.',
|
||||
'file' => 'Efallai na fydd y :attribute yn fwy na :max cilobytes.',
|
||||
'string' => 'Efallai na fydd y :attribute yn fwy na :max nodau.',
|
||||
'array' => 'Efallai na fydd y :attribute yn fwy na :max eitem.',
|
||||
],
|
||||
'mimes' => 'Rhaid i\'r :attribute fod yn ffeil o fath: :values.',
|
||||
'mimetypes' => 'Rhaid i\'r :attribute fod yn ffeil o fath: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'Rhaid i\'r :attribute fod o leiaf :min.',
|
||||
'file' => 'Rhaid i\'r :attribute fod o leiaf :min cilobytes.',
|
||||
'string' => 'Rhaid i\'r :attribute fod o leiaf :min nodau.',
|
||||
'array' => 'Rhaid i\'r :attribute fod o leiaf :min eitem.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute format is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => ':attribute rhaid bod :size.',
|
||||
'file' => ':attribute rhaid bod :size cilobytes.',
|
||||
'string' => ':attribute rhaid bod :size nodau.',
|
||||
'array' => ':attribute rhaid bod :size eitem.',
|
||||
],
|
||||
'string' => ':attribute rhaid fod yn llinyn.',
|
||||
'timezone' => ':attribute rhaid fod yn barth dilys.',
|
||||
'unique' => ':attribute eisoes wedi\'u cymryd.',
|
||||
'uploaded' => ':attribute wedi methu llwytho i fyny.',
|
||||
'url' => ':attribute fformat yn annilys.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
|
@ -37,25 +37,25 @@
|
|||
<form method="post">
|
||||
@csrf
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-sm-3 col-form-label font-weight-bold text-right">Name</label>
|
||||
<label for="name" class="col-sm-3 col-form-label font-weight-bold">Name</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Your Name" value="{{Auth::user()->profile->name}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="username" class="col-sm-3 col-form-label font-weight-bold text-right">Username</label>
|
||||
<label for="username" class="col-sm-3 col-form-label font-weight-bold">Username</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="username" name="username" placeholder="Username" value="{{Auth::user()->profile->username}}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="website" class="col-sm-3 col-form-label font-weight-bold text-right">Website</label>
|
||||
<label for="website" class="col-sm-3 col-form-label font-weight-bold">Website</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="website" name="website" placeholder="Website" value="{{Auth::user()->profile->website}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="bio" class="col-sm-3 col-form-label font-weight-bold text-right">Bio</label>
|
||||
<label for="bio" class="col-sm-3 col-form-label font-weight-bold">Bio</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control" id="bio" name="bio" placeholder="Add a bio here" rows="2" data-max-length="{{config('pixelfed.max_bio_length')}}">{{Auth::user()->profile->bio}}</textarea>
|
||||
<p class="form-text">
|
||||
|
@ -63,11 +63,21 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="bio" class="col-sm-3 col-form-label font-weight-bold">Language</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="language">
|
||||
@foreach(App\Util\Localization\Localization::languages() as $lang)
|
||||
<option value="{{$lang}}" {{Auth::user()->language == $lang ? 'selected':''}}>{{locale_get_display_language($lang, 'en')}} - {{locale_get_display_language($lang, $lang)}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-3">
|
||||
<p class="font-weight-bold text-muted text-center">Storage Usage</p>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="email" class="col-sm-3 col-form-label font-weight-bold text-right">Storage Used</label>
|
||||
<label class="col-sm-3 col-form-label font-weight-bold">Storage Used</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="progress mt-2">
|
||||
<div class="progress-bar" role="progressbar" style="width: {{$storage['percentUsed']}}%" aria-valuenow="{{$storage['percentUsed']}}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
@extends('site.partial.template')
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('section')
|
||||
|
||||
<div class="title">
|
||||
<h3 class="font-weight-bold">{{__('site.language')}}</h3>
|
||||
@section('content')
|
||||
@php($current = App::getLocale())
|
||||
<div class="container mt-5">
|
||||
<div class="col-12">
|
||||
<p class="font-weight-bold text-lighter text-uppercase">{{__('site.language')}}</p>
|
||||
<div class="card border shadow-none">
|
||||
<div class="card-body row pl-md-5 ml-md-5">
|
||||
@foreach(App\Util\Localization\Localization::languages() as $lang)
|
||||
<div class="col-12 col-md-4 mb-2">
|
||||
<a href="/i/lang/{{$lang}}" class="{{$current == $lang ? 'font-weight-bold text-primary' : 'text-muted'}} pr-3 b-3">{{locale_get_display_language($lang, $lang)}}</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="alert alert-info font-weight-bold">{{__('site.l10nWip')}}!</div>
|
||||
<p class="font-weight-light">{{__('site.currentLocale')}}: <span class="font-weight-bold">{{App::getLocale()}}</span></p>
|
||||
<p class="font-weight-light">{{__('site.selectLocale')}}:</p>
|
||||
<ul class="list-group">
|
||||
@foreach(App\Util\Localization\Localization::languages() as $lang)
|
||||
<a class="list-group-item font-weight-bold" href="/i/lang/{{$lang}}">{{locale_get_display_language($lang, $lang)}}</a>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('meta')
|
||||
<meta property="og:description" content="Language">
|
||||
<meta property="og:description" content="Change Site Language">
|
||||
@endpush
|
||||
|
|
|
@ -1,96 +1,95 @@
|
|||
@extends('site.partial.template')
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('section')
|
||||
@section('content')
|
||||
<div class="container mt-5">
|
||||
<div class="col-12">
|
||||
<p class="font-weight-bold text-lighter text-uppercase">Privacy Policy</p>
|
||||
<div class="card border shadow-none">
|
||||
<div class="card-body p-md-5 text-justify mx-md-3">
|
||||
@if($page && $page->content)
|
||||
{!! $page->content !!}
|
||||
@else
|
||||
<div class="terms">
|
||||
<h5 class="font-weight-bold" id="1">1. What information do we collect?</h5>
|
||||
<ul class=" pl-4">
|
||||
<li>
|
||||
Basic account information: If you register on this server, you may be asked to enter a username, an e-mail address and a password. You may also enter additional profile information such as a display name and biography, and upload a profile picture and header image. The username, display name, biography and avatar image are always listed publicly.
|
||||
</li>
|
||||
<li>
|
||||
Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
|
||||
</li>
|
||||
<li>
|
||||
Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it’s important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Pixelfed.
|
||||
</li>
|
||||
<li>
|
||||
IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
|
||||
</li>
|
||||
</ul>
|
||||
<h5 class="font-weight-bold mt-5" id="2">2. What do we use your information for?</h5>
|
||||
|
||||
@if($page && $page->content)
|
||||
<div class="title">
|
||||
<h3 class="font-weight-bold">Privacy Policy</h3>
|
||||
<p class="">Any of the information we collect from you may be used in the following ways:</p>
|
||||
<ul class=" pl-4">
|
||||
<li>
|
||||
To provide the core functionality of Pixelfed. You can only interact with other people’s content and post your own content when you are logged in. For example, you may follow other people to view their combined posts in your own personalized home timeline.
|
||||
</li>
|
||||
<li>
|
||||
To aid moderation of the community, for example comparing your IP address with other known ones to determine ban evasion or other violations.
|
||||
</li>
|
||||
<li>
|
||||
The email address you provide may be used to send you information, notifications about other people interacting with your content or sending you messages, and to respond to inquiries, and/or other requests or questions.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h5 class="font-weight-bold mt-5" id="3">3. How do we protect your information?</h5>
|
||||
<p class="">We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information. Among other things, your browser session, as well as the traffic between your applications and the API, are secured with SSL, and your password is hashed using a strong one-way algorithm. You may enable two-factor authentication to further secure access to your account.</p>
|
||||
|
||||
|
||||
<h5 class="font-weight-bold mt-5" id="4">4. What is our data retention policy?</h5>
|
||||
<p class="">We will make a good faith effort to:</p>
|
||||
<ul class=" pl-4">
|
||||
<li>
|
||||
Retain server logs containing the IP address of all requests to this server, in so far as such logs are kept, no more than 90 days.
|
||||
</li>
|
||||
<li>
|
||||
Retain the IP addresses associated with registered users no more than 12 months.
|
||||
</li>
|
||||
<li>
|
||||
You can request and download an archive of your content, including your posts, media attachments, profile picture, and header image.
|
||||
</li>
|
||||
</ul>
|
||||
<p class="">You may irreversibly delete your account at any time.</p>
|
||||
|
||||
<h5 class="font-weight-bold mt-5" id="5">5. Do we use cookies?</h5>
|
||||
<p class="">Yes. Cookies are small files that a site or its service provider transfers to your computer’s hard drive through your Web browser (if you allow). These cookies enable the site to recognize your browser and, if you have a registered account, associate it with your registered account.
|
||||
</p>
|
||||
<p class="">We use cookies to understand and save your preferences for future visits.</p>
|
||||
|
||||
<h5 class="font-weight-bold mt-5" id="6">6. Do we disclose any information to outside parties?</h5>
|
||||
<p class="">We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our site, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety.</p>
|
||||
<p class="">Your public content may be downloaded by other servers in the network. Your public and followers-only posts are delivered to the servers where your followers reside, and direct messages are delivered to the servers of the recipients, in so far as those followers or recipients reside on a different server than this.</p>
|
||||
<p class="">When you authorize an application to use your account, depending on the scope of permissions you approve, it may access your public profile information, your following list, your followers, your lists, all your posts, and your favourites. Applications can never access your e-mail address or password.</p>
|
||||
|
||||
<h5 class="font-weight-bold mt-5" id="7">7. Site usage by children</h5>
|
||||
|
||||
<p class="">If this server is in the EU or the EEA: Our site, products and services are all directed to people who are at least 16 years old. If you are under the age of 16, per the requirements of the GDPR (General Data Protection Regulation) do not use this site.</p>
|
||||
|
||||
<p class="">If this server is in the USA: Our site, products and services are all directed to people who are at least 13 years old. If you are under the age of 13, per the requirements of COPPA (Children's Online Privacy Protection Act) do not use this site.</p>
|
||||
|
||||
<p class="">Law requirements can be different if this server is in another jurisdiction.</p>
|
||||
|
||||
<h5 class="font-weight-bold mt-5" id="8">8. Changes to our Privacy Policy</h5>
|
||||
<p class="">If we decide to change our privacy policy, we will post those changes on this page.</p>
|
||||
|
||||
<p class="">This document is CC-BY-SA. It was last updated Jun 12, 2018.</p>
|
||||
|
||||
<p class="">Originally adapted from the <a href="https://mastodon.social/terms">Mastodon</a> privacy policy.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
{!! $page->content !!}
|
||||
@else
|
||||
<div class="title">
|
||||
<h3 class="font-weight-bold">Privacy Policy</h3>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="terms">
|
||||
<h5 class="font-weight-bold" id="1">1. What information do we collect?</h5>
|
||||
<ul class=" pl-4">
|
||||
<li>
|
||||
Basic account information: If you register on this server, you may be asked to enter a username, an e-mail address and a password. You may also enter additional profile information such as a display name and biography, and upload a profile picture and header image. The username, display name, biography and avatar image are always listed publicly.
|
||||
</li>
|
||||
<li>
|
||||
Posts, following and other public information: The list of people you follow is listed publicly, the same is true for your followers. When you submit a message, the date and time is stored as well as the application you submitted the message from. Messages may contain media attachments, such as pictures and videos. Public and unlisted posts are available publicly. When you feature a post on your profile, that is also publicly available information. Your posts are delivered to your followers, in some cases it means they are delivered to different servers and copies are stored there. When you delete posts, this is likewise delivered to your followers. The action of reblogging or favouriting another post is always public.
|
||||
</li>
|
||||
<li>
|
||||
Direct and followers-only posts: All posts are stored and processed on the server. Followers-only posts are delivered to your followers and users who are mentioned in them, and direct posts are delivered only to users mentioned in them. In some cases it means they are delivered to different servers and copies are stored there. We make a good faith effort to limit the access to those posts only to authorized persons, but other servers may fail to do so. Therefore it’s important to review servers your followers belong to. You may toggle an option to approve and reject new followers manually in the settings. Please keep in mind that the operators of the server and any receiving server may view such messages, and that recipients may screenshot, copy or otherwise re-share them. Do not share any dangerous information over Pixelfed.
|
||||
</li>
|
||||
<li>
|
||||
IPs and other metadata: When you log in, we record the IP address you log in from, as well as the name of your browser application. All the logged in sessions are available for your review and revocation in the settings. The latest IP address used is stored for up to 12 months. We also may retain server logs which include the IP address of every request to our server.
|
||||
</li>
|
||||
</ul>
|
||||
<h5 class="font-weight-bold" id="2">2. What do we use your information for?</h5>
|
||||
|
||||
<p class="">Any of the information we collect from you may be used in the following ways:</p>
|
||||
<ul class=" pl-4">
|
||||
<li>
|
||||
To provide the core functionality of Pixelfed. You can only interact with other people’s content and post your own content when you are logged in. For example, you may follow other people to view their combined posts in your own personalized home timeline.
|
||||
</li>
|
||||
<li>
|
||||
To aid moderation of the community, for example comparing your IP address with other known ones to determine ban evasion or other violations.
|
||||
</li>
|
||||
<li>
|
||||
The email address you provide may be used to send you information, notifications about other people interacting with your content or sending you messages, and to respond to inquiries, and/or other requests or questions.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h5 class="font-weight-bold" id="3">3. How do we protect your information?</h5>
|
||||
<p class="">We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information. Among other things, your browser session, as well as the traffic between your applications and the API, are secured with SSL, and your password is hashed using a strong one-way algorithm. You may enable two-factor authentication to further secure access to your account.</p>
|
||||
|
||||
|
||||
<h5 class="font-weight-bold" id="4">4. What is our data retention policy?</h5>
|
||||
<p class="">We will make a good faith effort to:</p>
|
||||
<ul class=" pl-4">
|
||||
<li>
|
||||
Retain server logs containing the IP address of all requests to this server, in so far as such logs are kept, no more than 90 days.
|
||||
</li>
|
||||
<li>
|
||||
Retain the IP addresses associated with registered users no more than 12 months.
|
||||
</li>
|
||||
<li>
|
||||
You can request and download an archive of your content, including your posts, media attachments, profile picture, and header image.
|
||||
</li>
|
||||
</ul>
|
||||
<p class="">You may irreversibly delete your account at any time.</p>
|
||||
|
||||
<h5 class="font-weight-bold" id="5">5. Do we use cookies?</h5>
|
||||
<p class="">Yes. Cookies are small files that a site or its service provider transfers to your computer’s hard drive through your Web browser (if you allow). These cookies enable the site to recognize your browser and, if you have a registered account, associate it with your registered account.
|
||||
</p>
|
||||
<p class="">We use cookies to understand and save your preferences for future visits.</p>
|
||||
|
||||
<h5 class="font-weight-bold" id="6">6. Do we disclose any information to outside parties?</h5>
|
||||
<p class="">We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our site, conducting our business, or servicing you, so long as those parties agree to keep this information confidential. We may also release your information when we believe release is appropriate to comply with the law, enforce our site policies, or protect ours or others rights, property, or safety.</p>
|
||||
<p class="">Your public content may be downloaded by other servers in the network. Your public and followers-only posts are delivered to the servers where your followers reside, and direct messages are delivered to the servers of the recipients, in so far as those followers or recipients reside on a different server than this.</p>
|
||||
<p class="">When you authorize an application to use your account, depending on the scope of permissions you approve, it may access your public profile information, your following list, your followers, your lists, all your posts, and your favourites. Applications can never access your e-mail address or password.</p>
|
||||
|
||||
<h5 class="font-weight-bold" id="7">7. Site usage by children</h5>
|
||||
|
||||
<p class="">If this server is in the EU or the EEA: Our site, products and services are all directed to people who are at least 16 years old. If you are under the age of 16, per the requirements of the GDPR (General Data Protection Regulation) do not use this site.</p>
|
||||
|
||||
<p class="">If this server is in the USA: Our site, products and services are all directed to people who are at least 13 years old. If you are under the age of 13, per the requirements of COPPA (Children's Online Privacy Protection Act) do not use this site.</p>
|
||||
|
||||
<p class="">Law requirements can be different if this server is in another jurisdiction.</p>
|
||||
|
||||
<h5 class="font-weight-bold" id="8">8. Changes to our Privacy Policy</h5>
|
||||
<p class="">If we decide to change our privacy policy, we will post those changes on this page.</p>
|
||||
|
||||
<p class="">This document is CC-BY-SA. It was last updated Jun 12, 2018.</p>
|
||||
|
||||
<p class="">Originally adapted from the <a href="https://mastodon.social/terms">Mastodon</a> privacy policy.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('meta')
|
||||
<meta property="og:description" content="Privacy Policy">
|
||||
@endpush
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
@extends('site.partial.template')
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('section')
|
||||
|
||||
@if($page && $page->content)
|
||||
<div class="title">
|
||||
<h3 class="font-weight-bold">Terms Of Use</h3>
|
||||
@section('content')
|
||||
<div class="container mt-5">
|
||||
<div class="col-12">
|
||||
<p class="font-weight-bold text-lighter text-uppercase">Terms of Use</p>
|
||||
<div class="card border shadow-none">
|
||||
<div class="card-body p-md-5 text-justify mx-md-3">
|
||||
@if($page && $page->content)
|
||||
{!! $page->content !!}
|
||||
@else
|
||||
<div class="terms">
|
||||
<h5 class="font-weight-bold">1. Terms</h5>
|
||||
<p class="">By accessing the website at <a href="{{config('app.url')}}">{{config('app.url')}}</a>, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this website are protected by applicable copyright and trademark law.</p>
|
||||
<h5 class="font-weight-bold mt-5">2. Use License</h5>
|
||||
<ol class="" type="a">
|
||||
<li>Permission is granted to temporarily download one copy of the materials (information or software) on Pixelfed's website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:
|
||||
<ol class="" type="i">
|
||||
<li>modify or copy the materials;</li>
|
||||
<li>use the materials for any commercial purpose, or for any public display (commercial or non-commercial);</li>
|
||||
<li>attempt to decompile or reverse engineer any software contained on Pixelfed's website;</li>
|
||||
<li>remove any copyright or other proprietary notations from the materials; or</li>
|
||||
<li>transfer the materials to another person or "mirror" the materials on any other server.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>This license shall automatically terminate if you violate any of these restrictions and may be terminated by Pixelfed at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.</li>
|
||||
</ol>
|
||||
<h5 class="font-weight-bold mt-5">3. Disclaimer</h5>
|
||||
<ol class="" type="a">
|
||||
<li>The materials on Pixelfed's website are provided on an 'as is' basis. Pixelfed makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.</li>
|
||||
<li>Further, Pixelfed does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its website or otherwise relating to such materials or on any sites linked to this site.</li>
|
||||
</ol>
|
||||
<h5 class="font-weight-bold mt-5">4. Limitations</h5>
|
||||
<p class="">In no event shall Pixelfed or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on Pixelfed's website, even if Pixelfed or a Pixelfed authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.</p>
|
||||
<h5 class="font-weight-bold mt-5">5. Accuracy of materials</h5>
|
||||
<p class="">The materials appearing on Pixelfed's website could include technical, typographical, or photographic errors. Pixelfed does not warrant that any of the materials on its website are accurate, complete or current. Pixelfed may make changes to the materials contained on its website at any time without notice. However Pixelfed does not make any commitment to update the materials.</p>
|
||||
<h5 class="font-weight-bold mt-5">6. Links</h5>
|
||||
<p class="">Pixelfed has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Pixelfed of the site. Use of any such linked website is at the user's own risk.</p>
|
||||
<h5 class="font-weight-bold mt-5">7. Modifications</h5>
|
||||
<p class="">Pixelfed may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.</p>
|
||||
<h5 class="font-weight-bold mt-5">8. Governing Law</h5>
|
||||
<p class="">These terms and conditions are governed by and construed in accordance with the laws of Canada and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.</p>
|
||||
<h5 class="font-weight-bold mt-5">9. Community Guidelines</h5>
|
||||
<p class="">You can view our Community Guidelines <a href="{{route('help.community-guidelines')}}">here</a>.</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
{!! $page->content !!}
|
||||
@else
|
||||
<div class="title">
|
||||
<h3 class="font-weight-bold">Terms Of Use</h3>
|
||||
</div>
|
||||
<hr>
|
||||
<h5 class="font-weight-bold">1. Terms</h5>
|
||||
<p class="">By accessing the website at <a href="{{config('app.url')}}">{{config('app.url')}}</a>, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this website are protected by applicable copyright and trademark law.</p>
|
||||
<h5 class="font-weight-bold">2. Use License</h5>
|
||||
<ol class="" type="a">
|
||||
<li>Permission is granted to temporarily download one copy of the materials (information or software) on Pixelfed's website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:
|
||||
<ol class="" type="i">
|
||||
<li>modify or copy the materials;</li>
|
||||
<li>use the materials for any commercial purpose, or for any public display (commercial or non-commercial);</li>
|
||||
<li>attempt to decompile or reverse engineer any software contained on Pixelfed's website;</li>
|
||||
<li>remove any copyright or other proprietary notations from the materials; or</li>
|
||||
<li>transfer the materials to another person or "mirror" the materials on any other server.</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>This license shall automatically terminate if you violate any of these restrictions and may be terminated by Pixelfed at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.</li>
|
||||
</ol>
|
||||
<h5 class="font-weight-bold">3. Disclaimer</h5>
|
||||
<ol class="" type="a">
|
||||
<li>The materials on Pixelfed's website are provided on an 'as is' basis. Pixelfed makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.</li>
|
||||
<li>Further, Pixelfed does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its website or otherwise relating to such materials or on any sites linked to this site.</li>
|
||||
</ol>
|
||||
<h5 class="font-weight-bold">4. Limitations</h5>
|
||||
<p class="">In no event shall Pixelfed or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on Pixelfed's website, even if Pixelfed or a Pixelfed authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.</p>
|
||||
<h5 class="font-weight-bold">5. Accuracy of materials</h5>
|
||||
<p class="">The materials appearing on Pixelfed's website could include technical, typographical, or photographic errors. Pixelfed does not warrant that any of the materials on its website are accurate, complete or current. Pixelfed may make changes to the materials contained on its website at any time without notice. However Pixelfed does not make any commitment to update the materials.</p>
|
||||
<h5 class="font-weight-bold">6. Links</h5>
|
||||
<p class="">Pixelfed has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Pixelfed of the site. Use of any such linked website is at the user's own risk.</p>
|
||||
<h5 class="font-weight-bold">7. Modifications</h5>
|
||||
<p class="">Pixelfed may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.</p>
|
||||
<h5 class="font-weight-bold">8. Governing Law</h5>
|
||||
<p class="">These terms and conditions are governed by and construed in accordance with the laws of Canada and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.</p>
|
||||
<h5 class="font-weight-bold">9. Community Guidelines</h5>
|
||||
<p class="">You can view our Community Guidelines <a href="{{route('help.community-guidelines')}}">here</a>.</p>
|
||||
<h5 class="font-weight-bold">10. Additional Rules</h5>
|
||||
<p class="">This website does not have any additional rules.</p>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('meta')
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
<div class="container px-0 mt-md-4">
|
||||
<div class="col-12 col-md-8 offset-md-2">
|
||||
|
||||
<div class="card">
|
||||
<div class="card shadow-none border">
|
||||
<div class="card-body">
|
||||
<p class="mb-0">
|
||||
<img class="img-thumbnail mr-2" src="{{$user->avatarUrl()}}" width="24px" height="24px" style="border-radius:12px;">
|
||||
<img class="img-thumbnail mr-2" src="{{$profile->avatarUrl()}}" width="24px" height="24px" style="border-radius:24px;">
|
||||
<span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="{{$status->profile->url()}}">{{ str_limit($status->profile->username, 15)}}</a></bdi></span>
|
||||
<span class="comment-text">{!! $status->rendered ?? e($status->caption) !!} <a href="{{$status->url()}}" class="text-dark small font-weight-bold float-right pl-2">{{$status->created_at->diffForHumans(null, true, true ,true)}}</a></span>
|
||||
</p>
|
||||
<hr>
|
||||
<p class="text-center font-weight-bold text-muted small text-uppercase pt-3">All Comments</p>
|
||||
<div class="comments">
|
||||
@foreach($replies as $item)
|
||||
<p class="mb-2">
|
||||
<span class="font-weight-bold pr-1">
|
||||
<img class="img-thumbnail mr-2" src="{{$item->profile->avatarUrl()}}" width="24px" height="24px" style="border-radius:12px;">
|
||||
<img class="img-thumbnail mr-2" src="{{$item->profile->avatarUrl()}}" width="24px" height="24px" style="border-radius:24px;">
|
||||
<bdi><a class="text-dark" href="{{$item->profile->url()}}">{{ str_limit($item->profile->username, 15)}}</a></bdi>
|
||||
</span>
|
||||
<span class="comment-text">
|
||||
|
@ -28,9 +28,13 @@
|
|||
</span>
|
||||
</p>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2 d-flex justify-content-center">
|
||||
{{ $replies->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::post('/users/{username}/inbox', 'FederationController@userInbox');
|
||||
|
||||
|
||||
Route::group(['prefix' => 'api'], function() {
|
||||
Route::group(['prefix' => 'v1'], function() {
|
||||
Route::post('apps', 'Api\ApiV1Controller@apps');
|
||||
Route::get('instance', 'Api\ApiV1Controller@instance');
|
||||
Route::get('filters', 'Api\ApiV1Controller@filters');
|
||||
Route::get('statuses/{id}', 'Api\ApiV1Controller@statusById');
|
||||
Route::get('statuses/{id}/context', 'Api\ApiV1Controller@context');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -77,19 +77,20 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::get('nodeinfo/2.0.json', 'FederationController@nodeinfo');
|
||||
|
||||
Route::group(['prefix' => 'v1'], function () {
|
||||
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
|
||||
Route::get('accounts/relationships', 'PublicApiController@relationships');
|
||||
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
|
||||
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
|
||||
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
|
||||
Route::get('accounts/{id}', 'PublicApiController@account');
|
||||
Route::post('avatar/update', 'ApiController@avatarUpdate');
|
||||
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials')->middleware('auth:api');
|
||||
Route::get('accounts/relationships', 'PublicApiController@relationships')->middleware('auth:api');
|
||||
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses')->middleware('auth:api');
|
||||
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing')->middleware('auth:api');
|
||||
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers')->middleware('auth:api');
|
||||
// Route::get('accounts/{id}', 'PublicApiController@account');
|
||||
Route::get('accounts/{id}', 'Api\ApiV1Controller@accountById');
|
||||
Route::post('avatar/update', 'ApiController@avatarUpdate')->middleware('auth:api');
|
||||
Route::get('likes', 'ApiController@hydrateLikes');
|
||||
Route::post('media', 'ApiController@uploadMedia');
|
||||
Route::delete('media', 'ApiController@deleteMedia');
|
||||
Route::get('notifications', 'ApiController@notifications');
|
||||
Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');
|
||||
Route::delete('media', 'ApiController@deleteMedia')->middleware('auth:api');
|
||||
Route::get('notifications', 'ApiController@notifications')->middleware('auth:api');
|
||||
Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
|
||||
Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
|
||||
Route::get('timelines/home', 'PublicApiController@homeTimelineApi')->middleware('auth:api');
|
||||
});
|
||||
Route::group(['prefix' => 'v2'], function() {
|
||||
Route::get('config', 'ApiController@siteConfiguration');
|
||||
|
@ -107,7 +108,38 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::get('discover/tag', 'DiscoverController@getHashtags');
|
||||
Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
|
||||
});
|
||||
Route::group(['prefix' => 'pixelfed'], function() {
|
||||
Route::group(['prefix' => 'v1'], function() {
|
||||
Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
|
||||
Route::get('accounts/relationships', 'PublicApiController@relationships');
|
||||
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
|
||||
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
|
||||
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
|
||||
Route::get('accounts/{id}', 'PublicApiController@account');
|
||||
Route::post('avatar/update', 'ApiController@avatarUpdate');
|
||||
Route::get('likes', 'ApiController@hydrateLikes');
|
||||
Route::post('media', 'ApiController@uploadMedia');
|
||||
Route::delete('media', 'ApiController@deleteMedia');
|
||||
Route::get('notifications', 'ApiController@notifications');
|
||||
Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
|
||||
Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
|
||||
});
|
||||
});
|
||||
Route::group(['prefix' => 'local'], function () {
|
||||
// Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
|
||||
// Route::get('accounts/relationships', 'PublicApiController@relationships');
|
||||
// Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
|
||||
// Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
|
||||
// Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
|
||||
// Route::get('accounts/{id}', 'PublicApiController@account');
|
||||
// Route::post('avatar/update', 'ApiController@avatarUpdate');
|
||||
// Route::get('likes', 'ApiController@hydrateLikes');
|
||||
// Route::post('media', 'ApiController@uploadMedia');
|
||||
// Route::delete('media', 'ApiController@deleteMedia');
|
||||
// Route::get('notifications', 'ApiController@notifications');
|
||||
// Route::get('timelines/public', 'PublicApiController@publicTimelineApi');
|
||||
// Route::get('timelines/home', 'PublicApiController@homeTimelineApi');
|
||||
|
||||
Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
|
||||
Route::get('exp/rec', 'ApiController@userRecommendations');
|
||||
Route::post('discover/tag/subscribe', 'HashtagFollowController@store')->middleware('throttle:maxHashtagFollowsPerHour,60')->middleware('throttle:maxHashtagFollowsPerDay,1440');;
|
||||
|
@ -329,13 +361,12 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::redirect('/', '/');
|
||||
Route::get('{user}.atom', 'ProfileController@showAtomFeed');
|
||||
Route::get('{username}/outbox', 'FederationController@userOutbox');
|
||||
Route::get('{username}', 'ProfileController@permalinkRedirect');
|
||||
Route::get('{username}/followers', 'FederationController@userFollowers');
|
||||
Route::get('{username}/following', 'FederationController@userFollowing');
|
||||
Route::get('{username}', 'ProfileController@permalinkRedirect');
|
||||
});
|
||||
|
||||
Route::get('c/{collection}', 'CollectionController@show');
|
||||
Route::get('p/{username}/{id}/c/{cid}', 'CommentController@show');
|
||||
Route::get('p/{username}/{id}/c', 'CommentController@showAll');
|
||||
Route::get('p/{username}/{id}/edit', 'StatusController@edit');
|
||||
Route::post('p/{username}/{id}/edit', 'StatusController@editStore');
|
||||
|
|
Loading…
Reference in a new issue