From 51510566bc2448e7b7b0bd4c5fc00e4906d03d31 Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Wed, 11 Oct 2023 11:08:51 +0530 Subject: [PATCH] refactor: add import buttons in empty state for collections & environments (#3438) --- packages/hoppscotch-common/locales/en.json | 7 +- .../components/collections/MyCollections.vue | 47 ++++++++----- .../collections/TeamCollections.vue | 68 ++++++++++++------- .../src/components/environments/Selector.vue | 3 +- .../src/components/environments/my/index.vue | 44 ++++++++---- .../components/environments/teams/index.vue | 65 +++++++++++------- .../src/components/http/Headers.vue | 6 ++ 7 files changed, 160 insertions(+), 80 deletions(-) diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json index 25f52906d..35450a5fb 100644 --- a/packages/hoppscotch-common/locales/en.json +++ b/packages/hoppscotch-common/locales/en.json @@ -125,6 +125,7 @@ "created": "Collection created", "different_parent": "Cannot reorder collection with different parent", "edit": "Edit Collection", + "import_or_create": "Import or create a collection", "invalid_name": "Please provide a name for the collection", "invalid_root_move": "Collection already in the root", "moved": "Moved Successfully", @@ -210,6 +211,7 @@ "empty_variables": "No variables", "global": "Global", "global_variables": "Global variables", + "import_or_create": "Import or create a environment", "invalid_name": "Please provide a name for the environment", "list": "Environment variables", "my_environments": "My Environments", @@ -459,6 +461,7 @@ "enter_curl": "Enter cURL command", "generate_code": "Generate code", "generated_code": "Generated code", + "go_to_authorization_tab": "Go to Authorization", "header_list": "Header List", "invalid_name": "Please provide a name for the request", "method": "Method", @@ -750,6 +753,7 @@ "enabled": "Enabled", "file_imported": "File imported", "finished_in": "Finished in {duration} ms", + "hide": "Hide", "history_deleted": "History deleted", "linewrap": "Wrap lines", "loading": "Loading...", @@ -760,6 +764,7 @@ "published_error": "Something went wrong while publishing msg: {topic} to topic: {message}", "published_message": "Published message: {message} to topic: {topic}", "reconnection_error": "Failed to reconnect", + "show":"Show", "subscribed_failed": "Failed to subscribe to topic: {topic}", "subscribed_success": "Successfully subscribed to topic: {topic}", "unsubscribed_failed": "Failed to unsubscribe from topic: {topic}", @@ -841,7 +846,7 @@ "new": "New Team", "new_created": "New team created", "new_name": "My New Team", - "no_access": "You do not have edit access to these collections", + "no_access": "You do not have edit access to this team", "no_invite_found": "Invitation not found. Contact your team owner.", "no_request_found": "Request not found.", "not_found": "Team not found. Contact your team owner.", diff --git a/packages/hoppscotch-common/src/components/collections/MyCollections.vue b/packages/hoppscotch-common/src/components/collections/MyCollections.vue index 9ba7b991f..d1e59ca54 100644 --- a/packages/hoppscotch-common/src/components/collections/MyCollections.vue +++ b/packages/hoppscotch-common/src/components/collections/MyCollections.vue @@ -25,7 +25,7 @@ @@ -251,19 +251,35 @@ - - +
+ + {{ t("collection.import_or_create") }} + +
+ + +
+
+ - + + - + /> @@ -297,9 +312,9 @@