diff --git a/PlayWall/src/main/java/de/tobias/playpad/Strings.java b/PlayWall/src/main/java/de/tobias/playpad/Strings.java index 77ebb297b833ea1fd31255bf87afd0be6d25a4c4..b0dd8185e643922d87e0a59c4be70b0778a2cbb8 100644 --- a/PlayWall/src/main/java/de/tobias/playpad/Strings.java +++ b/PlayWall/src/main/java/de/tobias/playpad/Strings.java @@ -239,7 +239,8 @@ public class Strings { // Search public static final String SEARCH_BUTTON = "Search.Button"; public static final String SEARCH_PLACEHOLDER = "Search.Placeholder"; - public static final String SEARCH_ALERT_NO_MATCHES = "Search.Alert.NoMatches"; + public static final String SEARCH_ALERT_NO_MATCHES_HEADER = "Search.Alert.NoMatches.Header"; + public static final String SEARCH_ALERT_NO_MATCHES_CONTENT = "Search.Alert.NoMatches.Content"; // UI - Dialog - Page - Delete public static final String UI_DIALOG_PAGE_DELETE_HEADER = "UI.Dialog.Page.Delete.Header"; diff --git a/PlayWall/src/main/java/de/tobias/playpad/layout/desktop/listener/DesktopSearchController.java b/PlayWall/src/main/java/de/tobias/playpad/layout/desktop/listener/DesktopSearchController.java index 28db0d83edcca7306c6602f539f97d878d1070f2..a00f2083d8c9c74070412de447ddfc6212d9da17 100644 --- a/PlayWall/src/main/java/de/tobias/playpad/layout/desktop/listener/DesktopSearchController.java +++ b/PlayWall/src/main/java/de/tobias/playpad/layout/desktop/listener/DesktopSearchController.java @@ -1,5 +1,7 @@ package de.tobias.playpad.layout.desktop.listener; +import de.thecodelabs.utils.application.ApplicationUtils; +import de.thecodelabs.utils.ui.Alerts; import de.thecodelabs.utils.util.Localization; import de.tobias.playpad.Strings; import de.tobias.playpad.pad.Pad; @@ -7,6 +9,7 @@ import de.tobias.playpad.project.Project; import de.tobias.playpad.viewcontroller.main.IMainViewController; import javafx.event.ActionEvent; import javafx.event.EventHandler; +import javafx.scene.control.Alert; import javafx.scene.control.TextField; import java.util.List; @@ -47,7 +50,12 @@ public class DesktopSearchController implements EventHandler<ActionEvent> { } if (searchResult.isEmpty()) { - mainView.showInfoMessage(Localization.getString(Strings.SEARCH_ALERT_NO_MATCHES)); + Alerts.getInstance().createAlert( + Alert.AlertType.INFORMATION, ApplicationUtils.getApplication().getInfo().getName(), + Localization.getString(Strings.SEARCH_ALERT_NO_MATCHES_HEADER), + Localization.getString(Strings.SEARCH_ALERT_NO_MATCHES_CONTENT, currentSearchTerm), + mainView.getStage() + ).showAndWait(); return; } @@ -58,7 +66,12 @@ public class DesktopSearchController implements EventHandler<ActionEvent> { result.getController().getView().highlightView(HIGHLIGHT_DURATION); } } else { - mainView.showInfoMessage(Localization.getString(Strings.SEARCH_ALERT_NO_MATCHES)); + Alerts.getInstance().createAlert( + Alert.AlertType.INFORMATION, ApplicationUtils.getApplication().getInfo().getName(), + Localization.getString(Strings.SEARCH_ALERT_NO_MATCHES_HEADER), + Localization.getString(Strings.SEARCH_ALERT_NO_MATCHES_CONTENT, currentSearchTerm), + mainView.getStage() + ).showAndWait(); currentIndex = 0; } } diff --git a/PlayWall/src/main/resources/lang/_de.properties b/PlayWall/src/main/resources/lang/_de.properties index 706ec7a54dce484ed1a58c387802b7eebbe350b7..d3e6f30a6fb009bacec3e4c6acd8e7d858aeab5a 100755 --- a/PlayWall/src/main/resources/lang/_de.properties +++ b/PlayWall/src/main/resources/lang/_de.properties @@ -218,10 +218,13 @@ DnDMode.Move=Tauschen # Main Layout MainLayout.Desktop=Desktopmodus MainLayout.Touch=Touchmodus + # Suche Search.Button=Suchen Search.Placeholder=Suche -Search.Alert.NoMatches=Keine Treffer gefunden. +Search.Alert.NoMatches.Header=Kachelsuche +Search.Alert.NoMatches.Content=Keine weiteren Treffer zu '{}' gefunden. + # UI - Dialog - Page - Delete UI.Dialog.Page.Delete.Header=Seite l\u00F6schen UI.Dialog.Page.Delete.Content=M\u00F6chten Sie die Seite unwiederbringlich l\u00F6schen?