From a007722df20d8d3d79a71c2cf29d8db24457a300 Mon Sep 17 00:00:00 2001 From: Christian Chiarulli Date: Sun, 8 Dec 2024 20:17:05 -0500 Subject: [PATCH] update wails and taskfile --- Taskfile.yml | 439 +------------ build/Taskfile.yml | 75 +++ build/config.yml | 62 ++ build/{ => darwin}/Info.dev.plist | 6 +- build/{ => darwin}/Info.plist | 6 +- build/darwin/Taskfile.yml | 70 ++ build/{ => darwin}/icons.icns | Bin build/devmode.config.yaml | 28 - build/linux/Taskfile.yml | 114 ++++ build/{ => linux}/appimage/build.sh | 0 build/linux/nfpm/nfpm.yaml | 50 ++ build/linux/nfpm/scripts/postinstall.sh | 1 + build/linux/nfpm/scripts/postremove.sh | 1 + build/linux/nfpm/scripts/preinstall.sh | 1 + build/linux/nfpm/scripts/preremove.sh | 1 + build/windows/Taskfile.yml | 56 ++ build/{ => windows}/icon.ico | Bin build/windows/icons.ico | Bin 0 -> 21677 bytes build/{ => windows}/info.json | 0 build/{ => windows}/nsis/project.nsi | 8 +- build/{ => windows}/nsis/wails_tools.nsh | 35 +- build/{ => windows}/wails.exe.manifest | 4 +- frontend/bindings/database/sql/index.js | 5 + frontend/bindings/database/sql/models.js | 98 +++ .../github.com/nodetec/comet/db/index.js | 5 + .../github.com/nodetec/comet/db/models.js | 596 ++++++++++++++++++ .../github.com/nodetec/comet/service/index.js | 22 + .../nodetec/comet/service/models.js | 292 +++++++++ .../nodetec/comet/service/nostrkeyservice.js | 76 +++ .../nodetec/comet/service/notebookservice.js | 127 ++++ .../nodetec/comet/service/noteservice.js | 208 ++++++ .../nodetec/comet/service/notetagservice.js | 58 ++ .../nodetec/comet/service/relayservice.js | 77 +++ .../nodetec/comet/service/settingservice.js | 45 ++ .../nodetec/comet/service/tagservice.js | 108 ++++ ...{tailwind.config.js => tailwind.config.ts} | 19 +- go.mod | 36 +- main.go | 2 +- 38 files changed, 2238 insertions(+), 493 deletions(-) create mode 100644 build/Taskfile.yml create mode 100644 build/config.yml rename build/{ => darwin}/Info.dev.plist (92%) rename build/{ => darwin}/Info.plist (91%) create mode 100644 build/darwin/Taskfile.yml rename build/{ => darwin}/icons.icns (100%) delete mode 100644 build/devmode.config.yaml create mode 100644 build/linux/Taskfile.yml rename build/{ => linux}/appimage/build.sh (100%) create mode 100644 build/linux/nfpm/nfpm.yaml create mode 100644 build/linux/nfpm/scripts/postinstall.sh create mode 100644 build/linux/nfpm/scripts/postremove.sh create mode 100644 build/linux/nfpm/scripts/preinstall.sh create mode 100644 build/linux/nfpm/scripts/preremove.sh create mode 100644 build/windows/Taskfile.yml rename build/{ => windows}/icon.ico (100%) create mode 100644 build/windows/icons.ico rename build/{ => windows}/info.json (100%) rename build/{ => windows}/nsis/project.nsi (94%) rename build/{ => windows}/nsis/wails_tools.nsh (79%) rename build/{ => windows}/wails.exe.manifest (88%) create mode 100644 frontend/bindings/database/sql/index.js create mode 100644 frontend/bindings/database/sql/models.js create mode 100644 frontend/bindings/github.com/nodetec/comet/db/index.js create mode 100644 frontend/bindings/github.com/nodetec/comet/db/models.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/index.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/models.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/nostrkeyservice.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/notebookservice.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/noteservice.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/notetagservice.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/relayservice.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/settingservice.js create mode 100644 frontend/bindings/github.com/nodetec/comet/service/tagservice.js rename frontend/{tailwind.config.js => tailwind.config.ts} (85%) diff --git a/Taskfile.yml b/Taskfile.yml index 4855ad42..646db22c 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,449 +1,34 @@ version: '3' +includes: + common: ./build/Taskfile.yml + windows: ./build/windows/Taskfile.yml + darwin: ./build/darwin/Taskfile.yml + linux: ./build/linux/Taskfile.yml + vars: - APP_NAME: "comet" + APP_NAME: "asdf" BIN_DIR: "bin" VITE_PORT: '{{.WAILS_VITE_PORT | default 9245}}' tasks: - - ## -------------------------- Build -------------------------- ## - build: summary: Builds the application cmds: - # Build for current OS - - task: build:{{OS}} - - # Uncomment to build for specific OSes - # - task: build:linux - # - task: build:windows - # - task: build:darwin - - - ## ------> Windows <------- - - build:windows: - summary: Builds the application for Windows - deps: - - task: go:mod:tidy - - task: build:frontend - vars: - BUILD_FLAGS: '{{.BUILD_FLAGS}}' - - task: generate:icons - - task: generate:syso - vars: - ARCH: '{{.ARCH}}' - cmds: - - go build {{.BUILD_FLAGS}} -o {{.BIN_DIR}}/comet.exe - vars: - BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production,fts5 -trimpath -ldflags="-w -s -H windowsgui"{{else}}-tags fts5 -gcflags=all="-N -l"{{end}}' - env: - GOOS: windows - CGO_ENABLED: 0 - GOARCH: '{{.ARCH | default ARCH}}' - PRODUCTION: '{{.PRODUCTION | default "false"}}' - - build:windows:prod:arm64: - summary: Creates a production build of the application - cmds: - - task: build:windows - vars: - ARCH: arm64 - PRODUCTION: "true" - - build:windows:prod:amd64: - summary: Creates a production build of the application - cmds: - - task: build:windows - vars: - ARCH: amd64 - PRODUCTION: "true" - - build:windows:debug:arm64: - summary: Creates a debug build of the application - cmds: - - task: build:windows - vars: - ARCH: arm64 - - build:windows:debug:amd64: - summary: Creates a debug build of the application - cmds: - - task: build:windows - vars: - ARCH: amd64 - - ## ------> Darwin <------- - - build:darwin: - summary: Creates a production build of the application - deps: - - task: go:mod:tidy - - task: build:frontend - vars: - BUILD_FLAGS: '{{.BUILD_FLAGS}}' - - task: generate:icons - cmds: - - go build {{.BUILD_FLAGS}} -o {{.BIN_DIR}}/{{.APP_NAME}} - vars: - BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production,fts5 -trimpath -ldflags="-w -s"{{else}}-tags fts5 -gcflags=all="-N -l"{{end}}' - env: - GOOS: darwin - CGO_ENABLED: 1 - GOARCH: '{{.ARCH | default ARCH}}' - CGO_CFLAGS: "-mmacosx-version-min=10.15" - CGO_LDFLAGS: "-mmacosx-version-min=10.15" - MACOSX_DEPLOYMENT_TARGET: "10.15" - PRODUCTION: '{{.PRODUCTION | default "false"}}' - - build:darwin:prod:arm64: - summary: Creates a production build of the application - cmds: - - task: build:darwin - vars: - ARCH: arm64 - PRODUCTION: "true" - - build:darwin:prod:amd64: - summary: Creates a production build of the application - cmds: - - task: build:darwin - vars: - ARCH: amd64 - PRODUCTION: "true" - - build:darwin:debug:arm64: - summary: Creates a debug build of the application - cmds: - - task: build:darwin - vars: - ARCH: arm64 - - build:darwin:debug:amd64: - summary: Creates a debug build of the application - cmds: - - task: build:darwin - vars: - ARCH: amd64 - - - ## ------> Linux <------- - - build:linux: - summary: Builds the application for Linux - deps: - - task: go:mod:tidy - - task: build:frontend - vars: - BUILD_FLAGS: '{{.BUILD_FLAGS}}' - - task: generate:icons - vars: - ARCH: '{{.ARCH}}' - cmds: - - go build {{.BUILD_FLAGS}} -o {{.BIN_DIR}}/comet - vars: - BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production,fts5 -trimpath -ldflags="-w -s"{{else}}-tags fts5 -gcflags=all="-N -l"{{end}}' - env: - GOOS: linux - CGO_ENABLED: 1 - GOARCH: '{{.ARCH | default ARCH}}' - PRODUCTION: '{{.PRODUCTION | default "false"}}' - - build:linux:prod:arm64: - summary: Creates a production build of the application - cmds: - - task: build:linux - vars: - ARCH: arm64 - PRODUCTION: "true" - - build:linux:prod:amd64: - summary: Creates a production build of the application - cmds: - - task: build:linux - vars: - ARCH: amd64 - PRODUCTION: "true" - - build:linux:debug:arm64: - summary: Creates a debug build of the application - cmds: - - task: build:linux - vars: - ARCH: arm64 - - build:linux:debug:amd64: - summary: Creates a debug build of the application - cmds: - - task: build:linux - vars: - ARCH: amd64 - - ## -------------------------- Package -------------------------- ## + - task: "{{OS}}:build" package: - summary: Packages a production build of the application into a bundle + summary: Packages a production build of the application cmds: - - # Package for current OS - - task: package:{{OS}} - - # Package for specific os/arch - # - task: package:darwin:arm64 - # - task: package:darwin:amd64 - # - task: package:windows:arm64 - # - task: package:windows:amd64 - - ## ------> Windows <------ - - package:windows: - summary: Packages a production build of the application into a `.exe` bundle - cmds: - - task: create:nsis:installer - vars: - ARCH: '{{.ARCH}}' - vars: - ARCH: '{{.ARCH | default ARCH}}' - - package:windows:arm64: - summary: Packages a production build of the application into a `.exe` bundle - cmds: - - task: package:windows - vars: - ARCH: arm64 - - package:windows:amd64: - summary: Packages a production build of the application into a `.exe` bundle - cmds: - - task: package:windows - vars: - ARCH: amd64 - - generate:syso: - summary: Generates Windows `.syso` file - dir: build - cmds: - - wails3 generate syso -arch {{.ARCH}} -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso - vars: - ARCH: '{{.ARCH | default ARCH}}' - - create:nsis:installer: - summary: Creates an NSIS installer - label: "NSIS Installer ({{.ARCH}})" - dir: build/nsis - sources: - - "{{.ROOT_DIR}}\\bin\\{{.APP_NAME}}.exe" - generates: - - "{{.ROOT_DIR}}\\bin\\{{.APP_NAME}}-{{.ARCH}}-installer.exe" - deps: - - task: build:windows - vars: - PRODUCTION: "true" - ARCH: '{{.ARCH}}' - cmds: - - makensis -DARG_WAILS_'{{.ARG_FLAG}}'_BINARY="{{.ROOT_DIR}}\{{.BIN_DIR}}\{{.APP_NAME}}.exe" project.nsi - vars: - ARCH: '{{.ARCH | default ARCH}}' - ARG_FLAG: '{{if eq .ARCH "amd64"}}AMD64{{else}}ARM64{{end}}' - - ## ------> Darwin <------ - - package:darwin: - summary: Packages a production build of the application into a `.app` bundle - platforms: [ darwin ] - deps: - - task: build:darwin - vars: - PRODUCTION: "true" - cmds: - - task: create:app:bundle - - package:darwin:arm64: - summary: Packages a production build of the application into a `.app` bundle - platforms: [ darwin/arm64 ] - deps: - - task: package:darwin - vars: - ARCH: arm64 - - package:darwin:amd64: - summary: Packages a production build of the application into a `.app` bundle - platforms: [ darwin/amd64 ] - deps: - - task: package:darwin - vars: - ARCH: amd64 - - create:app:bundle: - summary: Creates an `.app` bundle - cmds: - - mkdir -p {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/{MacOS,Resources} - - cp build/icons.icns {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/Resources - - cp {{.BIN_DIR}}/{{.APP_NAME}} {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/MacOS - - cp build/Info.plist {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents - - ## ------> Linux <------ - - package:linux: - summary: Packages a production build of the application for Linux - platforms: [ linux ] - deps: - - task: build:linux - vars: - PRODUCTION: "true" - cmds: - - task: create:appimage - - create:appimage: - summary: Creates an AppImage - dir: build/appimage - platforms: [ linux ] - deps: - - task: build:linux - vars: - PRODUCTION: "true" - - task: generate:linux:dotdesktop - cmds: - # Copy binary + icon to appimage dir - - cp {{.APP_BINARY}} {{.APP_NAME}} - - cp ../appicon.png appicon.png - # Generate AppImage - - wails3 generate appimage -binary {{.APP_NAME}} -icon {{.ICON}} -desktopfile {{.DESKTOP_FILE}} -outputdir {{.OUTPUT_DIR}} -builddir {{.ROOT_DIR}}/build/appimage - vars: - APP_NAME: '{{.APP_NAME}}' - APP_BINARY: '../../bin/{{.APP_NAME}}' - ICON: '../appicon.png' - DESKTOP_FILE: '{{.APP_NAME}}.desktop' - OUTPUT_DIR: '../../bin' - - generate:linux:dotdesktop: - summary: Generates a `.desktop` file - dir: build - sources: - - "appicon.png" - generates: - - '{{.ROOT_DIR}}/build/appimage/{{.APP_NAME}}.desktop' - cmds: - - mkdir -p {{.ROOT_DIR}}/build/appimage - # Run `wails3 generate .desktop -help` for all the options - - wails3 generate .desktop -name "{{.APP_NAME}}" -exec "{{.EXEC}}" -icon "{{.ICON}}" -outputfile {{.ROOT_DIR}}/build/appimage/{{.APP_NAME}}.desktop -categories "{{.CATEGORIES}}" - # -comment "A comment" - # -terminal "true" - # -version "1.0" - # -genericname "Generic Name" - # -keywords "keyword1;keyword2;" - # -startupnotify "true" - # -mimetype "application/x-extension1;application/x-extension2;" - - vars: - APP_NAME: '{{.APP_NAME}}' - EXEC: '{{.APP_NAME}}' - ICON: 'appicon' - CATEGORIES: 'Development;' - OUTPUTFILE: '{{.ROOT_DIR}}/build/appimage/{{.APP_NAME}}.desktop' - - ## -------------------------- Misc -------------------------- ## - - - generate:icons: - summary: Generates Windows `.ico` and Mac `.icns` files from an image - dir: build - sources: - - "appicon.png" - generates: - - "icons.icns" - - "icons.ico" - cmds: - # Generates both .ico and .icns files - - wails3 generate icons -input appicon.png - - install:frontend:deps: - summary: Install frontend dependencies - dir: frontend - sources: - - package.json - - package-lock.json - generates: - - node_modules/* - preconditions: - - sh: npm version - msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" - cmds: - # - npm install --silent --no-progress - - npm install - - build:frontend: - summary: Build the frontend project - dir: frontend - sources: - - "**/*" - generates: - - dist/* - deps: - - install:frontend:deps - - task: generate:bindings - vars: - BUILD_FLAGS: '{{.BUILD_FLAGS}}' - cmds: - - npm run build -q - - generate:bindings: - summary: Generates bindings for the frontend - sources: - - "**/*.go" - - go.mod - - go.sum - generates: - - "frontend/bindings/**/*" - cmds: - # For a complete list of options, run `wails3 generate bindings -help` - - wails3 generate bindings -f '{{.BUILD_FLAGS}}' -ts - - go:mod:tidy: - summary: Runs `go mod tidy` - internal: true - generates: - - go.sum - sources: - - go.mod - cmds: - - go mod tidy - -# ----------------------- dev ----------------------- # - + - task: "{{OS}}:package" run: summary: Runs the application cmds: - - task: run:{{OS}} - - run:windows: - cmds: - - '{{.BIN_DIR}}\\{{.APP_NAME}}.exe' - - run:linux: - cmds: - - '{{.BIN_DIR}}/{{.APP_NAME}}' - - run:darwin: - cmds: - - '{{.BIN_DIR}}/{{.APP_NAME}}' - - dev:frontend: - summary: Runs the frontend in development mode - dir: frontend - deps: - - task: install:frontend:deps - cmds: - - npm run dev -- --port {{.VITE_PORT}} --strictPort + - task: "{{OS}}:run" dev: summary: Runs the application in development mode cmds: - - wails3 dev -config ./build/devmode.config.yaml -port {{.VITE_PORT}} + - wails3 dev -config ./build/config.yml -port {{.VITE_PORT}} - dev:reload: - summary: Reloads the application - cmds: - - task: run diff --git a/build/Taskfile.yml b/build/Taskfile.yml new file mode 100644 index 00000000..ee88d272 --- /dev/null +++ b/build/Taskfile.yml @@ -0,0 +1,75 @@ +version: '3' + +tasks: + go:mod:tidy: + summary: Runs `go mod tidy` + internal: true + generates: + - go.sum + sources: + - go.mod + cmds: + - go mod tidy + + install:frontend:deps: + summary: Install frontend dependencies + dir: frontend + sources: + - package.json + - package-lock.json + generates: + - node_modules/* + preconditions: + - sh: npm version + msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/" + cmds: + - npm install + + build:frontend: + summary: Build the frontend project + dir: frontend + sources: + - "**/*" + generates: + - dist/* + deps: + - task: install:frontend:deps + - task: generate:bindings + cmds: + - npm run build -q + + generate:bindings: + summary: Generates bindings for the frontend + sources: + - "**/*.go" + - go.mod + - go.sum + generates: + - "frontend/bindings/**/*" + cmds: + - wails3 generate bindings -f '{{.BUILD_FLAGS}}'{{if .UseTypescript}} -ts{{end}} + + generate:icons: + summary: Generates Windows `.ico` and Mac `.icns` files from an image + dir: build + sources: + - "appicon.png" + generates: + - "icons.icns" + - "icons.ico" + cmds: + - wails3 generate icons -input appicon.png -macfilename darwin/icons.icns -windowsfilename windows/icons.ico + + dev:frontend: + summary: Runs the frontend in development mode + dir: frontend + deps: + - task: install:frontend:deps + cmds: + - npm run dev -- --port {{.VITE_PORT}} --strictPort + + update:build-assets: + summary: Updates the build assets + dir: build + cmds: + - wails3 update build-assets -name "{{.APP_NAME}}" -binaryname "{{.APP_NAME}}" -config config.yml -dir . \ No newline at end of file diff --git a/build/config.yml b/build/config.yml new file mode 100644 index 00000000..37da2511 --- /dev/null +++ b/build/config.yml @@ -0,0 +1,62 @@ +# This file contains the configuration for this project. +# When you update `info` or `fileAssociations`, run `wails3 task common:update:build-assets` to update the assets. +# Note that this will overwrite any changes you have made to the assets. +version: '3' + +# This information is used to generate the build assets. +info: + companyName: "My Company" # The name of the company + productName: "My Product" # The name of the application + productIdentifier: "com.mycompany.myproduct" # The unique product identifier + description: "A program that does X" # The application description + copyright: "(c) 2024, My Company" # Copyright text + comments: "Some Product Comments" # Comments + version: "v0.0.1" # The application version + +# Dev mode configuration +dev_mode: + root_path: . + log_level: warn + debounce: 1000 + ignore: + dir: + - .git + - node_modules + - frontend + - bin + file: + - .DS_Store + - .gitignore + - .gitkeep + watched_extension: + - "*.go" + git_ignore: true + executes: + - cmd: wails3 task common:install:frontend:deps + type: once + - cmd: wails3 task common:dev:frontend + type: background + - cmd: go mod tidy + type: blocking + - cmd: wails3 task build + type: blocking + - cmd: wails3 task run + type: primary + +# File Associations +# More information at: https://v3alpha.wails.io/noit/done/yet +fileAssociations: +# - ext: wails +# name: Wails +# description: Wails Application File +# iconName: wailsFileIcon +# role: Editor +# - ext: jpg +# name: JPEG +# description: Image File +# iconName: jpegFileIcon +# role: Editor + +# Other data +other: + - name: My Other Data \ No newline at end of file diff --git a/build/Info.dev.plist b/build/darwin/Info.dev.plist similarity index 92% rename from build/Info.dev.plist rename to build/darwin/Info.dev.plist index de9e36e5..a3ddfdc1 100644 --- a/build/Info.dev.plist +++ b/build/darwin/Info.dev.plist @@ -6,9 +6,9 @@ CFBundleName My Product CFBundleExecutable - comet + asdf CFBundleIdentifier - com.wails.comet + com.wails.asdf CFBundleVersion 0.1.0 CFBundleGetInfoString @@ -29,4 +29,4 @@ - + \ No newline at end of file diff --git a/build/Info.plist b/build/darwin/Info.plist similarity index 91% rename from build/Info.plist rename to build/darwin/Info.plist index af82f72f..ec6553a0 100644 --- a/build/Info.plist +++ b/build/darwin/Info.plist @@ -6,9 +6,9 @@ CFBundleName My Product CFBundleExecutable - comet + asdf CFBundleIdentifier - com.wails.comet + com.wails.asdf CFBundleVersion 0.1.0 CFBundleGetInfoString @@ -24,4 +24,4 @@ NSHumanReadableCopyright © now, My Company - + \ No newline at end of file diff --git a/build/darwin/Taskfile.yml b/build/darwin/Taskfile.yml new file mode 100644 index 00000000..c7d5ce8b --- /dev/null +++ b/build/darwin/Taskfile.yml @@ -0,0 +1,70 @@ +version: '3' + +includes: + common: ../Taskfile.yml + +tasks: + build: + summary: Creates a production build of the application + deps: + - task: common:go:mod:tidy + - task: common:build:frontend + - task: common:generate:icons + cmds: + - go build {{.BUILD_FLAGS}} -o {{.OUTPUT}} + vars: + BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production,fts5 -trimpath -ldflags="-w -s"{{else}}-tags fts5 -gcflags=all="-N -l"{{end}}' + DEFAULT_OUTPUT: '{{.BIN_DIR}}/{{.APP_NAME}}' + OUTPUT: '{{ .OUTPUT | default .DEFAULT_OUTPUT }}' + env: + GOOS: darwin + CGO_ENABLED: 1 + GOARCH: '{{.ARCH | default ARCH}}' + CGO_CFLAGS: "-mmacosx-version-min=10.15" + CGO_LDFLAGS: "-mmacosx-version-min=10.15" + MACOSX_DEPLOYMENT_TARGET: "10.15" + PRODUCTION: '{{.PRODUCTION | default "false"}}' + + build:universal: + summary: Builds darwin universal binary (arm64 + amd64) + deps: + - task: build + vars: + ARCH: amd64 + OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" + - task: build + vars: + ARCH: arm64 + OUTPUT: "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" + cmds: + - lipo -create -output "{{.BIN_DIR}}/{{.APP_NAME}}" "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" + - rm "{{.BIN_DIR}}/{{.APP_NAME}}-amd64" "{{.BIN_DIR}}/{{.APP_NAME}}-arm64" + + package: + summary: Packages a production build of the application into a `.app` bundle + deps: + - task: build + vars: + PRODUCTION: "true" + cmds: + - task: create:app:bundle + + package:universal: + summary: Packages darwin universal binary (arm64 + amd64) + deps: + - task: build:universal + cmds: + - task: create:app:bundle + + + create:app:bundle: + summary: Creates an `.app` bundle + cmds: + - mkdir -p {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/{MacOS,Resources} + - cp build/darwin/icons.icns {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/Resources + - cp {{.BIN_DIR}}/{{.APP_NAME}} {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents/MacOS + - cp build/darwin/Info.plist {{.BIN_DIR}}/{{.APP_NAME}}.app/Contents + + run: + cmds: + - '{{.BIN_DIR}}/{{.APP_NAME}}' diff --git a/build/icons.icns b/build/darwin/icons.icns similarity index 100% rename from build/icons.icns rename to build/darwin/icons.icns diff --git a/build/devmode.config.yaml b/build/devmode.config.yaml deleted file mode 100644 index 1a441f24..00000000 --- a/build/devmode.config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -config: - root_path: . - log_level: warn - debounce: 1000 - ignore: - dir: - - .git - - node_modules - - frontend - - bin - file: - - .DS_Store - - .gitignore - - .gitkeep - watched_extension: - - "*.go" - git_ignore: true - executes: - - cmd: wails3 task install:frontend:deps - type: once - - cmd: wails3 task dev:frontend - type: background - - cmd: go mod tidy - type: blocking - - cmd: wails3 task build - type: blocking - - cmd: wails3 task run - type: primary diff --git a/build/linux/Taskfile.yml b/build/linux/Taskfile.yml new file mode 100644 index 00000000..971ab5f1 --- /dev/null +++ b/build/linux/Taskfile.yml @@ -0,0 +1,114 @@ +version: '3' + +includes: + common: ../Taskfile.yml + +tasks: + build: + summary: Builds the application for Linux + deps: + - task: common:go:mod:tidy + - task: common:build:frontend + - task: common:generate:icons + cmds: + - go build {{.BUILD_FLAGS}} -o {{.BIN_DIR}}/{{.APP_NAME}} + vars: + BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production -trimpath -ldflags="-w -s"{{else}}-gcflags=all="-l"{{end}}' + env: + GOOS: linux + CGO_ENABLED: 1 + GOARCH: '{{.ARCH | default ARCH}}' + PRODUCTION: '{{.PRODUCTION | default "false"}}' + + package: + summary: Packages a production build of the application for Linux + deps: + - task: build + vars: + PRODUCTION: "true" + cmds: + - task: create:appimage + - task: create:deb + - task: create:rpm + - task: create:aur + + create:appimage: + summary: Creates an AppImage + dir: build/linux/appimage + deps: + - task: build + vars: + PRODUCTION: "true" + - task: generate:dotdesktop + cmds: + - cp {{.APP_BINARY}} {{.APP_NAME}} + - cp ../../appicon.png appicon.png + - wails3 generate appimage -binary {{.APP_NAME}} -icon {{.ICON}} -desktopfile {{.DESKTOP_FILE}} -outputdir {{.OUTPUT_DIR}} -builddir {{.ROOT_DIR}}/build/linux/appimage/build + vars: + APP_NAME: '{{.APP_NAME}}' + APP_BINARY: '../../../bin/{{.APP_NAME}}' + ICON: '../../appicon.png' + DESKTOP_FILE: '../{{.APP_NAME}}.desktop' + OUTPUT_DIR: '../../../bin' + + create:deb: + summary: Creates a deb package + deps: + - task: build + vars: + PRODUCTION: "true" + cmds: + - task: generate:dotdesktop + - task: generate:deb + + create:rpm: + summary: Creates a rpm package + deps: + - task: build + vars: + PRODUCTION: "true" + cmds: + - task: generate:dotdesktop + - task: generate:rpm + + create:aur: + summary: Creates a arch linux packager package + deps: + - task: build + vars: + PRODUCTION: "true" + cmds: + - task: generate:dotdesktop + - task: generate:aur + + generate:deb: + summary: Creates a deb package + cmds: + - wails3 tool package -name {{.APP_NAME}} -format deb -config ./build/linux/nfpm/nfpm.yaml -out {{.ROOT_DIR}}/bin + + generate:rpm: + summary: Creates a rpm package + cmds: + - wails3 tool package -name {{.APP_NAME}} -format rpm -config ./build/linux/nfpm/nfpm.yaml -out {{.ROOT_DIR}}/bin + + generate:aur: + summary: Creates a arch linux packager package + cmds: + - wails3 tool package -name {{.APP_NAME}} -format archlinux -config ./build/linux/nfpm/nfpm.yaml -out {{.ROOT_DIR}}/bin + + generate:dotdesktop: + summary: Generates a `.desktop` file + dir: build + cmds: + - mkdir -p {{.ROOT_DIR}}/build/linux/appimage + - wails3 generate .desktop -name "{{.APP_NAME}}" -exec "{{.EXEC}}" -icon "{{.ICON}}" -outputfile {{.ROOT_DIR}}/build/linux/{{.APP_NAME}}.desktop -categories "{{.CATEGORIES}}" + vars: + APP_NAME: '{{.APP_NAME}}' + EXEC: '{{.APP_NAME}}' + ICON: 'appicon' + CATEGORIES: 'Development;' + OUTPUTFILE: '{{.ROOT_DIR}}/build/linux/{{.APP_NAME}}.desktop' + + run: + cmds: + - '{{.BIN_DIR}}/{{.APP_NAME}}' diff --git a/build/appimage/build.sh b/build/linux/appimage/build.sh similarity index 100% rename from build/appimage/build.sh rename to build/linux/appimage/build.sh diff --git a/build/linux/nfpm/nfpm.yaml b/build/linux/nfpm/nfpm.yaml new file mode 100644 index 00000000..c40836bf --- /dev/null +++ b/build/linux/nfpm/nfpm.yaml @@ -0,0 +1,50 @@ +# Feel free to remove those if you don't want/need to use them. +# Make sure to check the documentation at https://nfpm.goreleaser.com +# +# The lines below are called `modelines`. See `:help modeline` + +name: "asdf" +arch: ${GOARCH} +platform: "linux" +version: "0.1.0" +section: "default" +priority: "extra" +maintainer: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}> +description: "My Product Description" +vendor: "My Company" +homepage: "https://wails.io" +license: "MIT" +release: "1" + +contents: + - src: "./bin/asdf" + dst: "/usr/local/bin/asdf" + - src: "./build/appicon.png" + dst: "/usr/share/icons/hicolor/128x128/apps/asdf.png" + - src: "./build/linux/asdf.desktop" + dst: "/usr/share/applications/asdf.desktop" + +depends: + - gtk3 + - libwebkit2gtk + +# replaces: +# - foobar +# provides: +# - bar +# depends: +# - gtk3 +# - libwebkit2gtk +# recommends: +# - whatever +# suggests: +# - something-else +# conflicts: +# - not-foo +# - not-bar +# changelog: "changelog.yaml" +# scripts: +# preinstall: ./build/linux/nfpm/scripts/preinstall.sh +# postinstall: ./build/linux/nfpm/scripts/postinstall.sh +# preremove: ./build/linux/nfpm/scripts/preremove.sh +# postremove: ./build/linux/nfpm/scripts/postremove.sh diff --git a/build/linux/nfpm/scripts/postinstall.sh b/build/linux/nfpm/scripts/postinstall.sh new file mode 100644 index 00000000..a9bf588e --- /dev/null +++ b/build/linux/nfpm/scripts/postinstall.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/build/linux/nfpm/scripts/postremove.sh b/build/linux/nfpm/scripts/postremove.sh new file mode 100644 index 00000000..a9bf588e --- /dev/null +++ b/build/linux/nfpm/scripts/postremove.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/build/linux/nfpm/scripts/preinstall.sh b/build/linux/nfpm/scripts/preinstall.sh new file mode 100644 index 00000000..a9bf588e --- /dev/null +++ b/build/linux/nfpm/scripts/preinstall.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/build/linux/nfpm/scripts/preremove.sh b/build/linux/nfpm/scripts/preremove.sh new file mode 100644 index 00000000..a9bf588e --- /dev/null +++ b/build/linux/nfpm/scripts/preremove.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/build/windows/Taskfile.yml b/build/windows/Taskfile.yml new file mode 100644 index 00000000..fd4c6d2f --- /dev/null +++ b/build/windows/Taskfile.yml @@ -0,0 +1,56 @@ +version: '3' + +includes: + common: ../Taskfile.yml + +tasks: + build: + summary: Builds the application for Windows + deps: + - task: common:go:mod:tidy + - task: common:build:frontend + - task: common:generate:icons + cmds: + - task: generate:syso + - go build {{.BUILD_FLAGS}} -o {{.BIN_DIR}}/{{.APP_NAME}}.exe + - cmd: powershell Remove-item *.syso + platforms: [windows] + - cmd: rm -f *.syso + platforms: [linux, darwin] + vars: + BUILD_FLAGS: '{{if eq .PRODUCTION "true"}}-tags production -trimpath -ldflags="-w -s -H windowsgui"{{else}}-gcflags=all="-l"{{end}}' + env: + GOOS: windows + CGO_ENABLED: 0 + GOARCH: '{{.ARCH | default ARCH}}' + PRODUCTION: '{{.PRODUCTION | default "false"}}' + + package: + summary: Packages a production build of the application into a `.exe` bundle + cmds: + - task: create:nsis:installer + + generate:syso: + summary: Generates Windows `.syso` file + dir: build + cmds: + - wails3 generate syso -arch {{.ARCH}} -icon windows/icon.ico -manifest windows/wails.exe.manifest -info windows/info.json -out ../wails_windows_{{.ARCH}}.syso + vars: + ARCH: '{{.ARCH | default ARCH}}' + + create:nsis:installer: + summary: Creates an NSIS installer + dir: build/windows/nsis + deps: + - task: build + vars: + PRODUCTION: "true" + cmds: + - makensis -DARG_WAILS_{{.ARG_FLAG}}_BINARY="{{.ROOT_DIR}}\{{.BIN_DIR}}\{{.APP_NAME}}.exe" project.nsi + vars: + ARCH: '{{.ARCH | default ARCH}}' + ARG_FLAG: '{{if eq .ARCH "amd64"}}AMD64{{else}}ARM64{{end}}' + + run: + cmds: + - '{{.BIN_DIR}}\\{{.APP_NAME}}.exe' \ No newline at end of file diff --git a/build/icon.ico b/build/windows/icon.ico similarity index 100% rename from build/icon.ico rename to build/windows/icon.ico diff --git a/build/windows/icons.ico b/build/windows/icons.ico new file mode 100644 index 0000000000000000000000000000000000000000..bfa0690b7f8aea8d793026b51f9fc4eed2e00af7 GIT binary patch literal 21677 zcmd43Wl$VZ7cJT|xLXn+xFoo{4;DN?g1fr~cLoR+Gzktt0|a+>2oM4U2n2V6yF2qb z-}i3St-4jW-urXw&W|p7db(%2&pCUqwf5Qo00ck<{`;Z^+PMM13fzIi|Gh&E#NYw| z9S;D&VE^5BLIZ$GNdVyF{O^7|3II?jfS;uP@BRW30F=E30DS!a?!SNnK;#<$h*Enk zhlBYX6MPp(L0$%Y2Lk>H0nq<_wSnt5@H@HRE67M{cxUc^u`M%{ZCKX+;%2St=zxtH z8jB`sT2;-Jh1SJyvLYRl7uO>37lS}HDj|=dV1jV>S!I--;*)m9hg{hr5xcyveGzRO zUtZ^h7tWi+$oY38QQC-_`9pZT+bDmjsrm`GhHKW_XYb(F2X3#qUCy?aObN9<*4t?w zltA&3SJ~(R z=go+-_)@+7G>jEJigSTbCih^eORXVKA$plW`!-7lx&QGrrPJW%d_om5QT(>3Vt;qH z#Swi-9$#g>KbFimQ^f1AU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M4syQmipxEQf$w>B=-XVbnqAvr@;#Gs#h{cmTg8v97HZ9UFJ+s0v{+becRWv?g&F` zk9C`og#s6%uWX-t%ih3Tf_i+mZkTGf62W^lYuPB)O#FL8&ozFjm~BGrjwmqcBg=E% zvQG)COXk9V*)cvXoDC?($VBsBoz_=|Z>l(IDx8MjEs_&k9v^OU^ zn8J%d7R|ayS+`6piDfZQuXxMa)asXy@80*>Egf4`>+`&ONav8flyNcqp3s5v#6Df_ ou5=8}@A^#05^yFjv{|%CV0m?W0y8r+H literal 0 HcmV?d00001 diff --git a/build/info.json b/build/windows/info.json similarity index 100% rename from build/info.json rename to build/windows/info.json diff --git a/build/nsis/project.nsi b/build/windows/nsis/project.nsi similarity index 94% rename from build/nsis/project.nsi rename to build/windows/nsis/project.nsi index caf67069..98b232fa 100644 --- a/build/nsis/project.nsi +++ b/build/windows/nsis/project.nsi @@ -19,7 +19,7 @@ Unicode true #### ## The following information is taken from the wails_tools.nsh file, but they can be overwritten here. #### -## !define INFO_PROJECTNAME "my-project" # Default "comet" +## !define INFO_PROJECTNAME "my-project" # Default "asdf" ## !define INFO_COMPANYNAME "My Company" # Default "My Company" ## !define INFO_PRODUCTNAME "My Product Name" # Default "My Product" ## !define INFO_PRODUCTVERSION "1.0.0" # Default "0.1.0" @@ -71,7 +71,7 @@ ManifestDPIAware true #!finalize 'signtool --file "%1"' Name "${INFO_PRODUCTNAME}" -OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file. +OutFile "..\..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file. InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder). ShowInstDetails show # This will always show the installation details. @@ -91,6 +91,8 @@ Section CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}" CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}" + !insertmacro wails.associateFiles + !insertmacro wails.writeUninstaller SectionEnd @@ -104,5 +106,7 @@ Section "uninstall" Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk" + !insertmacro wails.unassociateFiles + !insertmacro wails.deleteUninstaller SectionEnd diff --git a/build/nsis/wails_tools.nsh b/build/windows/nsis/wails_tools.nsh similarity index 79% rename from build/nsis/wails_tools.nsh rename to build/windows/nsis/wails_tools.nsh index 6de84e9d..39da55ad 100644 --- a/build/nsis/wails_tools.nsh +++ b/build/windows/nsis/wails_tools.nsh @@ -5,7 +5,7 @@ !include "FileFunc.nsh" !ifndef INFO_PROJECTNAME - !define INFO_PROJECTNAME "comet" + !define INFO_PROJECTNAME "asdf" !endif !ifndef INFO_COMPANYNAME !define INFO_COMPANYNAME "My Company" @@ -177,3 +177,36 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}" SetDetailsPrint both ok: !macroend + +# Copy of APP_ASSOCIATE and APP_UNASSOCIATE macros from here https://gist.github.com/nikku/281d0ef126dbc215dd58bfd5b3a5cd5b +!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND + ; Backup the previously associated file class + ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" "" + WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "${FILECLASS}_backup" "$R0" + + WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "${FILECLASS}" + + WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}" "" `${DESCRIPTION}` + WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\DefaultIcon" "" `${ICON}` + WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell" "" "open" + WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open" "" `${COMMANDTEXT}` + WriteRegStr SHELL_CONTEXT "Software\Classes\${FILECLASS}\shell\open\command" "" `${COMMAND}` +!macroend + +!macro APP_UNASSOCIATE EXT FILECLASS + ; Backup the previously associated file class + ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\.${EXT}" `${FILECLASS}_backup` + WriteRegStr SHELL_CONTEXT "Software\Classes\.${EXT}" "" "$R0" + + DeleteRegKey SHELL_CONTEXT `Software\Classes\${FILECLASS}` +!macroend + +!macro wails.associateFiles + ; Create file associations + +!macroend + +!macro wails.unassociateFiles + ; Delete app associations + +!macroend \ No newline at end of file diff --git a/build/wails.exe.manifest b/build/windows/wails.exe.manifest similarity index 88% rename from build/wails.exe.manifest rename to build/windows/wails.exe.manifest index 10faed98..c1310aa1 100644 --- a/build/wails.exe.manifest +++ b/build/windows/wails.exe.manifest @@ -1,6 +1,6 @@ - + @@ -12,4 +12,4 @@ permonitorv2,permonitor - + \ No newline at end of file diff --git a/frontend/bindings/database/sql/index.js b/frontend/bindings/database/sql/index.js new file mode 100644 index 00000000..580fb67a --- /dev/null +++ b/frontend/bindings/database/sql/index.js @@ -0,0 +1,5 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +export * from "./models.js"; diff --git a/frontend/bindings/database/sql/models.js b/frontend/bindings/database/sql/models.js new file mode 100644 index 00000000..02ff7f8b --- /dev/null +++ b/frontend/bindings/database/sql/models.js @@ -0,0 +1,98 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Create as $Create} from "@wailsio/runtime"; + +/** + * NullInt64 represents an int64 that may be null. + * NullInt64 implements the [Scanner] interface so + * it can be used as a scan destination, similar to [NullString]. + */ +export class NullInt64 { + /** + * Creates a new NullInt64 instance. + * @param {Partial} [$$source = {}] - The source object to create the NullInt64. + */ + constructor($$source = {}) { + if (!("Int64" in $$source)) { + /** + * @member + * @type {number} + */ + this["Int64"] = 0; + } + if (!("Valid" in $$source)) { + /** + * Valid is true if Int64 is not NULL + * @member + * @type {boolean} + */ + this["Valid"] = false; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new NullInt64 instance from a string or object. + * @param {any} [$$source = {}] + * @returns {NullInt64} + */ + static createFrom($$source = {}) { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new NullInt64(/** @type {Partial} */($$parsedSource)); + } +} + +/** + * NullString represents a string that may be null. + * NullString implements the [Scanner] interface so + * it can be used as a scan destination: + * + * var s NullString + * err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&s) + * ... + * if s.Valid { + * // use s.String + * } else { + * // NULL value + * } + */ +export class NullString { + /** + * Creates a new NullString instance. + * @param {Partial} [$$source = {}] - The source object to create the NullString. + */ + constructor($$source = {}) { + if (!("String" in $$source)) { + /** + * @member + * @type {string} + */ + this["String"] = ""; + } + if (!("Valid" in $$source)) { + /** + * Valid is true if String is not NULL + * @member + * @type {boolean} + */ + this["Valid"] = false; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new NullString instance from a string or object. + * @param {any} [$$source = {}] + * @returns {NullString} + */ + static createFrom($$source = {}) { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new NullString(/** @type {Partial} */($$parsedSource)); + } +} diff --git a/frontend/bindings/github.com/nodetec/comet/db/index.js b/frontend/bindings/github.com/nodetec/comet/db/index.js new file mode 100644 index 00000000..580fb67a --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/db/index.js @@ -0,0 +1,5 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +export * from "./models.js"; diff --git a/frontend/bindings/github.com/nodetec/comet/db/models.js b/frontend/bindings/github.com/nodetec/comet/db/models.js new file mode 100644 index 00000000..14b4f175 --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/db/models.js @@ -0,0 +1,596 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as sql$0 from "../../../../database/sql/models.js"; + +export class CreateNoteFromTrashRow { + /** + * Creates a new CreateNoteFromTrashRow instance. + * @param {Partial} [$$source = {}] - The source object to create the CreateNoteFromTrashRow. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("ID_2" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID_2"] = 0; + } + if (!("StatusID" in $$source)) { + /** + * @member + * @type {sql$0.NullInt64} + */ + this["StatusID"] = (new sql$0.NullInt64()); + } + if (!("NotebookID" in $$source)) { + /** + * @member + * @type {number} + */ + this["NotebookID"] = 0; + } + if (!("Content" in $$source)) { + /** + * @member + * @type {string} + */ + this["Content"] = ""; + } + if (!("Title" in $$source)) { + /** + * @member + * @type {string} + */ + this["Title"] = ""; + } + if (!("CreatedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["CreatedAt"] = ""; + } + if (!("ModifiedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["ModifiedAt"] = ""; + } + if (!("PublishedAt" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["PublishedAt"] = (new sql$0.NullString()); + } + if (!("EventID" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["EventID"] = (new sql$0.NullString()); + } + if (!("Pinned" in $$source)) { + /** + * @member + * @type {boolean} + */ + this["Pinned"] = false; + } + if (!("Notetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Notetype"] = ""; + } + if (!("Filetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Filetype"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new CreateNoteFromTrashRow instance from a string or object. + * @param {any} [$$source = {}] + * @returns {CreateNoteFromTrashRow} + */ + static createFrom($$source = {}) { + const $$createField2_0 = $$createType0; + const $$createField8_0 = $$createType1; + const $$createField9_0 = $$createType1; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("StatusID" in $$parsedSource) { + $$parsedSource["StatusID"] = $$createField2_0($$parsedSource["StatusID"]); + } + if ("PublishedAt" in $$parsedSource) { + $$parsedSource["PublishedAt"] = $$createField8_0($$parsedSource["PublishedAt"]); + } + if ("EventID" in $$parsedSource) { + $$parsedSource["EventID"] = $$createField9_0($$parsedSource["EventID"]); + } + return new CreateNoteFromTrashRow(/** @type {Partial} */($$parsedSource)); + } +} + +export class GetNoteFromTrashRow { + /** + * Creates a new GetNoteFromTrashRow instance. + * @param {Partial} [$$source = {}] - The source object to create the GetNoteFromTrashRow. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("NoteID" in $$source)) { + /** + * @member + * @type {number} + */ + this["NoteID"] = 0; + } + if (!("Content" in $$source)) { + /** + * @member + * @type {string} + */ + this["Content"] = ""; + } + if (!("Title" in $$source)) { + /** + * @member + * @type {string} + */ + this["Title"] = ""; + } + if (!("CreatedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["CreatedAt"] = ""; + } + if (!("ModifiedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["ModifiedAt"] = ""; + } + if (!("Tags" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["Tags"] = (new sql$0.NullString()); + } + if (!("NotebookID" in $$source)) { + /** + * @member + * @type {number} + */ + this["NotebookID"] = 0; + } + if (!("PublishedAt" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["PublishedAt"] = (new sql$0.NullString()); + } + if (!("EventID" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["EventID"] = (new sql$0.NullString()); + } + if (!("Notetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Notetype"] = ""; + } + if (!("Filetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Filetype"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new GetNoteFromTrashRow instance from a string or object. + * @param {any} [$$source = {}] + * @returns {GetNoteFromTrashRow} + */ + static createFrom($$source = {}) { + const $$createField6_0 = $$createType1; + const $$createField8_0 = $$createType1; + const $$createField9_0 = $$createType1; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("Tags" in $$parsedSource) { + $$parsedSource["Tags"] = $$createField6_0($$parsedSource["Tags"]); + } + if ("PublishedAt" in $$parsedSource) { + $$parsedSource["PublishedAt"] = $$createField8_0($$parsedSource["PublishedAt"]); + } + if ("EventID" in $$parsedSource) { + $$parsedSource["EventID"] = $$createField9_0($$parsedSource["EventID"]); + } + return new GetNoteFromTrashRow(/** @type {Partial} */($$parsedSource)); + } +} + +export class Note { + /** + * Creates a new Note instance. + * @param {Partial} [$$source = {}] - The source object to create the Note. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("StatusID" in $$source)) { + /** + * @member + * @type {sql$0.NullInt64} + */ + this["StatusID"] = (new sql$0.NullInt64()); + } + if (!("NotebookID" in $$source)) { + /** + * @member + * @type {number} + */ + this["NotebookID"] = 0; + } + if (!("Content" in $$source)) { + /** + * @member + * @type {string} + */ + this["Content"] = ""; + } + if (!("Title" in $$source)) { + /** + * @member + * @type {string} + */ + this["Title"] = ""; + } + if (!("CreatedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["CreatedAt"] = ""; + } + if (!("ModifiedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["ModifiedAt"] = ""; + } + if (!("PublishedAt" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["PublishedAt"] = (new sql$0.NullString()); + } + if (!("EventID" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["EventID"] = (new sql$0.NullString()); + } + if (!("Pinned" in $$source)) { + /** + * @member + * @type {boolean} + */ + this["Pinned"] = false; + } + if (!("Notetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Notetype"] = ""; + } + if (!("Filetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Filetype"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Note instance from a string or object. + * @param {any} [$$source = {}] + * @returns {Note} + */ + static createFrom($$source = {}) { + const $$createField1_0 = $$createType0; + const $$createField7_0 = $$createType1; + const $$createField8_0 = $$createType1; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("StatusID" in $$parsedSource) { + $$parsedSource["StatusID"] = $$createField1_0($$parsedSource["StatusID"]); + } + if ("PublishedAt" in $$parsedSource) { + $$parsedSource["PublishedAt"] = $$createField7_0($$parsedSource["PublishedAt"]); + } + if ("EventID" in $$parsedSource) { + $$parsedSource["EventID"] = $$createField8_0($$parsedSource["EventID"]); + } + return new Note(/** @type {Partial} */($$parsedSource)); + } +} + +export class Notebook { + /** + * Creates a new Notebook instance. + * @param {Partial} [$$source = {}] - The source object to create the Notebook. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("Name" in $$source)) { + /** + * @member + * @type {string} + */ + this["Name"] = ""; + } + if (!("CreatedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["CreatedAt"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Notebook instance from a string or object. + * @param {any} [$$source = {}] + * @returns {Notebook} + */ + static createFrom($$source = {}) { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new Notebook(/** @type {Partial} */($$parsedSource)); + } +} + +export class Tag { + /** + * Creates a new Tag instance. + * @param {Partial} [$$source = {}] - The source object to create the Tag. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("Name" in $$source)) { + /** + * @member + * @type {string} + */ + this["Name"] = ""; + } + if (!("Color" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["Color"] = (new sql$0.NullString()); + } + if (!("Icon" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["Icon"] = (new sql$0.NullString()); + } + if (!("CreatedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["CreatedAt"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Tag instance from a string or object. + * @param {any} [$$source = {}] + * @returns {Tag} + */ + static createFrom($$source = {}) { + const $$createField2_0 = $$createType1; + const $$createField3_0 = $$createType1; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("Color" in $$parsedSource) { + $$parsedSource["Color"] = $$createField2_0($$parsedSource["Color"]); + } + if ("Icon" in $$parsedSource) { + $$parsedSource["Icon"] = $$createField3_0($$parsedSource["Icon"]); + } + return new Tag(/** @type {Partial} */($$parsedSource)); + } +} + +export class Trash { + /** + * Creates a new Trash instance. + * @param {Partial} [$$source = {}] - The source object to create the Trash. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("NoteID" in $$source)) { + /** + * @member + * @type {number} + */ + this["NoteID"] = 0; + } + if (!("NotebookID" in $$source)) { + /** + * @member + * @type {number} + */ + this["NotebookID"] = 0; + } + if (!("Content" in $$source)) { + /** + * @member + * @type {string} + */ + this["Content"] = ""; + } + if (!("Title" in $$source)) { + /** + * @member + * @type {string} + */ + this["Title"] = ""; + } + if (!("CreatedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["CreatedAt"] = ""; + } + if (!("ModifiedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["ModifiedAt"] = ""; + } + if (!("Tags" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["Tags"] = (new sql$0.NullString()); + } + if (!("PublishedAt" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["PublishedAt"] = (new sql$0.NullString()); + } + if (!("EventID" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["EventID"] = (new sql$0.NullString()); + } + if (!("Notetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Notetype"] = ""; + } + if (!("Filetype" in $$source)) { + /** + * @member + * @type {string} + */ + this["Filetype"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Trash instance from a string or object. + * @param {any} [$$source = {}] + * @returns {Trash} + */ + static createFrom($$source = {}) { + const $$createField7_0 = $$createType1; + const $$createField8_0 = $$createType1; + const $$createField9_0 = $$createType1; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("Tags" in $$parsedSource) { + $$parsedSource["Tags"] = $$createField7_0($$parsedSource["Tags"]); + } + if ("PublishedAt" in $$parsedSource) { + $$parsedSource["PublishedAt"] = $$createField8_0($$parsedSource["PublishedAt"]); + } + if ("EventID" in $$parsedSource) { + $$parsedSource["EventID"] = $$createField9_0($$parsedSource["EventID"]); + } + return new Trash(/** @type {Partial} */($$parsedSource)); + } +} + +// Private type creation functions +const $$createType0 = sql$0.NullInt64.createFrom; +const $$createType1 = sql$0.NullString.createFrom; diff --git a/frontend/bindings/github.com/nodetec/comet/service/index.js b/frontend/bindings/github.com/nodetec/comet/service/index.js new file mode 100644 index 00000000..a6295320 --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/index.js @@ -0,0 +1,22 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +import * as NostrKeyService from "./nostrkeyservice.js"; +import * as NoteService from "./noteservice.js"; +import * as NoteTagService from "./notetagservice.js"; +import * as NotebookService from "./notebookservice.js"; +import * as RelayService from "./relayservice.js"; +import * as SettingService from "./settingservice.js"; +import * as TagService from "./tagservice.js"; +export { + NostrKeyService, + NoteService, + NoteTagService, + NotebookService, + RelayService, + SettingService, + TagService +}; + +export * from "./models.js"; diff --git a/frontend/bindings/github.com/nodetec/comet/service/models.js b/frontend/bindings/github.com/nodetec/comet/service/models.js new file mode 100644 index 00000000..7de58111 --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/models.js @@ -0,0 +1,292 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as sql$0 from "../../../../database/sql/models.js"; + +export class NostrKey { + /** + * Creates a new NostrKey instance. + * @param {Partial} [$$source = {}] - The source object to create the NostrKey. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("Nsec" in $$source)) { + /** + * @member + * @type {string} + */ + this["Nsec"] = ""; + } + if (!("Npub" in $$source)) { + /** + * @member + * @type {string} + */ + this["Npub"] = ""; + } + if (!("Active" in $$source)) { + /** + * @member + * @type {boolean} + */ + this["Active"] = false; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new NostrKey instance from a string or object. + * @param {any} [$$source = {}] + * @returns {NostrKey} + */ + static createFrom($$source = {}) { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new NostrKey(/** @type {Partial} */($$parsedSource)); + } +} + +export class Relay { + /** + * Creates a new Relay instance. + * @param {Partial} [$$source = {}] - The source object to create the Relay. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("Url" in $$source)) { + /** + * @member + * @type {string} + */ + this["Url"] = ""; + } + if (!("Read" in $$source)) { + /** + * @member + * @type {boolean} + */ + this["Read"] = false; + } + if (!("Write" in $$source)) { + /** + * @member + * @type {boolean} + */ + this["Write"] = false; + } + if (!("Sync" in $$source)) { + /** + * @member + * @type {boolean} + */ + this["Sync"] = false; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Relay instance from a string or object. + * @param {any} [$$source = {}] + * @returns {Relay} + */ + static createFrom($$source = {}) { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new Relay(/** @type {Partial} */($$parsedSource)); + } +} + +export class Settings { + /** + * Creates a new Settings instance. + * @param {Partial} [$$source = {}] - The source object to create the Settings. + */ + constructor($$source = {}) { + if (!("Theme" in $$source)) { + /** + * theme + * @member + * @type {string} + */ + this["Theme"] = ""; + } + if (!("Vim" in $$source)) { + /** + * editor + * @member + * @type {string} + */ + this["Vim"] = ""; + } + if (!("LineNumbers" in $$source)) { + /** + * @member + * @type {string} + */ + this["LineNumbers"] = ""; + } + if (!("HighlightActiveLine" in $$source)) { + /** + * @member + * @type {string} + */ + this["HighlightActiveLine"] = ""; + } + if (!("LineWrapping" in $$source)) { + /** + * @member + * @type {string} + */ + this["LineWrapping"] = ""; + } + if (!("IndentSpaces" in $$source)) { + /** + * @member + * @type {string} + */ + this["IndentSpaces"] = ""; + } + if (!("FontSize" in $$source)) { + /** + * @member + * @type {string} + */ + this["FontSize"] = ""; + } + if (!("FontFamily" in $$source)) { + /** + * @member + * @type {string} + */ + this["FontFamily"] = ""; + } + if (!("LineHeight" in $$source)) { + /** + * @member + * @type {string} + */ + this["LineHeight"] = ""; + } + if (!("Npub" in $$source)) { + /** + * profile + * @member + * @type {string} + */ + this["Npub"] = ""; + } + if (!("Nsec" in $$source)) { + /** + * @member + * @type {string} + */ + this["Nsec"] = ""; + } + if (!("Relays" in $$source)) { + /** + * relays + * @member + * @type {string} + */ + this["Relays"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Settings instance from a string or object. + * @param {any} [$$source = {}] + * @returns {Settings} + */ + static createFrom($$source = {}) { + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + return new Settings(/** @type {Partial} */($$parsedSource)); + } +} + +export class Tag { + /** + * Creates a new Tag instance. + * @param {Partial} [$$source = {}] - The source object to create the Tag. + */ + constructor($$source = {}) { + if (!("ID" in $$source)) { + /** + * @member + * @type {number} + */ + this["ID"] = 0; + } + if (!("Name" in $$source)) { + /** + * @member + * @type {string} + */ + this["Name"] = ""; + } + if (!("Color" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["Color"] = (new sql$0.NullString()); + } + if (!("Icon" in $$source)) { + /** + * @member + * @type {sql$0.NullString} + */ + this["Icon"] = (new sql$0.NullString()); + } + if (!("CreatedAt" in $$source)) { + /** + * @member + * @type {string} + */ + this["CreatedAt"] = ""; + } + + Object.assign(this, $$source); + } + + /** + * Creates a new Tag instance from a string or object. + * @param {any} [$$source = {}] + * @returns {Tag} + */ + static createFrom($$source = {}) { + const $$createField2_0 = $$createType0; + const $$createField3_0 = $$createType0; + let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; + if ("Color" in $$parsedSource) { + $$parsedSource["Color"] = $$createField2_0($$parsedSource["Color"]); + } + if ("Icon" in $$parsedSource) { + $$parsedSource["Icon"] = $$createField3_0($$parsedSource["Icon"]); + } + return new Tag(/** @type {Partial} */($$parsedSource)); + } +} + +// Private type creation functions +const $$createType0 = sql$0.NullString.createFrom; diff --git a/frontend/bindings/github.com/nodetec/comet/service/nostrkeyservice.js b/frontend/bindings/github.com/nodetec/comet/service/nostrkeyservice.js new file mode 100644 index 00000000..85623c14 --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/nostrkeyservice.js @@ -0,0 +1,76 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +/** + * @param {string} nsec + * @param {string} npub + * @param {boolean} active + * @returns {Promise<$models.NostrKey> & { cancel(): void }} + */ +export function CreateNostrKey(nsec, npub, active) { + let $resultPromise = /** @type {any} */($Call.ByID(450605574, nsec, npub, active)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function DeleteNostrKey(id) { + let $resultPromise = /** @type {any} */($Call.ByID(907990853, id)); + return $resultPromise; +} + +/** + * @param {number} id + * @returns {Promise<$models.NostrKey> & { cancel(): void }} + */ +export function GetNostrKey(id) { + let $resultPromise = /** @type {any} */($Call.ByID(3016819188, id)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @returns {Promise<$models.NostrKey[]> & { cancel(): void }} + */ +export function ListNostrKeys() { + let $resultPromise = /** @type {any} */($Call.ByID(2591303287)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType1($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @param {string} nsec + * @param {string} npub + * @param {boolean} active + * @returns {Promise & { cancel(): void }} + */ +export function UpdateNostrKey(id, nsec, npub, active) { + let $resultPromise = /** @type {any} */($Call.ByID(3751870067, id, nsec, npub, active)); + return $resultPromise; +} + +// Private type creation functions +const $$createType0 = $models.NostrKey.createFrom; +const $$createType1 = $Create.Array($$createType0); diff --git a/frontend/bindings/github.com/nodetec/comet/service/notebookservice.js b/frontend/bindings/github.com/nodetec/comet/service/notebookservice.js new file mode 100644 index 00000000..e7a6bc0f --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/notebookservice.js @@ -0,0 +1,127 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as db$0 from "../db/models.js"; + +/** + * @param {number} notebookID + * @param {number} tagID + * @returns {Promise & { cancel(): void }} + */ +export function AddTagToNotebook(notebookID, tagID) { + let $resultPromise = /** @type {any} */($Call.ByID(2083083162, notebookID, tagID)); + return $resultPromise; +} + +/** + * @param {number} notebookID + * @param {number} tagID + * @returns {Promise & { cancel(): void }} + */ +export function CheckTagForNotebook(notebookID, tagID) { + let $resultPromise = /** @type {any} */($Call.ByID(1901298027, notebookID, tagID)); + return $resultPromise; +} + +/** + * @param {string} name + * @returns {Promise & { cancel(): void }} + */ +export function CreateNotebook(name) { + let $resultPromise = /** @type {any} */($Call.ByID(4169347514, name)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function DeleteNotebook(id) { + let $resultPromise = /** @type {any} */($Call.ByID(588830629, id)); + return $resultPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function GetNotebook(id) { + let $resultPromise = /** @type {any} */($Call.ByID(2651103660, id)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} notebookID + * @returns {Promise & { cancel(): void }} + */ +export function GetTagsForNotebook(notebookID) { + let $resultPromise = /** @type {any} */($Call.ByID(1666855918, notebookID)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType2($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @returns {Promise & { cancel(): void }} + */ +export function ListNotebooks() { + let $resultPromise = /** @type {any} */($Call.ByID(595334731)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType3($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} notebookID + * @returns {Promise & { cancel(): void }} + */ +export function RemoveAllTagsFromNotebook(notebookID) { + let $resultPromise = /** @type {any} */($Call.ByID(2397072902, notebookID)); + return $resultPromise; +} + +/** + * @param {number} notebookID + * @param {number} tagID + * @returns {Promise & { cancel(): void }} + */ +export function RemoveTagFromNotebook(notebookID, tagID) { + let $resultPromise = /** @type {any} */($Call.ByID(2184813900, notebookID, tagID)); + return $resultPromise; +} + +/** + * @param {number} id + * @param {string} name + * @param {string} createdAt + * @returns {Promise & { cancel(): void }} + */ +export function UpdateNotebook(id, name, createdAt) { + let $resultPromise = /** @type {any} */($Call.ByID(1306217847, id, name, createdAt)); + return $resultPromise; +} + +// Private type creation functions +const $$createType0 = db$0.Notebook.createFrom; +const $$createType1 = db$0.Tag.createFrom; +const $$createType2 = $Create.Array($$createType1); +const $$createType3 = $Create.Array($$createType0); diff --git a/frontend/bindings/github.com/nodetec/comet/service/noteservice.js b/frontend/bindings/github.com/nodetec/comet/service/noteservice.js new file mode 100644 index 00000000..13b3496e --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/noteservice.js @@ -0,0 +1,208 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as sql$0 from "../../../../database/sql/models.js"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as db$0 from "../db/models.js"; + +/** + * @param {db$0.Note} note + * @param {db$0.Tag[]} tags + * @returns {Promise & { cancel(): void }} + */ +export function AddNoteToTrash(note, tags) { + let $resultPromise = /** @type {any} */($Call.ByID(36748134, note, tags)); + return $resultPromise; +} + +/** + * @param {string} title + * @param {string} content + * @param {number} notebookID + * @param {sql$0.NullInt64} statusID + * @param {sql$0.NullString} publishedAt + * @param {sql$0.NullString} eventId + * @param {string} notetype + * @param {string} filetype + * @returns {Promise & { cancel(): void }} + */ +export function CreateNote(title, content, notebookID, statusID, publishedAt, eventId, notetype, filetype) { + let $resultPromise = /** @type {any} */($Call.ByID(3651584158, title, content, notebookID, statusID, publishedAt, eventId, notetype, filetype)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function DeleteNote(id) { + let $resultPromise = /** @type {any} */($Call.ByID(1854972521, id)); + return $resultPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function DeleteNoteFromTrash(id) { + let $resultPromise = /** @type {any} */($Call.ByID(1832826689, id)); + return $resultPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function GetNote(id) { + let $resultPromise = /** @type {any} */($Call.ByID(1230348126, id)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function GetNoteFromTrash(id) { + let $resultPromise = /** @type {any} */($Call.ByID(1889602112, id)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType1($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} notebookId + * @param {number} tagId + * @param {number} limit + * @param {number} pageParam + * @param {string} orderBy + * @param {string} sortDirection + * @returns {Promise & { cancel(): void }} + */ +export function ListNotes(notebookId, tagId, limit, pageParam, orderBy, sortDirection) { + let $resultPromise = /** @type {any} */($Call.ByID(1572240871, notebookId, tagId, limit, pageParam, orderBy, sortDirection)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType2($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} limit + * @param {number} pageParam + * @param {string} orderBy + * @param {string} sortDirection + * @returns {Promise & { cancel(): void }} + */ +export function ListNotesFromTrash(limit, pageParam, orderBy, sortDirection) { + let $resultPromise = /** @type {any} */($Call.ByID(3661159223, limit, pageParam, orderBy, sortDirection)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType4($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} noteId + * @param {string} title + * @param {string} content + * @param {number} notebookID + * @param {sql$0.NullInt64} statusID + * @param {string} createdAt + * @param {string} modifiedAt + * @param {sql$0.NullString} publishedAt + * @param {sql$0.NullString} eventId + * @param {string} notetype + * @param {string} filetype + * @param {number[]} tagIds + * @returns {Promise & { cancel(): void }} + */ +export function RestoreNoteFromTrash(noteId, title, content, notebookID, statusID, createdAt, modifiedAt, publishedAt, eventId, notetype, filetype, tagIds) { + let $resultPromise = /** @type {any} */($Call.ByID(3762311242, noteId, title, content, notebookID, statusID, createdAt, modifiedAt, publishedAt, eventId, notetype, filetype, tagIds)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType5($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {string} searchTerm + * @param {number} notebookID + * @param {number} tagID + * @param {number} limit + * @param {number} pageParam + * @param {string} orderBy + * @param {string} sortDirection + * @returns {Promise & { cancel(): void }} + */ +export function SearchNotes(searchTerm, notebookID, tagID, limit, pageParam, orderBy, sortDirection) { + let $resultPromise = /** @type {any} */($Call.ByID(2746264403, searchTerm, notebookID, tagID, limit, pageParam, orderBy, sortDirection)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType2($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {string} searchTerm + * @param {number} limit + * @param {number} pageParam + * @param {string} orderBy + * @param {string} sortDirection + * @returns {Promise & { cancel(): void }} + */ +export function SearchTrash(searchTerm, limit, pageParam, orderBy, sortDirection) { + let $resultPromise = /** @type {any} */($Call.ByID(3538009948, searchTerm, limit, pageParam, orderBy, sortDirection)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType4($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @param {string} title + * @param {string} content + * @param {number} notebookID + * @param {sql$0.NullInt64} statusID + * @param {boolean} published + * @param {sql$0.NullString} eventId + * @param {boolean} pinned + * @param {string} notetype + * @param {string} filetype + * @returns {Promise & { cancel(): void }} + */ +export function UpdateNote(id, title, content, notebookID, statusID, published, eventId, pinned, notetype, filetype) { + let $resultPromise = /** @type {any} */($Call.ByID(518540175, id, title, content, notebookID, statusID, published, eventId, pinned, notetype, filetype)); + return $resultPromise; +} + +// Private type creation functions +const $$createType0 = db$0.Note.createFrom; +const $$createType1 = db$0.GetNoteFromTrashRow.createFrom; +const $$createType2 = $Create.Array($$createType0); +const $$createType3 = db$0.Trash.createFrom; +const $$createType4 = $Create.Array($$createType3); +const $$createType5 = db$0.CreateNoteFromTrashRow.createFrom; diff --git a/frontend/bindings/github.com/nodetec/comet/service/notetagservice.js b/frontend/bindings/github.com/nodetec/comet/service/notetagservice.js new file mode 100644 index 00000000..5acea8ce --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/notetagservice.js @@ -0,0 +1,58 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as db$0 from "../db/models.js"; + +/** + * @param {number} noteID + * @param {number} tagID + * @returns {Promise & { cancel(): void }} + */ +export function AddTagToNote(noteID, tagID) { + let $resultPromise = /** @type {any} */($Call.ByID(2643393932, noteID, tagID)); + return $resultPromise; +} + +/** + * @param {number} noteID + * @param {number} tagID + * @returns {Promise & { cancel(): void }} + */ +export function CheckTagForNote(noteID, tagID) { + let $resultPromise = /** @type {any} */($Call.ByID(1794760311, noteID, tagID)); + return $resultPromise; +} + +/** + * @param {number} noteID + * @returns {Promise & { cancel(): void }} + */ +export function GetTagsForNote(noteID) { + let $resultPromise = /** @type {any} */($Call.ByID(2728210140, noteID)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType1($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} noteID + * @param {number} tagID + * @returns {Promise & { cancel(): void }} + */ +export function RemoveTagFromNote(noteID, tagID) { + let $resultPromise = /** @type {any} */($Call.ByID(3246519988, noteID, tagID)); + return $resultPromise; +} + +// Private type creation functions +const $$createType0 = db$0.Tag.createFrom; +const $$createType1 = $Create.Array($$createType0); diff --git a/frontend/bindings/github.com/nodetec/comet/service/relayservice.js b/frontend/bindings/github.com/nodetec/comet/service/relayservice.js new file mode 100644 index 00000000..dcd576fb --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/relayservice.js @@ -0,0 +1,77 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +/** + * @param {string} url + * @param {boolean} read + * @param {boolean} write + * @param {boolean} sync + * @returns {Promise<$models.Relay> & { cancel(): void }} + */ +export function CreateRelay(url, read, write, sync) { + let $resultPromise = /** @type {any} */($Call.ByID(2564037930, url, read, write, sync)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @returns {Promise & { cancel(): void }} + */ +export function DeleteRelays() { + let $resultPromise = /** @type {any} */($Call.ByID(4014153816)); + return $resultPromise; +} + +/** + * @param {number} id + * @returns {Promise<$models.Relay> & { cancel(): void }} + */ +export function GetRelay(id) { + let $resultPromise = /** @type {any} */($Call.ByID(2570438932, id)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @returns {Promise<$models.Relay[]> & { cancel(): void }} + */ +export function ListRelays() { + let $resultPromise = /** @type {any} */($Call.ByID(377038031)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType1($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @param {string} url + * @param {boolean} read + * @param {boolean} write + * @param {boolean} sync + * @returns {Promise & { cancel(): void }} + */ +export function UpdateRelay(id, url, read, write, sync) { + let $resultPromise = /** @type {any} */($Call.ByID(1832504309, id, url, read, write, sync)); + return $resultPromise; +} + +// Private type creation functions +const $$createType0 = $models.Relay.createFrom; +const $$createType1 = $Create.Array($$createType0); diff --git a/frontend/bindings/github.com/nodetec/comet/service/settingservice.js b/frontend/bindings/github.com/nodetec/comet/service/settingservice.js new file mode 100644 index 00000000..1eb447e2 --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/settingservice.js @@ -0,0 +1,45 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +/** + * @returns {Promise<$models.Settings> & { cancel(): void }} + */ +export function GetAllSettings() { + let $resultPromise = /** @type {any} */($Call.ByID(1346639610)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {string} key + * @returns {Promise & { cancel(): void }} + */ +export function GetSetting(key) { + let $resultPromise = /** @type {any} */($Call.ByID(1317242856, key)); + return $resultPromise; +} + +/** + * @param {string} key + * @param {string} value + * @returns {Promise & { cancel(): void }} + */ +export function UpdateSetting(key, value) { + let $resultPromise = /** @type {any} */($Call.ByID(2612065271, key, value)); + return $resultPromise; +} + +// Private type creation functions +const $$createType0 = $models.Settings.createFrom; diff --git a/frontend/bindings/github.com/nodetec/comet/service/tagservice.js b/frontend/bindings/github.com/nodetec/comet/service/tagservice.js new file mode 100644 index 00000000..56c0a2e6 --- /dev/null +++ b/frontend/bindings/github.com/nodetec/comet/service/tagservice.js @@ -0,0 +1,108 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import {Call as $Call, Create as $Create} from "@wailsio/runtime"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as sql$0 from "../../../../database/sql/models.js"; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore: Unused imports +import * as $models from "./models.js"; + +/** + * @param {string} name + * @param {sql$0.NullString} color + * @param {sql$0.NullString} icon + * @param {string} createdAt + * @returns {Promise<$models.Tag> & { cancel(): void }} + */ +export function CreateTag(name, color, icon, createdAt) { + let $resultPromise = /** @type {any} */($Call.ByID(4191103332, name, color, icon, createdAt)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @returns {Promise & { cancel(): void }} + */ +export function DeleteTag(id) { + let $resultPromise = /** @type {any} */($Call.ByID(1411090129, id)); + return $resultPromise; +} + +/** + * @param {number} id + * @returns {Promise<$models.Tag> & { cancel(): void }} + */ +export function GetTag(id) { + let $resultPromise = /** @type {any} */($Call.ByID(2029176156, id)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {string} name + * @returns {Promise<$models.Tag> & { cancel(): void }} + */ +export function GetTagByName(name) { + let $resultPromise = /** @type {any} */($Call.ByID(1160743666, name)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType0($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {string[]} names + * @returns {Promise<$models.Tag[]> & { cancel(): void }} + */ +export function GetTagsByNames(names) { + let $resultPromise = /** @type {any} */($Call.ByID(1226187244, names)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType1($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @returns {Promise<$models.Tag[]> & { cancel(): void }} + */ +export function ListTags() { + let $resultPromise = /** @type {any} */($Call.ByID(342385689)); + let $typingPromise = /** @type {any} */($resultPromise.then(($result) => { + return $$createType1($result); + })); + $typingPromise.cancel = $resultPromise.cancel.bind($resultPromise); + return $typingPromise; +} + +/** + * @param {number} id + * @param {string} name + * @param {sql$0.NullString} color + * @param {sql$0.NullString} icon + * @param {string} createdAt + * @returns {Promise & { cancel(): void }} + */ +export function UpdateTag(id, name, color, icon, createdAt) { + let $resultPromise = /** @type {any} */($Call.ByID(3312250639, id, name, color, icon, createdAt)); + return $resultPromise; +} + +// Private type creation functions +const $$createType0 = $models.Tag.createFrom; +const $$createType1 = $Create.Array($$createType0); diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.ts similarity index 85% rename from frontend/tailwind.config.js rename to frontend/tailwind.config.ts index 0fa16dbf..3ea64aa2 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.ts @@ -1,5 +1,9 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +/* eslint-disable @typescript-eslint/no-require-imports */ + +import { Config } from "tailwindcss"; + +const config: Config = { darkMode: ["class"], content: [ "./pages/**/*.{ts,tsx}", @@ -74,11 +78,8 @@ module.exports = { typography: { DEFAULT: { css: { - // Target all images within Prose img: { - // Change the display property to inline display: "inline", - // Optionally adjust vertical alignment "vertical-align": "middle", "margin-top": "0.5em", "margin-bottom": "0.5em", @@ -86,9 +87,9 @@ module.exports = { "margin-right": "0.25em", }, h2: { - "margin-top": "1.5em", // Adjust the top margin - "margin-bottom": "1em", // Adjust the bottom margin - padding: "0", // Remove any padding if necessary + "margin-top": "1.5em", + "margin-bottom": "1em", + padding: "0", }, }, }, @@ -97,3 +98,5 @@ module.exports = { }, plugins: [require("@tailwindcss/typography"), require("tailwindcss-animate")], }; + +export default config; diff --git a/go.mod b/go.mod index db9c1dde..e21acfec 100644 --- a/go.mod +++ b/go.mod @@ -3,25 +3,25 @@ module github.com/nodetec/comet go 1.22.4 require ( - github.com/adrg/xdg v0.4.0 + github.com/adrg/xdg v0.5.0 github.com/mattn/go-sqlite3 v1.14.22 github.com/pressly/goose/v3 v3.21.1 github.com/wailsapp/wails/v3 v3.0.0-alpha.4 ) require ( - dario.cat/mergo v1.0.0 // indirect + dario.cat/mergo v1.0.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/bep/debounce v1.2.1 // indirect - github.com/cloudflare/circl v1.3.7 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/cloudflare/circl v1.3.8 // indirect + github.com/cyphar/filepath-securejoin v0.2.5 // indirect github.com/ebitengine/purego v0.4.0-alpha.4 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.11.0 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-git/go-billy/v5 v5.6.0 // indirect + github.com/go-git/go-git/v5 v5.12.0 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/uuid v1.6.0 // indirect @@ -38,20 +38,20 @@ require ( github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/samber/lo v1.38.1 // indirect - github.com/sergi/go-diff v1.2.0 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect github.com/sethvargo/go-retry v0.2.4 // indirect - github.com/skeema/knownhosts v1.2.1 // indirect - github.com/wailsapp/go-webview2 v1.0.16 // indirect + github.com/skeema/knownhosts v1.2.2 // indirect + github.com/wailsapp/go-webview2 v1.0.18 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/tools v0.23.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/main.go b/main.go index 31c48311..ee025e81 100644 --- a/main.go +++ b/main.go @@ -104,7 +104,7 @@ func main() { URL: "/", MinWidth: 500, MinHeight: 250, - Centered: true, + // Centered: true, BackgroundColour: application.NewRGB(27, 38, 54), Mac: application.MacWindow{ InvisibleTitleBarHeight: 50,