feat: per-profile separate SQLite logbook file (config never swapped)
Design flaw: the SQLite backend conflated the app/config database (opslog.db — settings + profiles) with the QSO logbook. connectLogbook returned a.db for any non-MySQL profile, so the ONLY way to get a separate SQLite logbook was the whole-app "change database location" pointer — which swapped config + profiles too, wiping the operator's setup (reported: creating Jerem.db lost all configs). profile.ProfileDB gains a Path field: a non-empty path routes that profile's logbook to its own SQLite file (db.Open creates + migrates it on first use), while opslog.db keeps settings/profiles. connectLogbook opens the file; empty path = shared db (unchanged default, backward compatible). MySQLSettings carries sqlite_path; Get/Save wire it through. UI: the Database panel gains a third backend option "SQLite — separate file" with a file picker, and now clearly labels the shared application database (settings + profiles) vs this profile's logbook, so the two are never confused.
This commit is contained in:
@@ -1563,6 +1563,9 @@ type MySQLSettings struct {
|
|||||||
User string `json:"user"`
|
User string `json:"user"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Database string `json:"database"`
|
Database string `json:"database"`
|
||||||
|
// SqlitePath, when set (and Enabled=false), routes this profile's logbook to
|
||||||
|
// its OWN SQLite file instead of the shared app database. Empty = shared.
|
||||||
|
SqlitePath string `json:"sqlite_path,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DBBackendStatus reports which backend OpsLog actually opened at startup so
|
// DBBackendStatus reports which backend OpsLog actually opened at startup so
|
||||||
@@ -1620,6 +1623,17 @@ func (a *App) connectLogbook(cfg profile.ProfileDB) (*sql.DB, string, error) {
|
|||||||
}
|
}
|
||||||
return c, "mysql", nil
|
return c, "mysql", nil
|
||||||
}
|
}
|
||||||
|
// A per-profile SQLite logbook FILE (separate from the app/config database).
|
||||||
|
// db.Open creates it and runs the schema migrations if it doesn't exist yet,
|
||||||
|
// so pointing a profile at a fresh name just works. Empty path = the shared
|
||||||
|
// app database (a.db) is the logbook, as before.
|
||||||
|
if p := strings.TrimSpace(cfg.Path); p != "" {
|
||||||
|
c, err := db.Open(p)
|
||||||
|
if err != nil {
|
||||||
|
return nil, "", fmt.Errorf("open logbook %s: %w", p, err)
|
||||||
|
}
|
||||||
|
return c, "sqlite", nil
|
||||||
|
}
|
||||||
return a.db, "sqlite", nil
|
return a.db, "sqlite", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1684,6 +1698,7 @@ func (a *App) GetMySQLSettings() (MySQLSettings, error) {
|
|||||||
d := p.DB
|
d := p.DB
|
||||||
out.Enabled = d.Backend == "mysql"
|
out.Enabled = d.Backend == "mysql"
|
||||||
out.Host, out.User, out.Password, out.Database = d.Host, d.User, d.Password, d.Database
|
out.Host, out.User, out.Password, out.Database = d.Host, d.User, d.Password, d.Database
|
||||||
|
out.SqlitePath = d.Path
|
||||||
if d.Port > 0 {
|
if d.Port > 0 {
|
||||||
out.Port = d.Port
|
out.Port = d.Port
|
||||||
}
|
}
|
||||||
@@ -1708,6 +1723,10 @@ func (a *App) SaveMySQLSettings(s MySQLSettings) error {
|
|||||||
cfg.Port = s.Port
|
cfg.Port = s.Port
|
||||||
cfg.User = strings.TrimSpace(s.User)
|
cfg.User = strings.TrimSpace(s.User)
|
||||||
cfg.Password = s.Password
|
cfg.Password = s.Password
|
||||||
|
} else if sp := strings.TrimSpace(s.SqlitePath); sp != "" {
|
||||||
|
// Separate per-profile SQLite logbook file (config stays in opslog.db).
|
||||||
|
cfg.Backend = "sqlite"
|
||||||
|
cfg.Path = sp
|
||||||
}
|
}
|
||||||
if err := a.profiles.SetDB(a.ctx, p.ID, cfg); err != nil {
|
if err := a.profiles.SetDB(a.ctx, p.ID, cfg); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"version": "0.20.12",
|
"version": "0.20.12",
|
||||||
"date": "2026-07-24",
|
"date": "2026-07-24",
|
||||||
"en": [
|
"en": [
|
||||||
|
"A profile can now keep its QSOs in its own separate SQLite file (Settings → Database → 'SQLite — separate file'), not just the shared database or MySQL — so a visiting operator's log stays separate and your settings and profiles are never touched. The Database panel now clearly separates the shared app database (settings + profiles) from this profile's logbook.",
|
||||||
"Fixed a motorized-antenna bug that could leave a FlexRadio permanently unable to transmit (‘Interlock is preventing transmission’). With a SteppIR whose status frequency reads intermittently (it flipped between the commanded frequency and its home value), the ‘follow the rig’ loop re-sent a tune command on almost every poll, and each command re-armed the ‘block TX while the antenna moves’ window — so the interlock never released. The follow loop now keys its deadband off the rig’s frequency (only re-tuning when the RADIO actually QSYs), immune to a flaky antenna status. Also dropped an ‘interlock set reason=’ command that SmartSDR rejects (it’s read-only) and only produced a harmless error line — the transmit-inhibit itself is unchanged and still holds TX safely while the elements move. New: a SteppIR ‘Tunable range’ setting (Settings → Hardware → Antenna, default 13–54 MHz = 20 m–6 m) — on a band outside it OpsLog leaves the antenna and TX completely alone, so tuning to 30 m on a 20 m–6 m SteppIR no longer tries to move it or touches the interlock.",
|
"Fixed a motorized-antenna bug that could leave a FlexRadio permanently unable to transmit (‘Interlock is preventing transmission’). With a SteppIR whose status frequency reads intermittently (it flipped between the commanded frequency and its home value), the ‘follow the rig’ loop re-sent a tune command on almost every poll, and each command re-armed the ‘block TX while the antenna moves’ window — so the interlock never released. The follow loop now keys its deadband off the rig’s frequency (only re-tuning when the RADIO actually QSYs), immune to a flaky antenna status. Also dropped an ‘interlock set reason=’ command that SmartSDR rejects (it’s read-only) and only produced a harmless error line — the transmit-inhibit itself is unchanged and still holds TX safely while the elements move. New: a SteppIR ‘Tunable range’ setting (Settings → Hardware → Antenna, default 13–54 MHz = 20 m–6 m) — on a band outside it OpsLog leaves the antenna and TX completely alone, so tuning to 30 m on a 20 m–6 m SteppIR no longer tries to move it or touches the interlock.",
|
||||||
"New built-in award: The Helvetia 26 Award (H26) — the 26 cantons of Switzerland (USKA), matched from the QSO's address or QTH on HF. Each canton also recognises its main cities (Genève, Lausanne, Zürich, Bellinzona…), since operators rarely write the canton itself.",
|
"New built-in award: The Helvetia 26 Award (H26) — the 26 cantons of Switzerland (USKA), matched from the QSO's address or QTH on HF. Each canton also recognises its main cities (Genève, Lausanne, Zürich, Bellinzona…), since operators rarely write the canton itself.",
|
||||||
"FlexRadio panel: the RECEIVE card is shorter again. All the noise controls added recently made it tower, so only the everyday ones — NB, NR, ANF — now stay visible; WNB and the SmartSDR v4 DSP block (NRL/NRS/NRF/ANFL and the AI/FFT RNN & ANFT) tuck behind a 'DSP' button you expand when you need them. The button carries a dot and highlights when one of the hidden controls is switched on, so nothing active is ever out of sight, and its open/closed state is remembered.",
|
"FlexRadio panel: the RECEIVE card is shorter again. All the noise controls added recently made it tower, so only the everyday ones — NB, NR, ANF — now stay visible; WNB and the SmartSDR v4 DSP block (NRL/NRS/NRF/ANFL and the AI/FFT RNN & ANFT) tuck behind a 'DSP' button you expand when you need them. The button carries a dot and highlights when one of the hidden controls is switched on, so nothing active is ever out of sight, and its open/closed state is remembered.",
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
"Fixed the colour theme sometimes resetting to light after an update/relaunch: an update can clear the WebView's localStorage, and the fallback that restores the theme from the local settings database gave up after ~2.4s — occasionally too soon during the brief startup window before that store is ready. It now keeps retrying until the store actually answers, so a dark theme is reliably restored."
|
"Fixed the colour theme sometimes resetting to light after an update/relaunch: an update can clear the WebView's localStorage, and the fallback that restores the theme from the local settings database gave up after ~2.4s — occasionally too soon during the brief startup window before that store is ready. It now keeps retrying until the store actually answers, so a dark theme is reliably restored."
|
||||||
],
|
],
|
||||||
"fr": [
|
"fr": [
|
||||||
|
"Un profil peut désormais garder ses QSO dans son propre fichier SQLite séparé (Réglages → Base de données → « SQLite — fichier séparé »), et plus seulement la base partagée ou MySQL — ainsi le journal d'un opérateur de passage reste à part et tes réglages et profils ne sont jamais touchés. Le panneau Base de données sépare maintenant clairement la base applicative partagée (réglages + profils) du journal de ce profil.",
|
||||||
"Correction d'un bug d'antenne motorisée qui pouvait laisser un FlexRadio définitivement incapable d'émettre (« Interlock is preventing transmission »). Avec une SteppIR dont la fréquence de statut se lit par intermittence (elle alternait entre la fréquence commandée et sa valeur de repos), la boucle de suivi renvoyait un ordre d'accord à presque chaque cycle, et chaque ordre réarmait la fenêtre « bloquer l'émission pendant que l'antenne bouge » — l'interlock ne se relâchait donc jamais. La boucle de suivi se base maintenant sur la fréquence de la RADIO (elle ne réaccorde que quand le poste change réellement de fréquence), insensible à un statut d'antenne erratique. Retrait aussi d'une commande « interlock set reason= » que SmartSDR refuse (champ en lecture seule) et qui ne produisait qu'une ligne d'erreur sans effet — l'inhibition d'émission elle-même est inchangée et protège toujours pendant le mouvement des éléments. Nouveau : un réglage « Plage accordable » pour la SteppIR (Réglages → Matériel → Antenne, défaut 13-54 MHz = 20 m-6 m) — sur une bande hors de cette plage, OpsLog laisse totalement l'antenne et l'émission tranquilles, donc passer sur 30 m avec une SteppIR 20 m-6 m ne tente plus de la bouger ni ne touche à l'interlock.",
|
"Correction d'un bug d'antenne motorisée qui pouvait laisser un FlexRadio définitivement incapable d'émettre (« Interlock is preventing transmission »). Avec une SteppIR dont la fréquence de statut se lit par intermittence (elle alternait entre la fréquence commandée et sa valeur de repos), la boucle de suivi renvoyait un ordre d'accord à presque chaque cycle, et chaque ordre réarmait la fenêtre « bloquer l'émission pendant que l'antenne bouge » — l'interlock ne se relâchait donc jamais. La boucle de suivi se base maintenant sur la fréquence de la RADIO (elle ne réaccorde que quand le poste change réellement de fréquence), insensible à un statut d'antenne erratique. Retrait aussi d'une commande « interlock set reason= » que SmartSDR refuse (champ en lecture seule) et qui ne produisait qu'une ligne d'erreur sans effet — l'inhibition d'émission elle-même est inchangée et protège toujours pendant le mouvement des éléments. Nouveau : un réglage « Plage accordable » pour la SteppIR (Réglages → Matériel → Antenne, défaut 13-54 MHz = 20 m-6 m) — sur une bande hors de cette plage, OpsLog laisse totalement l'antenne et l'émission tranquilles, donc passer sur 30 m avec une SteppIR 20 m-6 m ne tente plus de la bouger ni ne touche à l'interlock.",
|
||||||
"Nouveau diplôme intégré : The Helvetia 26 Award (H26) — les 26 cantons de Suisse (USKA), reconnus depuis l'adresse ou le QTH du QSO en HF. Chaque canton reconnaît aussi ses principales villes (Genève, Lausanne, Zürich, Bellinzone…), car les opérateurs écrivent rarement le canton lui-même.",
|
"Nouveau diplôme intégré : The Helvetia 26 Award (H26) — les 26 cantons de Suisse (USKA), reconnus depuis l'adresse ou le QTH du QSO en HF. Chaque canton reconnaît aussi ses principales villes (Genève, Lausanne, Zürich, Bellinzone…), car les opérateurs écrivent rarement le canton lui-même.",
|
||||||
"Panneau FlexRadio : la carte RÉCEPTION est de nouveau plus compacte. Tous les contrôles de bruit ajoutés récemment la faisaient s'allonger, donc seuls ceux du quotidien — NB, NR, ANF — restent visibles ; le WNB et le bloc DSP SmartSDR v4 (NRL/NRS/NRF/ANFL ainsi que RNN & ANFT IA/FFT) se replient derrière un bouton « DSP » que tu déplies au besoin. Le bouton porte un point et s'illumine quand l'un des contrôles masqués est activé, pour ne jamais perdre de vue quelque chose d'actif, et son état ouvert/fermé est mémorisé.",
|
"Panneau FlexRadio : la carte RÉCEPTION est de nouveau plus compacte. Tous les contrôles de bruit ajoutés récemment la faisaient s'allonger, donc seuls ceux du quotidien — NB, NR, ANF — restent visibles ; le WNB et le bloc DSP SmartSDR v4 (NRL/NRS/NRF/ANFL ainsi que RNN & ANFT IA/FFT) se replient derrière un bouton « DSP » que tu déplies au besoin. Le bouton porte un point et s'illumine quand l'un des contrôles masqués est activé, pour ne jamais perdre de vue quelque chose d'actif, et son état ouvert/fermé est mémorisé.",
|
||||||
|
|||||||
@@ -1299,7 +1299,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
|
|
||||||
const [dbSettings, setDbSettings] = useState<{ path: string; default_path: string; is_custom: boolean }>({ path: '', default_path: '', is_custom: false });
|
const [dbSettings, setDbSettings] = useState<{ path: string; default_path: string; is_custom: boolean }>({ path: '', default_path: '', is_custom: false });
|
||||||
const [dbMsg, setDbMsg] = useState('');
|
const [dbMsg, setDbMsg] = useState('');
|
||||||
type MySQLCfg = { enabled: boolean; host: string; port: number; user: string; password: string; database: string };
|
type MySQLCfg = { enabled: boolean; host: string; port: number; user: string; password: string; database: string; sqlite_path?: string };
|
||||||
const [mysqlCfg, setMysqlCfg] = useState<MySQLCfg>({ enabled: false, host: '', port: 3306, user: '', password: '', database: '' });
|
const [mysqlCfg, setMysqlCfg] = useState<MySQLCfg>({ enabled: false, host: '', port: 3306, user: '', password: '', database: '' });
|
||||||
const setMysqlField = (patch: Partial<MySQLCfg>) => setMysqlCfg((s) => ({ ...s, ...patch }));
|
const setMysqlField = (patch: Partial<MySQLCfg>) => setMysqlCfg((s) => ({ ...s, ...patch }));
|
||||||
const [mysqlMsg, setMysqlMsg] = useState('');
|
const [mysqlMsg, setMysqlMsg] = useState('');
|
||||||
@@ -4310,10 +4310,22 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
// Switching the logbook backend applies immediately (no restart): the local
|
// Switching the logbook backend applies immediately (no restart): the local
|
||||||
// SQLite file always stays the config store; only the QSO logbook moves.
|
// SQLite file always stays the config store; only the QSO logbook moves.
|
||||||
function useLocalLogbook() {
|
function useLocalLogbook() {
|
||||||
SaveMySQLSettings({ ...mysqlCfg, enabled: false } as any)
|
SaveMySQLSettings({ ...mysqlCfg, enabled: false, sqlite_path: '' } as any)
|
||||||
.then(async () => { setMysqlField({ enabled: false }); setRestartMsg(t('db.switchedSqlite')); await refreshBackend(); })
|
.then(async () => { setMysqlField({ enabled: false, sqlite_path: '' }); setRestartMsg(t('db.switchedSqlite')); await refreshBackend(); })
|
||||||
.catch((e: any) => setErr(String(e?.message ?? e)));
|
.catch((e: any) => setErr(String(e?.message ?? e)));
|
||||||
}
|
}
|
||||||
|
// Route THIS profile's logbook to its own SQLite file (config stays in
|
||||||
|
// opslog.db). db.Open creates+migrates the file if it's new. Pick a name/place.
|
||||||
|
async function pickSeparateSqlite() {
|
||||||
|
try {
|
||||||
|
const p = await PickSaveDatabase();
|
||||||
|
if (!p) return;
|
||||||
|
await SaveMySQLSettings({ ...mysqlCfg, enabled: false, sqlite_path: p } as any);
|
||||||
|
setMysqlField({ enabled: false, sqlite_path: p });
|
||||||
|
setRestartMsg(t('db.switchedSqliteFile'));
|
||||||
|
await refreshBackend();
|
||||||
|
} catch (e: any) { setErr(String(e?.message ?? e)); }
|
||||||
|
}
|
||||||
function connectMysql() {
|
function connectMysql() {
|
||||||
SaveMySQLSettings(mysqlCfg as any)
|
SaveMySQLSettings(mysqlCfg as any)
|
||||||
.then(async () => { setRestartMsg(t('db.switchedMysql')); await refreshBackend(); })
|
.then(async () => { setRestartMsg(t('db.switchedMysql')); await refreshBackend(); })
|
||||||
@@ -4329,17 +4341,20 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
<div className="grid grid-cols-[130px_1fr] gap-2 items-center max-w-2xl mb-1">
|
<div className="grid grid-cols-[130px_1fr] gap-2 items-center max-w-2xl mb-1">
|
||||||
<Label className="text-sm">{t('db.backend')}</Label>
|
<Label className="text-sm">{t('db.backend')}</Label>
|
||||||
<Select
|
<Select
|
||||||
value={mysqlCfg.enabled ? 'mysql' : 'sqlite'}
|
value={mysqlCfg.enabled ? 'mysql' : (mysqlCfg.sqlite_path ? 'sqlite_file' : 'sqlite')}
|
||||||
onValueChange={(v) => {
|
onValueChange={(v) => {
|
||||||
const enabled = v === 'mysql';
|
|
||||||
setMysqlField({ enabled });
|
|
||||||
setRestartMsg('');
|
setRestartMsg('');
|
||||||
if (!enabled) useLocalLogbook(); // switching to local applies at once
|
if (v === 'mysql') { setMysqlField({ enabled: true }); return; }
|
||||||
|
if (v === 'sqlite') { useLocalLogbook(); return; } // shared app db
|
||||||
|
// sqlite_file: keep any existing path; if none, prompt to pick one.
|
||||||
|
setMysqlField({ enabled: false });
|
||||||
|
if (!mysqlCfg.sqlite_path) pickSeparateSqlite();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="h-8 w-72"><SelectValue /></SelectTrigger>
|
<SelectTrigger className="h-8 w-72"><SelectValue /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="sqlite">{t('db.optSqlite')}</SelectItem>
|
<SelectItem value="sqlite">{t('db.optSqlite')}</SelectItem>
|
||||||
|
<SelectItem value="sqlite_file">{t('db.optSqliteFile')}</SelectItem>
|
||||||
<SelectItem value="mysql">{t('db.optMysql')}</SelectItem>
|
<SelectItem value="mysql">{t('db.optMysql')}</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
@@ -4362,10 +4377,27 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* SQLite: local logbook file management */}
|
{/* SQLite: local logbook file management */}
|
||||||
{!mysqlCfg.enabled && (
|
{/* Separate per-profile SQLite logbook FILE (config stays in opslog.db) */}
|
||||||
|
{!mysqlCfg.enabled && mysqlCfg.sqlite_path && (
|
||||||
|
<div className="space-y-3 max-w-2xl">
|
||||||
|
<div className="space-y-1">
|
||||||
|
<Label>{t('db.logbookFile')}</Label>
|
||||||
|
<div className="font-mono text-xs bg-muted/40 border border-border rounded-md px-3 py-2 break-all">{mysqlCfg.sqlite_path}</div>
|
||||||
|
<p className="text-[11px] text-muted-foreground">{t('db.logbookFileHint')}</p>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
<Button variant="outline" size="sm" onClick={pickSeparateSqlite}><FolderOpen className="size-3.5" /> {t('db.chooseFile')}</Button>
|
||||||
|
</div>
|
||||||
|
{restartMsg && <div className="text-xs text-success-muted-foreground">{restartMsg}</div>}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Shared application/config database (opslog.db) = settings + profiles +
|
||||||
|
this profile's QSOs when it uses the default logbook. */}
|
||||||
|
{!mysqlCfg.enabled && !mysqlCfg.sqlite_path && (
|
||||||
<div className="space-y-4 max-w-2xl">
|
<div className="space-y-4 max-w-2xl">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label>{t('db.current')}</Label>
|
<Label>{t('db.appDb')}</Label>
|
||||||
<div className="font-mono text-xs bg-muted/40 border border-border rounded-md px-3 py-2 break-all">
|
<div className="font-mono text-xs bg-muted/40 border border-border rounded-md px-3 py-2 break-all">
|
||||||
{dbSettings.path || '—'}
|
{dbSettings.path || '—'}
|
||||||
{dbSettings.is_custom
|
{dbSettings.is_custom
|
||||||
@@ -4373,6 +4405,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
: <span className="ml-2 text-[10px] text-muted-foreground">{t('db.default')}</span>}
|
: <span className="ml-2 text-[10px] text-muted-foreground">{t('db.default')}</span>}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-[10px] text-muted-foreground">{t('db.defaultLabel')} <span className="font-mono">{dbSettings.default_path}</span></div>
|
<div className="text-[10px] text-muted-foreground">{t('db.defaultLabel')} <span className="font-mono">{dbSettings.default_path}</span></div>
|
||||||
|
<p className="text-[11px] text-muted-foreground">{t('db.appDbHint')}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-wrap gap-2">
|
<div className="flex flex-wrap gap-2">
|
||||||
|
|||||||
@@ -286,7 +286,9 @@ const en: Dict = {
|
|||||||
'prof.hint': 'Switch between operating identities (home / portable / SOTA / contest). Pick a profile here, then edit its fields in the other sections (Station Information, etc.) — changes are saved against the selected profile.', 'prof.active': 'ACTIVE', 'prof.duplicate': 'Duplicate', 'prof.delete': 'Delete', 'prof.profileName': 'Profile name',
|
'prof.hint': 'Switch between operating identities (home / portable / SOTA / contest). Pick a profile here, then edit its fields in the other sections (Station Information, etc.) — changes are saved against the selected profile.', 'prof.active': 'ACTIVE', 'prof.duplicate': 'Duplicate', 'prof.delete': 'Delete', 'prof.profileName': 'Profile name',
|
||||||
'prof.configId': 'Configuration ID', 'prof.description': 'Description', 'prof.new': 'New', 'prof.newTitle': 'Create a new empty profile', 'prof.dupTitle': 'Clone the selected profile (keeps all its fields)', 'prof.setActive': 'Set active', 'prof.setActiveTitle': 'Activate the selected profile — new QSOs will use its MY_* fields', 'prof.deleteTitle': 'Delete the selected profile', 'prof.cantDeleteLast': 'Cannot delete the last profile', 'prof.activeSuffix': ' (active)', 'prof.viewingNote': "You're viewing {name}. The active profile is {active} — its values are stamped on new QSOs. Click Set active to switch.",
|
'prof.configId': 'Configuration ID', 'prof.description': 'Description', 'prof.new': 'New', 'prof.newTitle': 'Create a new empty profile', 'prof.dupTitle': 'Clone the selected profile (keeps all its fields)', 'prof.setActive': 'Set active', 'prof.setActiveTitle': 'Activate the selected profile — new QSOs will use its MY_* fields', 'prof.deleteTitle': 'Delete the selected profile', 'prof.cantDeleteLast': 'Cannot delete the last profile', 'prof.activeSuffix': ' (active)', 'prof.viewingNote': "You're viewing {name}. The active profile is {active} — its values are stamped on new QSOs. Click Set active to switch.",
|
||||||
// Database panel
|
// Database panel
|
||||||
'db.optSqlite': 'SQLite — local file (solo)', 'db.optMysql': 'MySQL — shared server (multi-operator)', 'db.profileHint': 'This is the logbook for the active profile. Different profiles can point at different databases — switching profile switches the logbook.',
|
'db.optSqlite': 'SQLite — shared local database (default)', 'db.optSqliteFile': 'SQLite — separate file (this profile only)', 'db.optMysql': 'MySQL — shared server (multi-operator)', 'db.profileHint': 'This is the logbook for the active profile. Different profiles can point at different databases — switching profile switches the logbook.',
|
||||||
|
'db.logbookFile': "This profile's logbook file", 'db.logbookFileHint': "Only this profile's QSOs live here. Your settings and profiles stay in the shared app database, so switching this never affects your other profiles — ideal for a visiting operator. A new name is created automatically.", 'db.chooseFile': 'Choose file…', 'db.switchedSqliteFile': 'Logbook now uses a separate SQLite file.',
|
||||||
|
'db.appDb': 'Shared application database', 'db.appDbHint': 'Holds your settings, profiles and (for this profile) the QSOs. Changing its location moves the WHOLE install — settings and profiles included.',
|
||||||
'db.saveSwitch': 'Save & switch logbook', 'db.switchedMysql': 'Logbook switched to MySQL ✓', 'db.switchedSqlite': 'Logbook switched to local SQLite ✓',
|
'db.saveSwitch': 'Save & switch logbook', 'db.switchedMysql': 'Logbook switched to MySQL ✓', 'db.switchedSqlite': 'Logbook switched to local SQLite ✓',
|
||||||
'db.backend': 'Backend', 'db.configLocal': 'settings stay in the local SQLite file', 'db.connectUse': 'Connect & use',
|
'db.backend': 'Backend', 'db.configLocal': 'settings stay in the local SQLite file', 'db.connectUse': 'Connect & use',
|
||||||
'db.savedRestart': 'Saved. Restart OpsLog to open this logbook:', 'db.restartNow': 'Restart OpsLog', 'db.restartHint': '(reopens automatically)',
|
'db.savedRestart': 'Saved. Restart OpsLog to open this logbook:', 'db.restartNow': 'Restart OpsLog', 'db.restartHint': '(reopens automatically)',
|
||||||
@@ -641,7 +643,9 @@ const fr: Dict = {
|
|||||||
'prof.deleteConfirm': 'Supprimer le profil « {name} » ? Tous ses réglages seront perdus.', 'prof.dupPrompt': 'Nom du nouveau profil (copie de « {name} ») :', 'prof.dupSuffix': '{name} Copie', 'prof.newPrompt': 'Nom du nouveau profil :', 'prof.newDefault': 'Nouveau profil',
|
'prof.deleteConfirm': 'Supprimer le profil « {name} » ? Tous ses réglages seront perdus.', 'prof.dupPrompt': 'Nom du nouveau profil (copie de « {name} ») :', 'prof.dupSuffix': '{name} Copie', 'prof.newPrompt': 'Nom du nouveau profil :', 'prof.newDefault': 'Nouveau profil',
|
||||||
'prof.hint': "Bascule entre tes identités d'opération (maison / portable / SOTA / contest). Choisis un profil ici, puis édite ses champs dans les autres sections (Informations station, etc.) — les changements sont enregistrés sur le profil sélectionné.", 'prof.active': 'ACTIF', 'prof.duplicate': 'Dupliquer', 'prof.delete': 'Supprimer', 'prof.profileName': 'Nom du profil',
|
'prof.hint': "Bascule entre tes identités d'opération (maison / portable / SOTA / contest). Choisis un profil ici, puis édite ses champs dans les autres sections (Informations station, etc.) — les changements sont enregistrés sur le profil sélectionné.", 'prof.active': 'ACTIF', 'prof.duplicate': 'Dupliquer', 'prof.delete': 'Supprimer', 'prof.profileName': 'Nom du profil',
|
||||||
'prof.configId': 'ID de configuration', 'prof.description': 'Description', 'prof.new': 'Nouveau', 'prof.newTitle': 'Créer un nouveau profil vierge', 'prof.dupTitle': 'Cloner le profil sélectionné (garde tous ses champs)', 'prof.setActive': 'Activer', 'prof.setActiveTitle': 'Activer le profil sélectionné — les nouveaux QSO utiliseront ses champs MY_*', 'prof.deleteTitle': 'Supprimer le profil sélectionné', 'prof.cantDeleteLast': 'Impossible de supprimer le dernier profil', 'prof.activeSuffix': ' (actif)', 'prof.viewingNote': 'Tu consultes {name}. Le profil actif est {active} — ses valeurs sont inscrites sur les nouveaux QSO. Clique « Activer » pour basculer.',
|
'prof.configId': 'ID de configuration', 'prof.description': 'Description', 'prof.new': 'Nouveau', 'prof.newTitle': 'Créer un nouveau profil vierge', 'prof.dupTitle': 'Cloner le profil sélectionné (garde tous ses champs)', 'prof.setActive': 'Activer', 'prof.setActiveTitle': 'Activer le profil sélectionné — les nouveaux QSO utiliseront ses champs MY_*', 'prof.deleteTitle': 'Supprimer le profil sélectionné', 'prof.cantDeleteLast': 'Impossible de supprimer le dernier profil', 'prof.activeSuffix': ' (actif)', 'prof.viewingNote': 'Tu consultes {name}. Le profil actif est {active} — ses valeurs sont inscrites sur les nouveaux QSO. Clique « Activer » pour basculer.',
|
||||||
'db.optSqlite': 'SQLite — fichier local (solo)', 'db.optMysql': 'MySQL — serveur partagé (multi-opérateur)', 'db.profileHint': 'Ceci est le journal du profil actif. Des profils différents peuvent pointer vers des bases différentes — changer de profil change le journal.',
|
'db.optSqlite': 'SQLite — base locale partagée (défaut)', 'db.optSqliteFile': 'SQLite — fichier séparé (ce profil seulement)', 'db.optMysql': 'MySQL — serveur partagé (multi-opérateur)', 'db.profileHint': 'Ceci est le journal du profil actif. Des profils différents peuvent pointer vers des bases différentes — changer de profil change le journal.',
|
||||||
|
'db.logbookFile': 'Fichier journal de ce profil', 'db.logbookFileHint': "Seuls les QSO de ce profil y sont stockés. Tes réglages et profils restent dans la base applicative partagée, donc changer ceci n'affecte jamais tes autres profils — idéal pour un opérateur de passage. Un nouveau nom est créé automatiquement.", 'db.chooseFile': 'Choisir le fichier…', 'db.switchedSqliteFile': 'Le journal utilise désormais un fichier SQLite séparé.',
|
||||||
|
'db.appDb': 'Base applicative partagée', 'db.appDbHint': "Contient tes réglages, tes profils et (pour ce profil) les QSO. Changer son emplacement déplace TOUTE l'installation — réglages et profils compris.",
|
||||||
'db.saveSwitch': 'Enregistrer & basculer le journal', 'db.switchedMysql': 'Journal basculé vers MySQL ✓', 'db.switchedSqlite': 'Journal basculé vers SQLite local ✓',
|
'db.saveSwitch': 'Enregistrer & basculer le journal', 'db.switchedMysql': 'Journal basculé vers MySQL ✓', 'db.switchedSqlite': 'Journal basculé vers SQLite local ✓',
|
||||||
'db.backend': 'Base de données', 'db.configLocal': 'les réglages restent dans le fichier SQLite local', 'db.connectUse': 'Connecter et utiliser',
|
'db.backend': 'Base de données', 'db.configLocal': 'les réglages restent dans le fichier SQLite local', 'db.connectUse': 'Connecter et utiliser',
|
||||||
'db.savedRestart': 'Enregistré. Redémarrez OpsLog pour ouvrir cette base :', 'db.restartNow': 'Redémarrer OpsLog', 'db.restartHint': '(réouverture automatique)',
|
'db.savedRestart': 'Enregistré. Redémarrez OpsLog pour ouvrir cette base :', 'db.restartNow': 'Redémarrer OpsLog', 'db.restartHint': '(réouverture automatique)',
|
||||||
|
|||||||
@@ -2315,6 +2315,7 @@ export namespace main {
|
|||||||
user: string;
|
user: string;
|
||||||
password: string;
|
password: string;
|
||||||
database: string;
|
database: string;
|
||||||
|
sqlite_path?: string;
|
||||||
|
|
||||||
static createFrom(source: any = {}) {
|
static createFrom(source: any = {}) {
|
||||||
return new MySQLSettings(source);
|
return new MySQLSettings(source);
|
||||||
@@ -2328,6 +2329,7 @@ export namespace main {
|
|||||||
this.user = source["user"];
|
this.user = source["user"];
|
||||||
this.password = source["password"];
|
this.password = source["password"];
|
||||||
this.database = source["database"];
|
this.database = source["database"];
|
||||||
|
this.sqlite_path = source["sqlite_path"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class OfflineStatus {
|
export class OfflineStatus {
|
||||||
@@ -3365,6 +3367,7 @@ export namespace profile {
|
|||||||
user: string;
|
user: string;
|
||||||
password: string;
|
password: string;
|
||||||
database: string;
|
database: string;
|
||||||
|
path?: string;
|
||||||
|
|
||||||
static createFrom(source: any = {}) {
|
static createFrom(source: any = {}) {
|
||||||
return new ProfileDB(source);
|
return new ProfileDB(source);
|
||||||
@@ -3378,6 +3381,7 @@ export namespace profile {
|
|||||||
this.user = source["user"];
|
this.user = source["user"];
|
||||||
this.password = source["password"];
|
this.password = source["password"];
|
||||||
this.database = source["database"];
|
this.database = source["database"];
|
||||||
|
this.path = source["path"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class Profile {
|
export class Profile {
|
||||||
|
|||||||
@@ -26,6 +26,13 @@ type ProfileDB struct {
|
|||||||
User string `json:"user"`
|
User string `json:"user"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Database string `json:"database"`
|
Database string `json:"database"`
|
||||||
|
// Path is a per-profile SQLite logbook FILE, distinct from the shared app
|
||||||
|
// database (opslog.db, which always holds settings + profiles). Empty =
|
||||||
|
// the shared database is used as the logbook (the historical default). Set =
|
||||||
|
// this profile's QSOs live in their own .db, so a visiting operator's contacts
|
||||||
|
// don't mix into yours and switching it never touches your config. Only used
|
||||||
|
// when Backend != "mysql".
|
||||||
|
Path string `json:"path,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Profile is one operating configuration. A user typically keeps a few:
|
// Profile is one operating configuration. A user typically keeps a few:
|
||||||
|
|||||||
Reference in New Issue
Block a user