Skip to content

Commit

Permalink
Add more captive portal URL
Browse files Browse the repository at this point in the history
Fix Marlin filter file settings not working for second SD and isolate normal SD and Direct SD setting to avoid duplicate item and so conflict value
Bump version
  • Loading branch information
luc-github committed Oct 13, 2024
1 parent 27ba10f commit 2c14171
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/App/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
import { h } from "preact"
import { webUIbuild } from "../../targets"
export const webUIversion = "3.0.0-a77"
export const webUIversion = "3.0.0-a78"
export const Esp3dVersion = () => (
<span>
{webUIversion}.{webUIbuild}
Expand Down
17 changes: 13 additions & 4 deletions src/components/Helpers/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,30 @@ const espHttpURL = (base = "", args = {}) => {

function isLimitedEnvironment(mode) {
let sitesList = [
"clients3.google.com", //Android Captive Portal Detection
//google / android Captive Portal Detection
"google.com",
"connectivitycheck.",
//Apple iPhone, iPad with iOS 6 Captive Portal Detection
"googleapis.com",
"gstatic.com",
// Apple iPhone, iPad with iOS 6 Captive Portal Detection
"apple.com",
".akamaitechnologies.com",
//Apple iPhone, iPad with iOS 7, 8, 9 and recent versions of OS X
// Apple iPhone, iPad with iOS 7, 8, 9 and recent versions of OS X
"www.appleiphonecell.com",
"www.itools.info",
"www.ibook.info",
"www.airport.us",
"www.thinkdifferent.us",
".akamaiedge.net",
//Windows
// Windows
".msftncsi.com",
"microsoft.com",
".msftconnecttest.com",
// Firefox
"detectportal.firefox.com",
// Linux
"network-test.debian.org",
"nmcheck.gnome.org",
]
if (mode != "AP") return false
for (let i = 0; i < sitesList.length; i++) {
Expand Down
3 changes: 2 additions & 1 deletion src/targets/Printer3D/Marlin/DIRECTSD-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const commands = {
},
formatResult: (resultTxT) => {
const res = JSON.parse(resultTxT)
if (useUiContextFn.getValue("sort_sd_files")){
console.log("direct SD sort", useUiContextFn.getValue("sort_directsd_files"))
if (useUiContextFn.getValue("sort_directsd_files")){
res.files = sortedFilesList(res.files)
}
res.status = formatStatus(res.status)
Expand Down
1 change: 1 addition & 0 deletions src/targets/Printer3D/Marlin/SD-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const commands = {
formatResult: (result) => {
const files = formatFileSerialLine(result.content)
const isSorted = useUiContextFn.getValue("sort_sd_files")
console.log("sd is sorted", isSorted)
return {
files: isSorted? sortedFilesList(files, false) : files,
status: formatStatus(result.status),
Expand Down
7 changes: 4 additions & 3 deletions src/targets/Printer3D/Marlin/SDEXT-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ const commands = {
}
},
filterResult: (data, path) => {
//console.log(data)
const isSorted = useUiContextFn.getValue("sort_sd_files")
console.log(data)
const isSorted = useUiContextFn.getValue("sort_sdext_files")
console.log("is sorted ext", isSorted)
const res = {}
res.files = isSorted? sortedFilesList(filterResultFiles(data.files, path), false) : filterResultFiles(data.files, path)
res.files = isSorted? sortedFilesList(filterResultFiles(data.files, path), true) : filterResultFiles(data.files, path)
res.status = formatStatus(data.status)
return res
},
Expand Down
15 changes: 14 additions & 1 deletion src/targets/Printer3D/Marlin/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,20 @@
"type": "boolean",
"label": "S224",
"value": true,
"depend": [{ "id": "sd", "value": true }]
"depend": [{ "id": "sd", "value": true },{
"connection_id": "SDConnection",
"value": "=='none'"
} ]
},
{
"id": "sort_directsd_files",
"type": "boolean",
"label": "S224",
"value": true,
"depend": [{ "id": "sd", "value": true },{
"connection_id": "SDConnection",
"value": "!='none'"
} ]
}
]
},
Expand Down

0 comments on commit 2c14171

Please sign in to comment.