mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Merge pull request #4872 from pixelfed/staging
Update login view, add email prefill logic
This commit is contained in:
commit
ca05279bb6
2 changed files with 43 additions and 17 deletions
|
@ -86,6 +86,7 @@
|
|||
- Update FollowerService, add $silent param to remove method to more efficently purge relationships ([1664a5bc](https://github.com/pixelfed/pixelfed/commit/1664a5bc))
|
||||
- Update AP ProfileTransformer, add published attribute ([adfaa2b1](https://github.com/pixelfed/pixelfed/commit/adfaa2b1))
|
||||
- Update meta tags, improve descriptions and seo/og tags ([fd44c80c](https://github.com/pixelfed/pixelfed/commit/fd44c80c))
|
||||
- Update login view, add email prefill logic ([d76f0168](https://github.com/pixelfed/pixelfed/commit/d76f0168))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)
|
||||
|
|
|
@ -4,8 +4,12 @@
|
|||
<div class="container mt-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-5">
|
||||
<div class="">
|
||||
<div class="card-header bg-transparent p-3 text-center font-weight-bold h3">{{ __('Login') }}</div>
|
||||
<div class="card shadow-none border">
|
||||
<div class="card-header bg-transparent p-3">
|
||||
<h4 class="font-weight-bold mb-0 text-center">
|
||||
Account Login
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('login') }}">
|
||||
|
@ -14,6 +18,7 @@
|
|||
<div class="form-group row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<label for="email" class="small font-weight-bold text-muted mb-0">Email Address</label>
|
||||
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" placeholder="{{__('Email')}}" required autofocus>
|
||||
|
||||
@if ($errors->has('email'))
|
||||
|
@ -27,6 +32,7 @@
|
|||
<div class="form-group row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<label for="password" class="small font-weight-bold text-muted mb-0">Password</label>
|
||||
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="{{__('Password')}}" required>
|
||||
|
||||
@if ($errors->has('password'))
|
||||
|
@ -34,6 +40,12 @@
|
|||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<p class="help-text small text-right mb-0">
|
||||
<a href="{{ route('password.request') }}" class="small text-muted font-weight-bold">
|
||||
{{ __('Forgot Password') }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -64,14 +76,9 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group row mb-4">
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-lg font-weight-bold">
|
||||
{{ __('Login') }}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block btn-lg font-weight-bold rounded-pill">
|
||||
{{ __('Login') }}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
@if(
|
||||
|
@ -91,20 +98,38 @@
|
|||
</form>
|
||||
@endif
|
||||
|
||||
@if(config_cache('pixelfed.open_registration'))
|
||||
<hr>
|
||||
|
||||
<p class="text-center font-weight-bold">
|
||||
@if(config_cache('pixelfed.open_registration'))
|
||||
<p class="text-center font-weight-bold mb-0">
|
||||
<a href="/register">Register</a>
|
||||
<span class="px-1">·</span>
|
||||
@endif
|
||||
<a href="{{ route('password.request') }}">
|
||||
{{ __('Forgot Password') }}
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
function getQueryParam(name) {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
return urlParams.get(name);
|
||||
}
|
||||
const email = getQueryParam('email');
|
||||
if (email) {
|
||||
const emailInput = document.getElementById('email');
|
||||
if (emailInput) {
|
||||
emailInput.value = email;
|
||||
const passwordInput = document.getElementById('password');
|
||||
if (passwordInput) {
|
||||
passwordInput.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
Loading…
Reference in a new issue