diff --git a/README.md b/README.md index c0b3456..cc10b98 100644 --- a/README.md +++ b/README.md @@ -36,5 +36,5 @@ uv run python main.py --work-dir ## Troubleshooting #### Unable to log in Microsoft account. Launcher throw error "Signing in to Minecraft services failed (HTTP 403). This account is not allowed to complete this step. Check Xbox privacy settings and account restrictions. Or check the client id has authorized to use Minecraft API." -This launcher's client id haven't registered to [Minecraft API](https://forms.cloud.microsoft/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR-ajEQ1td1ROpz00KtS8Gd5UNVpPTkVLNFVROVQxNkdRMEtXVjNQQjdXVC4u). +This launcher's client id haven't registered to [Minecraft API](https://api.minecraftservices.com/). You may need to replace the client id that has permission to access Minecraft API in settings page (Settings>Account>Client ID) \ No newline at end of file diff --git a/constant.py b/constant.py index 3bebac1..ae383d1 100644 --- a/constant.py +++ b/constant.py @@ -9,7 +9,8 @@ ACCESS_TOKEN_KEYWORD = "accessToken" REFRESH_TOKEN_KEYWORD = "refreshToken" SYSTEM_KEYRING_KEYWORD = "SYSTEM_CREDENTIALS" -LAUNCHER_DESCRIPTION = """ -An unofficial Minecraft launcher written in Python. It aims to maintain maximum compatibility with the official Minecraft +LAUNCHER_DESCRIPTION = """An unofficial Minecraft launcher written in Python. It aims to maintain maximum compatibility with the official Minecraft Launcher while being more lightweight and easier to use. + +This launcher is not associated with Mojang Studios or Microsoft. Is a personal project that just for fun. """ diff --git a/pages/settings.py b/pages/settings.py index c907ceb..c2f72d1 100644 --- a/pages/settings.py +++ b/pages/settings.py @@ -9,9 +9,11 @@ from PySide6.QtWidgets import ( QSlider, QStackedWidget, QVBoxLayout, - QWidget, QLineEdit, + QWidget, QLineEdit, QPlainTextEdit, ) +from constant import LAUNCHER_NAME, LAUNCHER_DESCRIPTION, LAUNCHER_VERSION + class SettingsItem(QPushButton): """ @@ -172,11 +174,13 @@ class SettingsPage(QWidget): self.general_page = self.create_general_page() self.appearance_page = self.create_appearance_page() self.profile_page = self.create_profile_page() + self.about_page = self.create_about_page() self.stack.addWidget(self.main_page) self.stack.addWidget(self.general_page) self.stack.addWidget(self.appearance_page) self.stack.addWidget(self.profile_page) + self.stack.addWidget(self.about_page) root_layout.addWidget(self.stack) @@ -224,12 +228,21 @@ class SettingsPage(QWidget): lambda: self.open_page(self.profile_page) ) + about_button = SettingsItem( + "About", + "About the launcher", + ) + about_button.clicked.connect( + lambda: self.open_page(self.about_page) + ) + layout.addWidget(title) layout.addSpacing(8) layout.addWidget(info_button) layout.addWidget(general_button) layout.addWidget(appearance_button) layout.addWidget(profile_button) + layout.addWidget(about_button) layout.addStretch() return page @@ -289,6 +302,25 @@ class SettingsPage(QWidget): return page + def create_about_page(self) -> QWidget: + page = SettingsSubPage("About", self.go_back) + + brand_label = QLabel(LAUNCHER_NAME) + brand_label.setStyleSheet("QLabel { font-size: 20px; }") + + version_label = QLabel("Version: {}".format(LAUNCHER_VERSION)) + version_label.setStyleSheet("QLabel { font-size: 12px; }") + + text = QPlainTextEdit(LAUNCHER_DESCRIPTION) + text.setStyleSheet("QPlainTextEdit { font-size: 13px; }") + text.setReadOnly(True) + + page.content_layout.addWidget(brand_label) + page.content_layout.addWidget(version_label) + page.content_layout.addWidget(text) + + return page + def open_page(self, page: QWidget): self.stack.setCurrentWidget(page)