Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
695 commits
Select commit Hold shift + click to select a range
fbdbbda
test: improve typing in IdentifySigner.spec.ts
vitormattos Feb 24, 2026
33560d3
test: improve typing in VisibleElements.spec.ts
vitormattos Feb 24, 2026
fe40329
test: improve typing in RequestSignatureTab.spec.ts
vitormattos Feb 24, 2026
1391de2
test: improve typing in SigningOrderDiagram.spec.ts
vitormattos Feb 24, 2026
fcffe1d
test: improve typing in TopBar.spec.ts
vitormattos Feb 24, 2026
1c9c845
test: improve typing in UploadProgress.spec.ts
vitormattos Feb 24, 2026
38b4b08
test: improve typing in CertificateChain.spec.ts
vitormattos Feb 24, 2026
f372577
test: improve typing in FileValidation.spec.ts
vitormattos Feb 24, 2026
c3b6b6c
test: improve typing in SignerDetails.spec.ts
vitormattos Feb 24, 2026
ab3c3ce
test: improve typing in SignersList.spec.ts
vitormattos Feb 24, 2026
bccbe20
test: improve typing in SigningActionHelper.spec.ts
vitormattos Feb 24, 2026
15e0436
test: improve typing in certification.spec.ts
vitormattos Feb 24, 2026
8e65f41
test: improve typing in isExternal.spec.ts
vitormattos Feb 24, 2026
b7cb92d
test: improve typing in useIsDarkTheme.spec.ts
vitormattos Feb 24, 2026
7ced930
test: improve typing in isTouchDevice.spec.ts
vitormattos Feb 24, 2026
e4f4f3d
test: improve typing in SigningRequirementValidator.spec.ts
vitormattos Feb 24, 2026
99d8ab9
test: improve typing in filesSorting.spec.ts
vitormattos Feb 24, 2026
8a16083
test: improve typing in keyboard.spec.ts
vitormattos Feb 24, 2026
f725a2f
test: improve typing in userconfig.spec.ts
vitormattos Feb 24, 2026
5f5bf41
test: improve typing in test-types.ts
vitormattos Feb 24, 2026
2f3ae1f
test: improve typing in fileStatus.spec.ts
vitormattos Feb 24, 2026
7ba0dc9
test: improve typing in CreateAccount.spec.ts
vitormattos Feb 24, 2026
9639b89
test: improve typing in DocumentValidationLogic.spec.ts
vitormattos Feb 24, 2026
ad5b430
test: improve typing in FileRequestFlow.spec.ts
vitormattos Feb 24, 2026
9716776
test: improve typing in LegalInformation.spec.ts
vitormattos Feb 24, 2026
09ef72d
test: improve typing in SignatureElementsManagement.spec.ts
vitormattos Feb 24, 2026
b1d4e20
test: improve typing in SigningInvitations.spec.ts
vitormattos Feb 24, 2026
0264cf6
test: improve typing in Validation.spec.ts
vitormattos Feb 24, 2026
7eeb421
fix: default docmdp level when config is missing
vitormattos Feb 24, 2026
9f28857
fix: use typed values in admin initial state
vitormattos Feb 24, 2026
fd5f5b6
fix: persist allowed groups on model updates
vitormattos Feb 24, 2026
4768bfa
fix: align docmdp settings with modelValue contract
vitormattos Feb 24, 2026
ad00260
fix: align envelope toggle with modelValue contract
vitormattos Feb 24, 2026
7ae5c26
fix: load identification settings from initial state
vitormattos Feb 24, 2026
592d1ec
fix: align signature flow controls with modelValue
vitormattos Feb 24, 2026
5c191f6
test: add allowed groups model update coverage
vitormattos Feb 24, 2026
1b8ec04
test: add docmdp default backend config coverage
vitormattos Feb 24, 2026
c25f9dd
test: add envelope initial state coverage
vitormattos Feb 24, 2026
a89fe1c
test: add identification groups model update coverage
vitormattos Feb 24, 2026
e8d1b25
test: add signature flow model binding coverage
vitormattos Feb 24, 2026
5823deb
test: ensure reset does not restore app defaults
vitormattos Feb 24, 2026
3907100
test: cover docmdp config default and toggle semantics
vitormattos Feb 24, 2026
20940ed
fix(draw): expose delete mdi icon via setup
vitormattos Feb 24, 2026
086dfa4
fix(footer): use logical inset for hidden element
vitormattos Feb 24, 2026
32d51fd
fix(sidebar): restore mdi menu icons and wrapper registration
vitormattos Feb 24, 2026
7c0588a
fix(account): register document action mdi icons
vitormattos Feb 24, 2026
1f99730
fix(account): register manage password mdi icons
vitormattos Feb 24, 2026
355355e
fix(account): normalize signature setup icon bindings
vitormattos Feb 24, 2026
6a41510
fix(account): add missing email mdi icon binding
vitormattos Feb 24, 2026
fdefc03
fix(incomplete): register setup cogs icon
vitormattos Feb 24, 2026
a0e3b2e
fix(signpdf): register email modal mdi icons
vitormattos Feb 24, 2026
76f05d0
test(sidebar): cover menu icon path wiring
vitormattos Feb 24, 2026
5d10f25
test(account): cover documents icon bindings
vitormattos Feb 24, 2026
a16f890
test(account): cover manage password icon bindings
vitormattos Feb 24, 2026
39c59d6
test(account): cover signature icon bindings
vitormattos Feb 24, 2026
6dfeabf
test(incomplete): cover cogs icon binding
vitormattos Feb 24, 2026
2ac667f
test(signpdf): cover modal email icon bindings
vitormattos Feb 24, 2026
9d64c20
fix(app): hide left sidebar from route meta
vitormattos Feb 24, 2026
95c5a27
fix(app): mount only after router is ready
vitormattos Feb 24, 2026
cb498b7
fix(router): mark incomplete routes to hide left sidebar
vitormattos Feb 24, 2026
f5b1851
test(app): cover sidebar visibility by route meta
vitormattos Feb 24, 2026
c8f9c3e
fix(request): migrate SignerRow attrs and slots
vitormattos Feb 25, 2026
2bd8760
fix(request): migrate VisibleElements actions slot
vitormattos Feb 25, 2026
f140b04
fix(sidebar): register EnvelopeFilesList dependencies
vitormattos Feb 25, 2026
b57943d
test(request): cover VisibleElements actions slot forwarding
vitormattos Feb 25, 2026
5cd63d1
test(account): cover Signature draw editor rendering
vitormattos Feb 25, 2026
47dda96
test(sign): cover create signature draw modal
vitormattos Feb 25, 2026
88f88f5
fix(account): register Documents loading icon
vitormattos Feb 25, 2026
c83fbdf
fix(account): restore Signature draw editor
vitormattos Feb 25, 2026
6454596
fix(account): migrate Signatures named slots
vitormattos Feb 25, 2026
78e504d
fix(files-list): register FileEntryCheckbox switch
vitormattos Feb 25, 2026
f8812aa
fix(files-list): register FileEntryGrid children
vitormattos Feb 25, 2026
b8f464b
fix(files-list): register FileListFilterModified wrapper
vitormattos Feb 25, 2026
275a4d8
fix(files-list): register FileListFilterStatus wrapper
vitormattos Feb 25, 2026
59ce0ce
fix(files-list): register FileListFilters children
vitormattos Feb 25, 2026
3eebdba
fix(files-list): restore FilesList icon bindings
vitormattos Feb 25, 2026
634b539
fix(files-list): register FilesListTableHeader components
vitormattos Feb 25, 2026
85445d1
fix(account): register ResetPassword loading icon
vitormattos Feb 25, 2026
a066058
fix(sign): register ModalEmailManager loading icon
vitormattos Feb 25, 2026
77501cc
fix(sign): register ModalTokenManager loading icon
vitormattos Feb 25, 2026
f9dac46
fix(sign): restore Draw modal in Sign view
vitormattos Feb 25, 2026
390fd35
test(request): add SignerRow slot rendering spec
vitormattos Feb 25, 2026
957a8fa
test(account): add Signatures slot regression spec
vitormattos Feb 25, 2026
f1e1239
test(files-list): add FilesList rendering regression spec
vitormattos Feb 25, 2026
c07b50a
fix(draw): use PreviewSignature in text confirmation
vitormattos Feb 25, 2026
7ab8c56
test(draw): cover text confirmation preview rendering
vitormattos Feb 25, 2026
932491b
fix: clear reset password form on close
vitormattos Feb 25, 2026
c827ae8
test: add reset password cleanup regression spec
vitormattos Feb 25, 2026
f642728
fix: register certificate content component
vitormattos Feb 25, 2026
9be1a6c
fix: enforce strict upload ref invocation
vitormattos Feb 25, 2026
07ccac8
test: align manage password upload ref spec
vitormattos Feb 25, 2026
f8c6a49
fix: improve reset password enter-key flow
vitormattos Feb 25, 2026
43fe98b
test: cover reset password focus behavior
vitormattos Feb 25, 2026
9d88d97
fix: improve signer select search rendering
vitormattos Feb 25, 2026
90900b1
test: add signer select label fallback coverage
vitormattos Feb 25, 2026
5ecd714
refactor: expose mdi icons via setup in incomplete certification
vitormattos Feb 25, 2026
b2f5db2
refactor: move documents mdi bindings to setup
vitormattos Feb 25, 2026
8e93777
refactor: expose modal email icons from setup
vitormattos Feb 25, 2026
c291453
refactor: move file entry signers icon to setup
vitormattos Feb 25, 2026
fc8808a
refactor: expose signer menu icon via setup
vitormattos Feb 25, 2026
d16e527
refactor: expose pdf editor action icons via setup
vitormattos Feb 25, 2026
a81435c
refactor: move left sidebar mdi bindings to setup
vitormattos Feb 25, 2026
093b0e6
chore: remove unused l10n import from file entry preview
vitormattos Feb 25, 2026
5e8d50a
chore: remove unused l10n import from file entry status
vitormattos Feb 25, 2026
c6fd6ec
fix: keep file list status text-only
vitormattos Feb 25, 2026
4c7543b
test: relax logger instance identity assertion
vitormattos Feb 25, 2026
8feb54b
test: stabilize pdf editor missing refs scenario
vitormattos Feb 25, 2026
24cc39d
test: simplify app route state typing
vitormattos Feb 25, 2026
1512fee
test: simplify documents axios mock typing
vitormattos Feb 25, 2026
7e84a71
fix: tighten signer select icon mapping
vitormattos Feb 25, 2026
57319fd
test: cover strict signer select icon handling
vitormattos Feb 25, 2026
1f982c6
test: allow undefined route name in app spec
vitormattos Feb 25, 2026
7e81987
refactor: extract identify share type resolver
vitormattos Feb 25, 2026
49d65bf
test: add coverage for share type resolver scenarios
vitormattos Feb 25, 2026
fa490e7
fix: normalize identify search payload and resolver usage
vitormattos Feb 25, 2026
39b98ba
test: cover identify controller share type behavior
vitormattos Feb 25, 2026
a87f072
fix: harden signer select async search state
vitormattos Feb 25, 2026
ae0a645
test: add signer select regressions for async search
vitormattos Feb 25, 2026
98a57e7
fix: avoid null counter value in signer row
vitormattos Feb 25, 2026
4780c72
test: align signer counter assertions with zero default
vitormattos Feb 25, 2026
f70d854
fix: keep signersCount synced on signer mutations
vitormattos Feb 25, 2026
9d52f18
test: ensure signersCount updates after signer deletion
vitormattos Feb 25, 2026
ee70818
fix: use async component wrapper in validation view
vitormattos Feb 25, 2026
e77cbae
test: prevent promise text rendering in validation view
vitormattos Feb 25, 2026
2cf1004
fix: normalize CRL certificate type chip spacing
vitormattos Feb 25, 2026
4589cbb
fix: indent
vitormattos Feb 25, 2026
aa8447b
fix: indent
vitormattos Feb 25, 2026
e924990
fix: indent
vitormattos Feb 25, 2026
df22a1d
fix: indnet
vitormattos Feb 25, 2026
f364a9c
fix: indent
vitormattos Feb 25, 2026
60f649e
fix: indent
vitormattos Feb 25, 2026
3e278d7
fix: year
vitormattos Feb 25, 2026
d8c776f
fix: indent
vitormattos Feb 25, 2026
6f99700
fix: indent
vitormattos Feb 25, 2026
cedb04e
fix: indent
vitormattos Feb 25, 2026
e913b2c
fix: indent
vitormattos Feb 25, 2026
767c2c6
refactor: migrate Validation.vue beforeDestroy to beforeUnmount
vitormattos Feb 25, 2026
573686a
refactor: migrate SigningProgress.vue beforeDestroy to beforeUnmount
vitormattos Feb 25, 2026
eaebcb1
refactor: migrate SignerSelect.vue beforeDestroy to beforeUnmount
vitormattos Feb 25, 2026
d8ab35b
refactor: replace Vue2 dialog pattern with Vue3 spawnDialog
vitormattos Feb 25, 2026
05ce9d1
refactor: enhance test setup with error/warn interception
vitormattos Feb 25, 2026
9bb2e2c
test: migrate EditNameDialog.spec.ts propsData to props
vitormattos Feb 25, 2026
1560e47
test: migrate SigningOrderDiagram.spec.ts propsData to props
vitormattos Feb 25, 2026
05dfcb0
test: migrate SignerDetails.spec.ts propsData to props
vitormattos Feb 25, 2026
449c703
test: migrate FileEntrySigners.spec.ts propsData to props
vitormattos Feb 25, 2026
267a200
test: migrate Draw.spec.ts propsData to props (14 instances)
vitormattos Feb 25, 2026
f044c1a
test: migrate InputAction.spec.ts propsData to props
vitormattos Feb 25, 2026
71b45b5
test: migrate IdentifySigner.spec.ts propsData to props (2 instances)
vitormattos Feb 25, 2026
5c77c63
test: rewrite SigningProgress.spec.ts lifecycle tests
vitormattos Feb 25, 2026
31e166b
style: fix FileUpload.vue prop closing bracket alignment
vitormattos Feb 25, 2026
918db7b
style: fix FileStatusList.vue prop closing bracket alignment
vitormattos Feb 25, 2026
39f49e7
style: fix IdentifySigner.vue prop closing bracket alignment
vitormattos Feb 25, 2026
a5f3b43
style: fix RequestPicker.vue prop closing bracket alignment
vitormattos Feb 25, 2026
41e96a8
style: fix SignerRow.vue prop closing bracket alignment
vitormattos Feb 25, 2026
651fd4b
style: fix validation/FileStatusList.vue prop closing bracket alignment
vitormattos Feb 25, 2026
aeb423f
style: fix FileValidation.vue prop closing bracket alignment
vitormattos Feb 25, 2026
ca66104
style: fix RequestSigningProgress.vue prop closing bracket alignment
vitormattos Feb 25, 2026
bca76fc
style: fix Signer.vue prop closing bracket alignment
vitormattos Feb 25, 2026
7b0f469
style: fix Signers.vue prop closing bracket alignment
vitormattos Feb 25, 2026
c2141ea
style: fix SigningOrderDiagram.vue prop closing bracket alignment
vitormattos Feb 25, 2026
ed04fde
style: fix UploadProgress.vue prop closing bracket alignment
vitormattos Feb 25, 2026
54902d5
style: fix FileEntryActions.vue prop closing bracket alignment
vitormattos Feb 25, 2026
a5503ce
style: fix FileEntryCheckbox.vue prop closing bracket alignment
vitormattos Feb 25, 2026
ef5a7f0
style: fix FileEntryStatus.vue prop closing bracket alignment
vitormattos Feb 25, 2026
a825200
style: fix FileListFilter.vue prop closing bracket alignment
vitormattos Feb 25, 2026
d0cf9c2
style: fix FilesListTableHeaderButton.vue prop closing bracket alignment
vitormattos Feb 25, 2026
0fcf96e
style: fix CertificateContent.vue prop closing bracket alignment
vitormattos Feb 25, 2026
9e4ee03
style: fix SignatureStamp.vue prop closing bracket alignment
vitormattos Feb 25, 2026
5ad68c3
style: fix UploadCertificate.vue prop closing bracket alignment
vitormattos Feb 25, 2026
245ee88
build: configure __VUE_PROD_DEVTOOLS__ flag via vite plugin
vitormattos Feb 25, 2026
470939d
chore: update copyright year to 2026
vitormattos Feb 25, 2026
f2fd792
chore: update copyright year to 2026
vitormattos Feb 25, 2026
3a1830d
fix: await upload before registering file with API and opening sidebar
vitormattos Feb 25, 2026
02454ff
refactor: remove side-effect action imports from tab entry point
vitormattos Feb 25, 2026
7d85d15
fix: add defineOptions name to App root component
vitormattos Feb 25, 2026
0f562da
chore: update copyright year to 2026
vitormattos Feb 25, 2026
ad5462c
chore: update copyright year to 2026
vitormattos Feb 25, 2026
0739228
chore: update copyright year to 2026
vitormattos Feb 25, 2026
7d208e8
chore: update copyright year to 2026
vitormattos Feb 25, 2026
03d25c9
chore: update copyright year to 2026
vitormattos Feb 25, 2026
cc1ea12
chore: update copyright year to 2026
vitormattos Feb 25, 2026
64b0cd6
chore: update copyright year to 2026
vitormattos Feb 25, 2026
9fa93f4
fix: correct spawnDialog return value (remove array destructuring)
vitormattos Feb 25, 2026
44e1083
chore: update copyright year to 2026
vitormattos Feb 25, 2026
0d37e0d
fix: register NcCheckboxRadioSwitch and remove stray console.error
vitormattos Feb 25, 2026
0c303a6
fix: add missing closing brace in icons data object
vitormattos Feb 25, 2026
70e9025
fix: remove console.error debug logs from envelope files list
vitormattos Feb 25, 2026
8e7c438
fix: register NcCheckboxRadioSwitch and NcLoadingIcon components
vitormattos Feb 25, 2026
663e16d
fix: use signer.identify as sole :key, remove || index fallback
vitormattos Feb 25, 2026
67767ce
fix: register NcCheckboxRadioSwitch in FileEntryActions
vitormattos Feb 25, 2026
f032d22
fix: normalize file IDs to Number for consistent selection comparison
vitormattos Feb 25, 2026
ab66114
fix: normalize ordered IDs to Number in onToggleAll selection
vitormattos Feb 25, 2026
6d18288
fix: register NcCheckboxRadioSwitch and normalize IDs in changeLoadin…
vitormattos Feb 25, 2026
a9a3977
chore: update copyright year in pdf-elements mock index
vitormattos Feb 25, 2026
1943eaa
chore: update copyright year in PDFElements mock component
vitormattos Feb 25, 2026
24f717a
chore: update copyright year in asyncReader mock
vitormattos Feb 25, 2026
6618fa5
chore: update copyright year in vue-select mock
vitormattos Feb 25, 2026
b50d61f
chore: update copyright year in vitest type declarations
vitormattos Feb 25, 2026
951f7c8
test: add coverage for App external-page class and conditional rendering
vitormattos Feb 25, 2026
411e63e
test: simplify spawnDialog mock to plain resolved promise
vitormattos Feb 25, 2026
76c3593
test: refactor PdfEditor mock to use inline expose and direct $refs a…
vitormattos Feb 25, 2026
3682512
test: update RequestSignatureTab tests for component registration cha…
vitormattos Feb 25, 2026
3a0ac23
test: remove obsolete Signer spec cases
vitormattos Feb 25, 2026
1635be5
test: expand Signers spec coverage
vitormattos Feb 25, 2026
5108dd2
test: update SignerDetails spec for current component shape
vitormattos Feb 25, 2026
316fd1e
test: add files store test coverage
vitormattos Feb 25, 2026
1284433
test: update FileEntry spec for normalized ID comparisons
vitormattos Feb 25, 2026
8a448b8
fix: update to newest version
vitormattos Feb 25, 2026
c36fa6b
fix: initialize git submodules in the devcontainer setup script
vitormattos Feb 25, 2026
d833321
fix(a11y): add aria-expanded to Document certification section
vitormattos Feb 25, 2026
96aa053
fix: throws libresign exception
vitormattos Feb 26, 2026
34b4fd2
chore: cover new scenarios
vitormattos Feb 26, 2026
0e39cca
Merge branch 'feat/vue3-typescript-migration' of github.com:LibreSign…
vitormattos Feb 26, 2026
7898c81
fix(validation): fix indentation of chain prop closing brace
vitormattos Feb 26, 2026
266eba0
fix(validation): fix indentation of signRequestUuid prop and setup re…
vitormattos Feb 26, 2026
f511785
fix(validation): remove unused n import from DocumentValidationDetails
vitormattos Feb 26, 2026
5503698
fix(views): remove unused n import from Validation
vitormattos Feb 26, 2026
7a44a55
fix: remove unused n import from init
vitormattos Feb 26, 2026
c6fe51d
fix: fix prop closing brace indentation in FooterTemplateEditor
vitormattos Feb 26, 2026
5249d0b
fix: fix prop closing brace indentation in IdentifySigner
vitormattos Feb 26, 2026
0762da9
fix: fix prop closing brace indentation in RequestPicker
vitormattos Feb 26, 2026
8ef5650
fix: fix prop closing brace indentation in SignerSelect
vitormattos Feb 26, 2026
3702a48
fix: fix prop closing brace indentation in VisibleElements
vitormattos Feb 26, 2026
bc8e4de
fix: fix prop closing brace indentation in EnvelopeFilesList
vitormattos Feb 26, 2026
161a560
fix: fix prop closing brace indentation in RequestSignatureTab
vitormattos Feb 26, 2026
8178942
fix: fix prop closing brace indentation in SignTab
vitormattos Feb 26, 2026
85d4cf9
fix: fix prop closing brace indentation in Signers
vitormattos Feb 26, 2026
bbf3712
fix: fix prop closing brace indentation in TopBar
vitormattos Feb 26, 2026
83f43e0
fix: fix prop closing brace indentation in SignerDetails
vitormattos Feb 26, 2026
466a336
fix: fix prop closing brace indentation in Documents
vitormattos Feb 26, 2026
7029184
fix: fix prop closing brace indentation in Signature
vitormattos Feb 26, 2026
17354ea
fix: fix prop closing brace indentation in UserImage
vitormattos Feb 26, 2026
9b8781c
fix: fix prop closing brace indentation in CrlManagement
vitormattos Feb 26, 2026
5137ded
fix: fix prop closing brace indentation in FileEntryActions
vitormattos Feb 26, 2026
f247efc
fix: fix prop closing brace indentation in FileEntryName
vitormattos Feb 26, 2026
742739d
fix: fix prop closing brace indentation in FilesListTableHeaderButton
vitormattos Feb 26, 2026
7b57f0f
fix: fix prop closing brace indentation in CertificateCustonOptions
vitormattos Feb 26, 2026
1ca1ade
fix: fix prop closing brace indentation in CertificatePolicy
vitormattos Feb 26, 2026
86ff721
fix: fix prop closing brace indentation in DownloadBinaries
vitormattos Feb 26, 2026
ea646a0
fix: fix prop closing brace indentation in IdentificationFactors
vitormattos Feb 26, 2026
696f1da
fix: fix prop closing brace indentation in RootCertificateCfssl
vitormattos Feb 26, 2026
1af6dd2
fix: fix prop closing brace indentation in RootCertificateOpenSsl
vitormattos Feb 26, 2026
29d2ebf
fix: fix prop closing brace indentation in SignatureFlow
vitormattos Feb 26, 2026
fa38f29
fix: fix prop closing brace indentation in TSA
vitormattos Feb 26, 2026
39eb0a3
fix: fix prop closing brace indentation in SignPDF
vitormattos Feb 26, 2026
747b4ef
fix: fix prop closing brace indentation in ModalEmailManager
vitormattos Feb 26, 2026
741859a
fix: fix prop closing brace indentation in ModalTokenManager
vitormattos Feb 26, 2026
818be47
fix: fix prop closing brace indentation in Sign
vitormattos Feb 26, 2026
10000e9
fix: fix prop closing brace indentation in Validation
vitormattos Feb 26, 2026
b341b57
fix: review previous commit
vitormattos Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
git config --global --add safe.directory /var/www/html
git config --global --add safe.directory /var/www/html/apps-extra/libresign
cd /var/www/html/apps-extra/libresign
git submodule update --init --recursive
if [[ ! -d "vendor" ]]; then
composer install
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The second example is clear without comments because the method names describe e
- **Db**: `OCA\Libresign\Db\*` - Entities extend `Entity`, Mappers extend `QBMapper`

