Browse Source

Fix page counter

qortal-ui-dev
AlphaX-Projects 1 year ago
parent
commit
f0897e2982
  1. 20
      qortal-ui-plugins/plugins/core/q-app/q-apps.src.js
  2. 14
      qortal-ui-plugins/plugins/core/qdn/websites.src.js

20
qortal-ui-plugins/plugins/core/q-app/q-apps.src.js

@ -760,7 +760,7 @@ class QApps extends LitElement {
} else {
offset = 0
}
this.getData(offset);
this.getData(offset)
const selectedPage = parseInt(this.pagesControl.querySelector('[selected]').textContent)
this.updateItemsFromPage(selectedPage - 1)
})
@ -776,7 +776,7 @@ class QApps extends LitElement {
} else {
offset = 0
}
this.getData(offset);
this.getData(offset)
this.updateItemsFromPage(parseInt(e.target.textContent))
})
if (pageNumber === page) {
@ -793,7 +793,7 @@ class QApps extends LitElement {
} else {
offset = 0
}
this.getData(offset);
this.getData(offset)
const selectedPage = parseInt(this.pagesControl.querySelector('[selected]').textContent)
this.updateItemsFromPage(selectedPage + 1)
})
@ -831,6 +831,12 @@ class QApps extends LitElement {
await this.updateItemsFromPage(1, true)
}
async refreshapps() {
await this.getData(0)
await this.getArbitraryResources()
await this.updateItemsFromPage(1, true)
}
doSearch(e) {
this.searchResult()
}
@ -1008,7 +1014,7 @@ class QApps extends LitElement {
this.followedNames.push(name)
this.getFollowedNamesRefresh()
this.getFollowedNamesResource()
this.getArbitraryResources()
this.refreshapps()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err3string = get("appspage.schange22")
@ -1037,7 +1043,7 @@ class QApps extends LitElement {
this.followedNames = this.followedNames.filter(item => item != name)
this.getFollowedNamesRefresh()
this.getFollowedNamesResource()
this.getArbitraryResources()
this.refreshapps()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err4string = get("appspage.schange23")
@ -1067,7 +1073,7 @@ class QApps extends LitElement {
this.blockedNames.push(name)
this.getBlockedNamesRefresh()
this.getBlockedNamesResource()
this.getArbitraryResources()
this.refreshapps()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err5string = get("appspage.schange24")
@ -1096,7 +1102,7 @@ class QApps extends LitElement {
this.blockedNames = this.blockedNames.filter(item => item != name)
this.getBlockedNamesRefresh()
this.getBlockedNamesResource()
this.getArbitraryResources()
this.refreshapps()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err6string = get("appspage.schange25")

14
qortal-ui-plugins/plugins/core/qdn/websites.src.js

@ -676,6 +676,12 @@ class Websites extends LitElement {
await this.updateItemsFromPage(1, true)
}
async refreshWebsites() {
await this.getData(0)
await this.getArbitraryResources()
await this.updateItemsFromPage(1, true)
}
doSearch(e) {
this.searchResult()
}
@ -753,7 +759,7 @@ class Websites extends LitElement {
this.followedNames.push(name)
this.getFollowedNamesRefresh()
this.getFollowedNamesResource()
this.getArbitraryResources()
this.refreshWebsites()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err3string = get("websitespage.schange22")
@ -783,7 +789,7 @@ class Websites extends LitElement {
this.followedNames = this.followedNames.filter(item => item != name)
this.getFollowedNamesRefresh()
this.getFollowedNamesResource()
this.getArbitraryResources()
this.refreshWebsites()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err4string = get("websitespage.schange23")
@ -816,7 +822,7 @@ class Websites extends LitElement {
this.blockedNames.push(name)
this.getBlockedNamesRefresh()
this.getBlockedNamesResource()
this.getArbitraryResources()
this.refreshWebsites()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err5string = get("websitespage.schange24")
@ -846,7 +852,7 @@ class Websites extends LitElement {
this.blockedNames = this.blockedNames.filter(item => item != name)
this.getBlockedNamesRefresh()
this.getBlockedNamesResource()
this.getArbitraryResources()
this.refreshWebsites()
this.updateComplete.then(() => this.requestUpdate())
} else {
let err6string = get("websitespage.schange25")

Loading…
Cancel
Save