Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QR-code] - Widget redirects to Mobile app #10591

Merged
merged 25 commits into from May 17, 2024

Conversation

dashevchenko
Copy link
Contributor

@dashevchenko dashevchenko commented Apr 18, 2024

Pull Request description

This update allows users to scan a QR-code that redirects them to the mobile app. Includes:

  1. Added APIs for mobile app settings, including configuration of the QR code widget and mobile application credentials (for Android and iOS).
  2. Added APIs to retrieve deep links for the mobile application and to retrieve user tokens after the application is detected on Android or iOS.

General checklist

  • You have reviewed the guidelines document.
  • Labels that classify your pull request have been added.
  • The milestone is specified and corresponds to fix version.
  • Description references specific issue.
  • Description contains human-readable scope of changes.
  • Description contains brief notes about what needs to be added to the documentation.
  • No merge conflicts, commented blocks of code, code formatting issues.
  • Changes are backward compatible or upgrade script is provided.
  • Similar PR is opened for PE version to simplify merge. Crosslinks between PRs added. Required for internal contributors only.

Front-End feature checklist

  • Screenshots with affected component(s) are added. The best option is to provide 2 screens: before and after changes;
  • If you change the widget or other API, ensure it is backward-compatible or upgrade script is present.
  • Ensure new API is documented here

Back-End feature checklist

  • Added corresponding unit and/or integration test(s). Provide written explanation in the PR description if you have failed to add tests.
  • If new dependency was added: the dependency tree is checked for conflicts.
  • If new service was added: the service is marked with corresponding @TbCoreComponent, @TbRuleEngineComponent, @TbTransportComponent, etc.
  • If new REST API was added: the RestClient.java was updated, issue for Python REST client is created.
  • If new yml property was added: make sure a description is added (above or near the property).

@dashevchenko dashevchenko changed the title Mobile application QR code Mobile application QR code API Apr 19, 2024
@dashevchenko dashevchenko added this to the 3.7 milestone Apr 24, 2024
@dashevchenko dashevchenko added Core Changes to Core feature labels Apr 24, 2024
@vvlladd28 vvlladd28 changed the base branch from master to develop/3.6.3 May 7, 2024 15:06
@vvlladd28 vvlladd28 changed the base branch from develop/3.6.3 to master May 7, 2024 15:06
@vvlladd28 vvlladd28 added the UI UI changes label May 10, 2024
(state: AuthState) => state.mobileQrEnabled
);

export const selectPersistDeviceStateToTelemetryAndMobileQrEnabled = createSelector(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectHomeDashboardParams


import { TenantId } from '@shared/models/id/tenant-id';

export interface MobileAppQRCodeSettings {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need sync from Java models name

limitations under the License.

-->
<div *ngIf="!previewMode && !ctx" class="tb-title" translate>admin.mobile-app.connect-mobile-app</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove

<div class="tb-flex row align-center shrink"
[class.row]="mobileAppSettings?.qrCodeConfig.badgePosition === badgePosition.RIGHT"
[class.row-reverse]="mobileAppSettings?.qrCodeConfig.badgePosition === badgePosition.LEFT">
<!-- <canvas #canvas class="tb-qrcode"></canvas>-->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

this.destroy$.complete();
}

getMobileAppDeepLink(): Observable<string> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private method

return this.mobileAppService.getMobileAppDeepLink();
}

updateQRCode(link: string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private method

Comment on lines 17 to 19
.tb-fixed-width {
min-width: 230px;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to form.scss in class fixed-title-width-230

@@ -35,21 +39,42 @@ const customerUserHomePageJson = '/assets/dashboard/customer_user_home_page.json

const updateDeviceActivityKeyFilterIfNeeded = (store: Store<AppState>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename applyHomeDashboardParams

@ikulikov ikulikov merged commit cc49b21 into thingsboard:master May 17, 2024
1 of 3 checks passed
@vpan1n vpan1n changed the title Mobile application QR code API [QR-code] - Widget redirects to Mobile app May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Changes to Core feature UI UI changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants