Add info banner to about page, announce follower count limit

This commit is contained in:
Miss Pasture 2021-07-17 15:22:36 -04:00
parent fd1b3ab983
commit 8299249973
3 changed files with 27 additions and 2 deletions

View file

@ -39,7 +39,8 @@ namespace BirdsiteLive.Services
{
RefreshedTime = DateTime.UtcNow,
Saturation = saturation,
UnlistedUsers = _instanceSettings.UnlistedTwitterAccounts.Length > 0 ? string.Join("\n", _instanceSettings.UnlistedTwitterAccounts.Split(";").Select(i => "<li>" + i + "</li>")) : "(none)"
UnlistedUsers = _instanceSettings.UnlistedTwitterAccounts.Length > 0 ? string.Join("\n", _instanceSettings.UnlistedTwitterAccounts.Split(";").Select(i => "<li>" + i + "</li>")) : "(none)",
Settings = _instanceSettings
};
}
@ -52,5 +53,6 @@ namespace BirdsiteLive.Services
public DateTime RefreshedTime { get; set; }
public int Saturation { get; set; }
public string UnlistedUsers { get; set; }
public InstanceSettings Settings { get; set; }
}
}

View file

@ -6,6 +6,20 @@
<div class="col-12 col-sm-12 col-md-10 col-lg-8 mx-auto">
<h1>About</h1>
@if (Model.Settings.MaxFollowsPerUser > 0)
{
<div class="alert alert-warning">
In order to keep this service available to everyone, users are only permitted to follow <b>@Model.Settings.MaxFollowsPerUser</b> account(s). Any additional follows will be rejected.
</div>
}
@if (Model.Settings.InfoBanner.Length > 0)
{
<div class="alert alert-danger">
@Html.Raw(Model.Settings.InfoBanner)
</div>
}
<h4>What is this site?</h4>
<p>
@ -34,7 +48,9 @@
<h4 id="saturation">What does "instance saturation" mean?</h4>
<p>
This instance's saturation level is currently at @Model.Saturation%.<br /><br />
This instance's saturation level is currently at @Model.Saturation%.
<br /><br />
This instance relies on a tool Twitter provides (the API) to fetch Tweets in a predictable and high-quality manner. However, due to limits imposed by Twitter, this instance can only fetch so many Tweets and users per hour.<br /><br />

View file

@ -19,6 +19,13 @@
<br /><br />
@if( Model.MaxFollowsPerUser > 0)
{
<div class="alert alert-warning">
In order to keep this service available to everyone, users are only permitted to follow <b>@Model.MaxFollowsPerUser</b> account(s). Any additional follows will be rejected. For more information, see our <a href="/About#saturation">about page</a>.
</div>
}
@if (Model.InfoBanner.Length > 0)
{
<div class="alert alert-danger">