Commit Graph
16 Commits
Author SHA1 Message Date
Tomás Romero 5b7b1379fa feat: link to the privacy policy 2026-11-06 19:23:30 +01:00
Tomás Romero a4f894d823 ohos: share one font fallback policy 2026-11-03 19:56:57 +01:00
springmin 1bdb351eff ohos: measure font setup and guard fallback lists
Log system-font registration time so startup work can be attributed, and add a CI check that the Slint UI and mail-renderer fallback script lists stay identical. The two collections are separate, so this catches a script being added to only one side.
2026-11-02 15:30:42 +08:00
springmin 197eb1e0f0 build: drop the vendored fontique patch
fontique 0.11.1 already supports fontconfig-dlopen, which leaves an empty system collection when Fontconfig is absent. OHOS registers /system/fonts explicitly, so the local fontique copy, patch queue and quality verification are no longer needed; use the crates.io package and keep the lockfile pinned.
2026-10-28 19:17:59 +08:00
springmin 5c88d455f9 ohos: move privacy and notification seams out of the port
Remove the bundled policy, first-launch consent screen, bridge URL interception and Settings/onboarding rows; Flectar hosts the policy at https://flectar.com/mail/privacy/. Remove the notification publisher seam and the permission request so they can be reviewed separately.
2026-10-25 20:26:35 +08:00
Tomás Romero 2818b7d4e0 ohos: use the Android version code sequence 2026-10-24 23:14:29 +02:00
Tomás Romero 79e0c67fbf docs: correct the OpenHarmony backend notes 2026-10-24 23:12:44 +02:00
springmin 9b81216c79 ohos: localise the privacy policy and let consent be withdrawn
The policy page now carries Simplified Chinese, English, Spanish, Turkish
and Russian sections and a selector that mirrors Settings -> General; the
application passes the configured language (system, en, es, tr, zh_Hans,
ru) when it opens the page. Settings -> About gains a "Withdraw privacy
consent" row that clears the stored choice and stops the app, so consent can
be changed at any time.

Regenerate the catalogs without line wrapping: gettext versions wrap the
Language-Team header differently, which made the translation check fail on
CI.
2026-10-23 08:42:43 +08:00
springmin 754487188d ohos: add the privacy policy and first-run consent
Ship the policy as a local page (Simplified Chinese, an English application
supplement and the official Flectar text, selected from the system language)
and link it from onboarding and Settings -> About. The first launch asks for
consent before the native module starts, so no account or mail processing
happens before the user agrees; the choice is kept in ArkData preferences.

The host opens the bundled page when the shared UI asks for the published
policy URL; other platforms keep opening the website.
2026-10-23 08:42:43 +08:00
springmin 95cd321002 ohos: record the PDF preview and clipboard ACL status
PDF attachment preview is verified on device, and the READ_PASTEBOARD ACL has
been approved; note the profile requirement and drop PDF from the untested
list.
2026-10-23 08:42:43 +08:00
springmin 9bfd7a287a ohos: ignore the generated shell page, document lint and device status
The entry page is produced by build-hap.sh from page-templates/Index.<APP>.ets,
so stop tracking it and tell IDE users to copy it first. Add the oxk ArkTS lint
configuration with the rules that pass today, a section on the checks run on
device, and the known limitations (clipboard ACL, untested import flows, soft
keyboard on 2-in-1).
2026-10-23 08:42:43 +08:00
springmin 0784cf06d3 ohos: request the pasteboard ACL permission for paste
Reading the system pasteboard requires ohos.permission.READ_PASTEBOARD
(system_basic, user_grant). Declare it with a localized reason, resolve the
reasonId while packing the hap (the packing tool normally does this), and let
the page ask for the permission when a paste is denied; a toast explains the
denial.

The hap now only installs with an ACL-enabled signing profile that lists the
permission; the README documents the requirement.
2026-10-23 08:42:43 +08:00
springmin 81d76c3427 ohos: derive the hap version from the workspace crate
versionName is the root Cargo.toml version and versionCode is derived from
it (major*10^7 + minor*10^5 + patch*10^3, plus the prerelease number or 999
for a release) so application-market uploads stay monotonic. The values in
AppScope/app.json5 remain only as the fallback for an IDE build that skips
the script.
2026-10-23 08:42:43 +08:00
springmin f163107e29 ohos: default to com.flectar.mail
Use the project's bundle name on OpenHarmony too: the Flatpak app id, the
macOS/iOS bundle identifier and the Android applicationId are all
com.flectar.mail. Document the AGC release-signing environment
(hap-sign-tool with the release certificate and profile) and keep BUNDLE=
for signing material that was issued for another name.
2026-10-23 08:42:43 +08:00
springmin 4b510307f4 ohos: wheel scrolling, notification permission timing, asset recovery
- Register the XComponent UI input callback for axis events and translate
  wheel/touchpad deltas into Slint's PointerScrolled (50 logical pixels per
  wheel notch, the same step the desktop backend uses), so Slint flickables
  scroll under the mouse without application-side changes.
- Request notification permission from EntryAbility after loadContent: the
  page's aboutToAppear runs too early, the system rejects the request with
  1600013 and never shows the prompt. Publishing logs the outcome and the
  failure code through hilog.
- When OH_Asset_Add fails with ASSET_CRYPTO_ERROR (a stale row from an
  earlier signing identity, for example after reinstalling the hap), remove
  the alias and retry: deletion does not need the old secret, so sign-in and
  reconnect recover instead of failing with 'asset add failed: 24000009'.
- Document wheel input and notification behaviour in platform/ohos/README,
  and restore the notification_publisher and email_font_dir rows in the
  PlatformContext contract table.
2026-10-23 08:42:43 +08:00
springmin 8861d4b7f2 ohos: add the OpenHarmony platform host
Tier-3 community port (maintainer: springmin), rebased onto the merged
document-provider abstraction (#84) and the opener seam (#80).

- platform/ohos: Slint backend (XComponent window adapter, software renderer
  with the experimental femtovg/wgpu path, input/IME, clipboard, system
  fonts), the NAPI cdylib that builds a PlatformContext (app-private paths,
  DocumentProvider over the ArkTS pickers, Asset Store credential store,
  loopback OAuth broker, external URL opener, notification publisher) and
  calls flectar_mail::run, the demo crate, the ArkTS shell and the build and
  packaging scripts (bundle name configurable, defaults to
  com.flectar.mail_ohos).
- src/platform/ohos.rs: PDFium directory, renderer name, thread priority,
  preview lifecycle, email font directory; OpenHarmony stays under the
  mobile capability alias.
- patches/fontique + crates/fontique: the Fontconfig opt-out as a patch queue
  applied by the platform/ohos workspace, verified from quality.yml.
- .github/workflows/ohos.yml: manually dispatched tier-3 workflow, unsigned by
  default, signing material only from the FLECTAR_OHOS_* secrets.
- src/documents.rs: run_request blocks the calling thread on mobile hosts;
  the picker covers the window, and keeping the presentation thread idle is
  what OpenHarmony needs (verified on device; desktop keeps the runtime
  request for the native dialog).
- The email renderer and the compose editor load platform::email_font_dir()
  and the Han fallback, so CJK mail bodies and composed text render with the
  platform fonts.
- New-mail notifications: a publisher seam fed by CoreEvent::MailNew; the host
  publishes through @kit.NotificationKit.
2026-10-23 08:42:42 +08:00