Sale Djenic afa7928bae feat(@desktop/keycard): keycard settings -> migrate keypair flow
- Added flow which covers `Setup a new Keycard with an existing account` from
the keycard settings part (though two sub-flows there are missing, `Unlock Keycard`
and `Authentication` cause we don't have them yet).
- Updated factory reset flow (part of shared module) that it can read and display metadata
from a keycard if they are set, with this update this flow is almost complete, we are missing
`Unlock Keycard` flow for it as well.
2022-09-06 15:06:13 +02:00

24 lines
618 B
QML

import QtQuick 2.13
ListModel {
id: root
property var words: []
Component.onCompleted: {
var xhr = new XMLHttpRequest();
xhr.open("GET", "english.txt");
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
root.words = xhr.responseText.split('\n');
for (var i = 0; i < root.words.length; i++) {
if (root.words[i] !== "") {
insert(count, {"seedWord": root.words[i]});
}
}
}
}
xhr.send();
}
}