Fix of the app page

This commit is contained in:
Frikky
2025-06-03 11:43:05 +02:00
parent 4a867d9f1b
commit 90d909e5da
2 changed files with 13 additions and 6 deletions
+1
View File
@@ -3809,6 +3809,7 @@ func remoteOrgJobHandler(org shuffle.Org, interval int) error {
// Check if it's 1/20 times (600 seconds - 10 min on average)
// Only problem: May take time to sync the first time, which is annoying
// This is to ensure that we don't spam the shuffle cloud servers with a lot of data
shouldBackupData := false
randomNumber := rand.Intn(20)
if randomNumber == 0 {
+12 -6
View File
@@ -347,7 +347,6 @@ const Hits = ({
}
}, [currTab, window.location]);
//Function for activation and deactivation of app
const handleActivateButton = (event, data, type) => {
@@ -1205,7 +1204,7 @@ const Apps2 = (props) => {
// Find top categories and tags based on the current tab
useEffect(() => {
if (currTab === 0 || currTab === 1) {
if (currTab === 0 || currTab === 1 || currTab === 3) {
setCategories(findTopCategories());
setLabels(findTopTags());
}
@@ -1325,19 +1324,21 @@ const Apps2 = (props) => {
}
}
console.log("BACKUPAPPS: ", backups)
if (backups.length > 0) {
setBackupApps(backups)
}
privateapps.push(...valid);
privateapps.push(...invalid);
console.log("privateapps: setting apps ", privateapps)
setAppsToShow(privateapps);
setOrgApps(privateapps);
setApps(privateapps);
// setFilteredApps(privateapps);
//setFilteredApps(privateapps);
const filteredOrgApps = filterApps(privateapps, searchQuery, selectedCategory, selectedLabel);
setAppsToShow(filteredOrgApps)
if (privateapps.length > 0) {
if (selectedApp?.id === undefined || selectedApp?.id === null) {
if (privateapps[0]?.owner !== undefined && privateapps[0]?.owner !== null) {
@@ -1345,6 +1346,7 @@ const Apps2 = (props) => {
}
}
}
if (privateapps?.length > 0 && storageApps?.length === 0) {
try {
localStorage.setItem("apps", JSON.stringify(privateapps))
@@ -2106,6 +2108,7 @@ const Apps2 = (props) => {
</MenuItem>
))}
</Select>
{selectedCategory.length > 0 && (
<ClearIcon
style={{
@@ -2219,7 +2222,10 @@ const Apps2 = (props) => {
<div>
{
currTab === 0 || currTab === 3 && (
currTab !== 0 && currTab !== 3 ?
null
:
(
<div style={{ minHeight: 570 }}>
{isLoading ? (
<LoadingGrid />