Browse Source

chore: updated keyboard shortcuts

liyasthomas 3 năm trước cách đây
mục cha
commit
e31dc6e08d
34 tập tin đã thay đổi với 53 bổ sung2 xóa
  1. 1 0
      packages/hoppscotch-app/helpers/actions.ts
  2. 17 0
      packages/hoppscotch-app/helpers/shortcuts.js
  3. 3 0
      packages/hoppscotch-app/layouts/default.vue
  4. 1 0
      packages/hoppscotch-app/locales/af.json
  5. 1 0
      packages/hoppscotch-app/locales/ar.json
  6. 1 0
      packages/hoppscotch-app/locales/ca.json
  7. 1 0
      packages/hoppscotch-app/locales/cn.json
  8. 1 0
      packages/hoppscotch-app/locales/cs.json
  9. 1 0
      packages/hoppscotch-app/locales/da.json
  10. 1 0
      packages/hoppscotch-app/locales/de.json
  11. 1 0
      packages/hoppscotch-app/locales/el.json
  12. 1 0
      packages/hoppscotch-app/locales/en.json
  13. 1 0
      packages/hoppscotch-app/locales/es.json
  14. 1 0
      packages/hoppscotch-app/locales/fi.json
  15. 1 0
      packages/hoppscotch-app/locales/fr.json
  16. 1 0
      packages/hoppscotch-app/locales/he.json
  17. 1 0
      packages/hoppscotch-app/locales/hu.json
  18. 1 0
      packages/hoppscotch-app/locales/it.json
  19. 1 0
      packages/hoppscotch-app/locales/ja.json
  20. 1 0
      packages/hoppscotch-app/locales/ko.json
  21. 1 0
      packages/hoppscotch-app/locales/nl.json
  22. 1 0
      packages/hoppscotch-app/locales/no.json
  23. 1 0
      packages/hoppscotch-app/locales/pl.json
  24. 1 0
      packages/hoppscotch-app/locales/pt-br.json
  25. 1 0
      packages/hoppscotch-app/locales/pt.json
  26. 1 0
      packages/hoppscotch-app/locales/ro.json
  27. 1 0
      packages/hoppscotch-app/locales/ru.json
  28. 1 0
      packages/hoppscotch-app/locales/sr.json
  29. 1 0
      packages/hoppscotch-app/locales/sv.json
  30. 1 0
      packages/hoppscotch-app/locales/tr.json
  31. 1 0
      packages/hoppscotch-app/locales/tw.json
  32. 1 0
      packages/hoppscotch-app/locales/uk.json
  33. 1 0
      packages/hoppscotch-app/locales/vi.json
  34. 2 2
      packages/hoppscotch-app/newstore/GQLSession.ts

+ 1 - 0
packages/hoppscotch-app/helpers/actions.ts

@@ -27,6 +27,7 @@ export type HoppAction =
   | "navigation.jump.realtime" // Jump to realtime page
   | "navigation.jump.documentation" // Jump to documentation page
   | "navigation.jump.settings" // Jump to settings page
