{_msg("Peer to Peer Replicator")}

{_msg("P2P.Note.Summary")}

{_msg("P2P.Note.important_note")}

{_msg("P2P.Note.important_note_sub")}

{#each _msg("P2P.Note.description").split("\n\n") as paragraph}

{paragraph}

{/each}

{_msg("Connection Settings")}

{#if isObsidian} {_msg("You can configure in the Obsidian Plugin Settings.")} {:else}
{eRelay}
{_msg("Enable P2P Replicator")}
{_msg("Relay settings")}
{_msg("Room ID")} {_msg( "This can isolate your connections between devices. Use the same Room ID for the same devices." )}
{_msg("Password")} {_msg("This password is used to encrypt the connection. Use something long enough.")}
{_msg("This device name")} {_msg( 'Device name to identify the device. Please use shorter one for the stable peer detection, i.e., "iphone-16" or "macbook-2021".' )}
{_msg("Auto Connect")}
{_msg("Start change-broadcasting on Connect")}
{/if}

{_msg("Signaling Server Connection")}

{#if !isConnected}

{_msg("No Connection")}

{:else}

{_msg("Connected to Signaling Server (as Peer ID: ${peerId})", { peerId: serverPeerId })}

{/if}
{#if !isConnected} {:else} {#if replicatorInfo?.isBroadcasting !== undefined} {#if replicatorInfo?.isBroadcasting} {:else} {/if} {/if}
{_msg("Broadcasting?")}

{_msg( "If you want to use `LiveSync`, you should broadcast changes. All `watching` peers which detects this will start the replication for fetching." )}
{_msg("However, This should not be enabled if you want to increase your secrecy more.")}

{/if}

{_msg("Peers")}

{#each peers as peer} {/each}
{_msg("Name")} {_msg("Action")} {_msg("Command")}