### Frontend Architecture
- **Vue 2** with Composition API patterns via `@vueuse/core`
- **Vue 3** with Composition API patterns via `@vueuse/core`
- **Pinia stores** for state (not Vuex)
- **Router**: `src/router/router.js` defines SPA routes
- **OpenAPI integration**: TypeScript types generated from OpenAPI spec via `npm run typescript:generate`
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/lint-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Type checking

on:
pull_request:
push:
branches:
- main
- master
- stable*

permissions:
contents: read

concurrency:
group: lint-typescript-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read

outputs:
src: ${{ steps.changes.outputs.src}}

steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/lint-typescript.yml'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '**.ts'
- '**.vue'

test:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^24'
fallbackNpm: '^11.3'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'

- name: Install dependencies
env:
CYPRESS_INSTALL_BINARY: 0
run: |
npm ci

- name: Check types
run: |
npm run --if-present check-types
npm run --if-present ts:check

summary:
permissions:
contents: none
runs-on: ubuntu-latest-low
needs: [changes, test]

if: always()

name: typescript-summary

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/tests/integration/vendor
/tests/integration/output
/js/
/css/
/build/
node_modules/
/.php-cs-fixer.cache
Expand All @@ -20,4 +21,4 @@ node_modules/
/appinfo/install-*.json
/lib/Vendor/
/coverage

