diff --git a/.gitea/workflows/check.yaml b/.gitea/workflows/check.yaml new file mode 100644 index 0000000..b059ee3 --- /dev/null +++ b/.gitea/workflows/check.yaml @@ -0,0 +1,46 @@ +name: Check software + +on: [push] + +jobs: + prepare: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: '1.21.4' + cache: true + + - name: Install dependencies + run: go mod tidy + + - name: Install golangci-lint + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1 + + - name: Run golangci-lint + run: | + $(go env GOPATH)/bin/golangci-lint run + + # - name: Build + # run: go build -v ./... + + # - name: Run tests with race detector + # run: go test -v -race ./... + + # - name: Run tests and generate coverage report + # run: go test -v -coverprofile=coverage.out ./... + + # - name: Display coverage + # run: go tool cover -func=coverage.out + + # - name: Upload coverage report + # uses: actions/upload-artifact@v3 + # with: + # name: coverage-report + # path: coverage.out \ No newline at end of file diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..5a92b4b --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,33 @@ +version: '3' + +vars: + # Get the application name + repo_name: + sh: basename `git config --get remote.origin.url` .git + repo_version: + sh: | + tag=$(git describe --tags --abbrev=0 2>/dev/null || true) + if [ -z "$tag" ]; then + git rev-parse HEAD + else + echo $tag + fi + +tasks: + # Installing the dependencies to develop dmxconnect + install: + cmds: + - echo "Installing dependencies to contribute to {{.repo_name}}..." + silent: true + + # Running the application + run: + cmds: + - echo "Running {{.repo_name}}..." + silent: true + + # Building the application + build: + cmds: + - echo "Generating {{.repo_name}}_v{{.repo_version}}.deb ..." + silent: true \ No newline at end of file diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index a97d4b6..7f9c01d 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,54 +1,54 @@ - - -
- - -
-
- {#if selectedMenu === "settings"} - - {:else if selectedMenu === "devices"} - - {:else if selectedMenu === "preparation"} - - {:else if selectedMenu === "animation"} - - {:else if selectedMenu === "show"} - - {:else if selectedMenu === "console"} - - {/if} -
- - \ No newline at end of file diff --git a/frontend/src/components/Animation.svelte b/frontend/src/components/Animation.svelte index 5a09a61..b73cd6d 100644 --- a/frontend/src/components/Animation.svelte +++ b/frontend/src/components/Animation.svelte @@ -1 +1 @@ -

Animation creator

+

Animation creator

diff --git a/frontend/src/components/Toggle.svelte b/frontend/src/components/Toggle.svelte index 0749c27..7f38122 100644 --- a/frontend/src/components/Toggle.svelte +++ b/frontend/src/components/Toggle.svelte @@ -1,121 +1,121 @@ - - - - -
- - - -
- - \ No newline at end of file diff --git a/frontend/src/style.css b/frontend/src/style.css index b185506..b70296b 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -1,69 +1,69 @@ -:root{ - -webkit-user-select: none; /* Safari */ - -ms-user-select: none; /* IE 10 and IE 11 */ - user-select: none; /* Standard syntax */ -} - -html, body { - position: relative; - width: 100%; - height: 100%; -} - -body { - color: #333; - margin: 0; - padding: 8px; - box-sizing: border-box; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; -} - -a { - color: rgb(0,100,200); - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -a:visited { - color: rgb(0,80,160); -} - -label { - display: block; -} - -input, button, select, textarea { - font-family: inherit; - font-size: inherit; - -webkit-padding: 0.4em 0; - padding: 0.4em; - margin: 0 0 0.5em 0; - box-sizing: border-box; - border: 1px solid #ccc; - border-radius: 2px; -} - -input:disabled { - color: #ccc; -} - -button { - color: #333; - background-color: #f4f4f4; - outline: none; -} - -button:disabled { - color: #999; -} - -button:not(:disabled):active { - background-color: #ddd; -} - -button:focus { - border-color: #666; -} +:root{ + -webkit-user-select: none; /* Safari */ + -ms-user-select: none; /* IE 10 and IE 11 */ + user-select: none; /* Standard syntax */ +} + +html, body { + position: relative; + width: 100%; + height: 100%; +} + +body { + color: #333; + margin: 0; + padding: 8px; + box-sizing: border-box; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; +} + +a { + color: rgb(0,100,200); + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a:visited { + color: rgb(0,80,160); +} + +label { + display: block; +} + +input, button, select, textarea { + font-family: inherit; + font-size: inherit; + -webkit-padding: 0.4em 0; + padding: 0.4em; + margin: 0 0 0.5em 0; + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 2px; +} + +input:disabled { + color: #ccc; +} + +button { + color: #333; + background-color: #f4f4f4; + outline: none; +} + +button:disabled { + color: #999; +} + +button:not(:disabled):active { + background-color: #ddd; +} + +button:focus { + border-color: #666; +} diff --git a/go.mod b/go.mod index 734804f..0d4252a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module changeme -go 1.20 +go 1.21 + +toolchain go1.21.4 require github.com/wailsapp/wails/v2 v2.9.1 diff --git a/go.sum b/go.sum index 4b2bd38..7e8f88d 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,7 @@ github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXn github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE= github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= @@ -90,3 +91,4 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index 0cdb6f2..9605725 100644 --- a/main.go +++ b/main.go @@ -1,35 +1,35 @@ -package main - -import ( - "embed" - - "github.com/wailsapp/wails/v2" - "github.com/wailsapp/wails/v2/pkg/options" - "github.com/wailsapp/wails/v2/pkg/options/assetserver" -) - -//go:embed all:frontend/dist -var assets embed.FS - -func main() { - // Create an instance of the app structure - app := NewApp() - - // Create application with options - err := wails.Run(&options.App{ - Title: "dmxconnect", - Width: 1024, - Height: 768, - AssetServer: &assetserver.Options{ - Assets: assets, - }, - OnStartup: app.startup, - Bind: []interface{}{ - app, - }, - }) - - if err != nil { - println("Error:", err.Error()) - } -} +package main + +import ( + "embed" + + "github.com/wailsapp/wails/v2" + "github.com/wailsapp/wails/v2/pkg/options" + "github.com/wailsapp/wails/v2/pkg/options/assetserver" +) + +//go:embed all:frontend/dist +var assets embed.FS + +func main() { + // Create an instance of the app structure + app := NewApp() + + // Create application with options + err := wails.Run(&options.App{ + Title: "dmxconnect", + Width: 1024, + Height: 768, + AssetServer: &assetserver.Options{ + Assets: assets, + }, + OnStartup: app.startup, + Bind: []interface{}{ + app, + }, + }) + + if err != nil { + println("Error:", err.Error()) + } +}