Took a bit longer than I thought to finish shaving some other yaks and get back to directly working on this project. I'm happy to report I was able to figure out enough about menus to allow for the creation of new objects! It's still very much a work in progress, and I need to add some client-side data validations (if you build a new object and don't give it a name, that should present an error on the client side, rather than trying to push a nameless object and making the management hand me an error), but it's functional for all of the types I have detail views for.

The disabled entries in the menu are items I don't have a good detail view for yet. The issue is mostly that I don't yet know how I'm going to handle editing references from one object to another. I have some ideas, but other things have been higher priority.
So to recap, I now have:
- Object and rule download
- Object detail view and editing
- Creating new objects
- Drag-and-drop from object list into rules and from rule field to rule field for sources, destinations, and services
- Publishing and discarding sessions
The first three are subject to some limitations (as I said, I don't yet have good detail views for some object types, and I use the detail view for editing, and editing for creating new objects), but they work in general.
I do not yet have:
- Search for objects or rules
- Deleting objects
- Adding rules or sections
- Rearranging rules or sections
- Editing rule fields other than source, destination, and service
- Deleting rules or sections
- Any sort of view of progress for in-flight tasks
- Any sort of change counter to let you know how many things you are about to publish or discard
- Adding new policy packages or access layers
- Editing policy packages or access layers
- Deleting policy packages or access layers
- Pushing policy
- Anything to do with Threat Prevention
- Anything to do with logs
The client as it stands today is 1.3 MB zipped, 6.2 MB ready to run, built for both amd64 and aarch64. It's 6933 lines as written, 6127 if I remove blank lines and block comments. Shockingly (to me, anyway), 792 of those lines are just a single closing brace.
I'm finding I really like Swift's trailing closure syntax, and inline closures in general. The ability to do `let objectName = { <some tiny function here> }(<arguments>)`is pretty slick, as is the ability to add getter and setter methods and property observers to any property:
Code:
var someValue: Int = 0 {
get { ... },
willSet(newValue) { ... },
set(newValue) { ... },
didSet { ... }
}
Objective-C selectors (needed for double-click, menus, and more) are currently kind of painful for me, but I think I'm starting to understand how they actually work.
Bookmarks