ci/woodpecker/push/woodpecker Pipeline was successfulDetails
ci/woodpecker/pr/woodpecker Pipeline was successfulDetails
cleanup code and move parts to ui.ts and notes.ts.
simplify view and fix some weird animation issue, it should run
pretty stable now.
updated color and spacings.
profile view now showing kind 0 name, but it is unnecessarily
re-rendering. this part should probably go to a custom profil
subscription callback in the future. keeping as is for now and
refactor later.
settings view and write new message didnt show. reason was typescript
expected an instance of an HTMLElement but this didnt allow for
SVG elements inside the write button. Another reason was that the
condition expected a parent with data-id which isn't the case for
settings button nor write-new-message.
starting to move global application user config to settings.ts.
plan is to only share user settings via the config object, with
this all settings related ui can be moved out of main.js into its
own module.
use attributes of html element type.
so that the following example is correctly typed:
elem('input', {
className: 'foo',
hidden: false,
onclick: () => alert('hi'),
tabIndex: 1,
valueAsNumber: 1,
});
but this fails as foo is no valid attribute on div element:
elem('div', {foo: 'bar'});
typed elem so that it returns the exact type of the HTMLElement,
and that name must be a key of HTMLElementTagNameMap.
example:
elem('form'); // returns HTMLFormElement
elem('abc'); // not assignable to parameter of type 'keyof HTMLElementTagNameMap'
convert pubkey to npub and event id to note and store for
later. use npub and note for uri's so that we dont need to
guess what the view of a specific uri has to render.
this is only the first step that changes uri's, next step is
for the view to react to npub or note and render the
correct view accordingly.
move and typed relay related code to relays.ts
upgrade nostr-tools to latest greatest, major version with
breaking changes:
- relayPool is gone in favor of SimplePool, but this commit just
used relayInit directly as relays should become configurable at
some point
proof of concept to use generic view containers instead of specifc
functions to show and hide particular views.
a view has an identifier (path) which is used to subscribe to
relevant data. changing a view updates the history so that browser
back displays the last view. each view container has its own
scrollbar so that the scrolling position should be preserved when
changing back and forth between different views.
this change also removes CSS tabs in favor of view or overlays
such settings or write a new text note.
profile and notes deeplink use now native HTML anchors to improve
accessibility (copy/paste, open-in-new-tab, search engines).