|
8 | 8 | <Signatures v-if="hasSignatures" /> |
9 | 9 | </div> |
10 | 10 | <div v-if="!loading" class="button-wrapper"> |
11 | | - <NcNoteCard v-if="showMobileOrientationHint" type="warning"> |
12 | | - {{ t('libresign', 'For a better signing experience on mobile, rotate your phone to landscape mode.') }} |
13 | | - </NcNoteCard> |
14 | 11 | <NcNoteCard v-for="(error, index) in signStore.errors" |
15 | 12 | :key="index" |
16 | 13 | :heading="error.title || ''" |
@@ -436,7 +433,6 @@ const sidebarStore = useSidebarStore() as SidebarStoreContract |
436 | 433 | const identificationDocumentStore = useIdentificationDocumentStore() as IdentificationDocumentStoreContract |
437 | 434 |
|
438 | 435 | const loading = ref(true) |
439 | | -const isMobilePortrait = ref(false) |
440 | 436 | const user = ref<UserInfo>({ |
441 | 437 | account: { uid: '', emailAddress: '', displayName: '' }, |
442 | 438 | settings: { canRequestSign: false, hasSignatureFile: false, phoneNumber: '' }, |
@@ -476,7 +472,6 @@ const needCreateSignature = computed(() => { |
476 | 472 | } |
477 | 473 | return hasVisibleElementsForCurrentUser(visibleElementsDocument.value) |
478 | 474 | }) |
479 | | -const showMobileOrientationHint = computed(() => needCreateSignature.value && isMobilePortrait.value) |
480 | 475 | const needIdentificationDocuments = computed(() => identificationDocumentStore.showDocumentsComponent()) |
481 | 476 | const canCreateSignature = computed(() => { |
482 | 477 | const capabilities = getCapabilities() as LibresignCapabilities |
@@ -548,19 +543,6 @@ function clearBlockingSignError() { |
548 | 543 | signStore.clearSigningErrors() |
549 | 544 | } |
550 | 545 |
|
551 | | -function updateOrientationHint() { |
552 | | - if (typeof window === 'undefined') { |
553 | | - isMobilePortrait.value = false |
554 | | - return |
555 | | - } |
556 | | -
|
557 | | - const isMobileViewport = window.innerWidth <= 512 |
558 | | - const isPortrait = window.matchMedia?.('(orientation: portrait)').matches |
559 | | - ?? window.innerHeight > window.innerWidth |
560 | | -
|
561 | | - isMobilePortrait.value = isMobileViewport && isPortrait |
562 | | -} |
563 | | -
|
564 | 546 | function saveSignature() { |
565 | 547 | if (signatureElementsStore.success.length) { |
566 | 548 | showSuccess(signatureElementsStore.success) |
@@ -746,10 +728,6 @@ function executeSigningAction(action: string) { |
746 | 728 | } |
747 | 729 |
|
748 | 730 | onMounted(async () => { |
749 | | - updateOrientationHint() |
750 | | - window.addEventListener('resize', updateOrientationHint, { passive: true }) |
751 | | - window.addEventListener('orientationchange', updateOrientationHint) |
752 | | -
|
753 | 731 | loading.value = true |
754 | 732 | signatureElementsStore.signRequestUuid = signRequestUuid.value |
755 | 733 | signatureElementsStore.loadSignatures() |
@@ -797,8 +775,6 @@ watch(signRequestUuid, (newUuid, oldUuid) => { |
797 | 775 | }) |
798 | 776 |
|
799 | 777 | onBeforeUnmount(() => { |
800 | | - window.removeEventListener('resize', updateOrientationHint) |
801 | | - window.removeEventListener('orientationchange', updateOrientationHint) |
802 | 778 | resetSignMethodsState() |
803 | 779 | if (unwatchPendingAction) { |
804 | 780 | unwatchPendingAction() |
|
0 commit comments