How can I change the “Could not reconnect to the server” text in Blazor?

前端 未结 3 1270
灰色年华
灰色年华 2020-12-31 07:45

I am using the Blazor server-side.

When the Blazor App disconnect to the remote server, it will shows this:

I want to change the text (\'Could not

3条回答
  •  星月不相逢
    2020-12-31 08:25

    In your css:

    #components-reconnect-modal {
        display: none;
        position: fixed;
        top: 0px;
        right: 0px;
        bottom: 0px;
        left: 0px;
        z-index: 1000;
        overflow: hidden;
        background-color: rgb(255, 255, 255);
        opacity: 0.8;
        text-align: center;
        font-weight: bold;
    }
    #components-reconnect-modal.components-reconnect-show{
        display: block;
    }
    #components-reconnect-modal.components-reconnect-show div.reconnecting {
        display: block;
    }
    div.reconnecting {
        display: none;
    }
    
    #components-reconnect-modal.components-reconnect-failed {
        display: block;
    }
    #components-reconnect-modal.components-reconnect-failed div.failedToConnect {
        display: block;
    }
    div.failedToConnect {
        display: none;
    }
    
    #components-reconnect-modal.components-reconnect-rejected {
        display: block;
    }
    #components-reconnect-modal.components-reconnect-rejected div.connectionRejected {
        display: block;
    }
    div.connectionRejected {
        display: none;
    }
    
    #components-reconnect-modal.components-reconnect-hide {
        display: none;
    }
    

    In _Host body:

    Подключение к серверу...
    Не удалось подключиться к серверу
    Подключение к серверу прервано

提交回复
热议问题