mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-22 19:50:44 +00:00
Introducing Orca Cloud: https://cloud.orcaslicer.com (#13414)
* Add OrcaCloud sync platform and preset bundle sharing system Introduce OrcaCloud, a cloud sync platform for user presets, alongside a preset bundle system that enables sharing printer/filament/process profiles as local exportable bundles or subscribed cloud bundles. OrcaCloud platform: - Auth to Orca Cloud - Encrypted token storage (file-based or system keychain) - User preset sync with - Profile migration from default/bambu folders on first login - Homepage integration with entrance to cloud.orcaslicer.com Preset bundles: - Local bundle import/export with bundle_structure.json metadata - Subscribed cloud bundles with version-based update checking - Thread-safe concurrent bundle access with read-write mutex - Canonical bundle preset naming (_local/<id>/... and _subscribed/<id>/...) - Bundle presets are read-only; grouped under subheaders in combo boxes - PresetBundleDialog with auto-sync toggle, refresh, update notifications - Hyperlinked bundle names to cloud bundle pages Co-authored-by: Sabriel Koh <sabrielkcr@gmail.com> Co-authored-by: Derrick <derrick992110@gmail.com> Co-authored-by: Mykola Nahirnyi <mnahirnyi@amcbridge.com> Co-authored-by: Ian Chua <iancrb00@gmail.com> Co-authored-by: Draginraptor <draginraptor@gmail.com> Co-authored-by: ExPikaPaka <112851715+ExPikaPaka@users.noreply.github.com> Co-authored-by: Ian Bassi <ian.bassi@outlook.com> Co-authored-by: Ocraftyone <Ocraftyone@users.noreply.github.com> Co-authored-by: yw4z <ywsyildiz@gmail.com> Co-authored-by: peterm-m <101202951+peterm-m@users.noreply.github.com> * Fixed an issue on Windows it failed to login Orca Cloud with Google account
This commit is contained in:
@@ -285,7 +285,7 @@ void PingCodeBindDialog::on_bind_printer(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
NetworkAgent* agent = wxGetApp().getAgent();
|
||||
if (agent && agent->is_user_login() && ping_code.length() == PING_CODE_LENGTH) {
|
||||
if (agent && agent->is_user_login(wxGetApp().get_printer_cloud_provider()) && ping_code.length() == PING_CODE_LENGTH) {
|
||||
auto result = agent->ping_bind(ping_code.ToStdString());
|
||||
|
||||
if(result < 0){
|
||||
@@ -868,11 +868,12 @@ void BindMachineDialog::on_show(wxShowEvent &event)
|
||||
|
||||
m_printer_name->SetLabelText(from_u8(m_machine_info->get_dev_name()));
|
||||
|
||||
if (wxGetApp().is_user_login()) {
|
||||
wxString username_text = from_u8(wxGetApp().getAgent()->get_user_nickname());
|
||||
const std::string provider = wxGetApp().get_printer_cloud_provider();
|
||||
if (wxGetApp().is_user_login(provider)) {
|
||||
wxString username_text = from_u8(wxGetApp().getAgent()->get_user_nickname(provider));
|
||||
m_user_name->SetLabelText(username_text);
|
||||
|
||||
std::string avatar_url = wxGetApp().getAgent()->get_user_avatar();
|
||||
std::string avatar_url = wxGetApp().getAgent()->get_user_avatar(provider);
|
||||
Slic3r::Http http = Slic3r::Http::get(avatar_url);
|
||||
std::string suffix = avatar_url.substr(avatar_url.find_last_of(".") + 1);
|
||||
http.header("accept", "image/" + suffix)
|
||||
@@ -1017,7 +1018,7 @@ void UnBindMachineDialog::on_cancel(wxCommandEvent &event)
|
||||
|
||||
void UnBindMachineDialog::on_unbind_printer(wxCommandEvent &event)
|
||||
{
|
||||
if (!wxGetApp().is_user_login()) {
|
||||
if (!wxGetApp().is_user_login(wxGetApp().get_printer_cloud_provider())) {
|
||||
m_status_text->SetLabelText(_L("Please log in first."));
|
||||
return;
|
||||
}
|
||||
@@ -1073,11 +1074,12 @@ void UnBindMachineDialog::on_show(wxShowEvent &event)
|
||||
m_printer_name->SetLabelText(from_u8(m_machine_info->get_dev_name()));
|
||||
|
||||
|
||||
if (wxGetApp().is_user_login()) {
|
||||
wxString username_text = from_u8(wxGetApp().getAgent()->get_user_name());
|
||||
const std::string provider = wxGetApp().get_printer_cloud_provider();
|
||||
if (wxGetApp().is_user_login(provider)) {
|
||||
wxString username_text = from_u8(wxGetApp().getAgent()->get_user_name(provider));
|
||||
m_user_name->SetLabelText(username_text);
|
||||
|
||||
std::string avatar_url = wxGetApp().getAgent()->get_user_avatar();
|
||||
std::string avatar_url = wxGetApp().getAgent()->get_user_avatar(provider);
|
||||
Slic3r::Http http = Slic3r::Http::get(avatar_url);
|
||||
std::string suffix = avatar_url.substr(avatar_url.find_last_of(".") + 1);
|
||||
http.header("accept", "image/" + suffix)
|
||||
|
||||
Reference in New Issue
Block a user