+  | "navigation.jump.profile" // Jump to profile page
 
 type BoundActionList = {
   // eslint-disable-next-line no-unused-vars

+ 17 - 0
packages/hoppscotch-app/helpers/shortcuts.js

@@ -102,6 +102,10 @@ export default [
         keys: [getPlatformAlternateKey(), "S"],
         label: "shortcut.navigation.settings",
       },
+      {
+        keys: [getPlatformAlternateKey(), "P"],
+        label: "shortcut.navigation.profile",
+      },
     ],
   },
   {
@@ -166,6 +170,12 @@ export const spotlight = [
         action: "navigation.jump.settings",
         icon: "arrow-right",
       },
+      {
+        keys: [getPlatformAlternateKey(), "P"],
+        label: "shortcut.navigation.profile",
+        action: "navigation.jump.profile",
+        icon: "arrow-right",
+      },
     ],
   },
   {
@@ -256,6 +266,13 @@ export const fuse = [
     icon: "arrow-right",
     tags: ["settings", "jump", "page", "navigation", "account", "theme", "go"],
   },
+  {
+    keys: [getPlatformAlternateKey(), "P"],
+    label: "shortcut.navigation.profile",
+    action: "navigation.jump.profile",
+    icon: "arrow-right",
+    tags: ["profile", "jump", "page", "navigation", "account", "theme", "go"],
+  },
   {
     keys: [getPlatformSpecialKey(), "M"],
     label: "shortcut.miscellaneous.invite",

+ 3 - 0
packages/hoppscotch-app/layouts/default.vue

@@ -124,6 +124,9 @@ function defineJumpActions() {
   defineActionHandler("navigation.jump.settings", () => {
     router.push({ path: localePath("/settings") })
   })
+  defineActionHandler("navigation.jump.profile", () => {
+    router.push({ path: localePath("/profile") })
+  })
 }
 
 export default defineComponent({

+ 1 - 0
packages/hoppscotch-app/locales/af.json

@@ -400,6 +400,7 @@
       "documentation": "Gaan na die dokumentasiebladsy",
       "forward": "Gaan vorentoe na die volgende bladsy",
       "graphql": "Gaan na die GraphQL -bladsy",
+      "profile": "Go to Profile page",
       "realtime": "Gaan na Realtime -bladsy",
       "rest": "Gaan na die REST -bladsy",
       "settings": "Gaan na die instellingsbladsy",

+ 1 - 0
packages/hoppscotch-app/locales/ar.json

@@ -400,6 +400,7 @@
       "documentation": "انتقل إلى صفحة التوثيق",
       "forward": "انتقل إلى الصفحة التالية",
       "graphql": "انتقل إلى صفحة GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "انتقل إلى صفحة الوقت الفعلي",
       "rest": "انتقل إلى صفحة REST",
       "settings": "انتقل إلى صفحة الإعدادات",

+ 1 - 0
packages/hoppscotch-app/locales/ca.json

@@ -400,6 +400,7 @@
       "documentation": "Aneu a la pàgina Documentació",
       "forward": "Aneu a la pàgina següent",
       "graphql": "Aneu a la pàgina GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Aneu a la pàgina en temps real",
       "rest": "Aneu a la pàgina REST",
       "settings": "Aneu a la pàgina Configuració",

+ 1 - 0
packages/hoppscotch-app/locales/cn.json

@@ -400,6 +400,7 @@
       "documentation": "前往文档页面",
       "forward": "前往下一页面",
       "graphql": "前往 GraphQL 页面",
+      "profile": "Go to Profile page",
       "realtime": "前往实时页面",
       "rest": "前往 REST 页面",
       "settings": "前往设置页面",

+ 1 - 0
packages/hoppscotch-app/locales/cs.json

@@ -400,6 +400,7 @@
       "documentation": "Přejděte na stránku dokumentace",
       "forward": "Přejít na další stránku",
       "graphql": "Přejděte na stránku GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Přejít na stránku v reálném čase",
       "rest": "Přejděte na stránku REST",
       "settings": "Přejděte na stránku Nastavení",

+ 1 - 0
packages/hoppscotch-app/locales/da.json

@@ -400,6 +400,7 @@
       "documentation": "Gå til siden Dokumentation",
       "forward": "Gå videre til næste side",
       "graphql": "Gå til GraphQL -siden",
+      "profile": "Go to Profile page",
       "realtime": "Gå til siden Realtid",
       "rest": "Gå til REST side",
       "settings": "Gå til siden Indstillinger",

+ 1 - 0
packages/hoppscotch-app/locales/de.json

@@ -400,6 +400,7 @@
       "documentation": "Zur Dokumentationsseite gehen",
       "forward": "Weiter zur nächsten Seite",
       "graphql": "Gehen Sie zur GraphQL-Seite",
+      "profile": "Go to Profile page",
       "realtime": "Gehen Sie zur Echtzeit-Seite",
       "rest": "Zur REST-Seite gehen",
       "settings": "Gehen Sie zur Seite Einstellungen",

+ 1 - 0
packages/hoppscotch-app/locales/el.json

@@ -400,6 +400,7 @@
       "documentation": "Μεταβείτε στη σελίδα Τεκμηρίωση",
       "forward": "Προχωρήστε στην επόμενη σελίδα",
       "graphql": "Μεταβείτε στη σελίδα GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Μεταβείτε στη σελίδα σε πραγματικό χρόνο",
       "rest": "Μεταβείτε στη σελίδα REST",
       "settings": "Μεταβείτε στη σελίδα Ρυθμίσεις",

+ 1 - 0
packages/hoppscotch-app/locales/en.json

@@ -400,6 +400,7 @@
       "documentation": "Go to Documentation page",
       "forward": "Go forward to next page",
       "graphql": "Go to GraphQL page",
+      "profile": "Go to Profile page",
       "realtime": "Go to Realtime page",
       "rest": "Go to REST page",
       "settings": "Go to Settings page",

+ 1 - 0
packages/hoppscotch-app/locales/es.json

@@ -400,6 +400,7 @@
       "documentation": "Ir a la página de documentación",
       "forward": "Avanzar a la siguiente página",
       "graphql": "Ir a la página GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Ir a la página en tiempo real",
       "rest": "Ir a la página REST",
       "settings": "Ir a la página de configuración",

+ 1 - 0
packages/hoppscotch-app/locales/fi.json

@@ -400,6 +400,7 @@
       "documentation": "Siirry dokumentaatiosivulle",
       "forward": "Siirry seuraavalle sivulle",
       "graphql": "Siirry GraphQL -sivulle",
+      "profile": "Go to Profile page",
       "realtime": "Siirry Realtime -sivulle",
       "rest": "Siirry REST -sivulle",
       "settings": "Siirry Asetukset -sivulle",

+ 1 - 0
packages/hoppscotch-app/locales/fr.json

@@ -400,6 +400,7 @@
       "documentation": "Aller à la page Documentation",
       "forward": "Aller à la page suivante",
       "graphql": "Aller à la page GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Aller à la page Temps réel",
       "rest": "Aller à la page REST",
       "settings": "Aller à la page Paramètres",

+ 1 - 0
packages/hoppscotch-app/locales/he.json

@@ -400,6 +400,7 @@
       "documentation": "עבור לדף תיעוד",
       "forward": "המשך לדף הבא",
       "graphql": "עבור לדף GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "עבור לדף בזמן אמת",
       "rest": "עבור לדף REST",
       "settings": "עבור אל דף ההגדרות",

+ 1 - 0
packages/hoppscotch-app/locales/hu.json

@@ -400,6 +400,7 @@
       "documentation": "Lépjen a Dokumentáció oldalra",
       "forward": "Ugrás a következő oldalra",
       "graphql": "Lépjen a GraphQL oldalra",
+      "profile": "Go to Profile page",
       "realtime": "Lépjen a Valós idejű oldalra",
       "rest": "Lépjen a REST oldalra",
       "settings": "Lépjen a Beállítások oldalra",

+ 1 - 0
packages/hoppscotch-app/locales/it.json

@@ -400,6 +400,7 @@
       "documentation": "Vai alla pagina della documentazione",
       "forward": "Vai alla pagina successiva",
       "graphql": "Vai alla pagina GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Vai alla pagina Real Time",
       "rest": "Vai alla pagina REST",
       "settings": "Vai alla pagina Impostazioni",

+ 1 - 0
packages/hoppscotch-app/locales/ja.json

@@ -400,6 +400,7 @@
       "documentation": "ドキュメントページに移動",
       "forward": "次のページに進む",
       "graphql": "GraphQLページに移動します",
+      "profile": "Go to Profile page",
       "realtime": "リアルタイムページに移動",
       "rest": "RESTページに移動します",
       "settings": "設定ページに移動します",

+ 1 - 0
packages/hoppscotch-app/locales/ko.json

@@ -400,6 +400,7 @@
       "documentation": "문서 페이지로 이동",
       "forward": "다음 페이지로 이동",
       "graphql": "GraphQL 페이지로 이동",
+      "profile": "Go to Profile page",
       "realtime": "실시간 페이지로 이동",
       "rest": "REST 페이지로 이동",
       "settings": "설정 페이지로 이동",

+ 1 - 0
packages/hoppscotch-app/locales/nl.json

@@ -400,6 +400,7 @@
       "documentation": "Ga naar de documentatiepagina",
       "forward": "Ga verder naar de volgende pagina",
       "graphql": "Ga naar de GraphQL-pagina",
+      "profile": "Go to Profile page",
       "realtime": "Ga naar de Realtime-pagina",
       "rest": "Ga naar de REST-pagina",
       "settings": "Ga naar de pagina Instellingen",

+ 1 - 0
packages/hoppscotch-app/locales/no.json

@@ -400,6 +400,7 @@
       "documentation": "Gå til Dokumentasjonsside",
       "forward": "Gå videre til neste side",
       "graphql": "Gå til GraphQL-siden",
+      "profile": "Go to Profile page",
       "realtime": "Gå til sanntid-siden",
       "rest": "Gå til REST-siden",
       "settings": "Gå til Innstillinger-siden",

+ 1 - 0
packages/hoppscotch-app/locales/pl.json

@@ -400,6 +400,7 @@
       "documentation": "Przejdź do strony dokumentacji",
       "forward": "Przejdź do następnej strony",
       "graphql": "Przejdź do strony GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Przejdź do strony Realtime",
       "rest": "Przejdź do strony REST",
       "settings": "Przejdź do strony Ustawienia",

+ 1 - 0
packages/hoppscotch-app/locales/pt-br.json

@@ -400,6 +400,7 @@
       "documentation": "Vá para a página de documentação",
       "forward": "Avance para a próxima página",
       "graphql": "Vá para a página GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Vá para a página em tempo real",
       "rest": "Vá para a página REST",
       "settings": "Vá para a página de configurações",

+ 1 - 0
packages/hoppscotch-app/locales/pt.json

@@ -400,6 +400,7 @@
       "documentation": "Vá para a página de documentação",
       "forward": "Avance para a próxima página",
       "graphql": "Vá para a página GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Vá para a página em tempo real",
       "rest": "Vá para a página REST",
       "settings": "Vá para a página de configurações",

+ 1 - 0
packages/hoppscotch-app/locales/ro.json

@@ -400,6 +400,7 @@
       "documentation": "Accesați pagina Documentație",
       "forward": "Mergeți la pagina următoare",
       "graphql": "Accesați pagina GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Accesați pagina în timp real",
       "rest": "Accesați pagina REST",
       "settings": "Accesați pagina Setări",

+ 1 - 0
packages/hoppscotch-app/locales/ru.json

@@ -400,6 +400,7 @@
       "documentation": "Перейти на страницу документации",
       "forward": "Перейти на следующую страницу",
       "graphql": "Перейти на страницу GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Перейти на страницу в реальном времени",
       "rest": "Перейти на страницу REST",
       "settings": "Перейти на страницу настроек",

+ 1 - 0
packages/hoppscotch-app/locales/sr.json

@@ -400,6 +400,7 @@
       "documentation": "Идите на страницу Документација",
       "forward": "Идите на следећу страницу",
       "graphql": "Идите на страницу ГрапхКЛ",
+      "profile": "Go to Profile page",
       "realtime": "Идите на страницу у реалном времену",
       "rest": "Идите на страницу REST",
       "settings": "Идите на страницу Подешавања",

+ 1 - 0
packages/hoppscotch-app/locales/sv.json

@@ -397,6 +397,7 @@
       "documentation": "Gå till dokumentationssidan",
       "forward": "Gå vidare till nästa sida",
       "graphql": "Gå till GraphQL -sidan",
+      "profile": "Go to Profile page",
       "realtime": "Gå till realtidssidan",
       "rest": "Gå till REST -sidan",
       "settings": "Gå till sidan Inställningar",

+ 1 - 0
packages/hoppscotch-app/locales/tr.json

@@ -400,6 +400,7 @@
       "documentation": "Belgeler sayfasına git",
       "forward": "Sonraki sayfaya ilerle",
       "graphql": "GraphQL sayfasına git",
+      "profile": "Go to Profile page",
       "realtime": "Gerçek Zamanlı sayfasına git",
       "rest": "REST sayfasına git",
       "settings": "Ayarlar sayfasına git",

+ 1 - 0
packages/hoppscotch-app/locales/tw.json

@@ -397,6 +397,7 @@
       "documentation": "前往文件頁面",
       "forward": "前往下一頁面",
       "graphql": "前往 GraphQL 頁面",
+      "profile": "Go to Profile page",
       "realtime": "前往實時頁面",
       "rest": "前往 REST 頁面",
       "settings": "前往設定頁面",

+ 1 - 0
packages/hoppscotch-app/locales/uk.json

@@ -400,6 +400,7 @@
       "documentation": "Перейдіть на сторінку Документація",
       "forward": "Перейти до наступної сторінки",
       "graphql": "Перейдіть на сторінку GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Перейдіть на сторінку реального часу",
       "rest": "Перейдіть на сторінку REST",
       "settings": "Перейдіть на сторінку Налаштування",

+ 1 - 0
packages/hoppscotch-app/locales/vi.json

@@ -400,6 +400,7 @@
       "documentation": "Đi tới trang Tài liệu",
       "forward": "Chuyển tới trang tiếp theo",
       "graphql": "Đi tới trang GraphQL",
+      "profile": "Go to Profile page",
       "realtime": "Chuyển đến trang Thời gian thực",
       "rest": "Đi tới trang REST",
       "settings": "Đi tới trang Cài đặt",

+ 2 - 2
packages/hoppscotch-app/newstore/GQLSession.ts

@@ -11,7 +11,7 @@ type GQLSession = {
 
 export const defaultGQLSession: GQLSession = {
   request: makeGQLRequest({
-    name: "",
+    name: "Untitled request",
     url: "https://echo.hoppscotch.io/graphql",
     headers: [],
     variables: `{ "id": "1" }`,
@@ -213,7 +213,7 @@ export function setGQLSession(session: GQLSession) {
 }
 
 export function useGQLRequestName() {
-  return useStream(gqlName$, "", (newName) => {
+  return useStream(gqlName$, gqlSessionStore.value.request.name, (newName) => {
     gqlSessionStore.dispatch({
       dispatcher: "setName",
       payload: { newName },