commit c90ebab27ce8040bf43060f6811c57c176462b5e
Author: Laura Hausmann
+ Request ID:
+ Swapping to the Development environment displays detailed information about the error that occurred.
+
+ The Development environment shouldn't be enabled for deployed applications.
+ It can result in displaying sensitive information from exceptions to end users.
+ For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
+ and restarting the app.
+
+ @Html.Raw(description.Replace("\n", " ", "").Replace("
+
+
\ No newline at end of file
diff --git a/Pages/Conference.cshtml.cs b/Pages/Conference.cshtml.cs
new file mode 100644
index 0000000..a757866
--- /dev/null
+++ b/Pages/Conference.cshtml.cs
@@ -0,0 +1,58 @@
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.Extensions.Logging;
+using Newtonsoft.Json;
+
+namespace c3stream.Pages {
+ public class ConferenceModel : PageModel {
+ public static List
+
+
+
+ @foreach (var talk in Request.Query["orderby"] == "published" ? conference.Talks.OrderByDescending(p => p.ReleaseDate) : conference.Talks.OrderBy(p => p.Date)) {
+ var state = UserData.FirstOrDefault(p => p.TalkId == talk.Guid && p.UserId == Request.Cookies["bookmark"])?.State;
+ var isWatched = state == "watched";
+ var isMarked = state == "marked";
+ var file = $"{talk.Slug}.mp4";
+ var eventName = talk.Tags.Count <= 1 ? conference.Acronym : talk.Tags[0].Replace("-", "-Event
+
+ @Html.Raw(Request.Query["orderby"] == "published" ? $"Published" : $"Date")
+ Category
+ Title
+ Speaker(s)
+ Lang
+ Actions
+
");
+ var category = talk.Tags.Count switch {
+ 0 => "
+
+ }
+ @Html.Raw(eventName)
+ @(Request.Query["orderby"] == "published" ? talk.ReleaseDate?.Date.ToShortDateString() : talk.Date?.Date.ToShortDateString())
+ @category
+ @if (isWatched) {
+ @talk.Title
+ }
+ else if (isMarked) {
+ @talk.Title
+ }
+ else {
+ @talk.Title
+ }
+ @(talk.Persons.Any() ? talk.Persons.Aggregate((s, s1) => $"{s}, {s1}") : "
+ @talk.OriginalLanguage
+
+
+
+ >(System.IO.File.ReadAllText(c3stream.DbPath));
+ }
+
+ public static void WriteUserData() {
+ lock (c3stream.Lock)
+ System.IO.File.WriteAllText(c3stream.DbPath, JsonConvert.SerializeObject(UserData));
+ }
+
+ public class UserStatus {
+ public readonly string TalkId;
+ public readonly string UserId;
+ public string State;
+
+ public UserStatus(string userId, string talkId, string state = "unwatched") {
+ UserId = userId;
+ State = state;
+ TalkId = talkId;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Pages/Error.cshtml b/Pages/Error.cshtml
new file mode 100644
index 0000000..89a1b7f
--- /dev/null
+++ b/Pages/Error.cshtml
@@ -0,0 +1,25 @@
+@page
+@model ErrorModel
+@{
+ ViewData["Title"] = "Error";
+}
+
+
Error.
+An error occurred while processing your request.
+
+@if (Model.ShowRequestId) {
+ @Model.RequestId
+ Development Mode
+Welcome to c3stream!
+ Your bookmark link:
+ https://@Request.Host.Value?bookmark=@Request.Cookies["bookmark"]
+ @title - @speakers
+}
+else if (isMarked) {
+ @title - @speakers
+}
+else {
+ @title - @speakers
+}
+
+@eventName - @category - @talk.Date?.Date.ToShortDateString()
+
").Replace("
https://@Request.Host.Value/Info?guid=@Request.Query["guid"]
\ No newline at end of file
diff --git a/Pages/Info.cshtml.cs b/Pages/Info.cshtml.cs
new file mode 100644
index 0000000..3b8a73f
--- /dev/null
+++ b/Pages/Info.cshtml.cs
@@ -0,0 +1,12 @@
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.Extensions.Logging;
+
+namespace c3stream.Pages {
+ public class InfoModel : PageModel {
+ private readonly ILogger
+ All data saved about you on this website is the watched status of talks you marked in association with your randomly generated bookmark UUID.
+ No logs are kept, no trackers used. Keep in mind that you are forwarded to media.ccc.de when you watch a talk, and therefore should check their privacy policy as well.
+ Have fun!
+