Versie 0.3.2
This commit is contained in:
1 parent
e77d8fd373
commit
1cf6eeed29
16 files changed
+551
-44
No files matched your search
+2
-3
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:8874091aa075a54dd49f5d1aad9244d40ef61ac47ce7c83d7d4e346d8133207a
|
||||
// Generated, do not edit. sha256:98f4651e5cb7036965f92ae8206b5dd6cbf62ce4e42388c68825bc8d9de6ca9d
|
||||
import { configureSharedUi } from './ui/shared-setup.js';
|
||||
import './edition.js';
|
||||
import { assertConfig, ROUTE_KEYS, hashFromLocation } from '../shared/config.js';
|
||||
@@ -253,8 +253,7 @@ async function boot() {
|
||||
initCommands();
|
||||
await renderPage();
|
||||
document.documentElement.dataset.app = 'ready';
|
||||
finishSplash();
|
||||
maybeStartSetup();
|
||||
finishSplash().then(maybeStartSetup);
|
||||
|
||||
refreshAttention();
|
||||
listAssets()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated, do not edit. sha256:36518f0a81f251fc91cc7a50cccd80f8e26c117fb0b6017e85098cc76621857c */
|
||||
/* Generated, do not edit. sha256:d875d85b0d41e419eb6bae7090608b0914629b07925648a2d82dc7a8e8eb4309 */
|
||||
:root {
|
||||
--logo-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cpath d='M 46.108 37.099 L 79.826 68.032 L 113.068 37.288 L 142.067 37.244 L 92.564 85.773 L 92.367 123.544 L 80.04 135.851 L 67.262 123.517 L 67.425 85.773 L 17.176 37.092 L 46.108 37.099 Z'/%3E%3Cpath d='M 49.901 91.273 L 0 43.722 L 0 24.666 L 64.78 87.731 L 64.689 118.25 L 50.234 105.711 L 49.901 91.273 Z'/%3E%3Cpath d='M 95.221 87.779 L 160 24.149 L 160 43.383 L 109.554 93.918 L 109.584 105.756 L 94.924 118.584 L 95.221 87.779 Z'/%3E%3C/svg%3E");
|
||||
--radius-sm: 8px;
|
||||
@@ -2019,6 +2019,7 @@ html[data-pagetitle="off"] { --guide-top:1.2rem; }
|
||||
border:0; border-radius:50%; background:transparent; color:var(--text-ter); cursor:pointer; }
|
||||
.dialog-eye:hover, .dialog-eye:focus-visible { background:var(--accent-soft); color:var(--accent-text); }
|
||||
.dialog-eye svg { width:1rem; height:1rem; }
|
||||
.dialog:not(:has(.val)) .dialog-eye { display:none; }
|
||||
.dialog:has(.dialog-close) { position:relative; }
|
||||
.dialog-close {
|
||||
position:absolute; top:0.65rem; right:0.65rem; z-index:3;
|
||||
|
||||
+7
-3
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:13240cf3e3de47963beb3e5b97f3a5cb83beb4a9a635ce540f88a745df4d753d
|
||||
// Generated, do not edit. sha256:a167e18e55f858b6191c5f1c50bdab5b3bf485873744837c0e096e77f639cd0e
|
||||
import { nl } from './nl.js';
|
||||
|
||||
export const en = {
|
||||
@@ -60,7 +60,7 @@ export const en = {
|
||||
|
||||
license: {
|
||||
lockedTitle: 'Part of the paid version',
|
||||
counter: '{n} of {max}',
|
||||
counter: '{naam} in the free edition: {n} of {max}',
|
||||
whatIsPaid: 'What does the paid version include?',
|
||||
why_develop: 'Development version: nothing is restricted below 1.0.0',
|
||||
why_forced: 'Forced via ASSETAPP_LICENSE_STATE (development only)',
|
||||
@@ -210,6 +210,9 @@ export const en = {
|
||||
infoPrivacy: 'Your npub and the orders with it. An email address only if you provide one, and then '
|
||||
+ 'made unrecognizable, so it can only be matched if you come forward with it yourself.',
|
||||
name_fiatAccounts: 'Fiat accounts',
|
||||
name_assets: 'Assets besides currencies',
|
||||
name_valuations: 'Balances',
|
||||
name_portfolios: 'Portfolios',
|
||||
featTitle: 'What the editions include',
|
||||
featFull: 'Full',
|
||||
featFree: 'Free',
|
||||
@@ -1219,7 +1222,7 @@ export const en = {
|
||||
groupBy: 'Group',
|
||||
standing: 'Current position',
|
||||
toWealth: 'To Wealth',
|
||||
standingNone: 'No tax-relevant positions yet.',
|
||||
standingNone: 'No positions yet. Book a purchase or record a balance.',
|
||||
showToday: 'Show return',
|
||||
},
|
||||
|
||||
@@ -2084,6 +2087,7 @@ export const en = {
|
||||
scanning: 'Scanning…',
|
||||
scanningTx: 'Fetching transactions',
|
||||
scanError: 'Update failed',
|
||||
scanErrorWhy: 'Update failed: {reden}',
|
||||
scanNotOnchain: 'Cannot be scanned on-chain',
|
||||
lightningMovements: 'Lightning transactions updated',
|
||||
addressesScanned: 'addresses scanned',
|
||||
|
||||
+7
-3
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:5337809d822cab071fd28371d6976e564034e1f27296fd058188237da0027ce9
|
||||
// Generated, do not edit. sha256:f025d672341c54d23ebad8e10876b424ac570cd500126582bf4b9c905f2cd672
|
||||
export const nl = {
|
||||
app: { name: 'Atreides Assets' },
|
||||
|
||||
@@ -58,7 +58,7 @@ export const nl = {
|
||||
|
||||
license: {
|
||||
lockedTitle: 'Hoort bij de betaalde versie',
|
||||
counter: '{n} van {max}',
|
||||
counter: '{naam} in de gratis editie: {n} van {max}',
|
||||
whatIsPaid: 'Wat zit er in de betaalde versie?',
|
||||
why_develop: 'Ontwikkelversie: er wordt niets beperkt onder 1.0.0',
|
||||
why_forced: 'Geforceerd via ASSETAPP_LICENSE_STATE (alleen bij ontwikkelen)',
|
||||
@@ -210,6 +210,9 @@ export const nl = {
|
||||
infoPrivacy: 'Uw npub en de orders erbij. Een e-mailadres alleen als u dat opgeeft, en dan onherkenbaar '
|
||||
+ 'gemaakt, zodat het alleen terug te vinden is als u zich er zelf mee meldt.',
|
||||
name_fiatAccounts: 'Fiatrekeningen',
|
||||
name_assets: 'Assets naast valuta',
|
||||
name_valuations: 'Balansen',
|
||||
name_portfolios: 'Portefeuilles',
|
||||
featTitle: 'Wat de edities bieden',
|
||||
featFull: 'Volledig',
|
||||
featFree: 'Gratis',
|
||||
@@ -1235,7 +1238,7 @@ export const nl = {
|
||||
groupBy: 'Groeperen',
|
||||
standing: 'Huidige stand',
|
||||
toWealth: 'Naar Vermogen',
|
||||
standingNone: 'Nog geen tax-relevante posities.',
|
||||
standingNone: 'Nog geen posities. Boek een aankoop of leg een balans vast.',
|
||||
showToday: 'Rendement tonen',
|
||||
},
|
||||
|
||||
@@ -2108,6 +2111,7 @@ export const nl = {
|
||||
scanning: 'Scannen…',
|
||||
scanningTx: 'Transacties ophalen',
|
||||
scanError: 'Bijwerken mislukt',
|
||||
scanErrorWhy: 'Bijwerken mislukt: {reden}',
|
||||
scanNotOnchain: 'Niet via de keten te scannen',
|
||||
lightningMovements: 'lightning-bewegingen bijgewerkt',
|
||||
addressesScanned: 'adressen gescand',
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:e2056779c9285b8b0c7aa5d702fc44b067694e358ed2b791b9b58447551ece12
|
||||
// Generated, do not edit. sha256:1df2c5fd2e650856e801961b8f9b2f63fd3868b6f612cd0c41498384a12aea9b
|
||||
import { licenseStatus } from './data/license-status.js';
|
||||
import { getPref, setPref } from './data/preferences.js';
|
||||
import { t } from './i18n/index.js';
|
||||
@@ -24,7 +24,7 @@ export function limitFor(kind) {
|
||||
|
||||
export function counterText(kind, current) {
|
||||
const max = limitFor(kind);
|
||||
return max === null ? null : t('license.counter', { n: current, max });
|
||||
return max === null ? null : t('license.counter', { naam: t(`license.name_${kind}`), n: current, max });
|
||||
}
|
||||
|
||||
const PREF_SCOPE = 'license';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:51ab737fb6604c8493f238a8893184408226a1a90ddd465fcd92bf0040b5a50e
|
||||
// Generated, do not edit. sha256:9b4688b90b1d72ebe6c49262c3d23557d132d9066d8379a911157bbf3dae8ae8
|
||||
import { mergeCheck, mergeAccounts } from '../data/accounts-merge.js';
|
||||
import { listAccounts, listSelectableAccounts, createAccount, updateAccount, deleteAccount } from '../data/accounts.js';
|
||||
import { listConnections } from '../data/connections.js';
|
||||
@@ -102,7 +102,7 @@ async function buildTable(el) {
|
||||
tableApi = renderTable(el.querySelector('#tbl'), {
|
||||
columns, rows: rijen,
|
||||
...(limitFor('fiatAccounts') !== null
|
||||
? { toolbarNote: () => `${t('license.name_fiatAccounts')}: ${counterText('fiatAccounts', bankCount)}` } : {}),
|
||||
? { toolbarNote: () => counterText('fiatAccounts', bankCount) } : {}),
|
||||
...(await tableViewCfg('accounts', { key: 'name', dir: 'asc' })),
|
||||
emptyText: t('accounts.none'),
|
||||
noneLabel: t('table.none'),
|
||||
@@ -317,6 +317,8 @@ async function mountSources(host, accountId, allowed) {
|
||||
};
|
||||
let api = null;
|
||||
const reloadSrc = async () => api.refresh(await listWalletSources(accountId));
|
||||
const rows = await listWalletSources(accountId);
|
||||
const nodeColumn = !locked('lightning') || rows.some(r => r.connectionId != null);
|
||||
|
||||
api = renderTable(host.querySelector('[data-src-table]'), {
|
||||
title: t('accounts.sources'),
|
||||
@@ -348,8 +350,8 @@ async function mountSources(host, accountId, allowed) {
|
||||
{ key: 'scriptType', label: t('accounts.colScriptType'),
|
||||
render: s => s.kind === 'xpub' ? t('accounts.script_' + s.scriptType) : '<span class="t-muted-cell">-</span>',
|
||||
edit: { type: 'select', options: scriptTypeOpts, visible: v => v.kind === 'xpub' } },
|
||||
],
|
||||
rows: await listWalletSources(accountId),
|
||||
].filter(c => nodeColumn || c.key !== 'connectionId'),
|
||||
rows,
|
||||
...(await tableViewCfg('accounts.sources', { key: 'name', dir: 'asc' })),
|
||||
emptyText: t('accounts.noSources'),
|
||||
newLabel: t('table.new'),
|
||||
|
||||
+12
-5
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:7de3dc53eab20f070a6ac8c7162fee1bd0695f724c6a13e314a994181782906e
|
||||
// Generated, do not edit. sha256:26e9a2b26a7c0fa9e0b6979080609ba55baa351ce8440240a006def072475893
|
||||
import { listAssets, listBookableAssets, createAsset, updateAsset, deleteAsset } from '../data/assets.js';
|
||||
import { hasMetalAssets } from '../data/metals.js';
|
||||
import { tableViewCfg } from '../data/preferences.js';
|
||||
@@ -132,7 +132,14 @@ async function buildTable(el) {
|
||||
};
|
||||
}
|
||||
|
||||
const rijen = await listAssets();
|
||||
const nieuw = new Set();
|
||||
const zichtbaar = async () => {
|
||||
const b = await listBookableAssets();
|
||||
if (!nieuw.size) return b;
|
||||
const ids = new Set(b.map(a => a.id));
|
||||
return [...b, ...(await listAssets()).filter(a => nieuw.has(a.id) && !ids.has(a.id))];
|
||||
};
|
||||
const rijen = await zichtbaar();
|
||||
const bookable = async () => (await listBookableAssets()).filter(r => r.symbol !== baseCurrency()).length;
|
||||
let used = await bookable();
|
||||
tableApi = renderTable(el.querySelector('#tbl'), {
|
||||
@@ -145,11 +152,11 @@ async function buildTable(el) {
|
||||
newLabel: t('table.new'),
|
||||
newDefaults: { kind: 'crypto', decimals: '', displayUnit: 'unit', taxCategory: '', taxScope: '', balanceCapture: '' },
|
||||
saveLabel: t('assets.save'), cancelLabel: t('assets.cancel'),
|
||||
onCreate: async v => { const id = await createAsset(toPayload(v)); used = await bookable(); tableApi.refresh(await listAssets(), { locate: id }); },
|
||||
onSave: async (id, v) => { await updateAsset(id, toPayload(v)); tableApi.refresh(await listAssets()); },
|
||||
onCreate: async v => { const id = await createAsset(toPayload(v)); nieuw.add(id); used = await bookable(); tableApi.refresh(await zichtbaar(), { locate: id }); },
|
||||
onSave: async (id, v) => { await updateAsset(id, toPayload(v)); tableApi.refresh(await zichtbaar()); },
|
||||
onDelete: async id => {
|
||||
if (!(await dialog.confirm({ message: t('assets.confirmDelete'), danger: true }))) return;
|
||||
try { await deleteAsset(id); used = await bookable(); tableApi.refresh(await listAssets()); } catch (e) { dialog.alert({ title: t('dialog.error'), message: e.message }); }
|
||||
try { await deleteAsset(id); used = await bookable(); tableApi.refresh(await zichtbaar()); } catch (e) { dialog.alert({ title: t('dialog.error'), message: e.message }); }
|
||||
},
|
||||
});
|
||||
tableApi.focusRow(takeRowFocus('assets'));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:fcc1131e05f7794fbe4f303c8c1237f96201e5ee9ed17491fd18d55b64828d40
|
||||
// Generated, do not edit. sha256:bcb22b0408193ecc7c34d5e55a86c15a89be89fdd2d96b8d21f03771f4179be1
|
||||
import { localDate } from '../../shared/time.js';
|
||||
import { listAccounts } from '../data/accounts.js';
|
||||
import { listLabels, createLabel } from '../data/labels.js';
|
||||
@@ -553,18 +553,18 @@ async function scanAll(el) {
|
||||
const r = await scanLightningSource(s);
|
||||
ln += r.count;
|
||||
if (r.channelTxids.length) kanalen.push([s.accountId, r.channelTxids]);
|
||||
} catch (err) { console.error('[lightning-scan]', err); error = true; }
|
||||
} catch (err) { console.error('[lightning-scan]', err); error = err.message || true; }
|
||||
continue;
|
||||
}
|
||||
if (!isOnchainSource(s)) { geslagen++; continue; }
|
||||
try {
|
||||
const r = await scanOne(el, s, g.id);
|
||||
count += r.count; failed += r.failed; voorstellen.set(s.accountId, r.proposals || 0);
|
||||
} catch (err) { console.error('[onchain-scan-all]', err); error = true; }
|
||||
} catch (err) { console.error('[onchain-scan-all]', err); error = err.message || true; }
|
||||
}
|
||||
const skipped = geslagen && !lnBronnen && !count && !failed;
|
||||
if (error) nMislukt++; else if (!skipped) nWallets++;
|
||||
results[g.id] = error ? { error: true } : (skipped ? { skipped: true } : { count, failed, ln, lnBronnen });
|
||||
results[g.id] = error ? { error } : (skipped ? { skipped: true } : { count, failed, ln, lnBronnen });
|
||||
}
|
||||
if (Object.values(results).some(r => r.lnBronnen)) await syncAddressLinks().catch(err => console.error('[lightning-links]', err));
|
||||
for (const [accountId, txids] of kanalen) {
|
||||
@@ -582,7 +582,8 @@ async function scanAll(el) {
|
||||
zetStatus(scanSummary(nWallets, nVoorstellen, nMislukt));
|
||||
for (const id in results) {
|
||||
const r = results[id];
|
||||
if (r.error) setLogRow(el, id, 't-neg', t('tracking.scanError'));
|
||||
if (r.error) setLogRow(el, id, 't-neg', typeof r.error === 'string'
|
||||
? t('tracking.scanErrorWhy', { reden: r.error }) : t('tracking.scanError'));
|
||||
else if (r.skipped) setLogRow(el, id, 't-muted', t('tracking.scanNotOnchain'));
|
||||
else setLogRow(el, id, r.failed ? 't-neg' : 't-pos', scanDoneText(r));
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
// Generated, do not edit. sha256:4bf6f8ef0a0bf339d290a677844034b6b894f341f060833980b2dc5ccb489b09
|
||||
// Generated, do not edit. sha256:d2bc926ea0bee8d8465cb325428dc8ec0f61a809df8e09696d2ce30fb50111c2
|
||||
import { esc } from './escape.js';
|
||||
import { SHIELD } from './icons.js';
|
||||
import { t } from '../i18n/index.js';
|
||||
import { TARGETS, targetHash } from '../../shared/config.js';
|
||||
import { limitFor } from '../license.js';
|
||||
import { limitFor, counterText } from '../license.js';
|
||||
|
||||
export function lockIcon(title = t('license.lockedTitle')) {
|
||||
return `<span class="lock-icon" title="${esc(title)}" aria-label="${esc(title)}">${SHIELD}</span>`;
|
||||
@@ -31,7 +31,7 @@ export function capacityCfg(kind, used) {
|
||||
const max = limitFor(kind);
|
||||
if (max === null) return {};
|
||||
return {
|
||||
toolbarNote: () => t('license.counter', { n: used(), max }),
|
||||
toolbarNote: () => counterText(kind, used()),
|
||||
createHidden: () => used() >= max,
|
||||
};
|
||||
}
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
// Generated, do not edit. sha256:a433ae61cf1d51dd5a396f13922a2aaa329bfea96e00b35d9456a671a84c5e04
|
||||
// Generated, do not edit. sha256:45c5f1058c49379b8b6b1e8f53d554bf4f5826219c9349649a60020eb36c8064
|
||||
import { CONFIG } from '../../shared/config.js';
|
||||
import { t } from '../i18n/index.js';
|
||||
|
||||
@@ -24,10 +24,10 @@ let typeTimer = 0;
|
||||
|
||||
const reducedMotion = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
function fadeOut(splash) {
|
||||
function fadeOut(splash, after = () => {}) {
|
||||
splash.style.transitionDuration = `${CONFIG.SPLASH.FADE_MS}ms`;
|
||||
splash.classList.add('is-done');
|
||||
setTimeout(() => reset(splash), CONFIG.SPLASH.FADE_MS + 50);
|
||||
setTimeout(() => { reset(splash); after(); }, CONFIG.SPLASH.FADE_MS + 50);
|
||||
}
|
||||
|
||||
function reset(splash) {
|
||||
@@ -41,9 +41,9 @@ function reset(splash) {
|
||||
|
||||
export function finishSplash() {
|
||||
const splash = document.getElementById('splash');
|
||||
if (!splash || document.documentElement.dataset.splash !== 'on') return;
|
||||
if (!splash || document.documentElement.dataset.splash !== 'on') return Promise.resolve();
|
||||
const wait = Math.max(0, CONFIG.SPLASH.MIN_MS - (performance.now() - bootT0));
|
||||
setTimeout(() => fadeOut(splash), wait);
|
||||
return new Promise(resolve => setTimeout(() => fadeOut(splash, resolve), wait));
|
||||
}
|
||||
|
||||
function showManualSplash() {
|
||||
|
||||
Reference in new issue
Block a user