简体   繁体   中英

How to change the reconnect overlay in serverside blazor

I would like to chance the overlay when the site is disconnected.

("Reconnection failed. Try reloading the page if youre unable to reconnect. [Retry]")

Is this possible?

I came across an article explaining how to integrate blazor server side with an existing mvc project and found an explanation on how to override the reconnect message. It seems blazor creates the following:

<div id="components-reconnect-modal" class="reconnect-block">
   <div class="reconnect-wait">
      Connection lost -- please wait, attempting to reconnect
   </div>
   <div class="reconnect-button">
      Unable to reconnect. Click to attempt to reconnect:
      <input type="button" value="Reconnect" onclick="Reconnect()" />
   </div>
</div>

<script>
   function Reconnect() {
     window.Blazor.reconnect();
   }
</script>

I'm sure this can be overwritten with whatever you'd like. Hope this helps.

Source: Article

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM