Add Adventure icon for slot settings (#494)

* Adventures show correct icon in settings

* Update ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml

Co-authored-by: Josh <josh@slendy.pw>

Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
Dagg 2022-09-24 16:22:45 -07:00 committed by GitHub
commit 343a88f802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,8 @@
bool isMobile = Request.IsMobile(); bool isMobile = Request.IsMobile();
int size = isMobile ? 100 : 200; int size = isMobile ? 100 : 200;
bool isAdventure = Model.Slot?.IsAdventurePlanet ?? false;
string advenStyleExt = isAdventure ? "-webkit-mask-image: url(/assets/advSlotCardMask.png); -webkit-mask-size: contain; border-radius: 0%;" : "";
} }
<script> <script>
@ -37,11 +39,11 @@ function onSubmit(){
<div class="field" style="display: flex; justify-content: center; align-items: center;"> <div class="field" style="display: flex; justify-content: center; align-items: center;">
<div> <div>
<div> <div>
<img src="~/assets/slotCardOverlay.png" style="min-width: @(size)px; width: @(size)px; height: @(size)px; pointer-events: none; position: absolute; z-index: 3;"> <img src=@(isAdventure ? "/assets/advSlotCardOverlay.png" : "/assets/slotCardOverlay.png") style="min-width: @(size)px; width: @(size)px; height: @(size)px; pointer-events: none; position: absolute; z-index: 3;">
<img src="~/assets/slotCardBackground.png" style="min-width: @(size)px; width: @(size)px; height: @(size)px; position: absolute; z-index: 1;"> <img src="~/assets/slotCardBackground.png" style="min-width: @(size)px; width: @(size)px; height: @(size)px; position: absolute; z-index: 1; @(advenStyleExt)">
<img id="slotIcon" class="cardIcon slotCardIcon" src="/gameAssets/@Model.Slot.IconHash" style="min-width: @(size)px; width: @(size)px; height: @(size)px; position: relative; z-index: 2" <img id="slotIcon" class="cardIcon slotCardIcon" src="/gameAssets/@Model.Slot.IconHash" style="min-width: @(size)px; width: @(size)px; height: @(size)px; position: relative; z-index: 2; @(advenStyleExt)"
onerror="this.onerror='';this.src='/gameAssets/@ServerConfiguration.Instance.WebsiteConfiguration.MissingIconHash'"> onerror="this.onerror='';this.src='/gameAssets/@ServerConfiguration.Instance.WebsiteConfiguration.MissingIconHash'">
</div> </div>
<div class="ui fitted divider hidden"></div> <div class="ui fitted divider hidden"></div>
<label for="avatar" class="ui blue button" style="color: white; max-width: @(size)px"> <label for="avatar" class="ui blue button" style="color: white; max-width: @(size)px">
<i class="arrow circle up icon"></i> <i class="arrow circle up icon"></i>