From 84b0c30d64d4a79606fce547809a5912bcd6c7c2 Mon Sep 17 00:00:00 2001 From: Balu Babu Date: Thu, 15 Jun 2023 17:15:06 +0530 Subject: [PATCH 01/20] fix: fixed issue with team-invitations and new user accounts (#3137) --- .../src/team-invitation/team-invite-viewer.guard.ts | 2 +- .../src/team-invitation/team-invitee.guard.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-backend/src/team-invitation/team-invite-viewer.guard.ts b/packages/hoppscotch-backend/src/team-invitation/team-invite-viewer.guard.ts index a46f5e037..271d3031e 100644 --- a/packages/hoppscotch-backend/src/team-invitation/team-invite-viewer.guard.ts +++ b/packages/hoppscotch-backend/src/team-invitation/team-invite-viewer.guard.ts @@ -32,7 +32,7 @@ export class TeamInviteViewerGuard implements CanActivate { // Get user TE.bindW('user', ({ gqlCtx }) => pipe( - O.fromNullable(gqlCtx.getContext<{ user?: User }>().user), + O.fromNullable(gqlCtx.getContext().req.user), TE.fromOption(() => BUG_AUTH_NO_USER_CTX), ), ), diff --git a/packages/hoppscotch-backend/src/team-invitation/team-invitee.guard.ts b/packages/hoppscotch-backend/src/team-invitation/team-invitee.guard.ts index 577ad595b..1f2bdaa5d 100644 --- a/packages/hoppscotch-backend/src/team-invitation/team-invitee.guard.ts +++ b/packages/hoppscotch-backend/src/team-invitation/team-invitee.guard.ts @@ -33,7 +33,7 @@ export class TeamInviteeGuard implements CanActivate { // Get user TE.bindW('user', ({ gqlCtx }) => pipe( - O.fromNullable(gqlCtx.getContext<{ user?: User }>().user), + O.fromNullable(gqlCtx.getContext().req.user), TE.fromOption(() => BUG_AUTH_NO_USER_CTX), ), ), From f112c46bb48705422ad29082f97ea2dfe54720a1 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 19 Jun 2023 11:51:14 +0530 Subject: [PATCH 02/20] chore(ci): re-introduce hoppscotch-ui deploy script --- .github/workflows/ui.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ui.yml diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml new file mode 100644 index 000000000..b63aa7ad5 --- /dev/null +++ b/.github/workflows/ui.yml @@ -0,0 +1,41 @@ +name: Deploy to Netlify (ui) + +on: + push: + branches: [main] + # run this workflow only if an update is made to the ui package + paths: + - "packages/hoppscotch-ui/**" + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup environment + run: mv .env.example .env + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.4 + with: + version: 8 + run_install: true + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Build site + run: pnpm run generate-ui + + # Deploy the ui site with netlify-cli + - name: Deploy to Netlify (ui) + run: npx netlify-cli deploy --dir=packages/hoppscotch-ui/.histoire/dist --prod + env: + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }} + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} From e2b668bee2149d5cda378b6bb5b023451a8156ee Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 19 Jun 2023 12:33:52 +0530 Subject: [PATCH 03/20] chore(ci): add manual workflow dispatch for hoppscotch-ui deploy script --- .github/workflows/ui.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index b63aa7ad5..cc82cd954 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -6,6 +6,7 @@ on: # run this workflow only if an update is made to the ui package paths: - "packages/hoppscotch-ui/**" + workflow_dispatch: jobs: deploy: From 24894e05dcf6b46715c4b1db8087e83da0d07490 Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Mon, 19 Jun 2023 14:04:07 +0530 Subject: [PATCH 04/20] fix: shortcode resolution screen is stuck on invalid shortcodes (#3142) Co-authored-by: Andrew Bastin --- .github/workflows/ui.yml | 42 +++++++++++++++++++ .../hoppscotch-common/src/pages/r/_id.vue | 13 ++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/ui.yml diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml new file mode 100644 index 000000000..cc82cd954 --- /dev/null +++ b/.github/workflows/ui.yml @@ -0,0 +1,42 @@ +name: Deploy to Netlify (ui) + +on: + push: + branches: [main] + # run this workflow only if an update is made to the ui package + paths: + - "packages/hoppscotch-ui/**" + workflow_dispatch: + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup environment + run: mv .env.example .env + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.4 + with: + version: 8 + run_install: true + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Build site + run: pnpm run generate-ui + + # Deploy the ui site with netlify-cli + - name: Deploy to Netlify (ui) + run: npx netlify-cli deploy --dir=packages/hoppscotch-ui/.histoire/dist --prod + env: + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }} + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/packages/hoppscotch-common/src/pages/r/_id.vue b/packages/hoppscotch-common/src/pages/r/_id.vue index 64b917981..70155ce0b 100644 --- a/packages/hoppscotch-common/src/pages/r/_id.vue +++ b/packages/hoppscotch-common/src/pages/r/_id.vue @@ -11,6 +11,14 @@

{{ t("error.invalid_link_description") }}

+

+ +

{ const data = shortcodeDetails.data if (E.isRight(data)) { + if (!data.right.shortcode?.request) { + invalidLink.value = true + return + } + const request: unknown = JSON.parse(data.right.shortcode?.request as string) createNewTab({ From 4ba135f3b94c304470e8c79bc645157e52fe2eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20=C3=9Ar?= Date: Tue, 20 Jun 2023 10:58:53 +0200 Subject: [PATCH 05/20] chore(i18n): updated hungarian translation (#3151) --- packages/hoppscotch-common/locales/hu.json | 200 ++++++++++----------- 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/packages/hoppscotch-common/locales/hu.json b/packages/hoppscotch-common/locales/hu.json index c2c5878df..6b41fce69 100644 --- a/packages/hoppscotch-common/locales/hu.json +++ b/packages/hoppscotch-common/locales/hu.json @@ -5,29 +5,29 @@ "choose_file": "Válasszon egy fájlt", "clear": "Törlés", "clear_all": "Összes törlése", - "close": "Close", + "close": "Bezárás", "connect": "Kapcsolódás", - "connecting": "Connecting", + "connecting": "Kapcsolódás", "copy": "Másolás", "delete": "Törlés", "disconnect": "Leválasztás", "dismiss": "Eltüntetés", "dont_save": "Ne mentse", "download_file": "Fájl letöltése", - "drag_to_reorder": "Drag to reorder", + "drag_to_reorder": "Húzza az átrendezéshez", "duplicate": "Kettőzés", "edit": "Szerkesztés", - "filter": "Filter", + "filter": "Szűrő", "go_back": "Vissza", - "go_forward": "Go forward", - "group_by": "Group by", + "go_forward": "Előre", + "group_by": "Csoportosítás", "label": "Címke", "learn_more": "Tudjon meg többet", "less": "Kevesebb", "more": "Több", "new": "Új", "no": "Nem", - "open_workspace": "Open workspace", + "open_workspace": "Munkaterület megnyitása", "paste": "Beillesztés", "prettify": "Csinosítás", "remove": "Eltávolítás", @@ -38,7 +38,7 @@ "search": "Keresés", "send": "Küldés", "start": "Indítás", - "starting": "Starting", + "starting": "Indítás", "stop": "Leállítás", "to_close": "a bezáráshoz", "to_navigate": "a navigáláshoz", @@ -118,16 +118,16 @@ }, "collection": { "created": "Gyűjtemény létrehozva", - "different_parent": "Cannot reorder collection with different parent", + "different_parent": "Nem lehet átrendezni a különböző szülővel rendelkező gyűjteményt", "edit": "Gyűjtemény szerkesztése", "invalid_name": "Adjon nevet a gyűjteménynek", - "invalid_root_move": "Collection already in the root", - "moved": "Moved Successfully", + "invalid_root_move": "A gyűjtemény már a gyökérben van", + "moved": "Sikeresen áthelyezve", "my_collections": "Saját gyűjtemények", "name": "Saját új gyűjtemény", "name_length_insufficient": "A gyűjtemény nevének legalább 3 karakter hosszúságúnak kell lennie", "new": "Új gyűjtemény", - "order_changed": "Collection Order Updated", + "order_changed": "Gyűjtemény sorrendje frissítve", "renamed": "Gyűjtemény átnevezve", "request_in_use": "A kérés használatban", "save_as": "Mentés másként", @@ -147,7 +147,7 @@ "remove_team": "Biztosan törölni szeretné ezt a csapatot?", "remove_telemetry": "Biztosan ki szeretné kapcsolni a telemetriát?", "request_change": "Biztosan el szeretné vetni a jelenlegi kérést? Minden mentetlen változtatás el fog veszni.", - "save_unsaved_tab": "Do you want to save changes made in this tab?", + "save_unsaved_tab": "Szeretné menteni az ezen a lapon elvégzett változtatásokat?", "sync": "Szeretné visszaállítani a munkaterületét a felhőből? Ez el fogja vetni a helyi folyamatát." }, "count": { @@ -180,8 +180,8 @@ "profile": "Jelentkezzen be a profilja megtekintéséhez", "protocols": "A protokollok üresek", "schema": "Kapcsolódjon egy GraphQL-végponthoz a séma megtekintéséhez", - "shortcodes": "Shortcodes are empty", - "subscription": "Subscriptions are empty", + "shortcodes": "A rövid kódok üresek", + "subscription": "A feliratkozások üresek", "team_name": "A csapat neve üres", "teams": "Ön nem tartozik semmilyen csapathoz", "tests": "Nincsenek tesztek ehhez a kéréshez" @@ -194,13 +194,13 @@ "deleted": "Környezet törlése", "edit": "Környezet szerkesztése", "invalid_name": "Adjon nevet a környezetnek", - "my_environments": "My Environments", + "my_environments": "Saját környezetek", "nested_overflow": "az egymásba ágyazott környezeti változók 10 szintre vannak korlátozva", "new": "Új környezet", "no_environment": "Nincs környezet", "no_environment_description": "Nem lettek környezetek kiválasztva. Válassza ki, hogy mit kell tenni a következő változókkal.", "select": "Környezet kiválasztása", - "team_environments": "Team Environments", + "team_environments": "Csapatkörnyezetek", "title": "Környezetek", "updated": "Környezet frissítve", "variable_list": "Változólista" @@ -209,9 +209,9 @@ "browser_support_sse": "Úgy tűnik, hogy ez a böngésző nem támogatja a kiszolgáló által küldött eseményeket.", "check_console_details": "Nézze meg a konzolnaplót a részletekért.", "curl_invalid_format": "A cURL nincs megfelelően formázva", - "danger_zone": "Danger zone", - "delete_account": "Your account is currently an owner in these teams:", - "delete_account_description": "You must either remove yourself, transfer ownership, or delete these teams before you can delete your account.", + "danger_zone": "Veszélyes zóna", + "delete_account": "Az Ön fiókja jelenleg tulajdonos ezekben a csapatokban:", + "delete_account_description": "El kell távolítani magát, át kell adnia a tulajdonjogot vagy törölnie kell ezeket a csapatokat, mielőtt törölhetné a fiókját.", "empty_req_name": "Üres kérésnév", "f12_details": "(F12 a részletekért)", "gql_prettify_invalid_query": "Nem sikerült csinosítani egy érvénytelen lekérdezést, oldja meg a lekérdezés szintaktikai hibáit, és próbálja újra", @@ -219,13 +219,13 @@ "incorrect_email": "Hibás e-mail", "invalid_link": "Érvénytelen hivatkozás", "invalid_link_description": "A kattintott hivatkozás érvénytelen vagy lejárt.", - "json_parsing_failed": "Invalid JSON", + "json_parsing_failed": "Érvénytelen JSON", "json_prettify_invalid_body": "Nem sikerült csinosítani egy érvénytelen törzset, oldja meg a JSON szintaktikai hibáit, és próbálja újra", "network_error": "Úgy tűnik, hogy hálózati hiba van. Próbálja újra.", "network_fail": "Nem sikerült elküldeni a kérést", "no_duration": "Nincs időtartam", - "no_results_found": "No matches found", - "page_not_found": "This page could not be found", + "no_results_found": "Nincs találat", + "page_not_found": "Ez az oldal nem található", "script_fail": "Nem sikerült végrehajtani a kérés előtti parancsfájlt", "something_went_wrong": "Valami elromlott", "test_script_fail": "Nem sikerült végrehajtani a kérés utáni parancsfájlt" @@ -238,9 +238,9 @@ "title": "Exportálás" }, "filter": { - "all": "All", - "none": "None", - "starred": "Starred" + "all": "Összes", + "none": "Nincs", + "starred": "Csillagozott" }, "folder": { "created": "Mappa létrehozva", @@ -256,7 +256,7 @@ "subscriptions": "Feliratkozások" }, "group": { - "time": "Time", + "time": "Idő", "url": "URL" }, "header": { @@ -316,32 +316,32 @@ "zen_mode": "Zen mód" }, "modal": { - "close_unsaved_tab": "You have unsaved changes", + "close_unsaved_tab": "Elmentetlen változtatásai vannak", "collections": "Gyűjtemények", "confirm": "Megerősítés", "edit_request": "Kérés szerkesztése", "import_export": "Importálás és exportálás" }, "mqtt": { - "already_subscribed": "You are already subscribed to this topic.", - "clean_session": "Clean Session", - "clear_input": "Clear input", - "clear_input_on_send": "Clear input on send", - "client_id": "Client ID", - "color": "Pick a color", + "already_subscribed": "Ön már feliratkozott erre a témára.", + "clean_session": "Munkamenet törlése", + "clear_input": "Bevitel törlése", + "clear_input_on_send": "Bevitel törlése küldéskor", + "client_id": "Ügyfél-azonosító", + "color": "Válasszon színt", "communication": "Kommunikáció", - "connection_config": "Connection Config", - "connection_not_authorized": "This MQTT connection does not use any authentication.", - "invalid_topic": "Please provide a topic for the subscription", - "keep_alive": "Keep Alive", + "connection_config": "Kapcsolat beállításai", + "connection_not_authorized": "Ez az MQTT-kapcsolat nem használ semmilyen hitelesítést.", + "invalid_topic": "Adjon témát a feliratkozáshoz", + "keep_alive": "Életben tartás", "log": "Napló", - "lw_message": "Last-Will Message", - "lw_qos": "Last-Will QoS", - "lw_retain": "Last-Will Retain", - "lw_topic": "Last-Will Topic", + "lw_message": "Utolsó kívánság üzenet", + "lw_qos": "Utolsó kívánság QoS", + "lw_retain": "Utolsó kívánság megtartás", + "lw_topic": "Utolsó kívánság téma", "message": "Üzenet", - "new": "New Subscription", - "not_connected": "Please start a MQTT connection first.", + "new": "Új feliratkozás", + "not_connected": "Először indítson egy MQTT-kapcsolatot.", "publish": "Közzététel", "qos": "QoS", "ssl": "SSL", @@ -368,7 +368,7 @@ }, "profile": { "app_settings": "Alkalmazás beállításai", - "default_hopp_displayname": "Unnamed User", + "default_hopp_displayname": "Névtelen felhasználó", "editor": "Szerkesztő", "editor_description": "A szerkesztők hozzáadhatnak, szerkeszthetnek és törölhetnek kéréseket.", "email_verification_mail": "Egy ellenőrző e-mail el lett küldve az e-mail-címére. Kattintson a hivatkozásra az e-mail-címe ellenőrzéséhez.", @@ -391,26 +391,26 @@ "choose_language": "Nyelv kiválasztása", "content_type": "Tartalom típusa", "content_type_titles": { - "others": "Others", - "structured": "Structured", - "text": "Text" + "others": "Egyebek", + "structured": "Szerkesztett", + "text": "Szöveg" }, "copy_link": "Hivatkozás másolása", - "different_collection": "Cannot reorder requests from different collections", - "duplicated": "Request duplicated", + "different_collection": "Nem lehet átrendezni a különböző gyűjteményekből érkező kéréseket", + "duplicated": "Kérés megkettőzve", "duration": "Időtartam", - "enter_curl": "cURL megadása", + "enter_curl": "cURL-parancs megadása", "generate_code": "Kód előállítása", "generated_code": "Előállított kód", "header_list": "Fejléclista", "invalid_name": "Adjon nevet a kérésnek", "method": "Módszer", - "moved": "Request moved", + "moved": "Kérés áthelyezve", "name": "Kérés neve", "new": "Új kérés", - "order_changed": "Request Order Updated", + "order_changed": "Kérés sorrendje frissítve", "override": "Felülbírálás", - "override_help": "A Content-Type beállítása a fejlécekben", + "override_help": "Content-Type beállítása a fejlécekben", "overriden": "Felülbírálva", "parameter_list": "Lekérdezési paraméterek", "parameters": "Paraméterek", @@ -429,12 +429,12 @@ "type": "Kérés típusa", "url": "URL", "variables": "Változók", - "view_my_links": "View my links" + "view_my_links": "Saját hivatkozások megtekintése" }, "response": { - "audio": "Audio", + "audio": "Hang", "body": "Válasz törzse", - "filter_response_body": "Filter JSON response body (uses JSONPath syntax)", + "filter_response_body": "JSON-válasz törzsének szűrése (JSONPath szintaxist használ)", "headers": "Fejlécek", "html": "HTML", "image": "Kép", @@ -446,14 +446,14 @@ "status": "Állapot", "time": "Idő", "title": "Válasz", - "video": "Video", + "video": "Videó", "waiting_for_connection": "várakozás kapcsolódásra", "xml": "XML" }, "settings": { "accent_color": "Kiemelőszín", "account": "Fiók", - "account_deleted": "Your account has been deleted", + "account_deleted": "A fiókja törölve lett", "account_description": "A fiókbeállítások személyre szabása.", "account_email_description": "Az Ön elsődleges e-mail-címe.", "account_name_description": "Ez a megjelenített neve.", @@ -462,8 +462,8 @@ "change_font_size": "Betűméret megváltoztatása", "choose_language": "Nyelv kiválasztása", "dark_mode": "Sötét", - "delete_account": "Delete account", - "delete_account_description": "Once you delete your account, all your data will be permanently deleted. This action cannot be undone.", + "delete_account": "Fiók törlése", + "delete_account_description": "Ha törli a fiókját, akkor az összes adata véglegesen törlésre kerül. Ezt a műveletet nem lehet visszavonni.", "expand_navigation": "Navigáció kinyitása", "experiments": "Kísérletek", "experiments_notice": "Ez olyan kísérletek gyűjteménye, amelyeken dolgozunk, és amelyek hasznosak, szórakoztatóak lehetnek, mindkettő, vagy egyik sem. Ezek nem véglegesek és nem stabilak, ezért ha valami túl furcsa dolog történik, ne essen pánikba. Egyszerűen kapcsolja ki a hibás dolgot. Viccet félretéve, ", @@ -490,8 +490,8 @@ "proxy_use_toggle": "A proxy középprogram használata a kérések küldéséhez", "read_the": "Olvassa el:", "reset_default": "Visszaállítás az alapértelmezettre", - "short_codes": "Short codes", - "short_codes_description": "Short codes which were created by you.", + "short_codes": "Rövid kódok", + "short_codes_description": "Az Ön által létrehozott rövid kódok.", "sidebar_on_left": "Oldalsáv a bal oldalon", "sync": "Szinkronizálás", "sync_collections": "Gyűjtemények", @@ -505,16 +505,16 @@ "theme_description": "Az alkalmazás témájának személyre szabása.", "use_experimental_url_bar": "Kísérleti URL-sáv használata a környezet kiemelésével", "user": "Felhasználó", - "verified_email": "Verified email", + "verified_email": "Ellenőrzött e-mail-cím", "verify_email": "E-mail-cím ellenőrzése" }, "shortcodes": { - "actions": "Actions", - "created_on": "Created on", - "deleted": "Shortcode deleted", - "method": "Method", - "not_found": "Shortcode not found", - "short_code": "Short code", + "actions": "Műveletek", + "created_on": "Létrehozva", + "deleted": "Rövid kód törölve", + "method": "Módszer", + "not_found": "A rövid kód nem található", + "short_code": "Rövid kód", "url": "URL" }, "shortcut": { @@ -556,9 +556,9 @@ "title": "Kérés" }, "response": { - "copy": "Copy response to clipboard", - "download": "Download response as file", - "title": "Response" + "copy": "Válasz másolása a vágólapra", + "download": "Válasz letöltés fájlként", + "title": "Válasz" }, "theme": { "black": "Téma átváltása fekete módra", @@ -576,8 +576,8 @@ }, "socketio": { "communication": "Kommunikáció", - "connection_not_authorized": "This SocketIO connection does not use any authentication.", - "event_name": "Esemény neve", + "connection_not_authorized": "Ez a SocketIO-kapcsolat nem használ semmilyen hitelesítést.", + "event_name": "Esemény vagy téma neve", "events": "Események", "log": "Napló", "url": "URL" @@ -594,9 +594,9 @@ "connected": "Kapcsolódva", "connected_to": "Kapcsolódva ehhez: {name}", "connecting_to": "Kapcsolódás ehhez: {name}…", - "connection_error": "Failed to connect", - "connection_failed": "Connection failed", - "connection_lost": "Connection lost", + "connection_error": "Nem sikerült kapcsolódni", + "connection_failed": "A kapcsolódás sikertelen", + "connection_lost": "A kapcsolat elveszett", "copied_to_clipboard": "Vágólapra másolva", "deleted": "Törölve", "deprecated": "ELAVULT", @@ -611,17 +611,17 @@ "history_deleted": "Előzmények törölve", "linewrap": "Sorok tördelése", "loading": "Betöltés…", - "message_received": "Message: {message} arrived on topic: {topic}", - "mqtt_subscription_failed": "Something went wrong while subscribing to topic: {topic}", + "message_received": "Üzenet: {message} érkezett ehhez a témához: {topic}", + "mqtt_subscription_failed": "Valami elromlott a következő témára való feliratkozás során: {topic}", "none": "Nincs", "nothing_found": "Semmi sem található ehhez:", - "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", - "subscribed_failed": "Failed to subscribe to topic: {topic}", - "subscribed_success": "Successfully subscribed to topic: {topic}", - "unsubscribed_failed": "Failed to unsubscribe from topic: {topic}", - "unsubscribed_success": "Successfully unsubscribed from topic: {topic}", + "published_error": "Valami elromlott a következő üzenet közzététele során: {topic}, ehhez a témához: {message}", + "published_message": "Közzétett üzenet: {message}, ehhez a témához: {topic}", + "reconnection_error": "Nem sikerült újrakapcsolódni", + "subscribed_failed": "Nem sikerült feliratkozni erre a témára: {topic}", + "subscribed_success": "Sikeresen feliratkozott erre a témára: {topic}", + "unsubscribed_failed": "Nem sikerült leiratkozni erről a témáról: {topic}", + "unsubscribed_success": "Sikeresen leiratkozott erről a témáról: {topic}", "waiting_send_request": "Várakozás a kérés elküldésére" }, "support": { @@ -641,7 +641,7 @@ "body": "Törzs", "collections": "Gyűjtemények", "documentation": "Dokumentáció", - "environments": "Environments", + "environments": "Környezetek", "headers": "Fejlécek", "history": "Előzmények", "mqtt": "MQTT", @@ -666,7 +666,7 @@ "email_do_not_match": "Az e-mail-cím nem egyezik a fiókja részleteivel. Vegye fel a kapcsolatot a csapat tulajdonosával.", "exit": "Kilépés a csapatból", "exit_disabled": "Csak a tulajdonos nem léphet ki a csapatból", - "invalid_coll_id": "Invalid collection ID", + "invalid_coll_id": "Érvénytelen gyűjteményazonosító", "invalid_email_format": "Az e-mail formátuma érvénytelen", "invalid_id": "Érvénytelen csapatazonosító. Vegye fel a kapcsolatot a csapat tulajdonosával.", "invalid_invite_link": "Érvénytelen meghívási hivatkozás", @@ -690,7 +690,7 @@ "member_removed": "Felhasználó eltávolítva", "member_role_updated": "Felhasználói szerepek frissítve", "members": "Tagok", - "more_members": "+{count} more", + "more_members": "+{count} további", "name_length_insufficient": "A csapat nevének legalább 6 karakter hosszúságúnak kell lennie", "name_updated": "Csapatnév frissítve", "new": "Új csapat", @@ -698,13 +698,13 @@ "new_name": "Saját új csapat", "no_access": "Nincs szerkesztési jogosultsága ezekhez a gyűjteményekhez", "no_invite_found": "A meghívás nem található. Vegye fel a kapcsolatot a csapat tulajdonosával.", - "no_request_found": "Request not found.", + "no_request_found": "A kérés nem található.", "not_found": "A csapat nem található. Vegye fel a kapcsolatot a csapat tulajdonosával.", "not_valid_viewer": "Ön nem érvényes megtekintő. Vegye fel a kapcsolatot a csapat tulajdonosával.", - "parent_coll_move": "Cannot move collection to a child collection", + "parent_coll_move": "Nem lehet áthelyezni a gyűjteményt egy gyermekgyűjteménybe", "pending_invites": "Függőben lévő meghívások", "permissions": "Jogosultságok", - "same_target_destination": "Same target and destination", + "same_target_destination": "Ugyanaz a cél és célhely", "saved": "Csapat elmentve", "select_a_team": "Csapat kiválasztása", "title": "Csapatok", @@ -712,9 +712,9 @@ "we_sent_invite_link_description": "Kérje meg az összes meghívottat, hogy nézzék meg a beérkező leveleiket. Kattintsanak a hivatkozásra a csapathoz való csatlakozáshoz." }, "team_environment": { - "deleted": "Environment Deleted", - "duplicate": "Environment Duplicated", - "not_found": "Environment not found." + "deleted": "Környezet törölve", + "duplicate": "Környezet megkettőzve", + "not_found": "A környezet nem található." }, "test": { "failed": "teszt sikertelen", @@ -734,9 +734,9 @@ "url": "URL" }, "workspace": { - "change": "Change workspace", - "personal": "My Workspace", - "team": "Team Workspace", - "title": "Workspaces" + "change": "Munkaterület váltása", + "personal": "Saját munkaterület", + "team": "Csapat-munkaterület", + "title": "Munkaterületek" } } From d7cc9f5dbc12a8c6babcc7560ae411b826ac5a33 Mon Sep 17 00:00:00 2001 From: Webysther Sperandio Date: Tue, 20 Jun 2023 20:43:40 +0200 Subject: [PATCH 06/20] feat: custom location on admin redirect to base (#3103) --- packages/hoppscotch-sh-admin/src/helpers/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hoppscotch-sh-admin/src/helpers/auth.ts b/packages/hoppscotch-sh-admin/src/helpers/auth.ts index 850310b03..ba7385dbe 100644 --- a/packages/hoppscotch-sh-admin/src/helpers/auth.ts +++ b/packages/hoppscotch-sh-admin/src/helpers/auth.ts @@ -383,7 +383,7 @@ export const auth = { await this.signInWithEmailLink(deviceIdentifier, window.location.href); removeLocalConfig('deviceIdentifier'); - window.location.href = '/'; + window.location.href = import.meta.env.VITE_ADMIN_URL; } }, }; From 77e8a36ab058de3536efd999ad5ada2a4a9fefb6 Mon Sep 17 00:00:00 2001 From: Omer Baflah <57899138+omerbaflah@users.noreply.github.com> Date: Wed, 21 Jun 2023 22:05:57 +0300 Subject: [PATCH 07/20] fix: correct typos (#3153) --- packages/hoppscotch-backend/src/errors.ts | 10 +++++----- packages/hoppscotch-backend/src/types/AuthError.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/hoppscotch-backend/src/errors.ts b/packages/hoppscotch-backend/src/errors.ts index 247797bcc..7666e50e8 100644 --- a/packages/hoppscotch-backend/src/errors.ts +++ b/packages/hoppscotch-backend/src/errors.ts @@ -23,7 +23,7 @@ export const AUTH_FAIL = 'auth/fail'; export const JSON_INVALID = 'json_invalid'; /** - * Tried to delete an user data document from fb firestore but failed. + * Tried to delete a user data document from fb firestore but failed. * (FirebaseService) */ export const USER_FB_DOCUMENT_DELETION_FAILED = @@ -231,7 +231,7 @@ export const TEAM_COLL_INVALID_JSON = 'team_coll/invalid_json'; export const TEAM_NOT_OWNER = 'team_coll/team_not_owner' as const; /** - * Tried to perform action on a request that doesn't accept their member role level + * Tried to perform an action on a request that doesn't accept their member role level * (GqlRequestTeamMemberGuard) */ export const TEAM_REQ_NOT_REQUIRED_ROLE = 'team_req/not_required_role'; @@ -262,7 +262,7 @@ export const TEAM_REQ_REORDERING_FAILED = 'team_req/reordering_failed' as const; export const SENDER_EMAIL_INVALID = 'mailer/sender_email_invalid' as const; /** - * Tried to perform action on a request when the user is not even member of the team + * Tried to perform an action on a request when the user is not even a member of the team * (GqlRequestTeamMemberGuard, GqlCollectionTeamMemberGuard) */ export const TEAM_REQ_NOT_MEMBER = 'team_req/not_member'; @@ -307,7 +307,7 @@ export const SHORTCODE_INVALID_JSON = 'shortcode/invalid_json' as const; export const SHORTCODE_ALREADY_EXISTS = 'shortcode/already_exists' as const; /** - * Invalid or non-existent TEAM ENVIRONMMENT ID + * Invalid or non-existent TEAM ENVIRONMENT ID * (TeamEnvironmentsService) */ export const TEAM_ENVIRONMENT_NOT_FOUND = 'team_environment/not_found' as const; @@ -340,7 +340,7 @@ export const USER_SETTINGS_NULL_SETTINGS = 'user_settings/null_settings' as const; /* - * Global environment doesnt exists for the user + * Global environment doesn't exist for the user * (UserEnvironmentsService) */ export const USER_ENVIRONMENT_GLOBAL_ENV_DOES_NOT_EXISTS = diff --git a/packages/hoppscotch-backend/src/types/AuthError.ts b/packages/hoppscotch-backend/src/types/AuthError.ts index 81e8c68c6..d1d2d387e 100644 --- a/packages/hoppscotch-backend/src/types/AuthError.ts +++ b/packages/hoppscotch-backend/src/types/AuthError.ts @@ -2,7 +2,7 @@ import { HttpStatus } from '@nestjs/common'; /** ** Custom interface to handle errors specific to Auth module - ** Since its REST we need to return HTTP status code along with error message + ** Since its REST we need to return the HTTP status code along with the error message */ export type AuthError = { message: string; From f67b366b9024c974f4b859f9fa1e731e88c5fbaf Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Thu, 22 Jun 2023 00:38:28 +0530 Subject: [PATCH 08/20] fix: unified bg color in collection tree (#3155) --- .../src/components/collections/MyCollections.vue | 2 +- .../src/components/collections/TeamCollections.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-common/src/components/collections/MyCollections.vue b/packages/hoppscotch-common/src/components/collections/MyCollections.vue index d3cdf3904..256efb08a 100644 --- a/packages/hoppscotch-common/src/components/collections/MyCollections.vue +++ b/packages/hoppscotch-common/src/components/collections/MyCollections.vue @@ -1,5 +1,5 @@ From 878ec833ce379f7a2a7d29f71ba9bcf2fb5d0c66 Mon Sep 17 00:00:00 2001 From: Ankit Sridhar <36269838+ankitsridhar16@users.noreply.github.com> Date: Thu, 22 Jun 2023 23:38:02 +0530 Subject: [PATCH 10/20] fix: remove existing team invitation for an invitee when adding invitee to team by admin (HBE-229) (#3157) --- .../src/admin/admin.service.ts | 16 ++++++++-- .../team-invitation.service.ts | 29 +++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-backend/src/admin/admin.service.ts b/packages/hoppscotch-backend/src/admin/admin.service.ts index e3c90c80d..7a0c7305e 100644 --- a/packages/hoppscotch-backend/src/admin/admin.service.ts +++ b/packages/hoppscotch-backend/src/admin/admin.service.ts @@ -236,11 +236,11 @@ export class AdminService { const user = await this.userService.findUserByEmail(userEmail); if (O.isNone(user)) return E.left(USER_NOT_FOUND); - const isUserAlreadyMember = await this.teamService.getTeamMemberTE( + const teamMember = await this.teamService.getTeamMemberTE( teamID, user.value.uid, )(); - if (E.left(isUserAlreadyMember)) { + if (E.isLeft(teamMember)) { const addedUser = await this.teamService.addMemberToTeamWithEmail( teamID, userEmail, @@ -248,6 +248,18 @@ export class AdminService { ); if (E.isLeft(addedUser)) return E.left(addedUser.left); + const userInvitation = + await this.teamInvitationService.getTeamInviteByEmailAndTeamID( + userEmail, + teamID, + ); + + if (E.isRight(userInvitation)) { + await this.teamInvitationService.revokeInvitation( + userInvitation.right.id, + )(); + } + return E.right(addedUser.right); } diff --git a/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts b/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts index 9227fa93d..98610bde1 100644 --- a/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts +++ b/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts @@ -3,6 +3,7 @@ import * as T from 'fp-ts/Task'; import * as O from 'fp-ts/Option'; import * as TO from 'fp-ts/TaskOption'; import * as TE from 'fp-ts/TaskEither'; +import * as E from 'fp-ts/Either'; import { pipe, flow, constVoid } from 'fp-ts/function'; import { PrismaService } from 'src/prisma/prisma.service'; import { Team, TeamMemberRole } from 'src/team/team.model'; @@ -10,6 +11,7 @@ import { Email } from 'src/types/Email'; import { User } from 'src/user/user.model'; import { TeamService } from 'src/team/team.service'; import { + INVALID_EMAIL, TEAM_INVITE_ALREADY_MEMBER, TEAM_INVITE_EMAIL_DO_NOT_MATCH, TEAM_INVITE_MEMBER_HAS_INVITE, @@ -19,6 +21,7 @@ import { TeamInvitation } from './team-invitation.model'; import { MailerService } from 'src/mailer/mailer.service'; import { UserService } from 'src/user/user.service'; import { PubSubService } from 'src/pubsub/pubsub.service'; +import { validateEmail } from '../utils'; @Injectable() export class TeamInvitationService { @@ -63,6 +66,32 @@ export class TeamInvitationService { ); } + /** + * Get the team invite for an invitee with email and teamID. + * @param inviteeEmail invitee email + * @param teamID team id + * @returns an Either of team invitation for the invitee or error + */ + async getTeamInviteByEmailAndTeamID(inviteeEmail: string, teamID: string) { + const isEmailValid = validateEmail(inviteeEmail); + if (!isEmailValid) return E.left(INVALID_EMAIL); + + try { + const teamInvite = await this.prisma.teamInvitation.findUniqueOrThrow({ + where: { + teamID_inviteeEmail: { + inviteeEmail: inviteeEmail, + teamID: teamID, + }, + }, + }); + + return E.right(teamInvite); + } catch (e) { + return E.left(TEAM_INVITE_NO_INVITE_FOUND); + } + } + createInvitation( creator: User, team: Team, From 2afc87847d75c2990f69135f83da6ea01b28e7d1 Mon Sep 17 00:00:00 2001 From: Akash K <57758277+amk-dev@users.noreply.github.com> Date: Thu, 22 Jun 2023 23:40:09 +0530 Subject: [PATCH 11/20] fix: use --location param for url when parsing curl (#3152) --- .../src/components/http/Headers.vue | 2 +- .../src/components/http/RequestOptions.vue | 13 +++---------- .../src/helpers/curl/sub_helpers/url.ts | 4 +++- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/hoppscotch-common/src/components/http/Headers.vue b/packages/hoppscotch-common/src/components/http/Headers.vue index 2a13c18da..5015843a8 100644 --- a/packages/hoppscotch-common/src/components/http/Headers.vue +++ b/packages/hoppscotch-common/src/components/http/Headers.vue @@ -338,7 +338,7 @@ watch(workingHeaders, (headersList) => { // Sync logic between headers and working/bulk headers watch( - request.value.headers, + () => request.value.headers, (newHeadersList) => { // Sync should overwrite working headers const filteredWorkingHeaders = pipe( diff --git a/packages/hoppscotch-common/src/components/http/RequestOptions.vue b/packages/hoppscotch-common/src/components/http/RequestOptions.vue index 28e238b8f..2281ab42a 100644 --- a/packages/hoppscotch-common/src/components/http/RequestOptions.vue +++ b/packages/hoppscotch-common/src/components/http/RequestOptions.vue @@ -54,7 +54,8 @@