+
+
+
+
No Telephony Peers
+
Waiting for announces on the mesh.
+
+
+
@@ -1145,6 +1265,11 @@ export default {
editingRingtoneName: "",
elapsedTimeInterval: null,
voicemailSearch: "",
+ discoverySearch: "",
+ discoveryAnnounces: [],
+ discoveryLimit: 10,
+ discoveryOffset: 0,
+ hasMoreDiscovery: true,
contactsSearch: "",
contacts: [],
isContactModalOpen: false,
@@ -1186,6 +1311,7 @@ export default {
this.getHistory();
this.getVoicemails();
this.getContacts();
+ this.getDiscovery();
this.getVoicemailStatus();
this.getRingtones();
this.getRingtoneStatus();
@@ -1202,6 +1328,7 @@ export default {
this.getHistory();
this.getVoicemails();
this.getContacts();
+ this.getDiscovery();
}, 10000);
// update elapsed time every second
@@ -1236,6 +1363,9 @@ export default {
formatDateTime(timestamp) {
return Utils.convertUnixMillisToLocalDateTimeString(timestamp);
},
+ formatTimeAgo(datetimeString) {
+ return Utils.formatTimeAgo(datetimeString);
+ },
formatDuration(seconds) {
return Utils.formatMinutesSeconds(seconds);
},
@@ -1347,6 +1477,44 @@ export default {
this.getHistory();
}, 500);
},
+ async getDiscovery(loadMore = false) {
+ try {
+ if (!loadMore) {
+ this.discoveryOffset = 0;
+ this.hasMoreDiscovery = true;
+ }
+
+ const response = await window.axios.get("/api/v1/announces", {
+ params: {
+ aspect: "lxst.telephony",
+ limit: this.discoveryLimit,
+ offset: this.discoveryOffset,
+ search: this.discoverySearch,
+ },
+ });
+
+ const newItems = response.data.announces;
+ if (loadMore) {
+ this.discoveryAnnounces = [...this.discoveryAnnounces, ...newItems];
+ } else {
+ this.discoveryAnnounces = newItems;
+ }
+
+ this.hasMoreDiscovery = newItems.length === this.discoveryLimit;
+ } catch (e) {
+ console.log(e);
+ }
+ },
+ async loadMoreDiscovery() {
+ this.discoveryOffset += this.discoveryLimit;
+ await this.getDiscovery(true);
+ },
+ onDiscoverySearchInput() {
+ if (this.searchDebounceTimeout) clearTimeout(this.searchDebounceTimeout);
+ this.searchDebounceTimeout = setTimeout(() => {
+ this.getDiscovery();
+ }, 500);
+ },
async toggleDoNotDisturb(value) {
try {
await window.axios.post("/api/v1/config", {