mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +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:
@@ -229,9 +229,17 @@ void Tab::create_preset_tab()
|
||||
if (m_type == Preset::TYPE_PRINTER && !m_presets_choice->is_selected_physical_printer())
|
||||
m_preset_bundle->physical_printers.unselect_printer();
|
||||
|
||||
// select preset
|
||||
std::string preset_name = m_presets_choice->GetString(selection).ToUTF8().data();
|
||||
select_preset(Preset::remove_suffix_modified(preset_name));
|
||||
// select preset — prefer stored internal name to avoid alias collisions
|
||||
wxString stored_name = m_presets_choice->GetItemAlias(selection);
|
||||
std::string preset_name;
|
||||
if (!stored_name.empty()) {
|
||||
preset_name = Preset::remove_suffix_modified(stored_name.ToUTF8().data());
|
||||
} else {
|
||||
std::string selected_label = Preset::remove_suffix_modified(
|
||||
m_presets_choice->GetString(selection).ToUTF8().data());
|
||||
preset_name = m_preset_bundle->get_preset_name_by_alias(m_type, selected_label);
|
||||
}
|
||||
select_preset(preset_name);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -5670,7 +5678,7 @@ void Tab::update_btns_enabling()
|
||||
// and any user preset
|
||||
const Preset& preset = m_presets->get_edited_preset();
|
||||
m_btn_delete_preset->Show((m_type == Preset::TYPE_PRINTER && m_preset_bundle->physical_printers.has_selection())
|
||||
|| (!preset.is_default && !preset.is_system));
|
||||
|| preset.can_overwrite());
|
||||
|
||||
//if (m_btn_edit_ph_printer)
|
||||
// m_btn_edit_ph_printer->SetToolTip( m_preset_bundle->physical_printers.has_selection() ?
|
||||
@@ -5851,7 +5859,7 @@ bool Tab::select_preset(
|
||||
Preset ¤t_preset = m_presets->get_selected_preset();
|
||||
|
||||
// Obtain compatible filament and process presets for printers
|
||||
if (m_preset_bundle && m_presets->get_preset_base(current_preset) == ¤t_preset && printer_tab && !current_preset.is_system) {
|
||||
if (m_preset_bundle && m_presets->get_preset_base(current_preset) == ¤t_preset && printer_tab && !current_preset.is_system && !current_preset.is_from_bundle()) {
|
||||
delete_third_printer = true;
|
||||
for (const Preset &preset : m_preset_bundle->filaments.get_presets()) {
|
||||
if (preset.is_compatible && !preset.is_default) {
|
||||
@@ -5859,7 +5867,6 @@ bool Tab::select_preset(
|
||||
filament_presets.push_front(preset);
|
||||
else
|
||||
filament_presets.push_back(preset);
|
||||
if (!preset.setting_id.empty()) { m_preset_bundle->filaments.set_sync_info_and_save(preset.name, preset.setting_id, "delete", 0); }
|
||||
}
|
||||
}
|
||||
for (const Preset &preset : m_preset_bundle->prints.get_presets()) {
|
||||
@@ -5868,13 +5875,11 @@ bool Tab::select_preset(
|
||||
process_presets.push_front(preset);
|
||||
else
|
||||
process_presets.push_back(preset);
|
||||
if (!preset.setting_id.empty()) { m_preset_bundle->filaments.set_sync_info_and_save(preset.name, preset.setting_id, "delete", 0); }
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!current_preset.setting_id.empty()) {
|
||||
m_presets->set_sync_info_and_save(current_preset.name, current_preset.setting_id, "delete", 0);
|
||||
wxGetApp().delete_preset_from_cloud(current_preset.setting_id);
|
||||
wxGetApp().delete_preset_from_cloud(current_preset.setting_id, current_preset.file);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << "delete preset = " << current_preset.name << ", setting_id = " << current_preset.setting_id;
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("will delete current preset...");
|
||||
@@ -5965,7 +5970,7 @@ bool Tab::select_preset(
|
||||
|
||||
for (const Preset &preset : filament_presets) {
|
||||
if (!preset.setting_id.empty()) {
|
||||
wxGetApp().delete_preset_from_cloud(preset.setting_id);
|
||||
wxGetApp().delete_preset_from_cloud(preset.setting_id, preset.file);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << "delete filament preset = " << preset.name << ", setting_id = " << preset.setting_id;
|
||||
preset_bundle->filaments.delete_preset(preset.name);
|
||||
@@ -5973,7 +5978,7 @@ bool Tab::select_preset(
|
||||
|
||||
for (const Preset &preset : process_presets) {
|
||||
if (!preset.setting_id.empty()) {
|
||||
wxGetApp().delete_preset_from_cloud(preset.setting_id);
|
||||
wxGetApp().delete_preset_from_cloud(preset.setting_id, preset.file);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << "delete print preset = " << preset.name << ", setting_id = " << preset.setting_id;
|
||||
preset_bundle->prints.delete_preset(preset.name);
|
||||
|
||||
Reference in New Issue
Block a user