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/components.d.ts b/packages/hoppscotch-common/src/components.d.ts index e7c8a8e7d..21264cc9e 100644 --- a/packages/hoppscotch-common/src/components.d.ts +++ b/packages/hoppscotch-common/src/components.d.ts @@ -86,6 +86,7 @@ declare module '@vue/runtime-core' { HoppSmartLink: typeof import('@hoppscotch/ui')['HoppSmartLink'] HoppSmartModal: typeof import('@hoppscotch/ui')['HoppSmartModal'] HoppSmartPicture: typeof import('@hoppscotch/ui')['HoppSmartPicture'] + HoppSmartPlaceholder: typeof import('@hoppscotch/ui')['HoppSmartPlaceholder'] HoppSmartProgressRing: typeof import('@hoppscotch/ui')['HoppSmartProgressRing'] HoppSmartRadioGroup: typeof import('@hoppscotch/ui')['HoppSmartRadioGroup'] HoppSmartSlideOver: typeof import('@hoppscotch/ui')['HoppSmartSlideOver'] @@ -167,6 +168,7 @@ declare module '@vue/runtime-core' { SmartLink: typeof import('./../../hoppscotch-ui/src/components/smart/Link.vue')['default'] SmartModal: typeof import('./../../hoppscotch-ui/src/components/smart/Modal.vue')['default'] SmartPicture: typeof import('./../../hoppscotch-ui/src/components/smart/Picture.vue')['default'] + SmartPlaceholder: typeof import('./../../hoppscotch-ui/src/components/smart/Placeholder.vue')['default'] SmartProgressRing: typeof import('./../../hoppscotch-ui/src/components/smart/ProgressRing.vue')['default'] SmartRadio: typeof import('./../../hoppscotch-ui/src/components/smart/Radio.vue')['default'] SmartRadioGroup: typeof import('./../../hoppscotch-ui/src/components/smart/RadioGroup.vue')['default'] diff --git a/packages/hoppscotch-common/src/components/app/Fuse.vue b/packages/hoppscotch-common/src/components/app/Fuse.vue index 516e6893a..c6740137e 100644 --- a/packages/hoppscotch-common/src/components/app/Fuse.vue +++ b/packages/hoppscotch-common/src/components/app/Fuse.vue @@ -10,15 +10,14 @@ @mouseover="selectedEntry = shortcutIndex" /> -
- - - {{ t("state.nothing_found") }} "{{ search }}" - -
+ + diff --git a/packages/hoppscotch-common/src/components/app/Shortcuts.vue b/packages/hoppscotch-common/src/components/app/Shortcuts.vue index 2adfd302a..1a8608552 100644 --- a/packages/hoppscotch-common/src/components/app/Shortcuts.vue +++ b/packages/hoppscotch-common/src/components/app/Shortcuts.vue @@ -39,15 +39,14 @@ /> -
- - - {{ t("state.nothing_found") }} "{{ filterText }}" - -
+ +
+ + - - - {{ t("empty.collection") }} - + + -
-
+ - - - {{ t("empty.folder") }} - -
+ diff --git a/packages/hoppscotch-common/src/components/collections/TeamCollections.vue b/packages/hoppscotch-common/src/components/collections/TeamCollections.vue index 6a85fbaf2..02a3f2f5d 100644 --- a/packages/hoppscotch-common/src/components/collections/TeamCollections.vue +++ b/packages/hoppscotch-common/src/components/collections/TeamCollections.vue @@ -262,67 +262,53 @@ diff --git a/packages/hoppscotch-common/src/components/collections/graphql/Collection.vue b/packages/hoppscotch-common/src/components/collections/graphql/Collection.vue index f6debfa99..89ceb3e1a 100644 --- a/packages/hoppscotch-common/src/components/collections/graphql/Collection.vue +++ b/packages/hoppscotch-common/src/components/collections/graphql/Collection.vue @@ -171,21 +171,14 @@ @duplicate-request="$emit('duplicate-request', $event)" @select="$emit('select', $event)" /> -
- - - {{ t("empty.collection") }} - -
+ -
- - - {{ t("empty.folder") }} - -
+ -
- - - {{ t("empty.collections") }} - -
-
+ - - - {{ t("state.nothing_found") }} "{{ filterText }}" - -
+ + -
- - - {{ t("empty.environments") }} - -
+ -
- - - {{ t("empty.environments") }} - -
+
-
- - - {{ t("empty.environments") }} - -
+ diff --git a/packages/hoppscotch-common/src/components/environments/my/index.vue b/packages/hoppscotch-common/src/components/environments/my/index.vue index 654003970..1ba79a606 100644 --- a/packages/hoppscotch-common/src/components/environments/my/index.vue +++ b/packages/hoppscotch-common/src/components/environments/my/index.vue @@ -32,19 +32,12 @@ :environment="environment" @edit-environment="editEnvironment(index)" /> -
- - - {{ t("empty.environments") }} - -
+ -
- - - {{ t("empty.environments") }} - -
+ diff --git a/packages/hoppscotch-common/src/components/environments/teams/index.vue b/packages/hoppscotch-common/src/components/environments/teams/index.vue index ea36f0182..c18a049b5 100644 --- a/packages/hoppscotch-common/src/components/environments/teams/index.vue +++ b/packages/hoppscotch-common/src/components/environments/teams/index.vue @@ -43,19 +43,12 @@ /> -
- - - {{ t("empty.environments") }} - -
+
- - - {{ t("empty.authorization") }} - -
+
diff --git a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue index 8751ef025..7f5bf5d76 100644 --- a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue +++ b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue @@ -289,19 +289,12 @@
-
- - - {{ t("empty.headers") }} - -
+
diff --git a/packages/hoppscotch-common/src/components/graphql/Response.vue b/packages/hoppscotch-common/src/components/graphql/Response.vue index b0138d782..1bbfd7f7d 100644 --- a/packages/hoppscotch-common/src/components/graphql/Response.vue +++ b/packages/hoppscotch-common/src/components/graphql/Response.vue @@ -1,12 +1,13 @@ diff --git a/packages/hoppscotch-common/src/components/history/index.vue b/packages/hoppscotch-common/src/components/history/index.vue index 66bb1275c..1dcfa6b89 100644 --- a/packages/hoppscotch-common/src/components/history/index.vue +++ b/packages/hoppscotch-common/src/components/history/index.vue @@ -106,31 +106,23 @@ />
-
- - - {{ t("empty.history") }} - -
-
+ - - - {{ t("state.nothing_found") }} "{{ filterText || filterSelection }}" - + -
+ -
- - {{ t("empty.authorization") }} -
+
diff --git a/packages/hoppscotch-common/src/components/http/Body.vue b/packages/hoppscotch-common/src/components/http/Body.vue index 8c1e91211..c674c4c93 100644 --- a/packages/hoppscotch-common/src/components/http/Body.vue +++ b/packages/hoppscotch-common/src/components/http/Body.vue @@ -102,17 +102,12 @@ v-model="body" /> -
- - {{ t("empty.body") }} -
+
diff --git a/packages/hoppscotch-common/src/components/http/BodyParameters.vue b/packages/hoppscotch-common/src/components/http/BodyParameters.vue index 7fa7ee007..14e74b5ef 100644 --- a/packages/hoppscotch-common/src/components/http/BodyParameters.vue +++ b/packages/hoppscotch-common/src/components/http/BodyParameters.vue @@ -152,17 +152,12 @@ -
- - {{ t("empty.body") }} -
+
diff --git a/packages/hoppscotch-common/src/components/http/CodegenModal.vue b/packages/hoppscotch-common/src/components/http/CodegenModal.vue index f04c4aa94..61ca4f6b0 100644 --- a/packages/hoppscotch-common/src/components/http/CodegenModal.vue +++ b/packages/hoppscotch-common/src/components/http/CodegenModal.vue @@ -56,20 +56,19 @@ } " /> -
- - - {{ t("state.nothing_found") }} "{{ searchQuery }}" - -
+ +
diff --git a/packages/hoppscotch-common/src/components/http/Headers.vue b/packages/hoppscotch-common/src/components/http/Headers.vue index 2a13c18da..e4a54129f 100644 --- a/packages/hoppscotch-common/src/components/http/Headers.vue +++ b/packages/hoppscotch-common/src/components/http/Headers.vue @@ -202,17 +202,12 @@ -
- - {{ t("empty.headers") }} -
+ diff --git a/packages/hoppscotch-common/src/components/http/Parameters.vue b/packages/hoppscotch-common/src/components/http/Parameters.vue index a51dce11d..381a57ff7 100644 --- a/packages/hoppscotch-common/src/components/http/Parameters.vue +++ b/packages/hoppscotch-common/src/components/http/Parameters.vue @@ -145,18 +145,12 @@ - -
- - {{ t("empty.parameters") }} -
+ diff --git a/packages/hoppscotch-common/src/components/http/ResponseMeta.vue b/packages/hoppscotch-common/src/components/http/ResponseMeta.vue index 91f122415..2a768e581 100644 --- a/packages/hoppscotch-common/src/components/http/ResponseMeta.vue +++ b/packages/hoppscotch-common/src/components/http/ResponseMeta.vue @@ -11,51 +11,29 @@ {{ t("state.loading") }} -
- - - {{ t("error.network_fail") }} - - - {{ t("helpers.network_fail") }} - -
-
+ - - - {{ t("error.script_fail") }} - - - {{ t("helpers.script_fail") }} -
{{ response.error.name }}: {{ response.error.message }}
{{ response.error.stack }}
-
+
-
- - - {{ t("error.test_script_fail") }} - - - {{ t("helpers.test_script_fail") }} - -
-
+ - - - {{ t("empty.tests") }} - - - {{ t("helpers.tests") }} - -
+ -
- - - {{ t("empty.body") }} - -
+ diff --git a/packages/hoppscotch-common/src/components/profile/Shortcodes.vue b/packages/hoppscotch-common/src/components/profile/Shortcodes.vue index 4f2de9a0c..95ad85bd9 100644 --- a/packages/hoppscotch-common/src/components/profile/Shortcodes.vue +++ b/packages/hoppscotch-common/src/components/profile/Shortcodes.vue @@ -11,20 +11,13 @@ {{ t("state.loading") }} -
- - - {{ t("empty.shortcodes") }} - -
+
diff --git a/packages/hoppscotch-common/src/components/teams/Edit.vue b/packages/hoppscotch-common/src/components/teams/Edit.vue index 4eac78ccd..3bc8f9c23 100644 --- a/packages/hoppscotch-common/src/components/teams/Edit.vue +++ b/packages/hoppscotch-common/src/components/teams/Edit.vue @@ -47,19 +47,12 @@ " class="border rounded border-divider" > -
- - - {{ t("empty.members") }} - -
+
-
- - {{ t("empty.pending_invites") }} - -
+
-
- - - {{ t("empty.invites") }} - -
+
{{ t("state.loading") }}
-
- - - {{ t("empty.teams") }} - -
+
{{ t("state.loading") }}
-
- - - {{ t("empty.teams") }} - -
+
-
- -

- {{ t("empty.profile") }} -

-
+
- -
- - - {{ t("empty.subscription") }} - -
- +
-
- - - {{ t("socketio.connection_not_authorized") }} - -
+
-
- - - {{ t("empty.protocols") }} - -
+ diff --git a/packages/hoppscotch-sh-admin/src/components/teams/Invite.vue b/packages/hoppscotch-sh-admin/src/components/teams/Invite.vue index 41915b5d7..5f2bab5e9 100644 --- a/packages/hoppscotch-sh-admin/src/components/teams/Invite.vue +++ b/packages/hoppscotch-sh-admin/src/components/teams/Invite.vue @@ -111,13 +111,14 @@ />
-
- No invites -
+
-
- - {{ t('teams.no_members') }} - -
+
-
- {{ t('teams.no_pending_invites') }} -
-
- - {{ t('teams.error') }} -
+
+ + Something went wrong. Please try again later. +
+
diff --git a/packages/hoppscotch-ui/src/components/smart/Placeholder.vue b/packages/hoppscotch-ui/src/components/smart/Placeholder.vue new file mode 100644 index 000000000..9f0d6b219 --- /dev/null +++ b/packages/hoppscotch-ui/src/components/smart/Placeholder.vue @@ -0,0 +1,40 @@ + + + diff --git a/packages/hoppscotch-ui/src/components/smart/index.ts b/packages/hoppscotch-ui/src/components/smart/index.ts index ad176f54f..7f2d07616 100644 --- a/packages/hoppscotch-ui/src/components/smart/index.ts +++ b/packages/hoppscotch-ui/src/components/smart/index.ts @@ -19,3 +19,4 @@ export { default as HoppSmartToggle } from "./Toggle.vue" export { default as HoppSmartWindow } from "./Window.vue" export { default as HoppSmartWindows } from "./Windows.vue" export { default as HoppSmartPicture } from "./Picture.vue" +export { default as HoppSmartPlaceholder } from "./Placeholder.vue"