@model bitforum.Models.Log.LoginLog
@{
    ViewData["Title"] = "로그인 상세정보";
    var data = ViewBag.Data as dynamic;
}

<div class="container">
    <h3>@ViewData["Title"]</h3>
    <hr />

    <partial name="_StatusMessage" />

    <div class="row mb-2">
        <label for="Code" class="col-sm-2">PK</label>
        <div class="col-sm-10">@data.ID</div>
    </div>
    <div class="row mb-2">
        <label for="Subject" class="col-sm-2">회원</label>
        <div class="col-sm-10">@(data.MemberID != null ? $"{data.MemberID} / {data.Name}" : '-')</div>
    </div>
    <div class="row mb-2">
        <label for="Content" class="col-sm-2">시도 계정</label>
        <div class="col-sm-10">@data.Account</div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">사유</label>
        <div class="col-sm-10">
            @if (data.Reason != null)
            {
                <text>@data.Reason</text>
            }
            else
            {
                <text>-</text>
            }
        </div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">Referer</label>
        <div class="col-sm-10">@(data.Referer != "" ? data.Referer : '-')</div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">URL</label>
        <div class="col-sm-10">@data.Url</div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">IP</label>
        <div class="col-sm-10">@data.IpAddress</div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">User agent</label>
        <div class="col-sm-10">@data.UserAgent</div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">등록 일시</label>
        <div class="col-sm-10">@data.CreatedAt</div>
    </div>
    <hr/>
    <div class="row mb-2">
        <label class="col-sm-2">Browser</label>
        <div class="col-sm-10">@data.Browser?.Match.Name, @data.Browser?.Match.Version</div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">OS</label>
        <div class="col-sm-10">
            <text>@data.OS</text>
        </div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">Device</label>
        <div class="col-sm-10">@data.Device</div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">Brand</label>
        <div class="col-sm-10">
            @if (data.Brand != "")
            {
                <text>@data.Brand</text>
            }
            else
            {
                <text>-</text>
            }
        </div>
    </div>
    <div class="row mb-2">
        <label class="col-sm-2">Model</label>
        <div class="col-sm-10">
            @if (data.Model != "")
            {
                <text>@data.Model</text>
            }
            else
            {
                <text>-</text>
            }
        </div>
    </div>
    <hr/>
    <div class="d-grid gap-2 text-center d-md-block">
        <a asp-action="Index" class="btn btn-sm btn-secondary">취소</a>
    </div>
    <br/>
</div>