Commit graph

81 commits

Author SHA1 Message Date
Zed A. Shaw
b0ba0c7e16 Started the insert page but need to take a break to do the final part. 2025-07-27 03:00:21 -04:00
Zed A. Shaw
ea3b59129f We have delete now. Last thing is insert. 2025-07-27 02:38:08 -04:00
Zed A. Shaw
504433502a Now we have a working version without any JS. Way easier to do because javascript form submit blows hot wads. 2025-07-27 01:44:45 -04:00
Zed A. Shaw
3fd8169d83 First stab at a form submit off an alpine.js form. Honestly not great. It's a lot of code already for even less functionality. 2025-07-27 00:29:27 -04:00
Zed A. Shaw
e4153fd74a Created a common.Page function that returns a function to render a page from a view. 2025-07-26 22:44:09 -04:00
Zed A. Shaw
1bd733c328 Created a common.Page function that returns a function to render a page from a view. 2025-07-26 22:43:59 -04:00
Zed A. Shaw
ec7298cce0 Refactor everything that's used all over into a common/ package and sync files from static/ into public/ so that public's not in the git. 2025-07-25 11:35:04 -04:00
Zed A. Shaw
d12817f4cc I can now list the contents of a table and display a form for one row to update/delete, but haven't implemented update and delete. 2025-07-17 01:20:25 -04:00
Zed A. Shaw
2b40d6fdc3 Have a few of the basic admin pages working after switching to the API+View pattern. 2025-07-16 01:06:14 -04:00
Zed A. Shaw
fa7f886a59 Now have a simple table list index and a table view, but the templates aren't good enough to easily use the Go reflect data. Will find one tomorrow that's better. 2025-07-15 01:36:24 -04:00
Zed A. Shaw
d481c260c5 Forgot that squirrel needs the =? on Where so switched to using sq.Eq all the time. 2025-07-15 00:10:58 -04:00
Zed A. Shaw
d59e29fdc1 Now can select by pages and added Insert which I forgot. 2025-07-14 23:31:09 -04:00
Zed A. Shaw
aa3afa0d21 Have the full CURD operations going, but need pagination. 2025-07-14 14:29:14 -04:00
Zed A. Shaw
59a71534ae Finally figured out how to get sqlx to query an object based on a reflect.Type. 2025-07-14 00:52:10 -04:00
Zed A. Shaw
859e3ad0e3 Initial setup of an admin page that dynamically reflects the DB to create the CRUD stuff. 2025-07-13 12:28:03 -04:00
Zed A. Shaw
02910b8b93 Start the admin panels. 2025-07-13 10:42:15 -04:00
Zed A. Shaw
736095a5aa Nicer testing setup with my own interface and methods that abstract away the weird browser API. 2025-07-11 14:34:47 -04:00
Zed A. Shaw
77e4c3fa5b I can use the isdefault validator to make sure that a form field doesn't set a data field, but that may not be the best way. 2025-07-11 12:10:45 -04:00
Zed A. Shaw
de24d64f44 Use http_url in Validator instead of url or else people can inject JavaScript. 2025-07-11 11:11:44 -04:00
Zed A. Shaw
a3d4a3dc70 Make a little not to use a fake email. 2025-07-10 22:37:32 -04:00
Zed A. Shaw
ecc264db8c Now easier to write tests for the app, and most pages are at least touched. 2025-07-10 13:06:19 -04:00
Zed A. Shaw
d095bc9ff4 Now can alternatively generate a static page for a URL from pages, or dynamically return it with c.Render from views. Did this for games and streams. 2025-07-10 11:46:56 -04:00
Zed A. Shaw
cb537328ff Small config and my own little lib. 2025-07-10 10:18:43 -04:00
Zed A. Shaw
a2adf8ad67 Need to get rid of public. 2025-07-06 01:00:15 -04:00
Zed A. Shaw
d9a4c226de No need to auth getting a list of streams, that's public. 2025-07-06 01:00:01 -04:00
Zed A. Shaw
3c9a624d66 Tracking a possible corruption but that is _overwriting my damn templates with garbage._ 2025-07-06 00:59:33 -04:00
Zed A. Shaw
7e1a7eb7b4 Ignore the config but have an example. 2025-07-06 00:39:12 -04:00
Zed A. Shaw
929f755661 Example config file. 2025-07-06 00:38:35 -04:00
Zed A. Shaw
3bd8d38847 Managed to get a simple and NOT SECURE login system going. 2025-07-06 00:38:01 -04:00
Zed A. Shaw
75b1eb1edb Public update, these need to be ignored. 2025-07-06 00:37:28 -04:00
Zed A. Shaw
23bda88b29 Had to make the tests pass for the new page gen. 2025-07-05 22:19:44 -04:00
Zed A. Shaw
c64874cb51 Can now generate a lot of the static content from templates in pages/ WARNING: I kept seeing page _templates_ getting corrupted on rendering, which is no bueno. 2025-07-04 23:59:25 -04:00
Zed A. Shaw
7e48768e36 Just confirming that pages are not getting mangles. 2025-07-04 23:22:01 -04:00
Zed A. Shaw
9961915c8c Used the new sitebuild tool to generate stuff. 2025-07-04 14:36:24 -04:00
Zed A. Shaw
49dc8cf330 Needs to be in a dir. 2025-07-04 13:03:44 -04:00
Zed A. Shaw
3939a54513 Testing out the tools/cmd pattern with go get tool 2025-07-04 13:01:12 -04:00
Zed A. Shaw
f476605ecf Came up with the pages/ directory that's templates which are rendered into public for the static pages. 2025-07-04 11:31:15 -04:00
Zed A. Shaw
facc691343 Hot garbage but that's the idea. It will render only one page. 2025-07-04 00:43:19 -04:00
Zed A. Shaw
b9d5dbb2e9 Tinkering with how to do a 'check view, then static' style of templates, but maybe I need to do a generator? 2025-06-29 22:47:03 -04:00
Zed A. Shaw
abc9fbda2e Add a registration page. 2025-06-29 13:51:02 -04:00
Zed A. Shaw
014611a901 Make the register/login pages link to eachother. 2025-06-29 13:42:09 -04:00
Zed A. Shaw
07ff0e6a97 Tell air to not watch public, then tell Fiber to not cache public so I can reload it. 2025-06-29 13:41:48 -04:00
Zed A. Shaw
63fdc06438 Use TestMain to setup the database and shut it down after. 2025-06-29 13:33:53 -04:00
Zed A. Shaw
35d1b06a79 Test can now register a user and log in. 2025-06-29 13:30:40 -04:00
Zed A. Shaw
a22682878c Rename Insert to Exec since it mostly just does that. 2025-06-29 13:30:24 -04:00
Zed A. Shaw
45c541ee7c User registration now works. 2025-06-27 12:37:07 -04:00
Zed A. Shaw
eaaf309260 Now have a basic auth library for doing bcrypt auth. 2025-06-27 12:02:05 -04:00
Zed A. Shaw
b0c4144987 Can now set an auth cookie to check for auth, but I should see what it takes to make a middleware. 2025-06-26 16:50:22 -04:00
Zed A. Shaw
05788e5fbb Very simple dumb login that has no password hashing. 2025-06-25 01:25:00 -04:00
Zed A. Shaw
57d892e35c Panic handler didn't actually work. 2025-06-25 00:00:37 -04:00