jmuehlner commented on code in PR #840:
URL: https://github.com/apache/guacamole-client/pull/840#discussion_r1172905516


##########
guacamole/src/main/frontend/src/app/import/controllers/importConnectionsController.js:
##########
@@ -688,9 +637,42 @@ 
angular.module('import').controller('importConnectionsController', ['$scope', '$
     };
 
     /**
-     * The name of the file that's currently being uploaded, or has yet to
-     * be imported, if any.
+     * Display a modal with the given title and text keys.
+     *
+     * @param {String} titleKey
+     *     The translation key to use for the title of the modal.
+     *
+     * @param {String} contentKey
+     *     The translation key to use for the text contents of the modal.
      */
-    $scope.fileName = null;
+    const showModal = (titleKey, contentKey) => guacNotification.showStatus({
+
+        // The provided modal contents
+        title: titleKey,
+        text: { key: contentKey },
+
+        // Add a button to hide the modal
+        actions    : [{
+            name      : 'IMPORT.ACTION_ACKNOWLEDGE',
+            callback  : () => guacNotification.showStatus(false)
+        }]
+
+    });
+
+    /**
+     * Display a modal with information about the existing connection
+     * replacement option.
+     */
+    $scope.showConnectionReplaceHelp = () => showModal(
+            'IMPORT.HELP_REPLACE_CONNECTION_TITLE',
+            'IMPORT.HELP_REPLACE_CONNECTION_CONTENT');
+
+    /**
+     * Display a modal with information about the existing connection 
permission
+     * replacement option.
+     */
+    $scope.showPermissionReplaceHelp = () => showModal(
+            'IMPORT.HELP_REPLACE_PERMISSION_TITLE',
+            'IMPORT.HELP_REPLACE_PERMISSION_CONTENT');

Review Comment:
   Yeah, that works. I was worried that the text might be too much for a 
tooltip, but it doesn't look too bad, actually.
   <img width="1211" alt="image" 
src="https://user-images.githubusercontent.com/4633119/233444194-1336de22-e02e-4439-a479-af4790baec32.png";>
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to