Remove license check (#1035)

* remove license check

* removed IsDirty

---------

Co-authored-by: jackcaver <jackcaver@users.noreply.github.com>
This commit is contained in:
jackcaver 2024-06-23 07:38:59 +06:00 committed by GitHub
parent be11e138f0
commit 0fd76f1662
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 0 additions and 32 deletions

View file

@ -14,5 +14,4 @@
<p><b>Branch</b>: @VersionHelper.Branch</p>
<p><b>Build</b>: @VersionHelper.Build</p>
<p><b>CommitHash</b>: @VersionHelper.CommitHash</p>
<p><b>IsDirty</b>: @VersionHelper.IsDirty</p>
<p><b>RepositoryUrl</b>: @VersionHelper.RepositoryUrl</p>

View file

@ -158,26 +158,6 @@
</div>
</div>
</noscript>
@if (!ServerStatics.IsDebug() && VersionHelper.IsDirty)
{
<div class="ui bottom attached red message large">
<div class="ui container">
<i class="warning icon"></i>
<span style="font-size: 1.2rem;">@Model.Translate(BaseLayoutStrings.LicenseWarnTitle)</span>
<p>
@Html.Raw(Model.Translate(BaseLayoutStrings.LicenseWarn1,
"<a href=\"https://github.com/LBPUnion/project-lighthouse/blob/main/LICENSE\">GNU Affero General Public License v3.0</a>"))
</p>
<p>
@Html.Raw(Model.Translate(BaseLayoutStrings.LicenseWarn2,
"<code>git status</code>", "<a href=\"https://github.com/LBPUnion/project-lighthouse/issues\">", "</a>"))
</p>
<p>
@Html.Raw(Model.Translate(BaseLayoutStrings.LicenseWarn3))
</p>
</div>
</div>
}
@if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode)
{
<div class="ui bottom attached red message large">
@ -234,10 +214,6 @@
<span class="ui text red">Cannot Detect Source Code</span>
}
</span>
@if (VersionHelper.IsDirty)
{
<p>@Model.Translate(BaseLayoutStrings.GeneratedModified)</p>
}
</div>
</div>
@if (ServerStatics.IsDebug())

View file

@ -19,7 +19,6 @@ public static class VersionHelper
public static string EnvVer => $"{ServerConfiguration.Instance.Customization.EnvironmentName} {FullRevision}";
public static string FullVersion =>
$"Project Lighthouse {ServerConfiguration.Instance.Customization.EnvironmentName} {Branch}@{CommitHash} {Build}";
public static bool IsDirty => ThisAssembly.Git.IsDirty;
public static string RepositoryUrl => ThisAssembly.Git.RepositoryUrl;
public const string Build =

View file

@ -53,12 +53,6 @@ public static class StartupTasks
// Version info depends on ServerConfig
Logger.Info($"You are running version {VersionHelper.FullVersion}", LogArea.Startup);
if (VersionHelper.IsDirty)
{
Logger.Warn("This is a modified version of Project Lighthouse. " +
"Please make sure you are properly disclosing the source code to any users who may be using this instance.",
LogArea.Startup);
}
Logger.Info("Connecting to the database...", LogArea.Startup);