Readouble

Livewire v3 オフラインステータス

オフラインステータス

リアルタイムアプリケーションでは、ユーザーのデバイスがインターネットに接続されていないことを視覚的に示すことが役立つ場合があります。In real-time applications, it can be helpful to provide a visual indication that the user's device is no longer connected to the internet.

Livewireは、このような場合に役立つwire:offlineディレクティブを提供します。Livewire provides the wire:offline directive for such cases.

Livewireコンポーネント内の要素にwire:offlineを追加すると、デフォルトで非表示になり、ユーザーが接続を失うと表示されるようになります。By adding wire:offline to an element inside a Livewire component, it will be hidden by default and become visible when the user loses connection:

<div wire:offline>
    このデバイスは現在オフラインです。
</div>

クラスの切り替えToggling classes

class修飾子を追加すると、ユーザーが接続を失ったときに要素にクラスを追加できます。ユーザーがオンラインに戻ると、クラスは再び削除されます。Adding the class modifier allows you to add a class to an element when the user loses their connection. The class will be removed again, once the user is back online:

<div wire:offline.class="bg-red-300">

または、.remove修飾子を使用すると、ユーザーが接続を失ったときにクラスを削除できます。この例では、ユーザーが接続を失っている間、<div>からbg-green-300クラスが削除されます。Or, using the .remove modifier, you can remove a class when a user loses their connection. In this example, the bg-green-300 class will be removed from the <div> while the user has lost their connection:

<div class="bg-green-300" wire:offline.class.remove="bg-green-300">

属性の切り替えToggling attributes

.attr修飾子を使用すると、ユーザーが接続を失ったときに要素に属性を追加できます。この例では、ユーザーが接続を失っている間、「Save」ボタンは無効になります。The .attr modifier allows you to add an attribute to an element when the user loses their connection. In this example, the "Save" button will be disabled while the user has lost their connection:

<button wire:offline.attr="disabled">Save</button>

章選択

パッケージ

設定

バージョン変更
linkv3 linkv2
明暗テーマ
light_mode
dark_mode
brightness_auto システム設定に合わせる
テーマ選択
photo_size_select_actual デフォルト
photo_size_select_actual モノクローム(白黒)
photo_size_select_actual Solarized風
photo_size_select_actual GitHub風(青ベース)
photo_size_select_actual Viva(黄緑ベース)
photo_size_select_actual Happy(紫ベース)
photo_size_select_actual Mint(緑ベース)
コードハイライトテーマ選択

明暗テーマごとに、コードハイライトのテーマを指定できます。

テーマ配色確認
スクリーン表示幅
640px
80%
90%
100%

768px以上の幅があるときのドキュメント部分表示幅です。

インデント
無し
1rem
2rem
3rem
原文確認
原文を全行表示
原文を一行ずつ表示
使用しない

※ 段落末のEボタンへカーソルオンで原文をPopupします。

Diff表示形式
色分けのみで区別
行頭の±で区別
削除線と追記で区別

※ [tl!…]形式の挿入削除行の表示形式です。

テストコード表示
両コード表示
Pestのみ表示
PHPUnitのみ表示
OS表示
全OS表示
macOSのみ表示
windowsのみ表示
linuxのみ表示
JSフレームワーク
両フレームワーク
Reactのみ表示
Vueのみ表示
JSのみ表示

(JSが存在しない場合は、他を全表示)

和文変換

対象文字列と置換文字列を半角スペースで区切ってください。(最大5組各10文字まで)

本文フォント

総称名以外はCSSと同様に、"〜"でエスケープしてください。

コードフォント

総称名以外はCSSと同様に、"〜"でエスケープしてください。

保存内容リセット

localStrageに保存してある設定項目をすべて削除し、デフォルト状態へ戻します。

ヘッダー項目移動

キーボード操作