1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
@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><a href="@Url.Action("ListAvatars")"><span class="glyphicon glyphicon-picture"></span> Change avatar</a></li>
<li class="active"><a data-toggle="tab" href="#t_profile"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
<li><a data-toggle="tab" href="#t_privacy"><span class="glyphicon glyphicon-eye-open"></span> Privacy & Security</a></li>
<li><a data-toggle="tab" href="#t_notifications"><span class="glyphicon glyphicon-bullhorn"></span> Notifications</a></li>
<li><a data-toggle="tab" href="#t_data"><span class="glyphicon glyphicon-book"></span> Data</a></li>
<li><a data-toggle="tab" href="#t_api"><span class="glyphicon glyphicon-globe"></span> API</a></li>
<li class="danger"><a data-toggle="tab" href="#t_danger"><span class="glyphicon glyphicon-exclamation-sign"></span> 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_notifications">
<h2>Notifications</h2>
<p>These settings are for the ShiftOS notification system on your account.</p>
<h4>Send me notifications through email when I'm inactive</h4>
<p>Check this option to allow us to email you when you receive a notification and you haven't logged in for a week.</p> @Html.CheckBoxFor(Model=>Model.EmailOnNotifications)
@{
var notes = Model.Notifications.Where(x=>x.IsRead==false).OrderByDescending(x=>x.Timestamp);
}
<h3>Unread Notifications</h3>
@if (notes.Count() > 0)
{
<p>Below is a list of all unread notifications.</p>
<ul class="nav nav-tabs">
<li><a href="@Url.Action("MarkAllRead")"><span class="glyphicon glyphicon-book"></span> Mark all read</a></li>
</ul>
<div class="row">
<strong>Notification</strong>
</div>
foreach(var note in notes)
{
<div class="row">
@if (!string.IsNullOrWhiteSpace(note.AvatarUrl))
{
<img src="@note.AvatarUrl" height="128" width="128" class="avatar" />
}
<h5>@note.Title</h5>
<p>@note.Description</p>
<a href="@note.ActionUrl" class="btn btn-default">Read</a>
</div>
}
}
else
{
<p>You have no notifications.</p>
}
</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>
<code>
@key.Id
</code>
</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>
<div class="tab-pane fade in" id="t_danger">
<h2>The Danger Zone</h2>
<p>Be careful with these settings. These can cause data-loss or other issues.</p>
<div class="row">
<div class="col-xs-6">
<h4>Purge my data</h4>
<p>Use this option to purge all data associated with your account.</p>
<a href="@Url.Action("PurgeData")" class="btn btn-danger"><span class="glyphicon glyphicon-arrow-right"></span> Purge it all.</a>
</div>
<div class="col-xs-6">
<h4>Delete my account</h4>
<p>Use this option to permanently remove your account from the ShiftOS community. <strong>This will render your save files, skins, and other data INACCESSIBLE. There is NO GOING BACK ONCE YOU CLICK THIS DAMN BUTTON.</strong></p>
<a href="@Url.Action("DeleteAccount")" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> I COMPLETELY UNDERSTAND. NOW DELETE IT.</a>
</div>
</div>
</div>
<hr/>
<input type="submit" value="Update" class="btn btn-primary" />
</div>
</div>
</div>
}
|