profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/AlexxNB/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Alexey Schebelev AlexxNB Independent Developer Russia, Petrozavodsk

AlexxNB/derver 18

Tiny Development Server for your web-applications with livereload and watchers

AlexxNB/caprover-action 13

Action to deploy on Caprover server.

AlexxNB/highlightjs-svelte 13

Svelte Language Definition for Highlight.js

AlexxNB/storik 13

Tiny store with subscription

AlexxNB/aovi 11

AOVI is a tiny dependency free library to validate values in declarative way.

AlexxNB/aovi-svelte 10

Easy using Aovi in your Svelte apps

AlexxNB/mdi-svelte 9

Svelte component for Material Design Icons

AlexxNB/rollup-plugin-svg-icons 9

Rollup plugin for bundling all svg icons from the speciefed folder to the single spritesheet svg file.

AlexxNB/storxy 5

Stupid simple state manager based on proxies

AlexxNB/doconv 4

Document converting service with simple HTTP API packed in Docker image

issue commentAlexxNB/tinro

Could be a possible to add navigation/links toggle?

I got this idea but it doesn't solve a problem in all cases. Creator of widget may not know which id will have a container for widget. Or there may be two or more widgets on a page with independent links and routes.

Best solution is to have a reference for the root element(to check if the link is its child) right in Svelte context, but I don't know a way to get it.

Right now, best solution seems to turn off handling of all links on a page, except ones marked by creator in the widget.

croban

comment created time in 3 days

issue commentAlexxNB/tinro

$router.from is inaccurate when clicking browser back button

Thanks, I'll check this

jamauro

comment created time in 3 days

push eventAlexxNB/malinajs-router

AlexxNB

commit sha 156fd56d52ba42a28cd265de372349baa3799c73

fix: Nonexact route matching was wrong

view details

AlexxNB

commit sha 7dff0c896338395ca7b91c5619a858e9afca6be4

0.1.5

view details

push time in 3 days

issue commentAlexxNB/tinro

Could be a possible to add navigation/links toggle?

Globally turn off links handling except marked ones? Something like this:

<script>
   import {router} from 'tinro';
   router.handleLinks(false);
</script>

<a href="/foo/bar">Won't be handled by tinro</a>
<a href="/bar/foo" tinro>Will be handled by tinro</a>
croban

comment created time in 4 days

issue commentAlexxNB/tinro

Make history state oush/replace configureable

Hello, it is undocumented feature, but router's method go may get second bool parameter - when it is true - history's state will be raplces or pushed otherwise.

router.go('/foo/bar',true); // History will be replaced
router.go('/foo/bar'); History will be added

I will document this and add attribute for links to control this behaviour.

micschwarz

comment created time in 4 days

PR closed AlexxNB/tinro

Fix typo in COMPARE.md
+3 -3

1 comment

1 changed file

sevensidedmarble

pr closed time in 14 days

pull request commentAlexxNB/tinro

Fix typo in COMPARE.md

Thanks. This file is autogenerated on build. So I fix it in the script (65ca1beeb38c131e83bedeff1869d7a52039ee98).

sevensidedmarble

comment created time in 14 days

push eventAlexxNB/tinro

AlexxNB

commit sha 65ca1beeb38c131e83bedeff1869d7a52039ee98

docs: :memo: Fix typo Thx to @sevensidedmarble for its PR

view details

AlexxNB

commit sha 35408142fc0a2f10ae0f1fcd1e1ef8f4e1571963

Merge branch 'master' of github.com:AlexxNB/tinro

view details

push time in 14 days

issue commentAlexxNB/tinro

Deploy in subdirectory?

It is impossible to determine that app is under subdirectory when using history API. All routers have config option to set base path.

MoritzStefaner

comment created time in 16 days

issue commentAlexxNB/tinro

Deploy in subdirectory?

Read here https://github.com/AlexxNB/tinro#base-path

MoritzStefaner

comment created time in 16 days

issue commentAlexxNB/tinro

Deploy in subdirectory?

I added method router.base('/app1'); in 0.6.7 to set relative base path in the root component of your app.

MoritzStefaner

comment created time in 16 days

push eventAlexxNB/tinro

AlexxNB

commit sha d63dead7be3a3bae181c51bf2e3df6cc0fecdfe9

feat: Add method to set base path for router resolve #88

view details

AlexxNB

commit sha 68d3e6da3db43dd381dcc9ffaa394ec3f0c5d6de

0.6.7

view details

push time in 16 days

issue closedAlexxNB/tinro

Deploy in subdirectory?

Hi,

thanks for this handy router.

I have a scenario where I want to deploy a svelte app in a subdirectory on a server, e.g. example.com/app1/ example.com/app2/.

How would I configure tinro to manage routes only under inside their own path? (e.g. /app1/route1). I tried relative paths, but this didn't seem to trigger the routes.

Thank you for any pointers!

closed time in 16 days

MoritzStefaner

issue commentAlexxNB/tinro

Deploy in subdirectory?

Right now it should work if you will use full path in links and Routes:

<a href="/app1/route1">Route1</a>
<a href="/app1/route2">Route2</a>

<Route path="/app1/*>
    <Route path="/route1>This is route #1</Route>
    <Route path="/route2>This is route #2</Route>
</Route>

