mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-23 00:06:18 -04:00
Make "Unpair" and "auto-accept" translatable on the Edit Paired Devices Dialog
This commit is contained in:
parent
8b30940056
commit
3faa173dde
4 changed files with 12 additions and 4 deletions
|
@ -1393,7 +1393,10 @@ class EditPairedDevicesDialog extends Dialog {
|
|||
}
|
||||
|
||||
async _initDOM() {
|
||||
const unpairString = Localization.getTranslation("dialogs.unpair").toUpperCase();
|
||||
const autoAcceptString = Localization.getTranslation("dialogs.auto-accept").toLowerCase();
|
||||
const roomSecretsEntries = await PersistentStorage.getAllRoomSecretEntries();
|
||||
|
||||
roomSecretsEntries.forEach(roomSecretsEntry => {
|
||||
let $pairedDevice = document.createElement('div');
|
||||
$pairedDevice.classList = ["paired-device"];
|
||||
|
@ -1406,10 +1409,10 @@ class EditPairedDevicesDialog extends Dialog {
|
|||
<span>${roomSecretsEntry.device_name}</span>
|
||||
</div>
|
||||
<div class="button-wrapper">
|
||||
<label class="auto-accept pointer">auto-accept
|
||||
<label class="auto-accept pointer">${autoAcceptString}
|
||||
<input type="checkbox" ${roomSecretsEntry.auto_accept ? "checked" : ""}>
|
||||
</label>
|
||||
<button class="button" type="button">unpair</button>
|
||||
<button class="button" type="button">${unpairString}</button>
|
||||
</div>`
|
||||
|
||||
$pairedDevice.querySelector('input[type="checkbox"]').addEventListener('click', e => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue