mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7306bf7018 | ||
|
|
07fd9ff0ad | ||
|
|
fc0918c938 | ||
|
|
9f7ae46826 | ||
|
|
b455cf9ff4 | ||
|
|
cd7b30a0e3 | ||
|
|
dfc30b9754 | ||
|
|
78900c0b68 | ||
|
|
468c31a994 | ||
|
|
aca28b1336 | ||
|
|
3b027b836f | ||
|
|
d7d19f4bb7 | ||
|
|
49e56239a5 | ||
|
|
4a76f105af | ||
|
|
9fcdfe5243 | ||
|
|
e764cce90a | ||
|
|
acdd0eae39 | ||
|
|
6e384d5044 |
@@ -10,11 +10,10 @@ exclude_file = []
|
|||||||
exclude_regex = ["_test.go"]
|
exclude_regex = ["_test.go"]
|
||||||
exclude_unchanged = true
|
exclude_unchanged = true
|
||||||
follow_symlink = false
|
follow_symlink = false
|
||||||
full_bin = "make start-proxy"
|
full_bin = "devbox run start"
|
||||||
include_dir = ["cmd/dwn", "cmd/motr", "internal", "models", "pkl"]
|
include_dir = ["cmd/dwn", "cmd/motr", "internal", "models", "pkl"]
|
||||||
include_ext = ["go", "templ", "html", "pkl", "js", "mjs"]
|
include_ext = ["go", "templ", "html", "pkl", "js", "mjs", "proto"]
|
||||||
include_file = [
|
include_file = [
|
||||||
"wrangler.toml",
|
|
||||||
"Dockerfile",
|
"Dockerfile",
|
||||||
".goreleaser.yaml",
|
".goreleaser.yaml",
|
||||||
"go.mod",
|
"go.mod",
|
||||||
@@ -25,7 +24,7 @@ kill_delay = "10s"
|
|||||||
log = "build-errors.log"
|
log = "build-errors.log"
|
||||||
poll = false
|
poll = false
|
||||||
poll_interval = 0
|
poll_interval = 0
|
||||||
post_cmd = []
|
post_cmd = ["devbox run stop"]
|
||||||
pre_cmd = ["templ generate"]
|
pre_cmd = ["templ generate"]
|
||||||
rerun = false
|
rerun = false
|
||||||
rerun_delay = 1000
|
rerun_delay = 1000
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
tag_format = "v$version"
|
tag_format = "v$version"
|
||||||
version_scheme = "semver"
|
version_scheme = "semver"
|
||||||
version = "0.3.0"
|
version = "0.4.0"
|
||||||
update_changelog_on_bump = true
|
update_changelog_on_bump = true
|
||||||
major_version_zero = true
|
major_version_zero = true
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
name: Publish Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
tags:
|
|
||||||
- "v[0-9]+.[0-9]+.[0-9]+" # ignore rc
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
|
||||||
GO_VERSION: 1.22
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out the repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
# all lowercase ghcr registry
|
|
||||||
- run: |
|
|
||||||
DOCKER_REGISTRY=`echo "${{ env.REGISTRY }}/${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
|
|
||||||
echo "DOCKER_REGISTRY=$DOCKER_REGISTRY" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
REPO_NAME=`echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]'`
|
|
||||||
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Parse tag
|
|
||||||
id: tag
|
|
||||||
run: |
|
|
||||||
# v0.0.1
|
|
||||||
VERSION=$(echo ${{ github.ref_name }} | sed "s/v//")
|
|
||||||
# 0.0.1
|
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# build and publish package to ghcr (public) with codebase remaining private
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GH_PAT_TOKEN }}
|
|
||||||
|
|
||||||
# make sure to update package to be public in repo ghcr settings
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: strangelove-ventures/heighliner-build-action@v1.0.0
|
|
||||||
with:
|
|
||||||
# v0.0.1
|
|
||||||
git-ref: ${{ github.ref_name }}
|
|
||||||
chain: ${{ env.REPO_NAME}}
|
|
||||||
dockerfile: cosmos
|
|
||||||
registry: ${{ env.DOCKER_REGISTRY }}
|
|
||||||
build-target: |
|
|
||||||
cd ..
|
|
||||||
make install
|
|
||||||
local: true
|
|
||||||
binaries: |
|
|
||||||
- /go/bin/sonrd
|
|
||||||
build-env: |
|
|
||||||
- BUILD_TAGS=muslc
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
name: "Release Binary"
|
|
||||||
|
|
||||||
# Pairs with .goreleaser.yaml file for configuration.
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
goreleaser:
|
|
||||||
if: false
|
|
||||||
permissions: write-all
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "1.22"
|
|
||||||
check-latest: true
|
|
||||||
|
|
||||||
- name: Clean up dist directory
|
|
||||||
run: rm -rf dist
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
uses: goreleaser/goreleaser-action@v5
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
args: build --skip-validate
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
uses: goreleaser/goreleaser-action@v5
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
args: release --skip-validate --clean
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
name: "Release Binary"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
permissions: write-all
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.22"
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
with:
|
||||||
|
distribution: goreleaser-pro
|
||||||
|
version: latest
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Bump Version
|
name: Bump version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -15,10 +15,6 @@ jobs:
|
|||||||
name: "Run tests"
|
name: "Run tests"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.22"
|
go-version: "1.22"
|
||||||
@@ -31,12 +27,12 @@ jobs:
|
|||||||
if: "!startsWith(github.event.head_commit.message, 'bump:')"
|
if: "!startsWith(github.event.head_commit.message, 'bump:')"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: "Bump Version"
|
name: "Bump Version"
|
||||||
needs: run-tests
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Create bump and changelog
|
- name: Create bump and changelog
|
||||||
uses: commitizen-tools/commitizen-action@master
|
uses: commitizen-tools/commitizen-action@master
|
||||||
with:
|
with:
|
||||||
|
|||||||
+2
-1
@@ -9,6 +9,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.session.vim
|
.session.vim
|
||||||
aof*
|
aof*
|
||||||
|
dist
|
||||||
|
|
||||||
# Test binary
|
# Test binary
|
||||||
*.test
|
*.test
|
||||||
@@ -73,7 +74,7 @@ buildenv*
|
|||||||
nebula/node_modules
|
nebula/node_modules
|
||||||
|
|
||||||
mprocs.yaml
|
mprocs.yaml
|
||||||
|
build
|
||||||
|
|
||||||
!devbox.lock
|
!devbox.lock
|
||||||
!motr/build
|
|
||||||
!buf.lock
|
!buf.lock
|
||||||
|
|||||||
+63
-52
@@ -1,15 +1,7 @@
|
|||||||
project_name: core
|
project_name: sonr
|
||||||
|
|
||||||
release:
|
|
||||||
github:
|
|
||||||
owner: onsonr
|
|
||||||
name: core
|
|
||||||
name_template: "{{.Tag}}"
|
|
||||||
|
|
||||||
# Only uncomment os, arch, and targets if you are NOT using cosmwasm / wasm-light-client.
|
|
||||||
# Windows, 386 (32bit), and ARM are not Wasm compatible.
|
|
||||||
builds:
|
builds:
|
||||||
- id: core
|
- id: sonr
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
- darwin
|
||||||
@@ -22,51 +14,70 @@ builds:
|
|||||||
command: build
|
command: build
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
|
|
||||||
|
- id: motr
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
main: ./cmd/motrd
|
||||||
|
binary: motrd
|
||||||
|
builder: go
|
||||||
|
gobinary: go
|
||||||
|
command: build
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
|
|
||||||
|
- id: dwn
|
||||||
|
goos:
|
||||||
|
- js
|
||||||
|
goarch:
|
||||||
|
- wasm
|
||||||
|
main: ./cmd/dwn/dwn.go
|
||||||
|
binary: dwn
|
||||||
|
builder: go
|
||||||
|
gobinary: go
|
||||||
|
command: build
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- id: default
|
- id: default
|
||||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
builds:
|
||||||
|
- sonr
|
||||||
|
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||||
format: tar.gz
|
format: tar.gz
|
||||||
files:
|
files:
|
||||||
- src: LICENSE*
|
|
||||||
- src: README*
|
- src: README*
|
||||||
- src: CHANGELOG*
|
- src: CHANGELOG*
|
||||||
snapshot:
|
|
||||||
name_template: "{{ .Version }}-SNAPSHOT-{{ .ShortCommit }}"
|
- id: motr
|
||||||
checksum:
|
builds:
|
||||||
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
|
- motr
|
||||||
algorithm: sha256
|
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||||
dist: dist
|
format: tar.gz
|
||||||
env_files:
|
files:
|
||||||
github_token: ~/.config/goreleaser/github_token
|
- src: README*
|
||||||
gitlab_token: ~/.config/goreleaser/gitlab_token
|
- src: CHANGELOG*
|
||||||
gitea_token: ~/.config/goreleaser/gitea_token
|
|
||||||
source:
|
- id: dwn
|
||||||
name_template: "{{ .ProjectName }}-{{ .Version }}"
|
builds:
|
||||||
format: tar.gz
|
- dwn
|
||||||
gomod:
|
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||||
gobinary: go
|
format: zip
|
||||||
announce:
|
files:
|
||||||
twitter:
|
- src: CHANGELOG*
|
||||||
message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"
|
- src: pkl/dwn.pkl
|
||||||
mastodon:
|
|
||||||
message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"
|
release:
|
||||||
server: ""
|
github:
|
||||||
reddit:
|
owner: onsonr
|
||||||
title_template: "{{ .ProjectName }} {{ .Tag }} is out!"
|
name: sonr
|
||||||
url_template: "{{ .ReleaseURL }}"
|
name_template: "{{.Tag}}"
|
||||||
discord:
|
ids:
|
||||||
message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"
|
- default
|
||||||
author: GoReleaser
|
- motr
|
||||||
color: "3888754"
|
- dwn
|
||||||
icon_url: https://goreleaser.com/static/avatar.png
|
draft: false
|
||||||
telegram:
|
replace_existing_draft: true
|
||||||
message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"
|
replace_existing_artifacts: true
|
||||||
webhook:
|
|
||||||
message_template: '{ "message": "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"}'
|
|
||||||
content_type: application/json; charset=utf-8
|
|
||||||
git:
|
|
||||||
tag_sort: -version:refname
|
|
||||||
github_urls:
|
|
||||||
download: https://github.com
|
|
||||||
gitlab_urls:
|
|
||||||
download: https://gitlab.com
|
|
||||||
|
|||||||
+31
-2
@@ -1,3 +1,32 @@
|
|||||||
|
## v0.4.0 (2024-09-30)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- **dwn**: add wasm build for dwn
|
||||||
|
- add macaroon and oracle genesis states
|
||||||
|
- add scheduled binary release workflow
|
||||||
|
- introduce process-compose for process management
|
||||||
|
- add counter animation to hero section
|
||||||
|
- add registration page
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- Enable scheduled release workflow
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- remove old changelog entries
|
||||||
|
- remove unnecessary checkout in scheduled-release workflow
|
||||||
|
- rename build ID to sonr
|
||||||
|
- remove unnecessary release existence check
|
||||||
|
- move dwn wasm build to pkg directory
|
||||||
|
|
||||||
|
## v0.3.1 (2024-09-29)
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- move nebula/pages to pkg/nebula/pages
|
||||||
|
|
||||||
## v0.3.0 (2024-09-29)
|
## v0.3.0 (2024-09-29)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
@@ -105,7 +134,7 @@
|
|||||||
- extract root command creation to separate file
|
- extract root command creation to separate file
|
||||||
- move ipfs setup to function
|
- move ipfs setup to function
|
||||||
- remove unnecessary proxy config
|
- remove unnecessary proxy config
|
||||||
- rename script to
|
- rename script to
|
||||||
- move DWN proxy server logic to separate file
|
- move DWN proxy server logic to separate file
|
||||||
- use htmx instead of dwn for vault client
|
- use htmx instead of dwn for vault client
|
||||||
- remove unused environment variables
|
- remove unused environment variables
|
||||||
@@ -113,7 +142,7 @@
|
|||||||
- use staking keeper in DID keeper
|
- use staking keeper in DID keeper
|
||||||
- remove unused dependencies
|
- remove unused dependencies
|
||||||
- remove unused image building workflow
|
- remove unused image building workflow
|
||||||
- add field to
|
- add field to
|
||||||
- Update KeyKind Enum to have proper naming conventions
|
- Update KeyKind Enum to have proper naming conventions
|
||||||
- Update `DIDNamespace` to have proper naming convention
|
- Update `DIDNamespace` to have proper naming convention
|
||||||
- expose ports directly in docker-compose
|
- expose ports directly in docker-compose
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ endif
|
|||||||
|
|
||||||
install: go.sum
|
install: go.sum
|
||||||
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd
|
||||||
|
go install -mod=readonly $(BUILD_FLAGS) ./cmd/motrd
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
### Tools & dependencies
|
### Tools & dependencies
|
||||||
@@ -298,11 +299,11 @@ sh-testnet: mod-tidy
|
|||||||
|
|
||||||
motr:
|
motr:
|
||||||
@echo "(motr) Building motr gateway"
|
@echo "(motr) Building motr gateway"
|
||||||
go build -o ./build/motr ./cmd/motr
|
go build -o ./build/motrd ./cmd/motrd
|
||||||
|
|
||||||
dwn:
|
dwn:
|
||||||
@echo "(dwn) Building dwn.wasm -> IPFS Vault"
|
@echo "(dwn) Building dwn.wasm -> IPFS Vault"
|
||||||
GOOS=js GOARCH=wasm go build -o ./x/vault/types/internal/app.wasm ./x/vault/client/dwn/dwn.go
|
GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/dwn/dwn.go
|
||||||
|
|
||||||
templ:
|
templ:
|
||||||
@echo "(templ) Generating templ files"
|
@echo "(templ) Generating templ files"
|
||||||
@@ -324,7 +325,7 @@ start-caddy:
|
|||||||
|
|
||||||
start-motr: motr
|
start-motr: motr
|
||||||
@echo "(start-proxy) Starting proxy server"
|
@echo "(start-proxy) Starting proxy server"
|
||||||
./build/motr proxy
|
./build/motrd proxy
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### help ###
|
### help ###
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ import (
|
|||||||
|
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
promise "github.com/nlepage/go-js-promise"
|
promise "github.com/nlepage/go-js-promise"
|
||||||
"github.com/onsonr/sonr/nebula/pages"
|
|
||||||
"github.com/onsonr/sonr/x/vault/client/dwn/middleware"
|
"github.com/onsonr/sonr/cmd/dwn/middleware"
|
||||||
"github.com/onsonr/sonr/x/vault/client/dwn/state"
|
"github.com/onsonr/sonr/cmd/dwn/state"
|
||||||
|
"github.com/onsonr/sonr/pkg/nebula/pages"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
+18
-31
@@ -2,10 +2,12 @@
|
|||||||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
|
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
|
||||||
"packages": [
|
"packages": [
|
||||||
"go@1.22",
|
"go@1.22",
|
||||||
|
"air@latest",
|
||||||
"bun@latest",
|
"bun@latest",
|
||||||
"ipfs@latest",
|
"ipfs@latest",
|
||||||
"skate@latest",
|
"skate@latest",
|
||||||
"cloudflared@latest"
|
"cloudflared@latest",
|
||||||
|
"process-compose@latest"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"GOPATH": "$HOME/go",
|
"GOPATH": "$HOME/go",
|
||||||
@@ -26,36 +28,21 @@
|
|||||||
},
|
},
|
||||||
"shell": {
|
"shell": {
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:docker": [
|
"dev": ["air"],
|
||||||
"make local-image"
|
"build:docker": ["make local-image"],
|
||||||
],
|
"build:motr": ["make nebula", "make motr"],
|
||||||
"build:motr": [
|
"build:sonrd": ["make dwn", "make build"],
|
||||||
"make nebula",
|
"build": ["make dwn", "make build", "make motr"],
|
||||||
"make motr"
|
"gen:proto": ["make proto-gen"],
|
||||||
],
|
"gen:pkl": ["make pkl"],
|
||||||
"build:sonrd": [
|
"gen:templ": ["make templ"],
|
||||||
"make dwn",
|
"start:motr": ["make templ", "make motr", "make start-motr"],
|
||||||
"make build"
|
"start:testnet": ["make templ", "make install", "make sh-testnet"],
|
||||||
],
|
"start": ["process-compose up -d"],
|
||||||
"gen:proto": [
|
"stop": ["process-compose down"],
|
||||||
"make proto-gen"
|
"test:e2e": ["make templ", "make test-e2e"],
|
||||||
],
|
"test:unit": ["make templ", "make test-unit"],
|
||||||
"gen:pkl": [
|
"test": ["make templ", "make test"]
|
||||||
"make pkl"
|
|
||||||
],
|
|
||||||
"gen:templ": [
|
|
||||||
"make templ"
|
|
||||||
],
|
|
||||||
"start:motr": [
|
|
||||||
"make templ",
|
|
||||||
"make motr",
|
|
||||||
"make start-motr"
|
|
||||||
],
|
|
||||||
"start:testnet": [
|
|
||||||
"make templ",
|
|
||||||
"make install",
|
|
||||||
"make sh-testnet"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+96
@@ -1,6 +1,54 @@
|
|||||||
{
|
{
|
||||||
"lockfile_version": "1",
|
"lockfile_version": "1",
|
||||||
"packages": {
|
"packages": {
|
||||||
|
"air@latest": {
|
||||||
|
"last_modified": "2024-09-10T15:01:03Z",
|
||||||
|
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#air",
|
||||||
|
"source": "devbox-search",
|
||||||
|
"version": "1.52.3",
|
||||||
|
"systems": {
|
||||||
|
"aarch64-darwin": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/bfwl7myqmaqh2xxw5fla1kmnv89qjxz6-air-1.52.3",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/bfwl7myqmaqh2xxw5fla1kmnv89qjxz6-air-1.52.3"
|
||||||
|
},
|
||||||
|
"aarch64-linux": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/ac18dzvchpv0pzi6qvdjs01cffw4q6zf-air-1.52.3",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/ac18dzvchpv0pzi6qvdjs01cffw4q6zf-air-1.52.3"
|
||||||
|
},
|
||||||
|
"x86_64-darwin": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/jzdcmkyh258nf3j8lhfmg8n959ffvg13-air-1.52.3",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/jzdcmkyh258nf3j8lhfmg8n959ffvg13-air-1.52.3"
|
||||||
|
},
|
||||||
|
"x86_64-linux": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/rnny9fd1r9zdln6g6h7md4fpi6jgx229-air-1.52.3",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/rnny9fd1r9zdln6g6h7md4fpi6jgx229-air-1.52.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"bun@latest": {
|
"bun@latest": {
|
||||||
"last_modified": "2024-09-20T22:35:44Z",
|
"last_modified": "2024-09-20T22:35:44Z",
|
||||||
"resolved": "github:NixOS/nixpkgs/a1d92660c6b3b7c26fb883500a80ea9d33321be2#bun",
|
"resolved": "github:NixOS/nixpkgs/a1d92660c6b3b7c26fb883500a80ea9d33321be2#bun",
|
||||||
@@ -151,6 +199,54 @@
|
|||||||
"source": "devbox-search",
|
"source": "devbox-search",
|
||||||
"version": "0.17.0"
|
"version": "0.17.0"
|
||||||
},
|
},
|
||||||
|
"process-compose@latest": {
|
||||||
|
"last_modified": "2024-09-15T21:49:16Z",
|
||||||
|
"resolved": "github:NixOS/nixpkgs/039b72d0c738c934e2e36d7fc5520d1b425287a6#process-compose",
|
||||||
|
"source": "devbox-search",
|
||||||
|
"version": "1.27.0",
|
||||||
|
"systems": {
|
||||||
|
"aarch64-darwin": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/dxgk503lw2a0slqcvhcvwfa07qf9y8sx-process-compose-1.27.0",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/dxgk503lw2a0slqcvhcvwfa07qf9y8sx-process-compose-1.27.0"
|
||||||
|
},
|
||||||
|
"aarch64-linux": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/k6xl3mdb8f0fkv7q4ibw8smak6lxrb93-process-compose-1.27.0",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/k6xl3mdb8f0fkv7q4ibw8smak6lxrb93-process-compose-1.27.0"
|
||||||
|
},
|
||||||
|
"x86_64-darwin": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/5zyqg2yf0cg5nahgpwbkbblgml9nlac0-process-compose-1.27.0",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/5zyqg2yf0cg5nahgpwbkbblgml9nlac0-process-compose-1.27.0"
|
||||||
|
},
|
||||||
|
"x86_64-linux": {
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "out",
|
||||||
|
"path": "/nix/store/3fwnj5jmdky0nl9ixp6bxasvi4ki6jgz-process-compose-1.27.0",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"store_path": "/nix/store/3fwnj5jmdky0nl9ixp6bxasvi4ki6jgz-process-compose-1.27.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"skate@latest": {
|
"skate@latest": {
|
||||||
"last_modified": "2024-09-10T15:01:03Z",
|
"last_modified": "2024-09-10T15:01:03Z",
|
||||||
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#skate",
|
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#skate",
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
package vault
|
package dwn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@@ -8,8 +8,6 @@ import (
|
|||||||
|
|
||||||
"github.com/a-h/templ"
|
"github.com/a-h/templ"
|
||||||
"github.com/ipfs/boxo/files"
|
"github.com/ipfs/boxo/files"
|
||||||
|
|
||||||
"github.com/onsonr/sonr/pkg/dwn"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed app.wasm
|
//go:embed app.wasm
|
||||||
@@ -28,7 +26,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// NewVaultDirectory creates a new directory with the default files
|
// NewVaultDirectory creates a new directory with the default files
|
||||||
func NewVaultDirectory(cnfg *dwn.Config) (files.Node, error) {
|
func NewVaultDirectory(cnfg *Config) (files.Node, error) {
|
||||||
dwnJSON, err := json.Marshal(cnfg)
|
dwnJSON, err := json.Marshal(cnfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -54,7 +52,7 @@ func NewVaultDirectory(cnfg *dwn.Config) (files.Node, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use IndexHTML template to generate the index file
|
// Use IndexHTML template to generate the index file
|
||||||
func IndexHTMLFile(c *dwn.Config) (files.Node, error) {
|
func IndexHTMLFile(c *Config) (files.Node, error) {
|
||||||
str, err := templ.JSONString(c)
|
str, err := templ.JSONString(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -69,7 +67,7 @@ func IndexHTMLFile(c *dwn.Config) (files.Node, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MarshalConfigFile uses the config template to generate the dwn config file
|
// MarshalConfigFile uses the config template to generate the dwn config file
|
||||||
func MarshalConfigFile(c *dwn.Config) (files.Node, error) {
|
func MarshalConfigFile(c *Config) (files.Node, error) {
|
||||||
dwnConfigData, err := json.Marshal(c)
|
dwnConfigData, err := json.Marshal(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package vault
|
package dwn
|
||||||
|
|
||||||
var motrHandle = templ.NewOnceHandle()
|
var motrHandle = templ.NewOnceHandle()
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by templ - DO NOT EDIT.
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
// templ: version: v0.2.778
|
// templ: version: v0.2.778
|
||||||
package vault
|
package dwn
|
||||||
|
|
||||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,11 @@ templ LayoutNoBody(title string, remote bool) {
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
||||||
</head>
|
</head>
|
||||||
<main class="grow">
|
<main class="grow">
|
||||||
{ children... }
|
<body class="font-inter antialiased bg-white text-zinc-900 tracking-tight">
|
||||||
|
<div class="flex flex-col min-h-screen overflow-hidden supports-[overflow:clip]:overflow-clip">
|
||||||
|
{ children... }
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
</main>
|
</main>
|
||||||
</html>
|
</html>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ func LayoutNoBody(title string, remote bool) templ.Component {
|
|||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><main class=\"grow\">")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</title><!-- Sets the status bar style to transparent --><meta name=\"apple-mobile-web-app-capable\" content=\"yes\"><meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\"></head><main class=\"grow\"><body class=\"font-inter antialiased bg-white text-zinc-900 tracking-tight\"><div class=\"flex flex-col min-h-screen overflow-hidden supports-[overflow:clip]:overflow-clip\">")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ func LayoutNoBody(title string, remote bool) templ.Component {
|
|||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></html>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></body></main></html>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package sections
|
|||||||
templ FooterMarketingNav() {
|
templ FooterMarketingNav() {
|
||||||
<!-- Site footer -->
|
<!-- Site footer -->
|
||||||
<footer>
|
<footer>
|
||||||
<div class="max-w-6xl mx-auto px-4 sm:px-6">
|
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
||||||
<!-- Top area: Blocks -->
|
<!-- Top area: Blocks -->
|
||||||
<div class="grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200">
|
<div class="grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200">
|
||||||
<!-- 1st block -->
|
<!-- 1st block -->
|
||||||
@@ -14,7 +14,7 @@ templ FooterMarketingNav() {
|
|||||||
<img src="https://cdn.sonr.id/logo-zinc.svg" width="24" height="24" alt="Logo"/>
|
<img src="https://cdn.sonr.id/logo-zinc.svg" width="24" height="24" alt="Logo"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="grow text-sm text-zinc-500">© Cruip.com. All rights reserved.</div>
|
<div class="grow text-sm text-zinc-500">© diDAO DUNA. All rights reserved.</div>
|
||||||
<!-- Social links -->
|
<!-- Social links -->
|
||||||
<ul class="flex space-x-4 mt-4 mb-1">
|
<ul class="flex space-x-4 mt-4 mb-1">
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func FooterMarketingNav() templ.Component {
|
|||||||
templ_7745c5c3_Var1 = templ.NopComponent
|
templ_7745c5c3_Var1 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site footer --><footer><div class=\"max-w-6xl mx-auto px-4 sm:px-6\"><!-- Top area: Blocks --><div class=\"grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200\"><!-- 1st block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col\"><div class=\"mb-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><div class=\"grow text-sm text-zinc-500\">© Cruip.com. All rights reserved.</div><!-- Social links --><ul class=\"flex space-x-4 mt-4 mb-1\"><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Twitter\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"m7.063 3 3.495 4.475L14.601 3h2.454l-5.359 5.931L18 17h-4.938l-3.866-4.893L4.771 17H2.316l5.735-6.342L2 3h5.063Zm-.74 1.347H4.866l8.875 11.232h1.36L6.323 4.347Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Medium\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1.708 3.791-.858.823a.251.251 0 0 0-.1.241V12.9a.251.251 0 0 0 .1.241l.838.823v.181h-4.215v-.181l.868-.843c.085-.085.085-.11.085-.241V7.993L9.6 14.124h-.329l-2.81-6.13V12.1a.567.567 0 0 0 .156.472l1.129 1.37v.181h-3.2v-.181l1.129-1.37a.547.547 0 0 0 .146-.472V7.351A.416.416 0 0 0 5.683 7l-1-1.209V5.61H7.8l2.4 5.283 2.122-5.283h2.971l-.001.181Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Telegram\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17.968 3.276a.338.338 0 0 0-.232-.253 1.192 1.192 0 0 0-.63.045S3.087 8.106 2.286 8.664c-.172.121-.23.19-.259.272-.138.4.293.573.293.573l3.613 1.177a.388.388 0 0 0 .183-.011c.822-.519 8.27-5.222 8.7-5.38.068-.02.118 0 .1.049-.172.6-6.606 6.319-6.64 6.354a.138.138 0 0 0-.05.118l-.337 3.528s-.142 1.1.956 0a30.66 30.66 0 0 1 1.9-1.738c1.242.858 2.58 1.806 3.156 2.3a1 1 0 0 0 .732.283.825.825 0 0 0 .7-.622S17.894 5.292 17.98 3.909c.008-.135.021-.217.021-.317a1.177 1.177 0 0 0-.032-.316Z\"></path></svg></a></li></ul></div><!-- 2nd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Company</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">About us</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Diversity & Inclusion</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Blog</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Careers</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Financial statements</a></li></ul></div><!-- 3rd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Resources</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Community</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms of service</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Collaboration features</a></li></ul></div><!-- 4th block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Legals</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Refund policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms & Conditions</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Privacy policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Brand Kit</a></li></ul></div></div></div></footer>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site footer --><footer><div class=\"max-w-5xl mx-auto px-4 sm:px-6\"><!-- Top area: Blocks --><div class=\"grid sm:grid-cols-12 gap-8 py-8 md:py-12 border-t border-zinc-200\"><!-- 1st block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-6 max-sm:order-1 flex flex-col\"><div class=\"mb-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><div class=\"grow text-sm text-zinc-500\">© diDAO DUNA. All rights reserved.</div><!-- Social links --><ul class=\"flex space-x-4 mt-4 mb-1\"><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Twitter\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"m7.063 3 3.495 4.475L14.601 3h2.454l-5.359 5.931L18 17h-4.938l-3.866-4.893L4.771 17H2.316l5.735-6.342L2 3h5.063Zm-.74 1.347H4.866l8.875 11.232h1.36L6.323 4.347Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Medium\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17 2H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1Zm-1.708 3.791-.858.823a.251.251 0 0 0-.1.241V12.9a.251.251 0 0 0 .1.241l.838.823v.181h-4.215v-.181l.868-.843c.085-.085.085-.11.085-.241V7.993L9.6 14.124h-.329l-2.81-6.13V12.1a.567.567 0 0 0 .156.472l1.129 1.37v.181h-3.2v-.181l1.129-1.37a.547.547 0 0 0 .146-.472V7.351A.416.416 0 0 0 5.683 7l-1-1.209V5.61H7.8l2.4 5.283 2.122-5.283h2.971l-.001.181Z\"></path></svg></a></li><li><a class=\"flex justify-center items-center text-zinc-700 hover:text-zinc-900 transition\" href=\"#0\" aria-label=\"Telegram\"><svg class=\"fill-current\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17.968 3.276a.338.338 0 0 0-.232-.253 1.192 1.192 0 0 0-.63.045S3.087 8.106 2.286 8.664c-.172.121-.23.19-.259.272-.138.4.293.573.293.573l3.613 1.177a.388.388 0 0 0 .183-.011c.822-.519 8.27-5.222 8.7-5.38.068-.02.118 0 .1.049-.172.6-6.606 6.319-6.64 6.354a.138.138 0 0 0-.05.118l-.337 3.528s-.142 1.1.956 0a30.66 30.66 0 0 1 1.9-1.738c1.242.858 2.58 1.806 3.156 2.3a1 1 0 0 0 .732.283.825.825 0 0 0 .7-.622S17.894 5.292 17.98 3.909c.008-.135.021-.217.021-.317a1.177 1.177 0 0 0-.032-.316Z\"></path></svg></a></li></ul></div><!-- 2nd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Company</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">About us</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Diversity & Inclusion</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Blog</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Careers</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Financial statements</a></li></ul></div><!-- 3rd block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Resources</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Community</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms of service</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Collaboration features</a></li></ul></div><!-- 4th block --><div class=\"sm:col-span-6 md:col-span-3 lg:col-span-2\"><h6 class=\"text-sm text-zinc-800 font-medium mb-2\">Legals</h6><ul class=\"text-sm space-y-2\"><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Refund policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Terms & Conditions</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Privacy policy</a></li><li><a class=\"text-zinc-500 hover:text-zinc-900 transition\" href=\"#0\">Brand Kit</a></li></ul></div></div></div></footer>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ templ HeaderMarketingNav() {
|
|||||||
<!-- Desktop sign in links -->
|
<!-- Desktop sign in links -->
|
||||||
<ul class="flex grow justify-end flex-wrap items-center">
|
<ul class="flex grow justify-end flex-wrap items-center">
|
||||||
<li>
|
<li>
|
||||||
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition" href="login.html">Log in</a>
|
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition" href="/login">Log in</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="ml-1">
|
<li class="ml-1">
|
||||||
<a class="btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href="request-demo.html">Request Demo</a>
|
<a class="btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href="/register">Register</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func HeaderMarketingNav() templ.Component {
|
|||||||
templ_7745c5c3_Var1 = templ.NopComponent
|
templ_7745c5c3_Var1 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site header --><header class=\"absolute top-2 md:top-6 w-full z-30\"><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"flex items-center justify-between h-14 border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg px-3\"><!-- Site branding --><div class=\"shrink-0 mr-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><!-- Desktop navigation --><nav class=\"flex grow\"><!-- Desktop sign in links --><ul class=\"flex grow justify-end flex-wrap items-center\"><li><a class=\"text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition\" href=\"login.html\">Log in</a></li><li class=\"ml-1\"><a class=\"btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" href=\"request-demo.html\">Request Demo</a></li></ul></nav></div></div></div></header>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Site header --><header class=\"absolute top-2 md:top-6 w-full z-30\"><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"flex items-center justify-between h-14 border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg px-3\"><!-- Site branding --><div class=\"shrink-0 mr-4\"><!-- Logo --><a class=\"flex items-center justify-center bg-white w-8 h-8 rounded-full shadow-sm shadow-zinc-950/20\" href=\"/\"><img src=\"https://cdn.sonr.id/logo-zinc.svg\" width=\"24\" height=\"24\" alt=\"Logo\"></a></div><!-- Desktop navigation --><nav class=\"flex grow\"><!-- Desktop sign in links --><ul class=\"flex grow justify-end flex-wrap items-center\"><li><a class=\"text-sm font-medium text-zinc-500 hover:text-zinc-900 px-3 lg:px-5 py-2 flex items-center transition\" href=\"/login\">Log in</a></li><li class=\"ml-1\"><a class=\"btn-sm text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow\" href=\"/register\">Register</a></li></ul></nav></div></div></div></header>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,88 +44,97 @@ templ SectionHero(hero Hero) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
@heroImage()
|
||||||
<!-- Image -->
|
@stats()
|
||||||
<div class="max-w-6xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10">
|
|
||||||
<img class="rounded-lg shadow-2xl" src="https://cdn.sonr.id/img/hero-safe.svg" width="620" height="620" alt="Hero"/>
|
|
||||||
</div>
|
|
||||||
<!-- Stats -->
|
|
||||||
<div class="max-w-6xl mx-auto px-4 sm:px-6">
|
|
||||||
<div class="max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-start md:max-w-none">
|
|
||||||
<!-- 1st item -->
|
|
||||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
|
||||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(476)" x-text="counterValue">0</span>K</h4>
|
|
||||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
|
||||||
</div>
|
|
||||||
<!-- 2nd item -->
|
|
||||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
|
||||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(1.44)" x-text="counterValue">0</span>K</h4>
|
|
||||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
|
||||||
</div>
|
|
||||||
<!-- 3rd item -->
|
|
||||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
|
||||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(1.5)" x-text="counterValue">0</span>M+</h4>
|
|
||||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
|
||||||
</div>
|
|
||||||
<!-- 4th item -->
|
|
||||||
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
|
||||||
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(192)" x-text="counterValue">0</span>K</h4>
|
|
||||||
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@counterAnimation()
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
}
|
}
|
||||||
|
|
||||||
script counterAnimation() {
|
templ heroImage() {
|
||||||
document.addEventListener('alpine:init', () => {
|
<!-- Image -->
|
||||||
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
<div class="max-w-5xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white">
|
||||||
startTimestamp: null,
|
<img
|
||||||
step: null,
|
class="rounded-lg"
|
||||||
rawValue: 0,
|
src="https://cdn.sonr.id/img/hero-clipped.svg"
|
||||||
counterValue: 0,
|
width="560"
|
||||||
target: target,
|
height="560"
|
||||||
precision: (target % 1 === 0) ? 0 : (target.toString().split('.')[1] || []).length,
|
alt="Hero"
|
||||||
animationRequestId: null,
|
/>
|
||||||
animationCompleted: false,
|
</div>
|
||||||
observer: null,
|
}
|
||||||
init() {
|
|
||||||
// Intersection observer to watch visibility
|
templ stats() {
|
||||||
this.observer = new IntersectionObserver(entries => {
|
<!-- Stats -->
|
||||||
entries.forEach(entry => {
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 justify-center items-center">
|
||||||
// Check if element is in view
|
<div class="max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-end md:max-w-none">
|
||||||
if (entry.isIntersecting && !this.animationCompleted) {
|
<!-- 1st item -->
|
||||||
this.startAnimation()
|
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
||||||
}
|
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(476)" x-text="counterValue">0</span>K</h4>
|
||||||
})
|
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||||
})
|
</div>
|
||||||
this.observer.observe(this.$el)
|
<!-- 2nd item -->
|
||||||
},
|
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
||||||
startAnimation() {
|
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(1.44)" x-text="counterValue">0</span>K</h4>
|
||||||
this.step = (timestamp) => {
|
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||||
if (!this.startTimestamp) this.startTimestamp = timestamp
|
</div>
|
||||||
const progress = Math.min((timestamp - this.startTimestamp) / duration, 1)
|
<!-- 3rd item -->
|
||||||
const easedProgress = this.easeOut(progress)
|
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
|
||||||
this.rawValue = parseFloat((easedProgress * this.target).toFixed(this.precision))
|
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data="counter(1.5)" x-text="counterValue">0</span>M+</h4>
|
||||||
this.counterValue = this.rawValue.toFixed(this.precision)
|
<p class="text-sm text-zinc-500">Assets packed with power beyond your imagination.</p>
|
||||||
if (progress < 1) {
|
</div>
|
||||||
this.animationRequestId = window.requestAnimationFrame(this.step)
|
</div>
|
||||||
} else {
|
@counterAnimation()
|
||||||
this.animationCompleted = true
|
</div>
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.animationRequestId = window.requestAnimationFrame(this.step);
|
script counterAnimation() {
|
||||||
},
|
document.addEventListener('alpine:init', () => {
|
||||||
easeOut(t) {
|
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
||||||
return 1 - Math.pow(1 - t, 5)
|
startTimestamp: null,
|
||||||
},
|
step: null,
|
||||||
destroy() {
|
rawValue: 0,
|
||||||
// Detach the handler, avoiding memory and side-effect leakage
|
counterValue: 0,
|
||||||
this.animationRequestId && window.cancelAnimationFrame(this.step)
|
target: target,
|
||||||
this.observer && this.observer.disconnect()
|
precision: (target % 1 === 0) ? 0 : (target.toString().split('.')[1] || []).length,
|
||||||
},
|
animationRequestId: null,
|
||||||
}))
|
animationCompleted: false,
|
||||||
})
|
observer: null,
|
||||||
|
init() {
|
||||||
|
// Intersection observer to watch visibility
|
||||||
|
this.observer = new IntersectionObserver(entries => {
|
||||||
|
entries.forEach(entry => {
|
||||||
|
// Check if element is in view
|
||||||
|
if (entry.isIntersecting && !this.animationCompleted) {
|
||||||
|
this.startAnimation()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.observer.observe(this.$el)
|
||||||
|
},
|
||||||
|
startAnimation() {
|
||||||
|
this.step = (timestamp) => {
|
||||||
|
if (!this.startTimestamp) this.startTimestamp = timestamp
|
||||||
|
const progress = Math.min((timestamp - this.startTimestamp) / duration, 1)
|
||||||
|
const easedProgress = this.easeOut(progress)
|
||||||
|
this.rawValue = parseFloat((easedProgress * this.target).toFixed(this.precision))
|
||||||
|
this.counterValue = this.rawValue.toFixed(this.precision)
|
||||||
|
if (progress < 1) {
|
||||||
|
this.animationRequestId = window.requestAnimationFrame(this.step)
|
||||||
|
} else {
|
||||||
|
this.animationCompleted = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.animationRequestId = window.requestAnimationFrame(this.step);
|
||||||
|
},
|
||||||
|
easeOut(t) {
|
||||||
|
return 1 - Math.pow(1 - t, 5)
|
||||||
|
},
|
||||||
|
destroy() {
|
||||||
|
// Detach the handler, avoiding memory and side-effect leakage
|
||||||
|
this.animationRequestId && window.cancelAnimationFrame(this.step)
|
||||||
|
this.observer && this.observer.disconnect()
|
||||||
|
},
|
||||||
|
}))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,11 +138,15 @@ func SectionHero(hero Hero) templ.Component {
|
|||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></div></div></div></div></div><!-- Image --><div class=\"max-w-6xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10\"><img class=\"rounded-lg shadow-2xl\" src=\"https://cdn.sonr.id/img/hero-safe.svg\" width=\"620\" height=\"620\" alt=\"Hero\"></div><!-- Stats --><div class=\"max-w-6xl mx-auto px-4 sm:px-6\"><div class=\"max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-start md:max-w-none\"><!-- 1st item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(476)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 2nd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.44)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 3rd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.5)\" x-text=\"counterValue\">0</span>M+</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 4th item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(192)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div></div>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></div></div></div></div>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
templ_7745c5c3_Err = counterAnimation().Render(ctx, templ_7745c5c3_Buffer)
|
templ_7745c5c3_Err = heroImage().Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = stats().Render(ctx, templ_7745c5c3_Buffer)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -154,60 +158,126 @@ func SectionHero(hero Hero) templ.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func heroImage() templ.Component {
|
||||||
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||||
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
|
return templ_7745c5c3_CtxErr
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||||
|
if !templ_7745c5c3_IsBuffer {
|
||||||
|
defer func() {
|
||||||
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err == nil {
|
||||||
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
ctx = templ.InitializeContext(ctx)
|
||||||
|
templ_7745c5c3_Var10 := templ.GetChildren(ctx)
|
||||||
|
if templ_7745c5c3_Var10 == nil {
|
||||||
|
templ_7745c5c3_Var10 = templ.NopComponent
|
||||||
|
}
|
||||||
|
ctx = templ.ClearChildren(ctx)
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg\" src=\"https://cdn.sonr.id/img/hero-clipped.svg\" width=\"560\" height=\"560\" alt=\"Hero\"></div>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func stats() templ.Component {
|
||||||
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||||
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||||
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
||||||
|
return templ_7745c5c3_CtxErr
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
||||||
|
if !templ_7745c5c3_IsBuffer {
|
||||||
|
defer func() {
|
||||||
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err == nil {
|
||||||
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
ctx = templ.InitializeContext(ctx)
|
||||||
|
templ_7745c5c3_Var11 := templ.GetChildren(ctx)
|
||||||
|
if templ_7745c5c3_Var11 == nil {
|
||||||
|
templ_7745c5c3_Var11 = templ.NopComponent
|
||||||
|
}
|
||||||
|
ctx = templ.ClearChildren(ctx)
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Stats --><div class=\"max-w-4xl mx-auto px-4 sm:px-6 justify-center items-center\"><div class=\"max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-end md:max-w-none\"><!-- 1st item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(476)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 2nd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.44)\" x-text=\"counterValue\">0</span>K</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div><!-- 3rd item --><div class=\"relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden\"><h4 class=\"font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2\"><span x-data=\"counter(1.5)\" x-text=\"counterValue\">0</span>M+</h4><p class=\"text-sm text-zinc-500\">Assets packed with power beyond your imagination.</p></div></div>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
templ_7745c5c3_Err = counterAnimation().Render(ctx, templ_7745c5c3_Buffer)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func counterAnimation() templ.ComponentScript {
|
func counterAnimation() templ.ComponentScript {
|
||||||
return templ.ComponentScript{
|
return templ.ComponentScript{
|
||||||
Name: `__templ_counterAnimation_57a0`,
|
Name: `__templ_counterAnimation_524d`,
|
||||||
Function: `function __templ_counterAnimation_57a0(){document.addEventListener('alpine:init', () => {
|
Function: `function __templ_counterAnimation_524d(){document.addEventListener('alpine:init', () => {
|
||||||
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
Alpine.data('counter', (target = 0, duration = 3000) => ({
|
||||||
startTimestamp: null,
|
startTimestamp: null,
|
||||||
step: null,
|
step: null,
|
||||||
rawValue: 0,
|
rawValue: 0,
|
||||||
counterValue: 0,
|
counterValue: 0,
|
||||||
target: target,
|
target: target,
|
||||||
precision: (target % 1 === 0) ? 0 : (target.toString().split('.')[1] || []).length,
|
precision: (target % 1 === 0) ? 0 : (target.toString().split('.')[1] || []).length,
|
||||||
animationRequestId: null,
|
animationRequestId: null,
|
||||||
animationCompleted: false,
|
animationCompleted: false,
|
||||||
observer: null,
|
observer: null,
|
||||||
init() {
|
init() {
|
||||||
// Intersection observer to watch visibility
|
// Intersection observer to watch visibility
|
||||||
this.observer = new IntersectionObserver(entries => {
|
this.observer = new IntersectionObserver(entries => {
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
// Check if element is in view
|
// Check if element is in view
|
||||||
if (entry.isIntersecting && !this.animationCompleted) {
|
if (entry.isIntersecting && !this.animationCompleted) {
|
||||||
this.startAnimation()
|
this.startAnimation()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.observer.observe(this.$el)
|
this.observer.observe(this.$el)
|
||||||
},
|
},
|
||||||
startAnimation() {
|
startAnimation() {
|
||||||
this.step = (timestamp) => {
|
this.step = (timestamp) => {
|
||||||
if (!this.startTimestamp) this.startTimestamp = timestamp
|
if (!this.startTimestamp) this.startTimestamp = timestamp
|
||||||
const progress = Math.min((timestamp - this.startTimestamp) / duration, 1)
|
const progress = Math.min((timestamp - this.startTimestamp) / duration, 1)
|
||||||
const easedProgress = this.easeOut(progress)
|
const easedProgress = this.easeOut(progress)
|
||||||
this.rawValue = parseFloat((easedProgress * this.target).toFixed(this.precision))
|
this.rawValue = parseFloat((easedProgress * this.target).toFixed(this.precision))
|
||||||
this.counterValue = this.rawValue.toFixed(this.precision)
|
this.counterValue = this.rawValue.toFixed(this.precision)
|
||||||
if (progress < 1) {
|
if (progress < 1) {
|
||||||
this.animationRequestId = window.requestAnimationFrame(this.step)
|
this.animationRequestId = window.requestAnimationFrame(this.step)
|
||||||
} else {
|
} else {
|
||||||
this.animationCompleted = true
|
this.animationCompleted = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.animationRequestId = window.requestAnimationFrame(this.step);
|
this.animationRequestId = window.requestAnimationFrame(this.step);
|
||||||
},
|
},
|
||||||
easeOut(t) {
|
easeOut(t) {
|
||||||
return 1 - Math.pow(1 - t, 5)
|
return 1 - Math.pow(1 - t, 5)
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
// Detach the handler, avoiding memory and side-effect leakage
|
// Detach the handler, avoiding memory and side-effect leakage
|
||||||
this.animationRequestId && window.cancelAnimationFrame(this.step)
|
this.animationRequestId && window.cancelAnimationFrame(this.step)
|
||||||
this.observer && this.observer.disconnect()
|
this.observer && this.observer.disconnect()
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
}`,
|
}`,
|
||||||
Call: templ.SafeScript(`__templ_counterAnimation_57a0`),
|
Call: templ.SafeScript(`__templ_counterAnimation_524d`),
|
||||||
CallInline: templ.SafeScriptInline(`__templ_counterAnimation_57a0`),
|
CallInline: templ.SafeScriptInline(`__templ_counterAnimation_524d`),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import (
|
|||||||
|
|
||||||
func Home(c echo.Context) error {
|
func Home(c echo.Context) error {
|
||||||
hero := sections.Hero{
|
hero := sections.Hero{
|
||||||
TitleFirst: "Sonr.ID",
|
TitleFirst: "Simplified",
|
||||||
TitleEmphasis: "platform",
|
TitleEmphasis: "self-custody",
|
||||||
TitleSecond: "for cross-functional work",
|
TitleSecond: "for everyone",
|
||||||
Subtitle: "Turbocharge your creative process with a powerful AI design platform that gives creatives the power of creating without limits.",
|
Subtitle: "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.",
|
||||||
PrimaryButtonText: "Request Demo",
|
PrimaryButtonText: "Get Started",
|
||||||
PrimaryButtonLink: "request-demo.html",
|
PrimaryButtonLink: "/register",
|
||||||
SecondaryButtonText: "Try for Free",
|
SecondaryButtonText: "Learn More",
|
||||||
SecondaryButtonLink: "#0",
|
SecondaryButtonLink: "/about",
|
||||||
}
|
}
|
||||||
return echoResponse(c, homeView(hero))
|
return echoResponse(c, homeView(hero))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ import (
|
|||||||
|
|
||||||
func Home(c echo.Context) error {
|
func Home(c echo.Context) error {
|
||||||
hero := sections.Hero{
|
hero := sections.Hero{
|
||||||
TitleFirst: "Sonr.ID",
|
TitleFirst: "Simplified",
|
||||||
TitleEmphasis: "platform",
|
TitleEmphasis: "self-custody",
|
||||||
TitleSecond: "for cross-functional work",
|
TitleSecond: "for everyone",
|
||||||
Subtitle: "Turbocharge your creative process with a powerful AI design platform that gives creatives the power of creating without limits.",
|
Subtitle: "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.",
|
||||||
PrimaryButtonText: "Request Demo",
|
PrimaryButtonText: "Get Started",
|
||||||
PrimaryButtonLink: "request-demo.html",
|
PrimaryButtonLink: "/register",
|
||||||
SecondaryButtonText: "Try for Free",
|
SecondaryButtonText: "Learn More",
|
||||||
SecondaryButtonLink: "#0",
|
SecondaryButtonLink: "/about",
|
||||||
}
|
}
|
||||||
return echoResponse(c, homeView(hero))
|
return echoResponse(c, homeView(hero))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"cosmossdk.io/log"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/x/macaroon/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (k Keeper) Logger() log.Logger {
|
||||||
|
return k.logger
|
||||||
|
}
|
||||||
|
|
||||||
|
// InitGenesis initializes the module's state from a genesis state.
|
||||||
|
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
||||||
|
// this line is used by starport scaffolding # genesis/module/init
|
||||||
|
if err := data.Params.Validate(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return k.Params.Set(ctx, data.Params)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExportGenesis exports the module's state to a genesis state.
|
||||||
|
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
||||||
|
params, err := k.Params.Get(ctx)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// this line is used by starport scaffolding # genesis/module/export
|
||||||
|
|
||||||
|
return &types.GenesisState{
|
||||||
|
Params: params,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,13 @@
|
|||||||
package keeper
|
package keeper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
|
||||||
|
|
||||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
|
||||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
|
||||||
|
|
||||||
"cosmossdk.io/collections"
|
"cosmossdk.io/collections"
|
||||||
storetypes "cosmossdk.io/core/store"
|
storetypes "cosmossdk.io/core/store"
|
||||||
"cosmossdk.io/log"
|
"cosmossdk.io/log"
|
||||||
"cosmossdk.io/orm/model/ormdb"
|
"cosmossdk.io/orm/model/ormdb"
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
|
||||||
apiv1 "github.com/onsonr/sonr/api/macaroon/v1"
|
apiv1 "github.com/onsonr/sonr/api/macaroon/v1"
|
||||||
"github.com/onsonr/sonr/x/macaroon/types"
|
"github.com/onsonr/sonr/x/macaroon/types"
|
||||||
@@ -74,31 +70,3 @@ func NewKeeper(
|
|||||||
|
|
||||||
return k
|
return k
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k Keeper) Logger() log.Logger {
|
|
||||||
return k.logger
|
|
||||||
}
|
|
||||||
|
|
||||||
// InitGenesis initializes the module's state from a genesis state.
|
|
||||||
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
|
||||||
// this line is used by starport scaffolding # genesis/module/init
|
|
||||||
if err := data.Params.Validate(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return k.Params.Set(ctx, data.Params)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExportGenesis exports the module's state to a genesis state.
|
|
||||||
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
|
||||||
params, err := k.Params.Get(ctx)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// this line is used by starport scaffolding # genesis/module/export
|
|
||||||
|
|
||||||
return &types.GenesisState{
|
|
||||||
Params: params,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"cosmossdk.io/log"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/x/oracle/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (k Keeper) Logger() log.Logger {
|
||||||
|
return k.logger
|
||||||
|
}
|
||||||
|
|
||||||
|
// InitGenesis initializes the module's state from a genesis state.
|
||||||
|
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
||||||
|
// this line is used by starport scaffolding # genesis/module/init
|
||||||
|
if err := data.Params.Validate(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return k.Params.Set(ctx, data.Params)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExportGenesis exports the module's state to a genesis state.
|
||||||
|
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
||||||
|
params, err := k.Params.Get(ctx)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// this line is used by starport scaffolding # genesis/module/export
|
||||||
|
|
||||||
|
return &types.GenesisState{
|
||||||
|
Params: params,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,13 @@
|
|||||||
package keeper
|
package keeper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
|
||||||
|
|
||||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
|
||||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
|
||||||
|
|
||||||
"cosmossdk.io/collections"
|
"cosmossdk.io/collections"
|
||||||
storetypes "cosmossdk.io/core/store"
|
storetypes "cosmossdk.io/core/store"
|
||||||
"cosmossdk.io/log"
|
"cosmossdk.io/log"
|
||||||
"cosmossdk.io/orm/model/ormdb"
|
"cosmossdk.io/orm/model/ormdb"
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
|
||||||
apiv1 "github.com/onsonr/sonr/api/oracle/v1"
|
apiv1 "github.com/onsonr/sonr/api/oracle/v1"
|
||||||
"github.com/onsonr/sonr/x/oracle/types"
|
"github.com/onsonr/sonr/x/oracle/types"
|
||||||
@@ -74,31 +70,3 @@ func NewKeeper(
|
|||||||
|
|
||||||
return k
|
return k
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k Keeper) Logger() log.Logger {
|
|
||||||
return k.logger
|
|
||||||
}
|
|
||||||
|
|
||||||
// InitGenesis initializes the module's state from a genesis state.
|
|
||||||
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
|
||||||
// this line is used by starport scaffolding # genesis/module/init
|
|
||||||
if err := data.Params.Validate(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return k.Params.Set(ctx, data.Params)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExportGenesis exports the module's state to a genesis state.
|
|
||||||
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
|
||||||
params, err := k.Params.Get(ctx)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// this line is used by starport scaffolding # genesis/module/export
|
|
||||||
|
|
||||||
return &types.GenesisState{
|
|
||||||
Params: params,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"cosmossdk.io/log"
|
||||||
|
|
||||||
|
"github.com/onsonr/sonr/x/service/types"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (k Keeper) Logger() log.Logger {
|
||||||
|
return k.logger
|
||||||
|
}
|
||||||
|
|
||||||
|
// InitGenesis initializes the module's state from a genesis state.
|
||||||
|
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
||||||
|
// this line is used by starport scaffolding # genesis/module/init
|
||||||
|
if err := data.Params.Validate(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return k.Params.Set(ctx, data.Params)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExportGenesis exports the module's state to a genesis state.
|
||||||
|
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
||||||
|
params, err := k.Params.Get(ctx)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// this line is used by starport scaffolding # genesis/module/export
|
||||||
|
|
||||||
|
return &types.GenesisState{
|
||||||
|
Params: params,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,13 @@
|
|||||||
package keeper
|
package keeper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
|
||||||
|
|
||||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
|
||||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
|
||||||
|
|
||||||
"cosmossdk.io/collections"
|
"cosmossdk.io/collections"
|
||||||
storetypes "cosmossdk.io/core/store"
|
storetypes "cosmossdk.io/core/store"
|
||||||
"cosmossdk.io/log"
|
"cosmossdk.io/log"
|
||||||
"cosmossdk.io/orm/model/ormdb"
|
"cosmossdk.io/orm/model/ormdb"
|
||||||
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
|
||||||
apiv1 "github.com/onsonr/sonr/api/service/v1"
|
apiv1 "github.com/onsonr/sonr/api/service/v1"
|
||||||
"github.com/onsonr/sonr/x/service/types"
|
"github.com/onsonr/sonr/x/service/types"
|
||||||
@@ -74,31 +70,3 @@ func NewKeeper(
|
|||||||
|
|
||||||
return k
|
return k
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k Keeper) Logger() log.Logger {
|
|
||||||
return k.logger
|
|
||||||
}
|
|
||||||
|
|
||||||
// InitGenesis initializes the module's state from a genesis state.
|
|
||||||
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
|
||||||
// this line is used by starport scaffolding # genesis/module/init
|
|
||||||
if err := data.Params.Validate(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return k.Params.Set(ctx, data.Params)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExportGenesis exports the module's state to a genesis state.
|
|
||||||
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
|
||||||
params, err := k.Params.Get(ctx)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// this line is used by starport scaffolding # genesis/module/export
|
|
||||||
|
|
||||||
return &types.GenesisState{
|
|
||||||
Params: params,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"github.com/ipfs/boxo/files"
|
"github.com/ipfs/boxo/files"
|
||||||
|
|
||||||
"github.com/onsonr/sonr/pkg/dwn"
|
"github.com/onsonr/sonr/pkg/dwn"
|
||||||
vault "github.com/onsonr/sonr/x/vault/types/internal"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Vault struct {
|
type Vault struct {
|
||||||
@@ -18,7 +17,7 @@ func NewVault(keyshareJSON string, adddress string, chainID string, schema *dwn.
|
|||||||
Sonr: defaultSonrConfig(chainID),
|
Sonr: defaultSonrConfig(chainID),
|
||||||
Schema: schema,
|
Schema: schema,
|
||||||
}
|
}
|
||||||
fileMap, err := vault.NewVaultDirectory(dwnCfg)
|
fileMap, err := dwn.NewVaultDirectory(dwnCfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user