Course you can use constant to define base:

<script>
   import {BASE} from './my_constants.js'; // BASE='/app1';
</script>

<a href="{BASE}/route1">Route1</a>
<a href="{BASE}/route2">Route2</a>

<Route path="{BASE}/*>
    <Route path="/route1>This is route #1</Route>
    <Route path="/route2>This is route #2</Route>
</Route>

But I'll try to implement more explicit base defining. It will be something like this in near future:

<script>
   import {router} from 'tinro';
   router.setBase('app1');
</script>

<a href="/route1">Route1</a>
<a href="/route2">Route2</a>

<Route>
    <Route path="/route1>This is route #1</Route>
    <Route path="/route2>This is route #2</Route>
</Route>
MoritzStefaner

comment created time in 17 days

push eventAlexxNB/derver

AlexxNB

commit sha 6883c207d93c82638000a73f3696d23e5bb88a44

feat: Add options to prevent console trashing

view details

AlexxNB

commit sha c507bdc8b74c33017b26d7a6cadfcc1ebf174137

0.4.19

view details

AlexxNB

commit sha 3779af128dd0a67bf42ec5926834ba2afbc04159

Merge branch 'main' of github.com:AlexxNB/derver into main

view details

push time in 18 days

push eventAlexxNB/derver

AlexxNB

commit sha 1c3c5bc1a813369fca2338b9398f01e8e9a48bfb

feat: Ability to run only middlewares when dir option is false

view details

AlexxNB

commit sha 4ff59d7228e23e41ee4cd30db2e2fea2905db820

0.4.18

view details

push time in 19 days

push eventAlexxNB/malinajs-router

AlexxNB

commit sha 5aa1acbc483e5050e1585ad2d25b5f8ccf8bf9ce

add variables on slot

view details

AlexxNB

commit sha 56fd4f5a03a0a98b37ff812ff3334427766f4888

0.1.4

view details

push time in 20 days

push eventAlexxNB/malinajs-router

AlexxNB

commit sha a6fd3c3dde12b36e7854b4a7f1d45b86cf8287fa

add missed router export

view details

AlexxNB

commit sha 410fccc914742a746ef6a147cec055daecb8515d

0.1.3

view details

push time in 20 days

issue commentmalinajs/malinajs

Parameters

Sure, last argument is always the serving directory

L-a-c-a

comment created time in 23 days

push eventsveltejs-translations/russian-sites

AlexxNB

commit sha 3899dcaaabe2fba057cca8c787df4a39cdde0047

fix adapter-node installation

view details

push time in 24 days

push eventsveltejs-translations/russian-sites

Alexey Schebelev

commit sha 0abf4fc788680a83ef43aa3f9e532d22bbb8f21b

too much

view details

push time in 24 days

push eventsveltejs-translations/russian-sites

Alexey Schebelev

commit sha 73851a9f0739321c6af484389cd51465aab2cc35

install adapter-node

view details

push time in 24 days

issue commentmalinajs/malinajs

Encoding

Do you save component file in UTF-8 encoding? изображение (right bottom corner in VSCode to check)

L-a-c-a

comment created time in a month

issue commentAlexxNB/tinro

Prevent endless redirect

  1. Graph is impossible, because routes are unknown. Tinro knows only opened childs hierarchy.
  2. Size of graph algorithm may increase tinro size more than twice.
  3. Half solution is not a solution.
Prinzhorn

comment created time in a month

issue commentAlexxNB/tinro

Prevent endless redirect

How to detect this case?

<Route path="/bar" redirect="/foo"/>
<Route path="/foo" redirect="/bar"/>
Prinzhorn

comment created time in a month

CommitCommentEvent

issue closedAlexxNB/tinro

Fallback not triggered

So far I'm loving this router, I'm a sucker for declarative code.

When a user is not authenticated, I'm redirecting to /login and pass the page they where on as query param target (should be safe from XSS and open redirect because of pushState).

When an authenticated user hits /login I redirect to query.target or the index page.

But something is broken https://svelte.dev/repl/155bd89d71684fa2a16e1e7fa5ef62d7?version=3.42.1

  1. Hit "Login"
  2. Hit "Logout"
  3. You are in a broken state. $router didn't change. The fallback redirect was not triggered.

I haven't looked at the source at all, I assume <Route> does not properly execute the logic in onMount? In my REPL as soon as you logout this should be triggered <Route fallback redirect="/login?target={encodeURIComponent(meta.url)}" />

closed time in a month

Prinzhorn

issue commentAlexxNB/tinro

Fallback not triggered

closed in bc0c210c6a8d0570d0d5e1ad65feba655c4e5d1a

Prinzhorn

comment created time in a month

issue closedAlexxNB/tinro

Use:active isn't working with query params

Thanks for the router. It's been great.

I'm trying to leverage use:active. When I have query params e.g. /something?q=test, the active class isn't being applied.

Here's a quick example: https://svelte.dev/repl/c1ffe8a68ce941ab93c1ab60e5b329f9?version=3.42.1

I would expect Contacts in the main nav to be bolded. Am I missing something?

closed time in a month

jamauro

issue commentAlexxNB/tinro

Use:active isn't working with query params

closed in ddb222868da9a26376319c835763eab2deb6aa45

jamauro

comment created time in a month