mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-04-20 00:10:24 +00:00
167 lines
No EOL
7.3 KiB
Text
167 lines
No EOL
7.3 KiB
Text
@model Project_Unite.Models.ApplicationUser
|
|
@{
|
|
ViewBag.Title = "My profile";
|
|
}
|
|
@using (Html.BeginForm())
|
|
{
|
|
@Html.AntiForgeryToken()
|
|
|
|
string val = Html.ValidationSummary().ToHtmlString();
|
|
if (!string.IsNullOrWhiteSpace(val))
|
|
{
|
|
<div class="panel panel-danger">
|
|
<div class="panel-body">
|
|
@Html.Raw(val)
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<p class="text-success">@ViewBag.StatusMessage</p>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<img class="avatar" src="@Model.AvatarUrl" width="128" height="128" />
|
|
@if (!string.IsNullOrWhiteSpace(Model.FullName))
|
|
{
|
|
<h4>@Model.FullName</h4>
|
|
}
|
|
<h5>@Model.DisplayName</h5>
|
|
|
|
<ul id="tabs" data-tabs="tabs" class="nav nav-pills nav-stacked" role="tablist">
|
|
<li class="active"><a data-toggle="tab" href="#t_profile">Profile</a></li>
|
|
<li><a data-toggle="tab" href="#t_privacy">Privacy & Security</a></li>
|
|
<li><a data-toggle="tab" href="#t_data">Data</a></li>
|
|
<li><a data-toggle="tab" href="#t_api">API</a></li>
|
|
<li class="danger"><a data-toggle="tab" href="#t_danger">The Danger Zone</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-xs-8">
|
|
<div class="tab-content">
|
|
<div class="tab-pane fade in active" id="#t_profile">
|
|
<h2>Profile settings</h2>
|
|
|
|
<p>Edit your public profile here.</p>
|
|
|
|
<h4>Display Name</h4>
|
|
<p>Your Display Name is what everyone sees you as on the website. This field is required.</p>
|
|
@Html.TextBoxFor(Model => Model.DisplayName, new { @class = "form-control" })
|
|
|
|
<h4>Full name</h4>
|
|
<p>On your profile page, you can optionally set a full name to display along with the above display name.</p>
|
|
@Html.TextBoxFor(Model => Model.FullName, new { @class = "form-control" })
|
|
|
|
<h4>YouTube channel URL</h4>
|
|
<p>Have a YouTube channel and want to show it off on your profile? Paste it here!</p>
|
|
@Html.TextBoxFor(Model => Model.YoutubeUrl, new { @class = "form-control" })
|
|
|
|
<h4>Website</h4>
|
|
<p>Feel free to post a link to your website, if you want to.</p>
|
|
@Html.TextBoxFor(Model => Model.Website, new { @class = "form-control" })
|
|
|
|
<div class="panel panel-warning">
|
|
<div class="panel-body">
|
|
<strong>Info about URLs: </strong>
|
|
<p>We reserve the right to remove the links to your YouTube channel or website if they do not follow the community guidelines or they point to malicious sites.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4>Bio</h4>
|
|
<p>Tell us about yourself!</p>
|
|
@Html.TextAreaFor(Model=>Model.Bio)
|
|
|
|
|
|
<h4>Interests</h4>
|
|
<p>What are you interested in?</p>
|
|
@Html.TextAreaFor(Model => Model.Interests, new { @class = "form-control" })
|
|
|
|
|
|
|
|
<h4>Hobbies</h4>
|
|
<p>What do you like to do?</p>
|
|
@Html.TextAreaFor(Model => Model.Hobbies, new { @class = "form-control" })
|
|
|
|
|
|
</div>
|
|
<div class="tab-pane fade in" id="t_privacy">
|
|
<h2>Privacy & Security</h2>
|
|
|
|
<p>At ShiftOS, we take privacy seriously. If you want to hide certain things from your public profile, this is the place to do so. </p>
|
|
|
|
<p class="text-warning"><strong>NOTE: </strong> Moderators may still have access to this information for the purpose of community moderation. They will not leak your information.</p>
|
|
|
|
<h4>Show my followers on my public profile?</h4>
|
|
<p>Should we show your followers on your profile?</p> @Html.CheckBoxFor(Model => Model.ShowFollowers)
|
|
|
|
<h4>Show the people I follow on my public profile?</h4>
|
|
<p>Should we show the people you follow on your profile?</p> @Html.CheckBoxFor(Model => Model.ShowFollowed)
|
|
|
|
<h4>Show my registration date?</h4>
|
|
<p>Check this to show your registration date on your profile.</p> @Html.CheckBoxFor(Model => Model.ShowJoinDate)
|
|
|
|
<h4>Show my forum activity?</h4>
|
|
<p>Shall we tell readers how many posts and topics you have made on the forum?</p> @Html.CheckBoxFor(Model => Model.ShowPostAndTopicCounts)
|
|
|
|
<h4>Allow users to email me?</h4>
|
|
<p>Should we allow users to email you by showing your email address on your profile?</p> @Html.CheckBoxFor(Model => Model.ShowEmail)
|
|
|
|
<h3>Security</h3>
|
|
|
|
<h4>Change email address</h4>
|
|
<p>Use this field to enter a new email address. Doing so will cause your account to require reactivation.</p>
|
|
@Html.TextBoxFor(Model=>Model.Email, new { @class = "form-control" })
|
|
|
|
<h4>Change your password</h4>
|
|
<p>Use this option to change your account's password.</p>
|
|
<a href="@Url.Action("SetPassword", "Manage")" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span> Change password</a>
|
|
|
|
</div>
|
|
<div class="tab-pane fade in" id="t_api">
|
|
<h2>API</h2>
|
|
<p>The ShiftOS API is a way for desktop and mobile applications to easily access certain data from the ShiftOS community in an easy-to-display way. It is also how ShiftOS is able to connect your save file to your ShiftOS account.</p>
|
|
|
|
<p>You can use this screen to manage your API keys. These keys give API-level access to your account. You can revoke them at any time.</p>
|
|
|
|
<div class="panel panel-danger">
|
|
<div class="panel-body">
|
|
<strong>Danger!</strong>
|
|
<p>Revoking an API key generated by ShiftOS will cause you to lose access to any associated save files.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-8">API key</div>
|
|
<div class="col-xs-4">Actions</div>
|
|
</div>
|
|
@{
|
|
var db = new Project_Unite.Models.ApplicationDbContext();
|
|
var keys = db.OAuthTokens.Where(x=>x.UserId==Model.Id).ToArray();
|
|
}
|
|
@foreach(var key in keys)
|
|
{
|
|
<div class="row">
|
|
<div class="col-xs-8">
|
|
<strong>@key.AppName @key.Version</strong>
|
|
<p>@key.AppDescription</p>
|
|
<pre>
|
|
<code>
|
|
@key.Id
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
<div class="col-xs-4">
|
|
<a href="@Url.Action("RevokeAPIKey", "Manage", new { id = key.Id })" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Revoke key</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<hr/>
|
|
<input type="submit" value="Update" class="btn btn-primary" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
} |