Files
Synapse/capacitor.config.ts
Dasemu b339cbb3b7 Rename product to Synapse; add Gitea CI, VPS deploy templates, RPM build fixes
Rebrands user-facing product identity from Logseq to Synapse (package
metadata, Electron appId/protocol scheme, Android/iOS display names, HTML
titles, and the English UI dictionary), authored by Darío Sevilla
<dario@dariosevilla.es>. Internal Clojure namespaces, :logseq.class/*
and :logseq.property/* DB schema idents, and deps.edn's upstream git
dependency coordinates are intentionally left untouched -- those are
either persisted data in existing graphs or point at real upstream repos,
and renaming them has no user-visible benefit.

Also:
- .gitea/workflows/build.yml: Linux (AppImage/deb/rpm), Windows (nsis),
  and Android (debug APK) build jobs.
- deploy/: systemd unit + Caddyfile templates for a self-hosted VPS
  (daemon on loopback, Caddy reverse-proxies /v1/*, /mcp, /healthz and
  serves the static web client with TLS).
- gulpfile.js / prepare-desktop-runtime-js.mjs: LOGSEQ_SKIP_CLI_BUNDLE
  skips the cli/ OCaml package (no toolchain in this environment) instead
  of failing the build; LOGSEQ_ELECTRON_BUILDER_ARGS lets CI override the
  packaged Linux targets independently of the local default.
- resources/electron-builder.yml: drop the extraResources entry for a
  SKILL.md that doesn't exist in this fork, and the author.email fix
  needed for the rpm/deb targets' Packager/Maintainer metadata.
2026-08-27 12:03:03 +02:00

73 lines
1.9 KiB
TypeScript

import { CapacitorConfig } from '@capacitor/cli'
import { KeyboardResize } from '@capacitor/keyboard'
import * as fs from 'fs'
const version = fs.readFileSync('static/package.json', 'utf8').match(/"version": "(.*?)"/)?.at(1) ?? '0.0.0'
const config: CapacitorConfig = {
// appId intentionally left as-is: it must match android/'s applicationId
// and ios/'s bundle id, which haven't been renamed yet.
appId: 'com.logseq.app',
appName: 'Synapse',
webDir: 'static/mobile',
loggingBehavior: 'debug',
server: {
androidScheme: 'http',
},
plugins: {
App: {
// Logseq routes back presses through MainActivity -> JS (window.LogseqNative.onNativePop).
// Disable @capacitor/app's built-in OnBackPressedCallback so it doesn't intercept the
// first edge-back gesture by calling webView.goBack() (which causes a flash and swallows
// the event before our handler runs). See android/app/.../MainActivity.java.
disableBackButtonHandler: true,
},
StatusBar: {
overlaysWebView: true,
style: 'Light',
backgroundColor: '#ffffffff',
},
SplashScreen: {
launchShowDuration: 500,
launchAutoHide: false,
androidScaleType: 'CENTER_CROP',
splashImmersive: false,
backgroundColor: '#002b36'
},
Keyboard: {
resize: KeyboardResize.None,
},
SafeArea: {
enabled: true,
customColorsForSystemBars: true,
statusBarColor: '#000000',
statusBarContent: 'light',
navigationBarColor: '#000000',
navigationBarContent: 'light',
offset: 0
}
},
android: {
appendUserAgent: `Logseq/${version} (Android)`,
},
ios: {
scheme: 'Logseq',
appendUserAgent: `Logseq/${version} (iOS)`,
}
}
if (process.env.LOGSEQ_APP_SERVER_URL) {
Object.assign(config, {
server: {
url: process.env.LOGSEQ_APP_SERVER_URL,
cleartext: true
}
})
}
export = config;