Fix of the app page
This commit is contained in:
@@ -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)
|
// 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
|
// 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
|
shouldBackupData := false
|
||||||
randomNumber := rand.Intn(20)
|
randomNumber := rand.Intn(20)
|
||||||
if randomNumber == 0 {
|
if randomNumber == 0 {
|
||||||
|
|||||||
@@ -347,7 +347,6 @@ const Hits = ({
|
|||||||
}
|
}
|
||||||
}, [currTab, window.location]);
|
}, [currTab, window.location]);
|
||||||
|
|
||||||
|
|
||||||
//Function for activation and deactivation of app
|
//Function for activation and deactivation of app
|
||||||
const handleActivateButton = (event, data, type) => {
|
const handleActivateButton = (event, data, type) => {
|
||||||
|
|
||||||
@@ -1205,7 +1204,7 @@ const Apps2 = (props) => {
|
|||||||
|
|
||||||
// Find top categories and tags based on the current tab
|
// Find top categories and tags based on the current tab
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currTab === 0 || currTab === 1) {
|
if (currTab === 0 || currTab === 1 || currTab === 3) {
|
||||||
setCategories(findTopCategories());
|
setCategories(findTopCategories());
|
||||||
setLabels(findTopTags());
|
setLabels(findTopTags());
|
||||||
}
|
}
|
||||||
@@ -1325,19 +1324,21 @@ const Apps2 = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("BACKUPAPPS: ", backups)
|
|
||||||
if (backups.length > 0) {
|
if (backups.length > 0) {
|
||||||
setBackupApps(backups)
|
setBackupApps(backups)
|
||||||
}
|
}
|
||||||
|
|
||||||
privateapps.push(...valid);
|
privateapps.push(...valid);
|
||||||
privateapps.push(...invalid);
|
privateapps.push(...invalid);
|
||||||
console.log("privateapps: setting apps ", privateapps)
|
|
||||||
setAppsToShow(privateapps);
|
setAppsToShow(privateapps);
|
||||||
setOrgApps(privateapps);
|
setOrgApps(privateapps);
|
||||||
setApps(privateapps);
|
setApps(privateapps);
|
||||||
|
|
||||||
// setFilteredApps(privateapps);
|
//setFilteredApps(privateapps);
|
||||||
|
const filteredOrgApps = filterApps(privateapps, searchQuery, selectedCategory, selectedLabel);
|
||||||
|
setAppsToShow(filteredOrgApps)
|
||||||
|
|
||||||
if (privateapps.length > 0) {
|
if (privateapps.length > 0) {
|
||||||
if (selectedApp?.id === undefined || selectedApp?.id === null) {
|
if (selectedApp?.id === undefined || selectedApp?.id === null) {
|
||||||
if (privateapps[0]?.owner !== undefined && privateapps[0]?.owner !== null) {
|
if (privateapps[0]?.owner !== undefined && privateapps[0]?.owner !== null) {
|
||||||
@@ -1345,6 +1346,7 @@ const Apps2 = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (privateapps?.length > 0 && storageApps?.length === 0) {
|
if (privateapps?.length > 0 && storageApps?.length === 0) {
|
||||||
try {
|
try {
|
||||||
localStorage.setItem("apps", JSON.stringify(privateapps))
|
localStorage.setItem("apps", JSON.stringify(privateapps))
|
||||||
@@ -2106,6 +2108,7 @@ const Apps2 = (props) => {
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
{selectedCategory.length > 0 && (
|
{selectedCategory.length > 0 && (
|
||||||
<ClearIcon
|
<ClearIcon
|
||||||
style={{
|
style={{
|
||||||
@@ -2219,7 +2222,10 @@ const Apps2 = (props) => {
|
|||||||
<div>
|
<div>
|
||||||
|
|
||||||
{
|
{
|
||||||
currTab === 0 || currTab === 3 && (
|
currTab !== 0 && currTab !== 3 ?
|
||||||
|
null
|
||||||
|
:
|
||||||
|
(
|
||||||
<div style={{ minHeight: 570 }}>
|
<div style={{ minHeight: 570 }}>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<LoadingGrid />
|
<LoadingGrid />
|
||||||
|
|||||||
Reference in New Issue
Block a user