spr-networks / super

📡 SPR: Open Source, secure, user friendly and fast wifi routers for your home. One wifi password per device. Ad Blocking & Privacy Blocklists. Policy Based Network Access
https://www.supernetworks.org/
BSD 3-Clause "New" or "Revised" License
182 stars 13 forks source link

device expiry time calculation seems broken in UI #282

Closed lts-rad closed 7 months ago

lts-rad commented 8 months ago

@0vercl0k i have not been able to reproduce this yet

lts-rad commented 8 months ago

need to test closer to 0 GMT in case this is a bug with the timeAgo.js package

lts-rad commented 8 months ago

smells like https://github.com/hustcc/timeago.js/issues/222

0vercl0k commented 8 months ago

i'm happy to try to repro again or help in any way :) Give me a shout!

On Thu, Feb 8, 2024 at 10:50 AM Alex Rad @.***> wrote:

smells like hustcc/timeago.js#222 https://github.com/hustcc/timeago.js/issues/222

— Reply to this email directly, view it on GitHub https://github.com/spr-networks/super/issues/282#issuecomment-1934739871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIORPFF27JQXHBGO2L4YLYSUM77AVCNFSM6AAAAABC5BM746VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUG4ZTSOBXGE . You are receiving this because you were mentioned.Message ID: @.***>

lts-rad commented 8 months ago
Expire in ${timeAgo(
    new Date('07 Feb 2024 03:39:31 GMT').toUTCString()
  , 'en_US', {relativeDate: '07 Feb 2024 02:26:31 GMT'})}

correctly reports 1 hour at least

lts-rad commented 8 months ago

seems like the issue is not with the rendering. perhaps a UI state error with inputting the wrong time

0vercl0k commented 8 months ago

I can still repro this on latest flights fwiw

On Thu, Feb 8, 2024 at 12:04 PM Alex Rad @.***> wrote:

seems like the issue is not with the rendering. perhaps a UI state error with inputting the wrong time

— Reply to this email directly, view it on GitHub https://github.com/spr-networks/super/issues/282#issuecomment-1934850596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIOROJ5MFVOEJMBPIXHBLYSUVTLAVCNFSM6AAAAABC5BM746VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUHA2TANJZGY . You are receiving this because you were mentioned.Message ID: @.***>

lts-po commented 8 months ago

@0vercl0k think its related to editing a pending device, does it work ok when editing a device that is not pending / after its auth'd? pushing a fix that will handle this for pending devices

0vercl0k commented 8 months ago

I've just tried it out - it seems the UI behaves the same way if I connect a device "Expire in 8 minute ago". But the device actually doesn't seem to be auto removed so maybe it's just a UI display issue?

On Fri, Feb 9, 2024 at 4:19 AM lts-po @.***> wrote:

@0vercl0k https://github.com/0vercl0k think its related to editing a pending device, does it work ok when editing a device that is not pending / after its auth'd? pushing a fix that will handle this for pending devices

— Reply to this email directly, view it on GitHub https://github.com/spr-networks/super/issues/282#issuecomment-1935830703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALIORJYVTXYMGDZ55DKIULYSYH6FAVCNFSM6AAAAABC5BM746VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZVHAZTANZQGM . You are receiving this because you were mentioned.Message ID: @.***>