소스 검색

removed more info hyperlink and fixed ui by moving isLoadingHttpResponse.set(true)

Jan-Peter Klein 1 년 전
부모
커밋
f91a854b3e
3개의 변경된 파일2개의 추가작업 그리고 13개의 파일을 삭제
  1. 1 7
      src/main/java/org/cryptomator/ui/error/ErrorController.java
  2. 1 5
      src/main/resources/fxml/error.fxml
  3. 0 1
      src/main/resources/i18n/strings.properties

+ 1 - 7
src/main/java/org/cryptomator/ui/error/ErrorController.java

@@ -43,7 +43,6 @@ public class ErrorController implements FxController {
 	private static final ObjectMapper JSON = new ObjectMapper();
 	private static final Logger LOG = LoggerFactory.getLogger(ErrorController.class);
 	private static final String ERROR_CODES_URL = "https://api.cryptomator.org/desktop/error-codes.json";
-	private static final String LOOKUP_PERMISSION_INFO_URL = "https://docs.cryptomator.org/"; //TODO: set correct url
 	private static final String SEARCH_URL_FORMAT = "https://github.com/cryptomator/cryptomator/discussions/categories/errors?discussions_q=category:Errors+%s";
 	private static final String REPORT_URL_FORMAT = "https://github.com/cryptomator/cryptomator/discussions/new?category=Errors&title=Error+%s&body=%s";
 	private static final String SEARCH_ERRORCODE_DELIM = " OR ";
@@ -135,11 +134,6 @@ public class ErrorController implements FxController {
 		CompletableFuture.delayedExecutor(2, TimeUnit.SECONDS, Platform::runLater).execute(() -> copiedDetails.set(false));
 	}
 
-	@FXML
-	public void visitLookupPermissionInfoPage() {
-		application.getHostServices().showDocument(LOOKUP_PERMISSION_INFO_URL);
-	}
-
 	@FXML
 	public void dismiss() {
 		lookupDatabaseUserPermission.set(true);
@@ -147,6 +141,7 @@ public class ErrorController implements FxController {
 
 	@FXML
 	public void lookUpSolution() {
+		isLoadingHttpResponse.set(true);
 		lookupDatabaseUserPermission.set(true);
 		HttpClient httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
 		HttpRequest httpRequest = HttpRequest.newBuilder()//
@@ -158,7 +153,6 @@ public class ErrorController implements FxController {
 	}
 
 	private void loadHttpResponse(HttpResponse<InputStream> response) {
-		isLoadingHttpResponse.set(true);
 		if (response.statusCode() != 200) {
 			LOG.error("Status code {} when trying to load {} ", response.statusCode(), response.uri());
 		}

+ 1 - 5
src/main/resources/fxml/error.fxml

@@ -35,11 +35,7 @@
 			<VBox spacing="6" HBox.hgrow="ALWAYS">
 				<FormattedLabel styleClass="label-extra-large" format="%error.message" arg1="${controller.errorCode}"/>
 				<VBox visible="${!controller.lookupDatabaseUserPermission}" managed="${!controller.lookupDatabaseUserPermission}">
-					<TextFlow>
-						<Text text="%error.lookupPermissionMessage"/>
-						<Text text=" "/>
-						<Hyperlink styleClass="hyperlink-underline" text="%error.hyperlink.moreInfo" onAction="#visitLookupPermissionInfoPage"/>
-					</TextFlow>
+					<Label text="%error.lookupPermissionMessage" wrapText="true"/>
 					<Region VBox.vgrow="ALWAYS" minHeight="18"/>
 					<ButtonBar buttonMinWidth="120" buttonOrder="+NY">
 						<buttons>

+ 0 - 1
src/main/resources/i18n/strings.properties

@@ -26,7 +26,6 @@ error.hyperlink.solution=Look up the solution
 error.lookupPermissionMessage=Cryptomator can look up a solution for this problem online. This will send a request to our problem database from your IP address.
 error.dismiss=Dismiss
 error.lookUpSolution=Look up Solution
-error.hyperlink.moreInfo=More Info...
 
 # Defaults
 defaults.vault.vaultName=Vault