非公開アカウント対応
This commit is contained in:
parent
d0c9e3a3af
commit
7e9501ab9d
@ -1,23 +1,32 @@
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<img src="{{ $user->getProfileImageUrl(64) }}" class="rounded mb-1">
|
||||
<h4 class="card-title"><a class="text-dark" href="{{ route('user.profile', ['name' => $user->name]) }}">{{ $user->display_name }}</a></h4>
|
||||
<h6 class="card-subtitle mb-4"><a class="text-muted" href="{{ route('user.profile', ['name' => $user->name]) }}">@{{ $user->name }}</a></h6>
|
||||
<h4 class="card-title">
|
||||
<a class="text-dark" href="{{ route('user.profile', ['name' => $user->name]) }}">{{ $user->display_name }}</a>
|
||||
</h4>
|
||||
<h6 class="card-subtitle">
|
||||
<a class="text-muted" href="{{ route('user.profile', ['name' => $user->name]) }}">@{{ $user->name }}</a>
|
||||
@if ($user->is_protected)
|
||||
<span class="oi oi-lock-locked text-muted"></span>
|
||||
@endif
|
||||
</h6>
|
||||
|
||||
<h6 class="font-weight-bold"><span class="oi oi-timer"></span> 現在のセッション</h6>
|
||||
@if (isset($currentSession))
|
||||
<p class="card-text mb-0">{{ $currentSession }}経過</p>
|
||||
<p class="card-text">({{ $latestEjaculation->ejaculated_date->format('Y/m/d H:i') }} にリセット)</p>
|
||||
@else
|
||||
<p class="card-text mb-0">計測がまだ始まっていません</p>
|
||||
<p class="card-text">(一度チェックインすると始まります)</p>
|
||||
@if (!$user->is_protected)
|
||||
<h6 class="font-weight-bold mt-4"><span class="oi oi-timer"></span> 現在のセッション</h6>
|
||||
@if (isset($currentSession))
|
||||
<p class="card-text mb-0">{{ $currentSession }}経過</p>
|
||||
<p class="card-text">({{ $latestEjaculation->ejaculated_date->format('Y/m/d H:i') }} にリセット)</p>
|
||||
@else
|
||||
<p class="card-text mb-0">計測がまだ始まっていません</p>
|
||||
<p class="card-text">(一度チェックインすると始まります)</p>
|
||||
@endif
|
||||
|
||||
<h6 class="font-weight-bold"><span class="oi oi-graph"></span> 概況</h6>
|
||||
<p class="card-text mb-0">平均記録: {{ Formatter::formatInterval($summary[0]->average) }}</p>
|
||||
<p class="card-text mb-0">最長記録: {{ Formatter::formatInterval($summary[0]->longest) }}</p>
|
||||
<p class="card-text mb-0">最短記録: {{ Formatter::formatInterval($summary[0]->shortest) }}</p>
|
||||
<p class="card-text mb-0">合計時間: {{ Formatter::formatInterval($summary[0]->total_times) }}</p>
|
||||
<p class="card-text">通算回数: {{ $summary[0]->total_checkins }}回</p>
|
||||
@endif
|
||||
|
||||
<h6 class="font-weight-bold"><span class="oi oi-graph"></span> 概況</h6>
|
||||
<p class="card-text mb-0">平均記録: {{ Formatter::formatInterval($summary[0]->average) }}</p>
|
||||
<p class="card-text mb-0">最長記録: {{ Formatter::formatInterval($summary[0]->longest) }}</p>
|
||||
<p class="card-text mb-0">最短記録: {{ Formatter::formatInterval($summary[0]->shortest) }}</p>
|
||||
<p class="card-text mb-0">合計時間: {{ Formatter::formatInterval($summary[0]->total_times) }}</p>
|
||||
<p class="card-text">通算回数: {{ $summary[0]->total_checkins }}回</p>
|
||||
</div>
|
||||
</div>
|
@ -8,7 +8,13 @@
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
@if ($ejaculation->is_private && !(Auth::check() && $user->id === Auth::user()->id))
|
||||
@if ($user->is_protected && !(Auth::check() && $user->id === Auth::user()->id))
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<span class="oi oi-lock-locked"></span> このユーザはチェックイン履歴を公開していません。
|
||||
</div>
|
||||
</div>
|
||||
@elseif ($ejaculation->is_private && !(Auth::check() && $user->id === Auth::user()->id))
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<span class="oi oi-lock-locked"></span> 非公開チェックインのため、表示できません
|
||||
|
@ -1,4 +1,10 @@
|
||||
@extends('user.base')
|
||||
|
||||
@section('tab-content')
|
||||
@if ($user->is_protected && !(Auth::check() && $user->id === Auth::user()->id))
|
||||
<p class="mt-4">
|
||||
<span class="oi oi-lock-locked"></span> このユーザはチェックイン履歴を公開していません。
|
||||
</p>
|
||||
@else
|
||||
@endif
|
||||
@endsection
|
@ -1,73 +1,79 @@
|
||||
@extends('user.base')
|
||||
|
||||
@section('tab-content')
|
||||
<ul class="list-group">
|
||||
@forelse ($ejaculations as $ejaculation)
|
||||
<li class="list-group-item border-bottom-only pt-3 pb-3">
|
||||
<!-- span -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5>{{ $ejaculation->ejaculated_span ?? '精通' }} <a href="{{ route('checkin.show', ['id' => $ejaculation->id]) }}" class="text-muted"><small>{{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}</small></a></h5>
|
||||
@if (Auth::check() && $user->id === Auth::user()->id)
|
||||
<div>
|
||||
<a class="text-secondary timeline-action-item" href="#"><span class="oi oi-pencil" data-toggle="tooltip" data-placement="bottom" title="修正"></span></a>
|
||||
<a class="text-secondary timeline-action-item" href="#" data-toggle="modal" data-target="#deleteCheckinModal" data-id="{{ $ejaculation->id }}" data-date="{{ $ejaculation->ejaculated_date }}"><span class="oi oi-trash" data-toggle="tooltip" data-placement="bottom" title="削除"></span></a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<!-- tags -->
|
||||
@if ($ejaculation->is_private) {{-- TODO: タグを付けたら、タグが空じゃないかも判定に加える --}}
|
||||
<p class="mb-2">
|
||||
@if ($ejaculation->is_private)
|
||||
<span class="badge badge-warning"><span class="oi oi-lock-locked"></span> 非公開</span>
|
||||
@endif
|
||||
{{--
|
||||
<span class="badge badge-secondary"><span class="oi oi-tag"></span> 催眠音声</span>
|
||||
<span class="badge badge-secondary"><span class="oi oi-tag"></span> 適当なタグ</span>
|
||||
--}}
|
||||
</p>
|
||||
@endif
|
||||
<!-- okazu link -->
|
||||
{{--
|
||||
<div class="card mb-2 w-50" style="font-size: small;">
|
||||
<a class="text-dark card-link" href="#">
|
||||
<img src="holder.js/320x240" alt="Thumbnail" class="card-img-top">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">タイトル</h6>
|
||||
<p class="card-text">コンテンツの説明文</p>
|
||||
@if ($user->is_protected && !(Auth::check() && $user->id === Auth::user()->id))
|
||||
<p class="mt-4">
|
||||
<span class="oi oi-lock-locked"></span> このユーザはチェックイン履歴を公開していません。
|
||||
</p>
|
||||
@else
|
||||
<ul class="list-group">
|
||||
@forelse ($ejaculations as $ejaculation)
|
||||
<li class="list-group-item border-bottom-only pt-3 pb-3">
|
||||
<!-- span -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5>{{ $ejaculation->ejaculated_span ?? '精通' }} <a href="{{ route('checkin.show', ['id' => $ejaculation->id]) }}" class="text-muted"><small>{{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}</small></a></h5>
|
||||
@if (Auth::check() && $user->id === Auth::user()->id)
|
||||
<div>
|
||||
<a class="text-secondary timeline-action-item" href="#"><span class="oi oi-pencil" data-toggle="tooltip" data-placement="bottom" title="修正"></span></a>
|
||||
<a class="text-secondary timeline-action-item" href="#" data-toggle="modal" data-target="#deleteCheckinModal" data-id="{{ $ejaculation->id }}" data-date="{{ $ejaculation->ejaculated_date }}"><span class="oi oi-trash" data-toggle="tooltip" data-placement="bottom" title="削除"></span></a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
--}}
|
||||
<!-- note -->
|
||||
@if (!empty($ejaculation->note))
|
||||
<p class="mb-0 tis-word-wrap">
|
||||
{!! Formatter::linkify(nl2br(e($ejaculation->note))) !!}
|
||||
</p>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<!-- tags -->
|
||||
@if ($ejaculation->is_private) {{-- TODO: タグを付けたら、タグが空じゃないかも判定に加える --}}
|
||||
<p class="mb-2">
|
||||
@if ($ejaculation->is_private)
|
||||
<span class="badge badge-warning"><span class="oi oi-lock-locked"></span> 非公開</span>
|
||||
@endif
|
||||
{{--
|
||||
<span class="badge badge-secondary"><span class="oi oi-tag"></span> 催眠音声</span>
|
||||
<span class="badge badge-secondary"><span class="oi oi-tag"></span> 適当なタグ</span>
|
||||
--}}
|
||||
</p>
|
||||
@endif
|
||||
<!-- okazu link -->
|
||||
{{--
|
||||
<div class="card mb-2 w-50" style="font-size: small;">
|
||||
<a class="text-dark card-link" href="#">
|
||||
<img src="holder.js/320x240" alt="Thumbnail" class="card-img-top">
|
||||
<div class="card-body">
|
||||
<h6 class="card-title">タイトル</h6>
|
||||
<p class="card-text">コンテンツの説明文</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
--}}
|
||||
<!-- note -->
|
||||
@if (!empty($ejaculation->note))
|
||||
<p class="mb-0 tis-word-wrap">
|
||||
{!! Formatter::linkify(nl2br(e($ejaculation->note))) !!}
|
||||
</p>
|
||||
@endif
|
||||
</li>
|
||||
@empty
|
||||
<li class="list-group-item border-bottom-only">
|
||||
<p>まだチェックインしていません。</p>
|
||||
</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
<ul class="pagination mt-4 justify-content-center">
|
||||
<li class="page-item {{ $ejaculations->currentPage() === 1 ? 'disabled' : '' }}">
|
||||
<a class="page-link" href="{{ $ejaculations->previousPageUrl() }}" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
</li>
|
||||
@empty
|
||||
<li class="list-group-item border-bottom-only">
|
||||
<p>まだチェックインしていません。</p>
|
||||
@for ($i = 1; $i <= $ejaculations->lastPage(); $i++)
|
||||
<li class="page-item {{ $i === $ejaculations->currentPage() ? 'active' : '' }}"><a href="{{ $ejaculations->url($i) }}" class="page-link">{{ $i }}</a></li>
|
||||
@endfor
|
||||
<li class="page-item {{ $ejaculations->currentPage() === $ejaculations->lastPage() ? 'disabled' : '' }}">
|
||||
<a class="page-link" href="{{ $ejaculations->nextPageUrl() }}" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
<ul class="pagination mt-4 justify-content-center">
|
||||
<li class="page-item {{ $ejaculations->currentPage() === 1 ? 'disabled' : '' }}">
|
||||
<a class="page-link" href="{{ $ejaculations->previousPageUrl() }}" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
</li>
|
||||
@for ($i = 1; $i <= $ejaculations->lastPage(); $i++)
|
||||
<li class="page-item {{ $i === $ejaculations->currentPage() ? 'active' : '' }}"><a href="{{ $ejaculations->url($i) }}" class="page-link">{{ $i }}</a></li>
|
||||
@endfor
|
||||
<li class="page-item {{ $ejaculations->currentPage() === $ejaculations->lastPage() ? 'disabled' : '' }}">
|
||||
<a class="page-link" href="{{ $ejaculations->nextPageUrl() }}" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@component('components.modal', ['id' => 'deleteCheckinModal'])
|
||||
@slot('title')
|
||||
|
@ -1,4 +1,10 @@
|
||||
@extends('user.base')
|
||||
|
||||
@section('tab-content')
|
||||
@if ($user->is_protected && !(Auth::check() && $user->id === Auth::user()->id))
|
||||
<p class="mt-4">
|
||||
<span class="oi oi-lock-locked"></span> このユーザはチェックイン履歴を公開していません。
|
||||
</p>
|
||||
@else
|
||||
@endif
|
||||
@endsection
|
Loading…
Reference in New Issue
Block a user