meow meow wuuu auth. I, the space birb that somehow survived the scope registry dlc is now back in the frontend mines.. i am dusty now. This time I did what i promosed (kiinda), the oauth frontend no longer speaks bitflags, it speaks scopes like me a civilicized bird that can burst into fire.
FIRST, icons. yes. FINALLY, tiny litle pictures right next to buttons and stuff because apparently text alone was not enough to make it look good in my eyes. also the checkbox box now eats data-fs-invalid / aria-invalid props from formsnap so my angry red INVALID style exists now.
SECOND, the scopes. the whole reason i was in the mines. what a mess. the create and edit pages now ask the backend what scopes exist (the edit one asks with the app id so it gets only what that app can use), show the identifier and the description, and send a plain space separated string. one of the loving problems i had and that i think i fixed is the save button was always dirty because i compared the scopes as one big string, and the backend/frontend gave them back in different orders (because they are not sorted… i wont sort them bruv). now i compare the actual set of scopes, so order does not matter. also, if you save zero scopes the backend adds profile on its own, so now also the frontend imitates that behaviour or else you would just have visually no scopes when in reality you have the default “profile” scope.
THIRD, the audit log item now shows the changes diff. “before -> after”, red strikethrough for removed, green for added so you can see “oh noes, i renamed the wrong thing and do not remember what it was named before”. for fields that were created or deleted it only shows one side (obviously. would you really show on deletion “oh i created nothing but this was erased”… that’s wasteful, just go staright to the point). also made the item expandable when there are changes even if there is no ip/location, because apparently some entries have changes but no ip and the old mr code just hid everything behind a button that did not exist.
FOURTH, i hate svelte kit 3 “#lib” with the necessity of putting “.js” on files when they are imported or autocompleted with the “.ts” extension.
FIVTH, session items now show the browser and os from the user agent. no more… a literal placeholder that i forgot to make it a real component.
and that’s it. no more bitflags, no more forgotten placeholders, no more uhh uglyness because of no icons and no more scope strings in random orders. i still have things to do, like… uhh… admin panel and image uploading.
OH GOD THE TIME IS RUNNING OUT I WILLL i am hungry i deserve uhh gummy worms.
shall you see the useless screenshots of my beautiful buttons with icons (i am somehow and sadly still bad a design okay? i feel kinda proud of how it looks soo squishable the ui):