mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
Revert "update user agent" for now as it cause trouble to login
This reverts commit ae8995fec2
.
(cherry picked from commit cd35171fd18d47839faa3ea119f3cbfc356c0a65)
This commit is contained in:
parent
bba367cde8
commit
8dd9c11241
6 changed files with 9 additions and 9 deletions
|
@ -260,7 +260,7 @@ function clearCookie(name) {
|
|||
/*--------Studio WX Message-------*/
|
||||
function IsInSlicer()
|
||||
{
|
||||
let bMatch=navigator.userAgent.match( RegExp('OrcaSlicer','i') );
|
||||
let bMatch=navigator.userAgent.match( RegExp('BBL-Slicer','i') );
|
||||
|
||||
return bMatch;
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ function clearCookie(name) {
|
|||
/*--------Studio WX Message-------*/
|
||||
function IsInSlicer()
|
||||
{
|
||||
let bMatch=navigator.userAgent.match( RegExp('OrcaSlicer','i') );
|
||||
let bMatch=navigator.userAgent.match( RegExp('BBL-Slicer','i') );
|
||||
|
||||
return bMatch;
|
||||
}
|
||||
|
|
|
@ -327,7 +327,7 @@ function clearCookie(name) {
|
|||
/*--------Studio WX Message-------*/
|
||||
function IsInSlicer()
|
||||
{
|
||||
let bMatch=navigator.userAgent.match( RegExp('OrcaSlicer','i') );
|
||||
let bMatch=navigator.userAgent.match( RegExp('BBL-Slicer','i') );
|
||||
|
||||
return bMatch;
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ function clearCookie(name) {
|
|||
/*--------Studio WX Message-------*/
|
||||
function IsInSlicer()
|
||||
{
|
||||
let bMatch=navigator.userAgent.match( RegExp('OrcaSlicer','i') );
|
||||
let bMatch=navigator.userAgent.match( RegExp('BBL-Slicer','i') );
|
||||
|
||||
return bMatch;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_AN
|
|||
|
||||
BOOST_LOG_TRIVIAL(info) << "login url = " << TargetUrl.ToStdString();
|
||||
|
||||
m_bbl_user_agent = wxString::Format("OrcaSlicer/v%s", SLIC3R_VERSION);
|
||||
m_bbl_user_agent = wxString::Format("BBL-Slicer/v%s", SLIC3R_VERSION);
|
||||
|
||||
// set the frame icon
|
||||
|
||||
|
|
|
@ -263,12 +263,12 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, wxString const & url)
|
|||
if (webView) {
|
||||
webView->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
|
||||
#ifdef __WIN32__
|
||||
webView->SetUserAgent(wxString::Format("OrcaSlicer/v%s (%s) Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
webView->SetUserAgent(wxString::Format("BBL-Slicer/v%s (%s) Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.52", SLIC3R_VERSION,
|
||||
Slic3r::GUI::wxGetApp().dark_mode() ? "dark" : "light"));
|
||||
webView->Create(parent, wxID_ANY, url2, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
|
||||
// We register the wxfs:// protocol for testing purposes
|
||||
webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewArchiveHandler("orca")));
|
||||
webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewArchiveHandler("bbl")));
|
||||
// And the memory: file system
|
||||
webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewFSHandler("memory")));
|
||||
#else
|
||||
|
@ -277,7 +277,7 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, wxString const & url)
|
|||
// And the memory: file system
|
||||
webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewFSHandler("memory")));
|
||||
webView->Create(parent, wxID_ANY, url2, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
|
||||
webView->SetUserAgent(wxString::Format("OrcaSlicer/v%s (%s) Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)", SLIC3R_VERSION,
|
||||
webView->SetUserAgent(wxString::Format("BBL-Slicer/v%s (%s) Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)", SLIC3R_VERSION,
|
||||
Slic3r::GUI::wxGetApp().dark_mode() ? "dark" : "light"));
|
||||
#endif
|
||||
#ifdef __WXMAC__
|
||||
|
@ -380,7 +380,7 @@ void WebView::RecreateAll()
|
|||
{
|
||||
auto dark = Slic3r::GUI::wxGetApp().dark_mode();
|
||||
for (auto webView : g_webviews) {
|
||||
webView->SetUserAgent(wxString::Format("OrcaSlicer/v%s (%s) Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)", SLIC3R_VERSION,
|
||||
webView->SetUserAgent(wxString::Format("BBL-Slicer/v%s (%s) Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)", SLIC3R_VERSION,
|
||||
dark ? "dark" : "light"));
|
||||
webView->Reload();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue