feat: Implement session management

This commit is contained in:
Prad Nukala 2024-10-01 17:02:54 -04:00
parent 23588cc7ff
commit 0451c30d6e
4 changed files with 33 additions and 49 deletions

View File

@ -22,24 +22,24 @@ jobs:
- name: Run tests
run: make test
check-protos:
name: "Check Protobuf Breaking Changes"
check-proto-changes:
name: "Check Proto Changes"
runs-on: ubuntu-latest
continue-on-error: true
outputs:
has_breaking_changes: ${{ steps.check_breaking.outputs.has_breaking_changes }}
proto_changed: ${{ steps.check_proto.outputs.proto_changed }}
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
- id: check_breaking
uses: bufbuild/buf-breaking-action@v1
with:
against: "https://github.com/onsonr/sonr.git#branch=master"
- name: Set output
run: echo "has_breaking_changes=${{ steps.check_breaking.outcome == 'failure' }}" >> $GITHUB_OUTPUT
fetch-depth: 0
- name: Check for changes in proto directory
id: check_proto
run: |
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^proto/' && \
echo "proto_changed=true" >> $GITHUB_OUTPUT || \
echo "proto_changed=false" >> $GITHUB_OUTPUT
bump-version:
needs: [run-tests, check-protos]
needs: [run-tests, check-proto-changes]
runs-on: ubuntu-latest
name: "Bump Version"
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
@ -52,4 +52,4 @@ jobs:
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
increment: ${{ needs.check-protos.outputs.has_breaking_changes == 'true' && 'MINOR' || 'PATCH' }}
increment: ${{ needs.check-proto-changes.outputs.proto_changed == 'true' && 'MINOR' || 'PATCH' }}

View File

@ -1,39 +1,3 @@
## v0.4.1 (2024-10-01)
### Feat
- allow manual release triggers
- add Input and RegistrationForm models
- add new utility classes
- add login and registration pages
- add tailwindcss utilities
- add support for ARM64 architecture
- add DWN resolver field
- add stats section to homepage
- implement hero section using Pkl
- add PKL schema for message formats
- add Homebrew tap for sonr
- update release workflow to use latest tag
### Fix
- update release workflow to use latest tag
- **versioning**: revert version to 0.9.0
- **cta**: Fix typo in CTA title
- change bento section title to reflect security focus
- adjust hero image dimensions
- **Input**: Change type from to
- update hero image height in config.pkl
### Refactor
- move home page sections to home package
- rename motrd to motr
- update hero image dimensions
- move nebula configuration to static file
- rename buf-publish.yml to publish-assets.yml
- remove unused field from
## v0.4.0 (2024-09-30)
### Feat

View File

@ -25,7 +25,7 @@ templ SectionHero(hero *models.Hero) {
</p>
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
<div>
<a class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href={ templ.SafeURL(hero.PrimaryButton.Href) }>{ hero.PrimaryButton.Text }</a>
<div class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" hx-get={ hero.PrimaryButton.Href }>{ hero.PrimaryButton.Text }</div>
</div>
<div>
<a class="btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" href={ templ.SafeURL(hero.SecondaryButton.Href) }>{ hero.SecondaryButton.Text }</a>

View File

@ -270,6 +270,26 @@ class Profile {
updatedAt: String?
}
class Session {
@PrimaryKey
id: String
@JsonField
subject: String
@JsonField
controller: Bech32
@JsonField
origin: String
@JsonField
createdAt: String?
@JsonField
updatedAt: String?
}
db_name: String = "vault"
db_version: Int = 1