#107: Fixed double apps and general duplicates
This commit is contained in:
+12
-5
@@ -743,7 +743,7 @@ const Apps = (props) => {
|
||||
null
|
||||
|
||||
// Load data e.g. from github
|
||||
const getSpecificApps = (url) => {
|
||||
const getSpecificApps = (url, forceUpdate) => {
|
||||
setValidation(true)
|
||||
|
||||
setIsLoading(true)
|
||||
@@ -761,6 +761,8 @@ const Apps = (props) => {
|
||||
parsedData["field_2"] = field2
|
||||
}
|
||||
|
||||
parsedData["force_update"] = forceUpdate
|
||||
|
||||
alert.success("Getting specific apps from your URL.")
|
||||
var cors = "cors"
|
||||
fetch(globalUrl+"/api/v1/apps/get_existing", {
|
||||
@@ -977,8 +979,8 @@ const Apps = (props) => {
|
||||
window.location.href = "/apps/new?id="+appValidation
|
||||
}
|
||||
|
||||
const handleGithubValidation = () => {
|
||||
getSpecificApps(openApi)
|
||||
const handleGithubValidation = (forceUpdate) => {
|
||||
getSpecificApps(openApi, forceUpdate)
|
||||
setLoadAppsModalOpen(false)
|
||||
}
|
||||
|
||||
@@ -1034,7 +1036,7 @@ const Apps = (props) => {
|
||||
>
|
||||
<DialogTitle>
|
||||
<div style={{color: "rgba(255,255,255,0.9)"}}>
|
||||
Load from github repo
|
||||
Load from github repo
|
||||
</div>
|
||||
</DialogTitle>
|
||||
<DialogContent style={{color: "rgba(255,255,255,0.65)"}}>
|
||||
@@ -1098,7 +1100,12 @@ const Apps = (props) => {
|
||||
Cancel
|
||||
</Button>
|
||||
<Button style={{borderRadius: "0px"}} disabled={openApi.length === 0 || !openApi.includes("http")} onClick={() => {
|
||||
handleGithubValidation()
|
||||
handleGithubValidation(true)
|
||||
}} color="primary">
|
||||
Force update
|
||||
</Button>
|
||||
<Button variant="outlined" style={{float: "left", borderRadius: "0px"}} disabled={openApi.length === 0 || !openApi.includes("http")} onClick={() => {
|
||||
handleGithubValidation(false)
|
||||
}} color="primary">
|
||||
Submit
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user