diff --git a/core/language/us.json b/core/language/us.json index e43bec41..18631964 100644 --- a/core/language/us.json +++ b/core/language/us.json @@ -1193,6 +1193,7 @@ "friend13": "Feed", "friend14": "Remove friend", "friend15": "Feed settings", - "friend16": "Select the Q-Apps you want updates from, especially those related to your friends." + "friend16": "Select the Q-Apps you want updates from, especially those related to your friends.", + "friends17": "Friends" } } \ No newline at end of file diff --git a/core/src/components/app-view.js b/core/src/components/app-view.js index cb12b505..7be45ec4 100644 --- a/core/src/components/app-view.js +++ b/core/src/components/app-view.js @@ -560,7 +560,7 @@ class AppView extends connect(store)(LitElement) {
- + diff --git a/core/src/components/friends-view/add-friends-modal.js b/core/src/components/friends-view/add-friends-modal.js index 20973871..0f420d85 100644 --- a/core/src/components/friends-view/add-friends-modal.js +++ b/core/src/components/friends-view/add-friends-modal.js @@ -12,6 +12,7 @@ import '@material/mwc-dialog'; import '@material/mwc-checkbox'; import { connect } from 'pwa-helpers'; import { store } from '../../store'; +import '@polymer/paper-spinner/paper-spinner-lite.js' class AddFriendsModal extends connect(store)(LitElement) { static get properties() { @@ -27,7 +28,8 @@ class AddFriendsModal extends connect(store)(LitElement) { editContent: { type: Object }, onClose: { attribute: false }, mySelectedFeeds: { type: Array }, - availableFeeedSchemas: {type: Array} + availableFeeedSchemas: {type: Array}, + isLoadingSchemas: {type: Boolean} }; } @@ -41,7 +43,8 @@ class AddFriendsModal extends connect(store)(LitElement) { this.nodeUrl = this.getNodeUrl(); this.myNode = this.getMyNode(); this.mySelectedFeeds = []; - this.availableFeeedSchemas = [] + this.availableFeeedSchemas = []; + this.isLoadingSchemas= false; } static get styles() { @@ -53,6 +56,7 @@ class AddFriendsModal extends connect(store)(LitElement) { --mdc-dialog-content-ink-color: var(--black); --mdc-dialog-min-width: 400px; --mdc-dialog-max-width: 1024px; + box-sizing:border-box; } .input { width: 90%; @@ -145,9 +149,11 @@ class AddFriendsModal extends connect(store)(LitElement) { box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px; z-index: 1001; border-radius: 5px; - max-height: 80vh; - overflow: auto; + display: flex; + flex-direction:column; } + + .modal-overlay.hidden { display: none; } @@ -155,7 +161,7 @@ class AddFriendsModal extends connect(store)(LitElement) { width: 36px; height: 36px; display: flex; - align-items: center; + align-items: center; } .app-name { @@ -168,6 +174,30 @@ class AddFriendsModal extends connect(store)(LitElement) { border-radius: 5px; margin-bottom: 10px; } + .inner-content { + display: flex; + flex-direction: column; + max-height: 75vh; + flex-grow: 1; + overflow: auto; + } + + .inner-content::-webkit-scrollbar-track { + background-color: whitesmoke; + border-radius: 7px; + } + + .inner-content::-webkit-scrollbar { + width: 12px; + border-radius: 7px; + background-color: whitesmoke; + } + + .inner-content::-webkit-scrollbar-thumb { + background-color: rgb(180, 176, 176); + border-radius: 7px; + transition: all 0.3s ease-in-out; + } `; } @@ -250,10 +280,10 @@ class AddFriendsModal extends connect(store)(LitElement) { async getAvailableFeedSchemas() { try { + this.isLoadingSchemas= true const url = `${this.nodeUrl}/arbitrary/resources/search?service=DOCUMENT&identifier=ui_schema_feed&prefix=true`; const res = await fetch(url); const data = await res.json(); - if (data.error === 401) { this.availableFeeedSchemas = []; } else { @@ -264,13 +294,17 @@ class AddFriendsModal extends connect(store)(LitElement) { this.availableFeeedSchemas = result; } this.userFoundModalOpen = true; - } catch (error) {} + } catch (error) {} finally { + this.isLoadingSchemas= false + } } render() { return html`