diff options
-rw-r--r-- | MatrixRoomUtils.Web/Pages/About.razor | 24 | ||||
-rw-r--r-- | MatrixRoomUtils.Web/Shared/MainLayout.razor | 28 | ||||
-rwxr-xr-x | scripts/deploy.sh | 10 |
3 files changed, 2 insertions, 60 deletions
diff --git a/MatrixRoomUtils.Web/Pages/About.razor b/MatrixRoomUtils.Web/Pages/About.razor index 59368af..18d7c3f 100644 --- a/MatrixRoomUtils.Web/Pages/About.razor +++ b/MatrixRoomUtils.Web/Pages/About.razor @@ -1,7 +1,4 @@ @page "/About" -@using System.Net -@inject NavigationManager NavigationManager -@inject ILocalStorageService LocalStorage <PageTitle>About</PageTitle> @@ -13,24 +10,3 @@ <br/><br/> <p>You can find the source code on <a href="https://cgit.rory.gay/matrix/MatrixRoomUtils.git/">cgit.rory.gay</a>.<br/></p> <p>You can also join the <a href="https://matrix.to/#/%23mru%3Arory.gay?via=rory.gay&via=matrix.org&via=feline.support">Matrix room</a> for this project.</p> -@if (BinDownloadAvailable) { - <p>This deployment also serves a copy of the compiled, hosting-ready binaries at <a href="/MRU-BIN.tar.xz">/MRU-BIN.tar.xz</a>!</p> -} -@if (SrcDownloadAvailable) { - <p>This deployment also serves a copy of the source code at <a href="/MRU-SRC.tar.xz">/MRU-SRC.tar.xz</a>!</p> -} - -@code { - private bool BinDownloadAvailable { get; set; } - private bool SrcDownloadAvailable { get; set; } - - protected override async Task OnInitializedAsync() { - using var hc = new HttpClient(); - var hr = await hc.SendAsync(new HttpRequestMessage(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-BIN.tar.xz").AbsoluteUri)); - BinDownloadAvailable = hr.StatusCode == HttpStatusCode.OK; - hr = await hc.SendAsync(new HttpRequestMessage(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-SRC.tar.xz").AbsoluteUri)); - SrcDownloadAvailable = hr.StatusCode == HttpStatusCode.OK; - await base.OnInitializedAsync(); - } - -} diff --git a/MatrixRoomUtils.Web/Shared/MainLayout.razor b/MatrixRoomUtils.Web/Shared/MainLayout.razor index 74db805..2322af1 100644 --- a/MatrixRoomUtils.Web/Shared/MainLayout.razor +++ b/MatrixRoomUtils.Web/Shared/MainLayout.razor @@ -9,36 +9,12 @@ <main> <div class="top-row px-4"> <PortableDevTools></PortableDevTools> - <a href="https://cgit.rory.gay/MatrixRoomUtils.git/" target="_blank">Git</a> + <a href="https://cgit.rory.gay/matrix/MatrixRoomUtils.git/" target="_blank">Git</a> <a href="https://matrix.to/#/%23mru%3Arory.gay?via=rory.gay&via=matrix.org&via=feline.support" target="_blank">Matrix</a> - @if (showDownload) { - <a href="/MRU.tar.xz" target="_blank">Download</a> - } </div> <article class="Content px-4"> @Body </article> </main> -</div> - -@code { - private bool showDownload { get; set; } - - protected override async Task OnInitializedAsync() { - using var hc = new HttpClient(); - var hr = await hc.SendAsync(new HttpRequestMessage(HttpMethod.Head, NavigationManager.ToAbsoluteUri("/MRU-BIN.tar.xz").AbsoluteUri)); - showDownload = hr.StatusCode == HttpStatusCode.OK; - - // TODO: fix console logging toggle - // if (!LocalStorageWrapper.Settings.DeveloperSettings.EnableConsoleLogging) { - // Console.WriteLine("Console logging disabled!"); - // var sw = new StringWriter(); - // Console.SetOut(sw); - // Console.SetError(sw); - // } - - await base.OnInitializedAsync(); - } - -} \ No newline at end of file +</div> \ No newline at end of file diff --git a/scripts/deploy.sh b/scripts/deploy.sh index df79ace..6755053 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -12,13 +12,3 @@ rm -rf **/bin/Release cd MatrixRoomUtils.Web dotnet publish -c Release rsync -raP bin/Release/net8.0/publish/wwwroot/ rory.gay:/data/nginx/html_mru/ -cd bin/Release/net8.0/publish/wwwroot -tar cf - ./ | xz -z -9 - > $BASE_DIR/MRU-BIN.tar.xz -#rsync -raP $BASE_DIR/MRU-BIN.tar.xz rory.gay:/data/nginx/html_mru/MRU-BIN.tar.xz -rm -rf $BASE_DIR/MRU-BIN.tar.xz -cd $BASE_DIR -git clone .git -b `git branch --show-current` src --recursive -rm -rf src/.git -tar cf - src/ | xz -z -9 - > MRU-SRC.tar.xz -rsync -raP $BASE_DIR/MRU-SRC.tar.xz rory.gay:/data/nginx/html_mru/MRU-SRC.tar.xz -rm -rf src/ |