/dist/
28 changes: 3 additions & 25 deletions lib/Controller/IdentifyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,23 @@
use OCA\Libresign\Service\Identify\ResultFilter;
use OCA\Libresign\Service\Identify\ResultFormatter;
use OCA\Libresign\Service\Identify\SearchNormalizer;
use OCA\Libresign\Service\Identify\ShareTypeResolver;
use OCA\Libresign\Service\Identify\SignerSearchContext;
use OCA\Libresign\Service\IdentifyMethod\Account;
use OCA\Libresign\Service\IdentifyMethod\Email;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\ApiRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\Collaboration\Collaborators\ISearch;
use OCP\IRequest;
use OCP\Share\IShare;

/**
* @psalm-import-type LibresignIdentifyAccount from ResponseDefinitions
*/
class IdentifyController extends AEnvironmentAwareController {
private const PHONE_METHODS = ['whatsapp', 'sms', 'telegram', 'signal'];

public function __construct(
IRequest $request,
private ISearch $collaboratorSearch,
private Email $identifyEmailMethod,
private Account $identifyAccountMethod,
private ShareTypeResolver $shareTypeResolver,
private SearchNormalizer $searchNormalizer,
private SignerSearchContext $signerSearchContext,
private ResultFilter $resultFilter,
Expand Down Expand Up @@ -76,7 +71,7 @@ public function search(string $search = '', string $method = '', int $page = 1,
return new DataResponse([]);
}

$shareTypes = $this->getShareTypes();
$shareTypes = $this->shareTypeResolver->resolve($method);
$offset = $limit * ($page - 1);

$this->signerSearchContext->set($method, $search, $rawSearch);
Expand Down Expand Up @@ -112,21 +107,4 @@ private function registerPlugin(): void {
$refProperty->setValue($this->collaboratorSearch, $plugins);
}

private function getShareTypes(): array {
$shareTypes = [];
$settings = $this->identifyEmailMethod->getSettings();
if ($settings['enabled']) {
$shareTypes[] = IShare::TYPE_EMAIL;
}
$settings = $this->identifyAccountMethod->getSettings();
if ($settings['enabled']) {
$shareTypes[] = IShare::TYPE_USER;
}

$shareTypes[] = SignerPlugin::TYPE_SIGNER;
$shareTypes[] = AccountPhonePlugin::TYPE_SIGNER_ACCOUNT_PHONE;
$shareTypes[] = ContactPhonePlugin::TYPE_SIGNER_CONTACT_PHONE;
$shareTypes[] = ManualPhonePlugin::TYPE_SIGNER_MANUAL_PHONE;
return $shareTypes;
}
}
6 changes: 6 additions & 0 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function index(): TemplateResponse {
$this->initialState->provideInitialState('legal_information', $this->appConfig->getValueString(Application::APP_ID, 'legal_information'));

Util::addScript(Application::APP_ID, 'libresign-main');
Util::addStyle(Application::APP_ID, 'libresign-main');

if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
Expand Down Expand Up @@ -156,6 +157,7 @@ public function indexF(): TemplateResponse {
#[FrontpageRoute(verb: 'GET', url: '/f/incomplete')]
public function incomplete(): TemplateResponse {
Util::addScript(Application::APP_ID, 'libresign-main');
Util::addStyle(Application::APP_ID, 'libresign-main');
$response = new TemplateResponse(Application::APP_ID, 'main');
return $response;
}
Expand All @@ -172,6 +174,7 @@ public function incomplete(): TemplateResponse {
#[FrontpageRoute(verb: 'GET', url: '/p/incomplete')]
public function incompleteP(): TemplateResponse {
Util::addScript(Application::APP_ID, 'libresign-main');
Util::addStyle(Application::APP_ID, 'libresign-main');
$response = new TemplateResponse(Application::APP_ID, 'main', [], TemplateResponse::RENDER_AS_BASE);
return $response;
}
Expand Down Expand Up @@ -378,6 +381,7 @@ public function sign(string $uuid): TemplateResponse {
$this->initialState->provideInitialState('nodeType', $this->getFileEntity()->getNodeType());

Util::addScript(Application::APP_ID, 'libresign-external');
Util::addStyle(Application::APP_ID, 'libresign-external');
if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer());
}
Expand Down Expand Up @@ -532,6 +536,7 @@ public function validation(): TemplateResponse {
}

Util::addScript(Application::APP_ID, 'libresign-validation');
Util::addStyle(Application::APP_ID, 'libresign-validation');
$response = new TemplateResponse(Application::APP_ID, 'validation', [], TemplateResponse::RENDER_AS_BASE);

return $response;
Expand Down Expand Up @@ -580,6 +585,7 @@ public function resetPassword(): TemplateResponse {
);

Util::addScript(Application::APP_ID, 'libresign-main');
Util::addStyle(Application::APP_ID, 'libresign-main');
$response = new TemplateResponse(Application::APP_ID, 'reset_password');

return $response;
Expand Down
1 change: 1 addition & 0 deletions lib/Files/TemplateLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function handle(Event $event): void {
}

Util::addScript(Application::APP_ID, 'libresign-tab');
Util::addStyle(Application::APP_ID, 'libresign-tab');
Util::addStyle(Application::APP_ID, 'icons');
}

Expand Down
1 change: 1 addition & 0 deletions lib/Middleware/InjectionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ public function afterException($controller, $methodName, \Exception $exception):
}

Util::addScript(Application::APP_ID, 'libresign-' . $template);
Util::addStyle(Application::APP_ID, 'libresign-' . $template);
$response = new TemplateResponse(
appName: Application::APP_ID,
templateName: $template,
Expand Down
15 changes: 10 additions & 5 deletions lib/Service/DocMdp/ConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,23 @@ public function __construct(
}

public function isEnabled(): bool {
return $this->appConfig->hasKey(Application::APP_ID, self::CONFIG_KEY_LEVEL);
return $this->getLevel()->isCertifying();
}

public function setEnabled(bool $enabled): void {
if (!$enabled) {
$this->appConfig->deleteKey(Application::APP_ID, self::CONFIG_KEY_LEVEL);
if ($enabled) {
if (!$this->getLevel()->isCertifying()) {
$this->setLevel(DocMdpLevel::CERTIFIED_FORM_FILLING);
}
return;
}

$this->setLevel(DocMdpLevel::NOT_CERTIFIED);
}

public function getLevel(): DocMdpLevel {
$level = $this->appConfig->getValueInt(Application::APP_ID, self::CONFIG_KEY_LEVEL, DocMdpLevel::NOT_CERTIFIED->value);
return DocMdpLevel::from($level);
$level = $this->appConfig->getValueInt(Application::APP_ID, self::CONFIG_KEY_LEVEL, DocMdpLevel::CERTIFIED_FORM_FILLING->value);
return DocMdpLevel::tryFrom($level) ?? DocMdpLevel::CERTIFIED_FORM_FILLING;
}

public function setLevel(DocMdpLevel $level): void {
Expand Down
23 changes: 15 additions & 8 deletions lib/Service/File/FileContentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,32 @@ public function __construct(
*/
public function getContentFromUrl(string $url): string {
if (!filter_var($url, FILTER_VALIDATE_URL)) {
throw new \Exception($this->l10n->t('Invalid URL file'));
throw new LibresignException($this->l10n->t('Invalid URL file'), 422);
}

try {
$response = $this->client->newClient()->get($url);
} catch (\Throwable) {
throw new \Exception($this->l10n->t('Invalid URL file'));
throw new LibresignException($this->l10n->t('Invalid URL file'), 422);
}

$mimetypeFromHeader = $response->getHeader('Content-Type');
$content = (string)$response->getBody();

if (!$content) {
throw new \Exception($this->l10n->t('Empty file'));
throw new LibresignException($this->l10n->t('Empty file'), 422);
}

$mimetypeFromHeader = $response->getHeader('Content-Type');
// Strip parameters like "; charset=utf-8"
if (str_contains($mimetypeFromHeader, ';')) {
$mimetypeFromHeader = trim(explode(';', $mimetypeFromHeader)[0]);
}

$mimeTypeFromContent = $this->mimeService->getMimeType($content);
if ($mimetypeFromHeader !== $mimeTypeFromContent) {
throw new \Exception($this->l10n->t('Invalid URL file'));

// application/octet-stream is a generic fallback — trust content detection
if ($mimetypeFromHeader !== 'application/octet-stream' && $mimetypeFromHeader !== $mimeTypeFromContent) {
throw new LibresignException($this->l10n->t('Invalid URL file'), 422);
}

return $content;
Expand All @@ -75,7 +82,7 @@ public function getContentFromBase64(string $base64): string {
$mimeTypeFromContent = $this->mimeService->getMimeType($content);

if ($mimeTypeFromType !== $mimeTypeFromContent) {
throw new \Exception($this->l10n->t('Invalid URL file'));
throw new LibresignException($this->l10n->t('Invalid URL file'), 422);
}

$this->mimeService->setMimeType($mimeTypeFromContent);
Expand Down Expand Up @@ -103,7 +110,7 @@ public function getContentFromData(array $data): string {
return $this->getContentFromBase64($data['file']['base64']);
}

throw new \Exception($this->l10n->t('No file source provided'));
throw new LibresignException($this->l10n->t('No file source provided'), 422);
}

/**
Expand Down
Loading
Loading