Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Merge feat/one-click-update 549db456 (accent buttons; Open github.com/login/device in drawMemberSignInSteps)

islandmed77421ba7a5bc
diff --cc src/app/PanelUpdate.cpp
index a9059ba4,be748bab..91174747
--- a/src/app/PanelUpdate.cpp
+++ b/src/app/PanelUpdate.cpp
@@@ -569,36 -568,6 +576,34 @@@ void App::memberSignOut()
if (options_.uiTest.empty()) std::thread([] { keychain::erase(member::kKeychainAccount); }).detach();
}
+// A sign-in in progress: the code to enter on GitHub, Copy, the page, Cancel (Preferences > Updates and the
+// membership card's "I'm already a member").
+void App::drawMemberSignInSteps() {
+ if (!memberSignIn_) return;
+ std::string code;
+ {
+ std::lock_guard<std::mutex> lock(memberSignIn_->mutex);
+ code = memberSignIn_->userCode;
+ }
+ if (code.empty()) {
+ ImGui::TextDisabled("%s", tr("Asking GitHub..."));
+ } else {
+ ImGui::TextWrapped("%s", tr("On GitHub, enter this code:"));
+ if (ImFont* big = guide_.bodyBoldFont()) ImGui::PushFont(big);
+ ImGui::TextUnformatted(code.c_str());
+ if (guide_.bodyBoldFont()) ImGui::PopFont();
+ ImGui::SameLine();
+ if (ImGui::Button(tr("Copy##member.copy"))) SDL_SetClipboardText(code.c_str());
- ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive)); // the next step
- const bool open = ImGui::Button(tr("Open github.com/login/device##member.open"));
- ImGui::PopStyleColor();
- if (open) SDL_OpenURL(member::kVerifyUrl); // (always this page, whatever GitHub's answer said)
++ if (accentButton(tr("Open github.com/login/device##member.open"))) // the next step
++ SDL_OpenURL(member::kVerifyUrl); // (always this page, whatever GitHub's answer said)
+ ImGui::TextDisabled("%s", tr("Waiting for GitHub..."));
+ }
+ if (ImGui::Button(tr("Cancel##member.cancel"))) {
+ memberSignIn_->cancel = true;
+ if (!options_.uiTest.empty()) memberSignIn_->done = true;
+ }
+}
+
void App::drawMemberBuildsSection() {
ImGui::Spacing();
ImGui::SeparatorText(tr("Member builds"));