mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 13:03:16 +00:00
Merge pull request #398 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
84c10e3d13
2 changed files with 13 additions and 8 deletions
|
@ -44,29 +44,33 @@ class SettingsController extends Controller
|
|||
$user = Auth::user();
|
||||
$profile = $user->profile;
|
||||
|
||||
$validate = config('pixelfed.enforce_email_verification');
|
||||
|
||||
if($user->email != $email) {
|
||||
$changes = true;
|
||||
$user->email = $email;
|
||||
$user->email_verified_at = null;
|
||||
// Prevent old verifications from working
|
||||
EmailVerification::whereUserId($user->id)->delete();
|
||||
|
||||
if($validate) {
|
||||
$user->email_verified_at = null;
|
||||
// Prevent old verifications from working
|
||||
EmailVerification::whereUserId($user->id)->delete();
|
||||
}
|
||||
}
|
||||
|
||||
// Only allow email to be updated if not yet verified
|
||||
if(!$changes && $user->email_verified_at) {
|
||||
if(!$validate || !$changes && $user->email_verified_at) {
|
||||
if($profile->name != $name) {
|
||||
$changes = true;
|
||||
$user->name = $name;
|
||||
$profile->name = $name;
|
||||
}
|
||||
|
||||
if($profile->website != $website) {
|
||||
if(!$profile->website || $profile->website != $website) {
|
||||
$changes = true;
|
||||
$profile->website = $website;
|
||||
}
|
||||
|
||||
if($profile->bio != $bio) {
|
||||
if(!$profile->bio || !$profile->bio != $bio) {
|
||||
$changes = true;
|
||||
$profile->bio = $bio;
|
||||
}
|
||||
|
|
|
@ -70,13 +70,14 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="lead">
|
||||
<p class="lead mb-0">
|
||||
<span class="font-weight-bold">{{$user->name}}</span>
|
||||
@if($user->remote_url)
|
||||
<span class="badge badge-info">REMOTE PROFILE</span>
|
||||
@endif
|
||||
{{$user->bio}}
|
||||
</p>
|
||||
<p class="mb-0 lead">{{$user->bio}}</p>
|
||||
<p class="mb-0"><a href="{{$user->website}}" class="font-weight-bold" rel="external nofollow noopener" target="_blank">{{str_limit($user->website, 30)}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue