diff --git a/.github/workflows/deploy_web.yaml b/.github/workflows/deploy_web.yaml index 02a05ba35..f74f49daa 100644 --- a/.github/workflows/deploy_web.yaml +++ b/.github/workflows/deploy_web.yaml @@ -22,30 +22,16 @@ jobs: with: node-version-file: .nvmrc - - name: use pnpm + - name: Use pnpm uses: pnpm/action-setup@v2 with: version: 8 - - name: Cache pnpm modules - uses: actions/cache@v3 - with: - path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- - - - name: Set env - run: | - cd apps/web - echo "VUE_APP_PAGE_TITLE=Easy-to-Use Online MQTT Client | Try Now" > .env.local - echo "VUE_APP_PAGE_DESCRIPTION=Online MQTT 5.0 client on the web, using MQTT over WebSocket to connect to the MQTT Broker and test message publishing and receiving in the browser." >> .env.local - - name: Install dependencies run: | pnpm install - - name: build + - name: Build run: | pnpm run build:web diff --git a/apps/desktop/src/renderer/components.d.ts b/apps/desktop/src/renderer/components.d.ts index c31097493..160f4b0c9 100644 --- a/apps/desktop/src/renderer/components.d.ts +++ b/apps/desktop/src/renderer/components.d.ts @@ -7,6 +7,9 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AboutFooter: typeof import('./../../../../packages/ui/src/components/about/Footer.vue')['default'] + AboutInfo: typeof import('./../../../../packages/ui/src/components/about/Info.vue')['default'] + AboutView: typeof import('./../../../../packages/ui/src/components/about/View.vue')['default'] CommonEmptyView: typeof import('./../../../../packages/ui/src/components/common/EmptyView.vue')['default'] CommonLeftMenu: typeof import('./../../../../packages/ui/src/components/common/LeftMenu.vue')['default'] CommonMainView: typeof import('./../../../../packages/ui/src/components/common/MainView.vue')['default'] @@ -24,12 +27,14 @@ declare module 'vue' { ElIconDelete: typeof import('@element-plus/icons-vue')['Delete'] ElIconDownload: typeof import('@element-plus/icons-vue')['Download'] ElIconPrinter: typeof import('@element-plus/icons-vue')['Printer'] + ElIconRight: typeof import('@element-plus/icons-vue')['Right'] ElIconUpload: typeof import('@element-plus/icons-vue')['Upload'] ElIconWarning: typeof import('@element-plus/icons-vue')['Warning'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMain: typeof import('element-plus/es')['ElMain'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPopover: typeof import('element-plus/es')['ElPopover'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] diff --git a/apps/desktop/src/renderer/src/pages/about.vue b/apps/desktop/src/renderer/src/pages/about.vue new file mode 100644 index 000000000..b25db2d70 --- /dev/null +++ b/apps/desktop/src/renderer/src/pages/about.vue @@ -0,0 +1,3 @@ + + + diff --git a/apps/desktop/typed-router.d.ts b/apps/desktop/typed-router.d.ts index 07087aabb..dd95cc4a7 100644 --- a/apps/desktop/typed-router.d.ts +++ b/apps/desktop/typed-router.d.ts @@ -18,6 +18,7 @@ declare module 'vue-router/auto-routes' { * Route name map generated by unplugin-vue-router */ export interface RouteNamedMap { + '/about': RouteRecordInfo<'/about', '/about', Record, Record>, '/connections/': RouteRecordInfo<'/connections/', '/connections', Record, Record>, '/connections/[id]': RouteRecordInfo<'/connections/[id]', '/connections/:id', { id: ParamValue }, { id: ParamValue }>, '/help': RouteRecordInfo<'/help', '/help', Record, Record>, diff --git a/apps/web/components.d.ts b/apps/web/components.d.ts index ead027120..c5f4e2c0c 100644 --- a/apps/web/components.d.ts +++ b/apps/web/components.d.ts @@ -7,6 +7,9 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AboutFooter: typeof import('./../../packages/ui/src/components/about/Footer.vue')['default'] + AboutInfo: typeof import('./../../packages/ui/src/components/about/Info.vue')['default'] + AboutView: typeof import('./../../packages/ui/src/components/about/View.vue')['default'] CommonEmptyView: typeof import('./../../packages/ui/src/components/common/EmptyView.vue')['default'] CommonLeftMenu: typeof import('./../../packages/ui/src/components/common/LeftMenu.vue')['default'] CommonMainView: typeof import('./../../packages/ui/src/components/common/MainView.vue')['default'] @@ -24,12 +27,14 @@ declare module 'vue' { ElIconDelete: typeof import('@element-plus/icons-vue')['Delete'] ElIconDownload: typeof import('@element-plus/icons-vue')['Download'] ElIconPrinter: typeof import('@element-plus/icons-vue')['Printer'] + ElIconRight: typeof import('@element-plus/icons-vue')['Right'] ElIconUpload: typeof import('@element-plus/icons-vue')['Upload'] ElIconWarning: typeof import('@element-plus/icons-vue')['Warning'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMain: typeof import('element-plus/es')['ElMain'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPopover: typeof import('element-plus/es')['ElPopover'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] diff --git a/apps/web/src/pages/about.vue b/apps/web/src/pages/about.vue new file mode 100644 index 000000000..b25db2d70 --- /dev/null +++ b/apps/web/src/pages/about.vue @@ -0,0 +1,3 @@ + + + diff --git a/apps/web/typed-router.d.ts b/apps/web/typed-router.d.ts index 07087aabb..dd95cc4a7 100644 --- a/apps/web/typed-router.d.ts +++ b/apps/web/typed-router.d.ts @@ -18,6 +18,7 @@ declare module 'vue-router/auto-routes' { * Route name map generated by unplugin-vue-router */ export interface RouteNamedMap { + '/about': RouteRecordInfo<'/about', '/about', Record, Record>, '/connections/': RouteRecordInfo<'/connections/', '/connections', Record, Record>, '/connections/[id]': RouteRecordInfo<'/connections/[id]', '/connections/:id', { id: ParamValue }, { id: ParamValue }>, '/help': RouteRecordInfo<'/help', '/help', Record, Record>, diff --git a/packages/tailwind-config/base.config.ts b/packages/tailwind-config/base.config.ts index b6fa33530..18f74482e 100644 --- a/packages/tailwind-config/base.config.ts +++ b/packages/tailwind-config/base.config.ts @@ -10,6 +10,7 @@ const config: Config = { extend: { backgroundImage: () => ({ 'gradient-card': 'var(--color-bg-card-gradient)', + 'gradient-btn': 'var(--color-bg-btn-gradient)', }), }, }, diff --git a/packages/ui/components.d.ts b/packages/ui/components.d.ts index 0f88d63cd..9d3f59138 100644 --- a/packages/ui/components.d.ts +++ b/packages/ui/components.d.ts @@ -7,6 +7,9 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AboutFooter: typeof import('./src/components/about/Footer.vue')['default'] + AboutInfo: typeof import('./src/components/about/Info.vue')['default'] + AboutView: typeof import('./src/components/about/View.vue')['default'] CommonEmptyView: typeof import('./src/components/common/EmptyView.vue')['default'] CommonLeftMenu: typeof import('./src/components/common/LeftMenu.vue')['default'] CommonMainView: typeof import('./src/components/common/MainView.vue')['default'] @@ -22,12 +25,14 @@ declare module 'vue' { ElIconDelete: typeof import('@element-plus/icons-vue')['Delete'] ElIconDownload: typeof import('@element-plus/icons-vue')['Download'] ElIconPrinter: typeof import('@element-plus/icons-vue')['Printer'] + ElIconRight: typeof import('@element-plus/icons-vue')['Right'] ElIconUpload: typeof import('@element-plus/icons-vue')['Upload'] ElIconWarning: typeof import('@element-plus/icons-vue')['Warning'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMain: typeof import('element-plus/es')['ElMain'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPopover: typeof import('element-plus/es')['ElPopover'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] diff --git a/packages/ui/src/assets/images/about/emq-logo-dark.png b/packages/ui/src/assets/images/about/emq-logo-dark.png new file mode 100644 index 000000000..b22f6ca2c Binary files /dev/null and b/packages/ui/src/assets/images/about/emq-logo-dark.png differ diff --git a/packages/ui/src/assets/images/about/emq-logo-light.png b/packages/ui/src/assets/images/about/emq-logo-light.png new file mode 100644 index 000000000..cd2b7a381 Binary files /dev/null and b/packages/ui/src/assets/images/about/emq-logo-light.png differ diff --git a/packages/ui/src/assets/images/about/mqttx-dark.png b/packages/ui/src/assets/images/about/mqttx-dark.png new file mode 100644 index 000000000..13abc8c1d Binary files /dev/null and b/packages/ui/src/assets/images/about/mqttx-dark.png differ diff --git a/packages/ui/src/assets/images/about/mqttx-light.png b/packages/ui/src/assets/images/about/mqttx-light.png new file mode 100644 index 000000000..222377d52 Binary files /dev/null and b/packages/ui/src/assets/images/about/mqttx-light.png differ diff --git a/packages/ui/src/assets/images/about/wx_qr_code.png b/packages/ui/src/assets/images/about/wx_qr_code.png new file mode 100644 index 000000000..5a31a4eac Binary files /dev/null and b/packages/ui/src/assets/images/about/wx_qr_code.png differ diff --git a/packages/ui/src/components/about/Footer.vue b/packages/ui/src/components/about/Footer.vue new file mode 100644 index 000000000..d44a89da0 --- /dev/null +++ b/packages/ui/src/components/about/Footer.vue @@ -0,0 +1,76 @@ + + + + + + + + ©{{ fullYear }} + + EMQ + + Technologies Inc. + + + + + + + + + + + + + + + + + diff --git a/packages/ui/src/components/about/Info.vue b/packages/ui/src/components/about/Info.vue new file mode 100644 index 000000000..415a0736c --- /dev/null +++ b/packages/ui/src/components/about/Info.vue @@ -0,0 +1,105 @@ + + + + + + + {{ $t('about.update') }} + + + {{ $t('about.releases') }} + + + {{ $t('about.support') }} + + + {{ $t('about.dataCollectionPolicy') }} + + + + {{ platformType === 'desktop' ? $t('about.mqttxDesc') : $t('about.mqttxWebDesc') }} + + + + + {{ text }} + + + + + + {{ $t('about.cloudTitle') }} + + + {{ $t('about.cloudSummary') }} + + + {{ $t('about.tryCloud') }} + + + + + + + diff --git a/packages/ui/src/components/about/View.vue b/packages/ui/src/components/about/View.vue new file mode 100644 index 000000000..3a79c47e4 --- /dev/null +++ b/packages/ui/src/components/about/View.vue @@ -0,0 +1,33 @@ + + + + + + + {{ $t('about.about') }} + + + + + + + {{ version }} + + + + + + + + + diff --git a/packages/ui/src/components/common/LeftMenu.vue b/packages/ui/src/components/common/LeftMenu.vue index f0996cfe0..2d931f688 100644 --- a/packages/ui/src/components/common/LeftMenu.vue +++ b/packages/ui/src/components/common/LeftMenu.vue @@ -80,7 +80,7 @@ const menus = reactive({
+ {{ platformType === 'desktop' ? $t('about.mqttxDesc') : $t('about.mqttxWebDesc') }} +
+ {{ $t('about.cloudSummary') }} +