387 Commits

Author SHA1 Message Date
99cb24fa30 v1.0.0-rc.0-e 2024-11-16 22:33:02 +04:00
bd8462b2b3 chore: update build action 2024-11-03 10:21:34 +08:00
0857e4ea68 chore: bump lucide-react from 0.438.0 to 0.454.0 in /frontend/extension (#316)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.438.0 to 0.454.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.454.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 13:26:39 +08:00
9ac81dd138 chore: bump zustand from 4.5.5 to 5.0.1 in /frontend/web (#322)
Bumps [zustand](https://github.com/pmndrs/zustand) from 4.5.5 to 5.0.1.
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v4.5.5...v5.0.1)

---
updated-dependencies:
- dependency-name: zustand
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 13:26:27 +08:00
3e48bc8048 chore: bump @types/chrome from 0.0.273 to 0.0.280 in /frontend/extension (#323)
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.273 to 0.0.280.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome)

---
updated-dependencies:
- dependency-name: "@types/chrome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 13:26:16 +08:00
33cd0544a1 chore: update dependencies 2024-11-02 13:18:13 +08:00
f394b17537 fix: update viewTransition to react router links 2024-10-21 20:49:07 +08:00
755fdacf60 chore: add size to favicon url 2024-10-21 20:46:14 +08:00
9e7db8193a chore: fix linter warning 2024-10-21 20:43:53 +08:00
4336e89ba2 feat: pass search params to shortcuts 2024-10-21 20:40:54 +08:00
5539c2802b chore: update dependencies 2024-10-21 20:34:54 +08:00
c8262bed6c chore: buf generate 2024-10-20 23:00:17 +08:00
03c2ab56af chore: bump @types/chrome from 0.0.268 to 0.0.273 in /frontend/extension (#307)
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.268 to 0.0.273.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome)

---
updated-dependencies:
- dependency-name: "@types/chrome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 05:14:12 +08:00
0124f71cea chore: bump @types/react from 18.3.8 to 18.3.10 in /frontend/extension (#308)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.8 to 18.3.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 05:14:01 +08:00
6b06f37626 chore: bump eslint-plugin-react in /frontend/extension (#311)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.37.0 to 7.37.1.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.0...v7.37.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 05:13:49 +08:00
34ffb1a679 chore: bump vite from 5.4.7 to 5.4.8 in /frontend/web (#305)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.7 to 5.4.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.8/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 05:13:39 +08:00
0c36918cb8 chore: bump nice-grpc-web from 3.3.4 to 3.3.5 in /frontend/web (#303)
Bumps [nice-grpc-web](https://github.com/deeplay-io/nice-grpc) from 3.3.4 to 3.3.5.
- [Release notes](https://github.com/deeplay-io/nice-grpc/releases)
- [Commits](https://github.com/deeplay-io/nice-grpc/compare/nice-grpc-web@3.3.4...nice-grpc-web@3.3.5)

---
updated-dependencies:
- dependency-name: nice-grpc-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 05:13:27 +08:00
1a0dc70670 chore: bump eslint-plugin-react in /frontend/extension (#310)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.36.1 to 7.37.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.36.1...v7.37.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:54:08 +08:00
aa0b27ebc8 chore: bump tailwindcss from 3.4.12 to 3.4.13 in /frontend/extension (#309)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.12 to 3.4.13.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.13/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.12...v3.4.13)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:53:59 +08:00
44f56460ab chore: bump @types/node from 22.5.5 to 22.7.4 in /frontend/extension (#306)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.5.5 to 22.7.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:53:41 +08:00
f3f79c4193 chore: bump @vitejs/plugin-react-swc in /frontend/web (#304)
Bumps [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) from 3.7.0 to 3.7.1.
- [Release notes](https://github.com/vitejs/vite-plugin-react-swc/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react-swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react-swc/compare/v3.7.0...v3.7.1)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react-swc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:53:27 +08:00
4dc9ed92cd chore: bump qrcode.react from 3.2.0 to 4.0.1 in /frontend/web (#302)
Bumps [qrcode.react](https://github.com/zpao/qrcode.react) from 3.2.0 to 4.0.1.
- [Release notes](https://github.com/zpao/qrcode.react/releases)
- [Changelog](https://github.com/zpao/qrcode.react/blob/trunk/CHANGELOG.md)
- [Commits](https://github.com/zpao/qrcode.react/compare/v3.2.0...v4.0.1)

---
updated-dependencies:
- dependency-name: qrcode.react
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:53:13 +08:00
2c97755868 chore: bump lucide-react from 0.402.0 to 0.446.0 in /frontend/web (#301)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.402.0 to 0.446.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.446.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:53:05 +08:00
552d728049 chore: bump google.golang.org/grpc from 1.67.0 to 1.67.1 (#300)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.0 to 1.67.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.67.0...v1.67.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 21:06:04 +08:00
8fb0fe7fb5 fix: golangci linter 2024-09-22 14:24:06 +08:00
efb631e906 chore: bump dependencies 2024-09-22 14:20:04 +08:00
a7b3252096 feat: add url query to activity payload 2024-09-22 14:12:33 +08:00
b15b070487 chore: tweak about dialog 2024-09-18 20:30:53 +08:00
ff00a69025 docs: update privacy policy 2024-09-18 20:25:27 +08:00
4dcf352896 feat: add start decorator to inputs 2024-09-18 20:22:43 +08:00
cb286d827d chore: tweak dark mode styles 2024-09-18 20:14:34 +08:00
6a5defe9d6 chore: update common utils 2024-09-18 20:07:53 +08:00
d97cbbb183 chore: update confirm dialogs 2024-09-18 20:07:38 +08:00
200242aa67 chore: buf generate 2024-09-18 19:33:36 +08:00
ba62afc034 docs: update extension guide 2024-09-17 23:40:32 +08:00
52421b1598 chore: bump @emotion/react from 11.13.0 to 11.13.3 in /frontend/web (#283)
Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.13.0 to 11.13.3.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.13.0...@emotion/react@11.13.3)

---
updated-dependencies:
- dependency-name: "@emotion/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 21:29:18 +08:00
b34cd23d83 chore: bump @types/node from 20.16.1 to 22.5.2 in /frontend/extension (#296)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.16.1 to 22.5.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 21:29:09 +08:00
a7d45c5347 chore: bump google.golang.org/grpc from 1.65.0 to 1.66.0 (#282)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.65.0 to 1.66.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.65.0...v1.66.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:02:29 +08:00
4b15bd734e chore: bump @bufbuild/buf from 1.37.0 to 1.39.0 in /frontend/web (#284)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.37.0 to 1.39.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.37.0...v1.39.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:02:12 +08:00
522ecd2518 chore: bump vite from 5.4.1 to 5.4.2 in /frontend/web (#285)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.1 to 5.4.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:02:04 +08:00
8f01a01a46 chore: bump @types/react from 18.3.3 to 18.3.5 in /frontend/web (#286)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:01:55 +08:00
ebc5272023 chore: bump dayjs from 1.11.12 to 1.11.13 in /frontend/web (#287)
Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.12 to 1.11.13.
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/v1.11.13/CHANGELOG.md)
- [Commits](https://github.com/iamkun/dayjs/compare/v1.11.12...v1.11.13)

---
updated-dependencies:
- dependency-name: dayjs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:01:47 +08:00
c06029f040 chore: bump @types/react from 18.3.4 to 18.3.5 in /frontend/extension (#291)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.4 to 18.3.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:01:29 +08:00
2fbe1e5664 chore: bump postcss from 8.4.41 to 8.4.43 in /frontend/extension (#294)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.41 to 8.4.43.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.41...8.4.43)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:01:21 +08:00
ae62cac34d chore: bump lucide-react from 0.419.0 to 0.438.0 in /frontend/extension (#295)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.419.0 to 0.438.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.438.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:01:13 +08:00
f306c82a4f chore: bump plasmo from 0.88.0 to 0.89.1 in /frontend/extension (#292)
Bumps [plasmo](https://github.com/PlasmoHQ/plasmo/tree/HEAD/cli/plasmo) from 0.88.0 to 0.89.1.
- [Release notes](https://github.com/PlasmoHQ/plasmo/releases)
- [Commits](https://github.com/PlasmoHQ/plasmo/commits/HEAD/cli/plasmo)

---
updated-dependencies:
- dependency-name: plasmo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 12:50:12 +08:00
9b060cb7e7 chore: update assets 2024-09-01 22:44:26 +08:00
c5a38d14ad chore: tweak latest schema file 2024-09-01 17:26:28 +08:00
3937abb17b chore: add visibility migrate scripts 2024-09-01 08:40:16 +08:00
f276c979fa chore: update visibility checkbox 2024-08-31 22:54:30 +08:00
a49f87c55f chore: retire private visibility 2024-08-31 22:08:57 +08:00
b74e4f90c1 refactor: update visibilities 2024-08-31 22:04:24 +08:00
8511c09c63 chore: tweak migrator 2024-08-29 22:59:56 +08:00
b359b8f1cc chore: fix typo 2024-08-29 20:33:36 +08:00
220cabfb5b fix: migrator base path 2024-08-29 20:31:37 +08:00
baa3378ff7 chore: tweak subscription setting 2024-08-29 20:30:19 +08:00
b64ae1399a chore: add admin sign in page 2024-08-29 20:22:08 +08:00
0ac2554545 feat: add more security settings 2024-08-29 20:13:10 +08:00
6c54732cd1 chore: fix linter warning 2024-08-29 08:36:58 +08:00
85f5f03be9 refactor: update db migrator 2024-08-29 08:21:23 +08:00
784d91ab75 chore: retire unused service 2024-08-27 23:42:37 +08:00
9d6d93ab39 chore: update golangci config 2024-08-26 23:10:09 +08:00
f11a295ac2 chore: tweak text color in dark mode 2024-08-26 22:55:31 +08:00
ff035d25ba chore: tweak version utils 2024-08-26 22:52:58 +08:00
643a6051b2 chore: update docs 2024-08-24 00:33:17 +08:00
1cf274389c chore: tweak linter warning 2024-08-24 00:25:01 +08:00
4098ac824e chore: tweak linter warning 2024-08-24 00:22:38 +08:00
93bb880e8e fix: shortcut view activity 2024-08-24 00:14:55 +08:00
2ddb47f4df chore: add license for extension 2024-08-23 22:30:26 +08:00
0aab1a0e5d chore: tweak icon 2024-08-23 09:18:09 +08:00
f89100d721 fix: URL redirection issue (#280) 2024-08-23 09:08:07 +08:00
3c0b3369b8 chore: tweak extension popup 2024-08-23 08:11:25 +08:00
d3dcab3445 chore: tweak readme image 2024-08-22 23:26:19 +08:00
acb33080f3 chore: update extension dependencies 2024-08-22 23:19:00 +08:00
080929faed chore: retire access token field in extension 2024-08-22 16:46:42 +08:00
966e1d9ce3 chore: tweak description 2024-08-22 06:18:44 +08:00
1ee13c6859 chore: bump extension version 2024-08-22 06:02:46 +08:00
c196cbc7d5 fix: instance url of extension 2024-08-22 06:01:38 +08:00
4b7c494163 chore: update extension version 2024-08-21 23:28:00 +08:00
86b4f4aa9f fix: license cache 2024-08-21 22:50:46 +08:00
e3c2dc8441 chore: tweak feature matrix 2024-08-21 20:02:17 +08:00
85adb885fe chore: tweak comments 2024-08-20 23:55:42 +08:00
a44e3e23d9 chore: fix tests 2024-08-20 23:52:49 +08:00
340025002b chore: tweak utils 2024-08-20 23:45:55 +08:00
fc20673706 chore: go mod tidy 2024-08-20 23:18:25 +08:00
3df3405ad5 chore: tweak plugin 2024-08-20 23:17:24 +08:00
c4b26cac38 chore: add mailer plugin 2024-08-20 08:43:14 +08:00
a7c49a9ac0 chore: implement runners 2024-08-20 08:23:30 +08:00
5d703f563a chore: tweak shortcut status code 2024-08-18 12:45:43 +08:00
c571720d42 chore: tweak i18n 2024-08-18 12:43:50 +08:00
a3943f5b2d chore: add location header 2024-08-18 10:20:50 +08:00
80548aaf2c chore: tweak acl config 2024-08-18 08:51:50 +08:00
da14b9b7e5 chore: fix get security setting 2024-08-18 08:48:54 +08:00
7e35d3a319 feat: add security setting section 2024-08-18 08:43:47 +08:00
dba5067d51 chore: tweak setting styles 2024-08-18 00:23:52 +08:00
20e3212c2e chore: go mod tidy 2024-08-17 22:00:45 +08:00
d04d0d0e37 chore: update dependencies 2024-08-17 21:58:33 +08:00
01f1b961e1 chore: tweak collection service response 2024-08-17 21:40:51 +08:00
06b8f32a94 chore: tweak user setting service response 2024-08-17 21:38:26 +08:00
8eac931592 chore: tweak user service response 2024-08-17 21:32:27 +08:00
8d6ad68d47 chore: buf format 2024-08-17 21:26:25 +08:00
c356bc03e5 chore: tweak shortcut service response 2024-08-17 21:18:43 +08:00
da94907913 fix: auth service checks 2024-08-17 21:09:50 +08:00
f5edcff24b chore: tweak workspace setting definition 2024-08-17 21:06:42 +08:00
c98e717f5b chore: fix feature checks 2024-08-17 19:22:25 +08:00
a5bc443db9 feat: add workspace security setting definition 2024-08-17 13:11:53 +08:00
faa6fcf31c chore: tweak plans 2024-08-16 21:39:14 +08:00
0be4d8c906 chore: update subscription service 2024-08-16 21:02:51 +08:00
63ebd6f8ea docs: add subscription 2024-08-14 22:34:02 +08:00
972b3a3106 chore: tweak sso docs 2024-08-14 22:24:11 +08:00
f057cd0078 chore: update find activities 2024-08-13 23:04:13 +08:00
9876fb27a4 docs: add sso integration 2024-08-13 22:28:36 +08:00
e63c8dde09 docs: update install with postgres as database 2024-08-13 22:21:24 +08:00
d4e575774c fix: auth callback 2024-08-13 08:58:53 +08:00
db09ac2c5c fix: auth callback 2024-08-12 23:54:05 +08:00
ea7ea0ac24 chore: update identity provider id 2024-08-12 23:41:56 +08:00
80304070e7 chore: tweak plan header 2024-08-12 23:31:47 +08:00
7c31fd444c chore: tweak feature matrix 2024-08-12 21:29:57 +08:00
00e2a6fd96 chore: update license service 2024-08-12 21:17:27 +08:00
768af5b096 feat: implement identity provider settings 2024-08-11 23:30:58 +08:00
61dd989df4 chore: fix tests 2024-08-06 22:18:06 +08:00
647726fc2d feat: implement sign in with idp 2024-08-06 22:15:28 +08:00
6db8611a58 chore: update auth service 2024-08-06 21:56:00 +08:00
e12c83137d chore: update workspace setting service 2024-08-06 21:48:10 +08:00
89d1812c07 chore: update oauth2 plugin 2024-08-05 23:51:28 +08:00
e53ced8996 chore: add idp workspace setting 2024-08-05 23:43:59 +08:00
f9e5978a08 chore: tweak subscription section 2024-08-01 22:50:50 +08:00
0297e9aa2d chore: fix branding button style 2024-08-01 22:45:04 +08:00
c4e72f35c3 chore: bump @bufbuild/buf from 1.34.0 to 1.35.1 in /frontend/extension (#262)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.34.0 to 1.35.1.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.34.0...v1.35.1)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:56:15 +08:00
7179cde44a chore: bump eslint-plugin-react in /frontend/extension (#264)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.4 to 7.35.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.4...v7.35.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:56:06 +08:00
ba286a2e9c chore: bump typescript from 5.5.3 to 5.5.4 in /frontend/extension (#265)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:55:55 +08:00
c2541f0b43 chore: bump lucide-react from 0.408.0 to 0.419.0 in /frontend/extension (#274)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.408.0 to 0.419.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.419.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:55:45 +08:00
b6322fb532 chore: bump @typescript-eslint/parser in /frontend/extension (#266)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.16.1 to 7.18.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.18.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:46:11 +08:00
32b321dcfd chore: bump @emotion/react from 11.11.4 to 11.13.0 in /frontend/web (#267)
Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.11.4 to 11.13.0.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.11.4...@emotion/react@11.13.0)

---
updated-dependencies:
- dependency-name: "@emotion/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:45:59 +08:00
cc0884b07e chore: bump typescript from 5.5.3 to 5.5.4 in /frontend/web (#268)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:45:49 +08:00
133c701194 chore: bump dayjs from 1.11.11 to 1.11.12 in /frontend/web (#269)
Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.11 to 1.11.12.
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/iamkun/dayjs/compare/v1.11.11...v1.11.12)

---
updated-dependencies:
- dependency-name: dayjs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:45:36 +08:00
04f5c7ff1a chore: bump postcss from 8.4.39 to 8.4.40 in /frontend/web (#270)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.39 to 8.4.40.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.39...8.4.40)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:45:22 +08:00
81aa4d3d4e chore: bump react-use from 17.5.0 to 17.5.1 in /frontend/web (#271)
Bumps [react-use](https://github.com/streamich/react-use) from 17.5.0 to 17.5.1.
- [Release notes](https://github.com/streamich/react-use/releases)
- [Changelog](https://github.com/streamich/react-use/blob/master/CHANGELOG.md)
- [Commits](https://github.com/streamich/react-use/compare/v17.5.0...v17.5.1)

---
updated-dependencies:
- dependency-name: react-use
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:45:07 +08:00
a013edcfe3 chore: bump github.com/grpc-ecosystem/grpc-gateway/v2 (#272)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.20.0...v2.21.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:44:55 +08:00
90bc42ea71 chore: bump modernc.org/sqlite from 1.30.2 to 1.31.1 (#273)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.30.2 to 1.31.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.30.2...v1.31.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 21:44:42 +08:00
a7057f9e9f chore: update favicon with custom branding 2024-07-30 21:39:47 +08:00
87e251d6b0 chore: update custom branding tips 2024-07-30 21:35:49 +08:00
b6271938b3 feat: implement custom branding 2024-07-29 23:05:30 +08:00
a113d82e9b feat: add workspace custom branding setting 2024-07-29 22:22:06 +08:00
d513e89438 chore: tweak linter warning 2024-07-29 22:13:56 +08:00
075f51f745 chore: tweak linter warning 2024-07-29 22:07:23 +08:00
ecf77e0774 refactor: workspace setting definitions 2024-07-29 22:03:21 +08:00
61d01a53eb chore: tweak linter warning 2024-07-29 08:45:26 +08:00
8f8cd81c14 feat: add Hungarian translation (#261)
Co-authored-by: Kármán Zsombor <karman.zsombor@infohullam.hu>
2024-07-29 08:38:56 +08:00
5dd045e080 chore: remove unused workspace settings 2024-07-29 00:00:05 +08:00
2ad51a3d42 chore: remove unused resource route 2024-07-28 23:54:53 +08:00
51ed88d5aa chore: update i18n 2024-07-28 17:23:14 +08:00
1de9973af3 feat: add tr.json (#118)
Added Turkish translation.
2024-07-28 17:16:41 +08:00
324d6899c0 feat: add Russian translation (#260) 2024-07-28 17:16:21 +08:00
ad54dd14c8 docs: add more informations about the administrator account for newcomers 2024-07-24 13:00:01 +08:00
8010f54747 refactor: update user setting keys 2024-07-24 00:04:10 +08:00
87deeca110 chore: tweak user settings 2024-07-23 22:39:05 +08:00
6920313b77 fix: update user fields 2024-07-23 22:18:49 +08:00
b1051418c6 chore: bump i18next from 23.11.5 to 23.12.2 in /frontend/web (#251)
Bumps [i18next](https://github.com/i18next/i18next) from 23.11.5 to 23.12.2.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.11.5...v23.12.2)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 21:32:15 +08:00
5f3ce82b37 chore: bump eslint-plugin-prettier from 5.1.3 to 5.2.1 in /frontend/web (#250)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.1.3 to 5.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.3...v5.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 19:47:47 +08:00
5313b5a3e1 chore: bump tailwindcss from 3.4.4 to 3.4.6 in /frontend/extension (#252)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.4 to 3.4.6.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.6/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.4...v3.4.6)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 19:47:24 +08:00
59b56d9374 chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#253)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.16.0 to 7.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 19:47:10 +08:00
f9c1401437 chore: bump @typescript-eslint/parser in /frontend/extension (#254)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.15.0 to 7.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 19:47:01 +08:00
2502218fa1 chore: bump vite from 5.3.3 to 5.3.4 in /frontend/web (#255)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 19:46:52 +08:00
89dca1b1ef chore: bump react-i18next from 14.1.2 to 15.0.0 in /frontend/web (#256)
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 14.1.2 to 15.0.0.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v14.1.2...v15.0.0)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 19:46:40 +08:00
cf640123b8 chore: bump eslint-plugin-prettier in /frontend/extension (#258)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.1.3 to 5.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.3...v5.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 19:46:29 +08:00
e9856115a8 chore: bump @emotion/styled in /frontend/extension (#257)
Bumps [@emotion/styled](https://github.com/emotion-js/emotion) from 11.11.5 to 11.13.0.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/styled@11.11.5...@emotion/styled@11.13.0)

---
updated-dependencies:
- dependency-name: "@emotion/styled"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-21 20:54:30 +08:00
abe715acce chore: bump @emotion/react in /frontend/extension (#259)
Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.11.4 to 11.13.0.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.11.4...@emotion/react@11.13.0)

---
updated-dependencies:
- dependency-name: "@emotion/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-21 20:51:38 +08:00
0a92ba03a8 chore: udpate dependabot schedule interval 2024-07-21 09:47:47 +08:00
5dca1373fc chore: add ja locale 2024-07-15 22:26:46 +08:00
9b6ba2a5bb chore: bump prettier from 3.3.2 to 3.3.3 in /frontend/web (#246)
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:21:39 +08:00
6ac5ff20cd chore: bump @typescript-eslint/parser in /frontend/web (#245)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.13.1 to 7.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:21:31 +08:00
6366379c34 chore: bump @mui/joy in /frontend/web (#244)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.36 to 5.0.0-beta.48.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/next/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:21:22 +08:00
399047ef30 chore: bump eslint-plugin-react in /frontend/extension (#243)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.3 to 7.34.4.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.3...v7.34.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:21:13 +08:00
9e887f604d chore: bump prettier from 3.3.2 to 3.3.3 in /frontend/extension (#242)
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:21:06 +08:00
eac6cb1df3 chore: bump lucide-react from 0.399.0 to 0.408.0 in /frontend/extension (#241)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.399.0 to 0.408.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.408.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:20:57 +08:00
d6bb852720 chore: bump @bufbuild/buf from 1.33.0 to 1.34.0 in /frontend/extension (#240)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.33.0 to 1.34.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.33.0...v1.34.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:20:48 +08:00
c3f32eb7f4 chore: bump @mui/joy in /frontend/extension (#239)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.47 to 5.0.0-beta.48.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/next/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:20:40 +08:00
c78f8c6e42 feat: create ja.json (#238)
Creating a Japanese translation
2024-07-15 22:20:30 +08:00
2f35d7cb2d chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#247)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.15.0 to 7.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:19:41 +08:00
4b5294f806 chore: bump eslint-plugin-react from 7.34.3 to 7.34.4 in /frontend/web (#248)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.3 to 7.34.4.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.3...v7.34.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:19:35 +08:00
d6f9dd8145 chore: bump modernc.org/sqlite from 1.30.1 to 1.30.2 (#249)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.30.1 to 1.30.2.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.30.1...v1.30.2)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 22:19:26 +08:00
9db11c110e chore: bump @typescript-eslint/eslint-plugin in /frontend/extension (#237)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.13.1 to 7.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:41:57 +08:00
1dd6b85128 chore: bump @typescript-eslint/eslint-plugin in /frontend/extension (#226)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.13.1 to 7.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.15.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:41:47 +08:00
277f262fb1 chore: bump typescript from 5.4.5 to 5.5.3 in /frontend/extension (#224)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.5 to 5.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:40:41 +08:00
d9e52579eb chore: bump google.golang.org/grpc from 1.64.0 to 1.65.0 (#230)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.64.0 to 1.65.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.64.0...v1.65.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:40:25 +08:00
078c18c61c chore: bump github.com/rs/cors from 1.10.1 to 1.11.0 (#223)
Bumps [github.com/rs/cors](https://github.com/rs/cors) from 1.10.1 to 1.11.0.
- [Commits](https://github.com/rs/cors/compare/v1.10.1...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/rs/cors
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:40:06 +08:00
425aaab954 chore: bump @mui/joy in /frontend/extension (#225)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.36 to 5.0.0-beta.47.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/next/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:39:54 +08:00
b90234c1de chore: bump @types/node from 20.14.9 to 20.14.10 in /frontend/extension (#227)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.9 to 20.14.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:39:45 +08:00
444e77bd8a chore: bump @typescript-eslint/parser in /frontend/extension (#228)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.14.1 to 7.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.15.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:39:24 +08:00
7d696bf6d1 chore: bump golang.org/x/mod from 0.18.0 to 0.19.0 (#229)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/mod/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:39:17 +08:00
dae12720cd chore: bump golang.org/x/crypto from 0.24.0 to 0.25.0 (#231)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:39:00 +08:00
acb252ac4f chore: bump react-router-dom from 6.23.1 to 6.24.1 in /frontend/web (#232)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.23.1 to 6.24.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.24.1/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:38:51 +08:00
8216768b7e chore: bump vite from 5.3.2 to 5.3.3 in /frontend/web (#233)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:38:44 +08:00
8037f054af chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#234)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.14.1 to 7.15.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.15.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 22:38:33 +08:00
bc222bfa8d chore: bump lucide-react from 0.383.0 to 0.402.0 in /frontend/web (#235)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.383.0 to 0.402.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.402.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 23:15:32 +08:00
2264e0cf9f chore: bump typescript from 5.5.2 to 5.5.3 in /frontend/web (#236)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.2 to 5.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.2...v5.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 23:15:18 +08:00
24544be0e6 chore: add more reference links 2024-07-08 09:11:03 +08:00
1fea5102cf chore: update workspace setting descriptions 2024-07-07 21:54:43 +08:00
ba77def895 chore: retire vscode settings 2024-07-07 21:47:28 +08:00
8cd414f8e9 chore: update default visibility to workspace 2024-07-07 21:36:56 +08:00
50f3134bfa fix: default value of visibility selector 2024-07-07 21:30:12 +08:00
817e7ff87a chore: tweak auth pages 2024-07-07 20:22:56 +08:00
bb97cccb31 docs: add privacy policy 2024-07-07 20:17:50 +08:00
558be11808 feat: add dev script for windows (#222) 2024-07-07 20:09:02 +08:00
2f18894e1a chore: buf generate 2024-07-05 22:58:46 +08:00
270b61c08f chore: bump @reduxjs/toolkit from 2.2.5 to 2.2.6 in /frontend/web (#212)
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v2.2.5...v2.2.6)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:31:48 +08:00
410599f21a chore: bump postcss from 8.4.38 to 8.4.39 in /frontend/web (#213)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.38 to 8.4.39.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.38...8.4.39)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:31:40 +08:00
73a16941b2 chore: bump vite from 5.3.1 to 5.3.2 in /frontend/web (#214)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.1 to 5.3.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:31:32 +08:00
9df080d379 chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#215)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.13.1 to 7.14.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:31:23 +08:00
36008483eb chore: bump postcss from 8.4.38 to 8.4.39 in /frontend/extension (#217)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.38 to 8.4.39.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.38...8.4.39)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:31:15 +08:00
28301ebb48 chore: bump @typescript-eslint/parser in /frontend/extension (#218)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.13.1 to 7.14.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.14.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:31:04 +08:00
a8723c2d94 chore: bump @types/node from 20.14.8 to 20.14.9 in /frontend/extension (#219)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.8 to 20.14.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:30:56 +08:00
c1885823a1 chore: bump zustand from 4.5.2 to 4.5.4 in /frontend/extension (#220)
Bumps [zustand](https://github.com/pmndrs/zustand) from 4.5.2 to 4.5.4.
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v4.5.2...v4.5.4)

---
updated-dependencies:
- dependency-name: zustand
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 23:30:41 +08:00
cbfdc03bb9 chore: bump zustand from 4.5.2 to 4.5.4 in /frontend/web (#216)
Bumps [zustand](https://github.com/pmndrs/zustand) from 4.5.2 to 4.5.4.
- [Release notes](https://github.com/pmndrs/zustand/releases)
- [Commits](https://github.com/pmndrs/zustand/compare/v4.5.2...v4.5.4)

---
updated-dependencies:
- dependency-name: zustand
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 22:55:55 +08:00
8c05ca4338 chore: bump lucide-react from 0.396.0 to 0.399.0 in /frontend/extension (#221)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.396.0 to 0.399.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.399.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 22:55:08 +08:00
d96253798d chore: bump lucide-react from 0.391.0 to 0.396.0 in /frontend/extension (#207)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.391.0 to 0.396.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.396.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:18:41 +08:00
a695d8ed36 chore: bump typescript from 5.4.5 to 5.5.2 in /frontend/web (#204)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.5 to 5.5.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:18:28 +08:00
c3baef9ddc chore: bump eslint-plugin-react from 7.34.2 to 7.34.3 in /frontend/web (#202)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.2 to 7.34.3.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.2...v7.34.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:43:48 +08:00
1cc9736aa0 chore: bump @bufbuild/buf from 1.33.0 to 1.34.0 in /frontend/web (#203)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.33.0 to 1.34.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.33.0...v1.34.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:43:40 +08:00
cf7e3813fe chore: bump @typescript-eslint/parser in /frontend/web (#205)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.13.0 to 7.13.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:43:29 +08:00
0482491352 chore: bump prettier from 3.3.1 to 3.3.2 in /frontend/web (#206)
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:43:20 +08:00
dfc42476c4 chore: bump eslint-plugin-react in /frontend/extension (#208)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.2 to 7.34.3.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.2...v7.34.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:43:07 +08:00
5cfd6a28bf chore: bump @plasmohq/storage in /frontend/extension (#209)
Bumps [@plasmohq/storage](https://github.com/PlasmoHQ/storage) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/PlasmoHQ/storage/releases)
- [Commits](https://github.com/PlasmoHQ/storage/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: "@plasmohq/storage"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:43:00 +08:00
35100dd533 chore: bump @types/node from 20.14.0 to 20.14.8 in /frontend/extension (#210)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.0 to 20.14.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:42:52 +08:00
797164bd39 chore: bump plasmo from 0.87.1 to 0.88.0 in /frontend/extension (#211)
Bumps [plasmo](https://github.com/PlasmoHQ/plasmo/tree/HEAD/cli/plasmo) from 0.87.1 to 0.88.0.
- [Release notes](https://github.com/PlasmoHQ/plasmo/releases)
- [Commits](https://github.com/PlasmoHQ/plasmo/commits/v0.88.0/cli/plasmo)

---
updated-dependencies:
- dependency-name: plasmo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 23:42:34 +08:00
461cf2f45e chore: bump @typescript-eslint/eslint-plugin in /frontend/extension (#201)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.13.0 to 7.13.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 10:51:43 +08:00
291c7a88d9 chore: bump prettier from 3.2.5 to 3.3.2 in /frontend/extension (#197)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:50:17 +08:00
a0692aae66 chore: bump @typescript-eslint/parser in /frontend/extension (#200)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.12.0 to 7.13.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:49:59 +08:00
dc821e7221 chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#199)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.12.0 to 7.13.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:49:47 +08:00
348be0b76e chore: bump modernc.org/sqlite from 1.30.0 to 1.30.1 (#192)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.30.0 to 1.30.1.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.30.0...v1.30.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:49:34 +08:00
0cf3a937da chore: bump protobufjs from 7.3.0 to 7.3.2 in /frontend/extension (#195)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.3.0 to 7.3.2.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.3.0...protobufjs-v7.3.2)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:22:07 +08:00
d8795db70f chore: bump @typescript-eslint/eslint-plugin in /frontend/extension (#194)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.12.0 to 7.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:21:56 +08:00
a03b9678c7 chore: bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (#193)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:21:48 +08:00
b91273605e chore: bump google.golang.org/protobuf from 1.34.1 to 1.34.2 (#191)
Bumps google.golang.org/protobuf from 1.34.1 to 1.34.2.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:21:36 +08:00
7c2858e1ae chore: bump @bufbuild/buf from 1.32.2 to 1.33.0 in /frontend/web (#190)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.2 to 1.33.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.2...v1.33.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:21:28 +08:00
70bdbcfb21 chore: bump protobufjs from 7.3.0 to 7.3.2 in /frontend/web (#188)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.3.0 to 7.3.2.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.3.0...protobufjs-v7.3.2)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:21:14 +08:00
a5957aa6db chore: bump vite from 5.2.13 to 5.3.1 in /frontend/web (#187)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.13 to 5.3.1.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:21:06 +08:00
b12f316991 chore: bump @typescript-eslint/parser in /frontend/web (#186)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.12.0 to 7.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:20:57 +08:00
618fbb19c5 chore: bump docker/build-push-action from 5 to 6 (#185)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:20:49 +08:00
075633ea10 chore: bump @bufbuild/buf from 1.32.2 to 1.33.0 in /frontend/extension (#198)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.2 to 1.33.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.2...v1.33.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 09:20:24 +08:00
ba22186908 chore: bump @typescript-eslint/eslint-plugin in /frontend/extension (#174)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.11.0 to 7.12.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.12.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:36:30 +08:00
c10e1968d1 chore: bump lucide-react from 0.383.0 to 0.391.0 in /frontend/extension (#183)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.383.0 to 0.391.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.391.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:34:37 +08:00
d0d11f2c98 chore: bump @typescript-eslint/parser in /frontend/extension (#177)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.10.0 to 7.12.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.12.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:34:00 +08:00
8dde790e51 chore: bump tailwindcss from 3.4.3 to 3.4.4 in /frontend/extension (#173)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.3 to 3.4.4.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.4/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.3...v3.4.4)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:33:08 +08:00
233e10b264 chore: bump golang.org/x/mod from 0.17.0 to 0.18.0 (#170)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/mod/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:32:44 +08:00
d2ae38ff6b chore: bump golang.org/x/crypto from 0.23.0 to 0.24.0 (#171)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:32:37 +08:00
3441ff4821 chore: bump plasmo from 0.86.3 to 0.87.1 in /frontend/extension (#178)
Bumps [plasmo](https://github.com/PlasmoHQ/plasmo/tree/HEAD/cli/plasmo) from 0.86.3 to 0.87.1.
- [Release notes](https://github.com/PlasmoHQ/plasmo/releases)
- [Commits](https://github.com/PlasmoHQ/plasmo/commits/v0.87.1/cli/plasmo)

---
updated-dependencies:
- dependency-name: plasmo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:32:29 +08:00
2e25347de0 chore: bump nice-grpc-web from 3.3.3 to 3.3.4 in /frontend/web (#181)
Bumps [nice-grpc-web](https://github.com/deeplay-io/nice-grpc) from 3.3.3 to 3.3.4.
- [Release notes](https://github.com/deeplay-io/nice-grpc/releases)
- [Commits](https://github.com/deeplay-io/nice-grpc/compare/nice-grpc-web@3.3.3...nice-grpc-web@3.3.4)

---
updated-dependencies:
- dependency-name: nice-grpc-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:32:05 +08:00
4a05cf99f2 chore: bump goreleaser/goreleaser-action from 5 to 6 (#182)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5 to 6.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:31:55 +08:00
e0e4a1af8f chore: fix initial state 2024-06-03 23:15:37 +08:00
769b474bdc chore: update admin signup journey 2024-06-03 22:59:00 +08:00
d51d180a29 feat: update workspace profile 2024-06-03 22:41:51 +08:00
15ca4fe7ac chore: bump @bufbuild/buf from 1.32.1 to 1.32.2 in /frontend/web (#160)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.1 to 1.32.2.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.1...v1.32.2)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:12:12 +08:00
e82bac9385 chore: bump @typescript-eslint/eslint-plugin in /frontend/extension (#161)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.10.0 to 7.11.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.11.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:12:02 +08:00
df0c24354a chore: bump vite from 5.2.11 to 5.2.12 in /frontend/web (#162)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.11 to 5.2.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:11:52 +08:00
567636ff2b chore: bump @types/node from 20.12.12 to 20.14.0 in /frontend/extension (#163)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.12 to 20.14.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:11:41 +08:00
ebc0feb259 chore: bump prettier from 3.2.5 to 3.3.0 in /frontend/web (#164)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:11:35 +08:00
9d2c6bcc37 chore: bump eslint-plugin-react in /frontend/extension (#159)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.1 to 7.34.2.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.1...v7.34.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:11:16 +08:00
d522eae296 chore: bump modernc.org/sqlite from 1.29.10 to 1.30.0 (#158)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.10 to 1.30.0.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.10...v1.30.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:11:02 +08:00
2ba0694597 chore: bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#157)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.18.2...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:10:52 +08:00
c6b516a054 chore: bump @bufbuild/buf from 1.32.1 to 1.32.2 in /frontend/extension (#165)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.1 to 1.32.2.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.1...v1.32.2)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:10:37 +08:00
d482183b4f chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#166)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.10.0 to 7.11.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.11.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:10:28 +08:00
2558331d8f chore: bump lucide-react from 0.379.0 to 0.383.0 in /frontend/extension (#167)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.379.0 to 0.383.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.383.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:10:19 +08:00
482fb21fe9 chore: bump lucide-react from 0.378.0 to 0.383.0 in /frontend/web (#168)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.378.0 to 0.383.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.383.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 22:09:53 +08:00
a4408bff0e chore: tweak wording 2024-06-03 08:59:46 +08:00
970bd9afb0 chore: bump @typescript-eslint/parser in /frontend/extension (#150)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.21.0 to 7.10.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.10.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-30 07:42:31 +08:00
55a0c7f800 chore: bump lucide-react from 0.378.0 to 0.379.0 in /frontend/extension (#148)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.378.0 to 0.379.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.379.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-30 07:42:24 +08:00
9cdc815312 chore: bump @bufbuild/buf from 1.32.0 to 1.32.1 in /frontend/extension (#146)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.0 to 1.32.1.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.0...v1.32.1)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 19:40:36 +08:00
856cad8697 chore: bump @bufbuild/buf from 1.32.0 to 1.32.1 in /frontend/web (#155)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.32.0 to 1.32.1.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.32.0...v1.32.1)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 19:40:28 +08:00
6746b9dc58 chore: support fr locale 2024-05-21 21:57:03 +08:00
4444c72042 feat: impl fr.json (#144)
Add french translation
2024-05-21 21:33:03 +08:00
26aa00e20b chore: update auth checks 2024-05-21 20:34:06 +08:00
0602b2475a chore: tweak demo image 2024-05-20 23:56:31 +08:00
9e8eff134b chore: tweak demo image 2024-05-20 23:54:53 +08:00
e55c48865a chore: update linter 2024-05-20 20:41:34 +08:00
f98a61ba94 chore: fix linter 2024-05-20 20:40:11 +08:00
0fc3497a5b chore: bump lucide-react from 0.312.0 to 0.378.0 in /frontend/extension (#140)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.312.0 to 0.378.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.378.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:35:18 +08:00
af9bcade33 chore: bump prettier from 2.8.8 to 3.2.5 in /frontend/extension (#109)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:34:09 +08:00
2fd1224255 chore: bump @reduxjs/toolkit from 1.9.7 to 2.2.5 in /frontend/web (#139)
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 1.9.7 to 2.2.5.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v1.9.7...v2.2.5)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:33:51 +08:00
55974b1e6c chore: bump @typescript-eslint/parser in /frontend/web (#138)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.8.0 to 7.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.9.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:33:42 +08:00
c727cc2476 chore: bump @types/chrome from 0.0.267 to 0.0.268 in /frontend/extension (#141)
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.267 to 0.0.268.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome)

---
updated-dependencies:
- dependency-name: "@types/chrome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:33:22 +08:00
9b4e58f8c7 chore: bump @bufbuild/buf from 1.31.0 to 1.32.0 in /frontend/extension (#142)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:33:13 +08:00
3b0678ee7a chore: bump plasmo from 0.86.2 to 0.86.3 in /frontend/extension (#143)
Bumps [plasmo](https://github.com/PlasmoHQ/plasmo/tree/HEAD/cli/plasmo) from 0.86.2 to 0.86.3.
- [Release notes](https://github.com/PlasmoHQ/plasmo/releases)
- [Commits](https://github.com/PlasmoHQ/plasmo/commits/v0.86.3/cli/plasmo)

---
updated-dependencies:
- dependency-name: plasmo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:33:02 +08:00
f4a9e7bed7 chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#137)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.8.0 to 7.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.9.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:31:53 +08:00
2a59f0339a chore: bump @bufbuild/buf from 1.31.0 to 1.32.0 in /frontend/web (#136)
Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/bufbuild/buf/releases)
- [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bufbuild/buf/compare/v1.31.0...v1.32.0)

---
updated-dependencies:
- dependency-name: "@bufbuild/buf"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:30:17 +08:00
57caafec59 chore: bump github.com/grpc-ecosystem/grpc-gateway/v2 (#133)
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.19.1 to 2.20.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/main/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.19.1...v2.20.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 20:30:01 +08:00
38dfbb9012 chore: buf generate 2024-05-20 20:29:23 +08:00
f0121e2a01 chore: bump google.golang.org/grpc from 1.63.2 to 1.64.0 (#134)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.63.2 to 1.64.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.63.2...v1.64.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 18:22:54 +08:00
0e2940b58b chore: bump modernc.org/sqlite from 1.29.9 to 1.29.10 (#135)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.9 to 1.29.10.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.9...v1.29.10)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 18:22:42 +08:00
344fcab972 chore: bump lucide-react from 0.312.0 to 0.378.0 in /frontend/web (#124)
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.312.0 to 0.378.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.378.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:54:38 +08:00
8b2a8df5b0 chore: bump @typescript-eslint/parser in /frontend/web (#123)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 6.21.0 to 7.8.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.8.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:54:29 +08:00
9f52377a3a chore: bump @types/react from 18.3.1 to 18.3.2 in /frontend/extension (#127)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.1 to 18.3.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:54:19 +08:00
b582ccd0c9 chore: bump @mui/joy in /frontend/web (#122)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.30 to 5.0.0-beta.36.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/next/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:26:24 +08:00
ca199c3486 chore: bump golangci/golangci-lint-action from 5 to 6 (#120)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:26:05 +08:00
2791dc98ac chore: bump pnpm/action-setup from 3.0.0 to 4.0.0 (#121)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 3.0.0 to 4.0.0.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v3.0.0...v4.0.0)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:25:58 +08:00
ed02309f3b chore: bump @types/node from 20.12.8 to 20.12.11 in /frontend/extension (#130)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.8 to 20.12.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:25:50 +08:00
db485ba0a9 chore: bump golang.org/x/crypto from 0.22.0 to 0.23.0 (#128)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/crypto/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:25:42 +08:00
a291635edd chore: bump google.golang.org/protobuf from 1.34.0 to 1.34.1 (#129)
Bumps google.golang.org/protobuf from 1.34.0 to 1.34.1.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:25:37 +08:00
807481eb7f chore: bump protobufjs from 7.2.6 to 7.3.0 in /frontend/extension (#131)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.2.6 to 7.3.0.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.2.6...protobufjs-v7.3.0)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:25:20 +08:00
d395221ea1 chore: bump @mui/joy in /frontend/extension (#132)
Bumps [@mui/joy](https://github.com/mui/material-ui/tree/HEAD/packages/mui-joy) from 5.0.0-beta.32 to 5.0.0-beta.36.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/next/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/HEAD/packages/mui-joy)

---
updated-dependencies:
- dependency-name: "@mui/joy"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 20:25:08 +08:00
a79b1e80d8 chore: add tooltip to buttons 2024-05-10 07:02:31 +08:00
ad65c66be4 chore: update dependencies 2024-05-10 07:02:22 +08:00
3ef8b785c3 feat: add open-all-shortcuts button to collection (#117)
In /collection view, next to "Share" button, adds an "ArrowUpRight" button that opens all shortcuts in collection on click.
2024-05-10 06:20:39 +08:00
cd45d5a5b5 fix: broken logo.svg (#116) 2024-05-10 06:19:34 +08:00
4861136fdd chore: bump @typescript-eslint/eslint-plugin in /frontend/extension (#106)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.21.0 to 7.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:42:11 +08:00
2746607368 chore: bump eslint-config-prettier in /frontend/extension (#108)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.10.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.10.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:40:46 +08:00
8ee002074d chore: bump @types/chrome from 0.0.266 to 0.0.267 in /frontend/extension (#107)
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.266 to 0.0.267.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome)

---
updated-dependencies:
- dependency-name: "@types/chrome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:40:32 +08:00
76031a9126 chore: bump modernc.org/sqlite from 1.29.8 to 1.29.9 (#105)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.8 to 1.29.9.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.8...v1.29.9)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:40:18 +08:00
efb7910f3a chore: bump plasmo from 0.85.2 to 0.86.2 in /frontend/extension (#110)
Bumps [plasmo](https://github.com/PlasmoHQ/plasmo/tree/HEAD/cli/plasmo) from 0.85.2 to 0.86.2.
- [Release notes](https://github.com/PlasmoHQ/plasmo/releases)
- [Commits](https://github.com/PlasmoHQ/plasmo/commits/v0.86.2/cli/plasmo)

---
updated-dependencies:
- dependency-name: plasmo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:38:16 +08:00
90e7e48f66 chore: bump google.golang.org/protobuf from 1.33.0 to 1.34.0 (#104)
Bumps google.golang.org/protobuf from 1.33.0 to 1.34.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:38:06 +08:00
2efdec60fe chore: bump @typescript-eslint/eslint-plugin in /frontend/web (#113)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.21.0 to 7.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:37:46 +08:00
714e01ee4e chore: bump react-router-dom from 6.22.3 to 6.23.0 in /frontend/web (#115)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.3 to 6.23.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.23.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 21:33:45 +08:00
bb45bb3f36 chore: bump golangci/golangci-lint-action from 4 to 5 (#103)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 20:29:07 +08:00
101aa6a10f fix: serve frontend assets 2024-04-28 08:42:24 +08:00
399364af01 chore: update goreleaser 2024-04-27 00:11:03 +08:00
660f7fd955 chore: update goreleaser 2024-04-27 00:03:52 +08:00
43be41b8a5 chore: remove windows 2024-04-26 23:52:17 +08:00
92eaa3c613 chore: update goreleaser action version 2024-04-26 23:47:18 +08:00
17fd86726d chore: update goreleaser action version 2024-04-26 23:45:47 +08:00
393574d57d chore: add goreleaser action 2024-04-26 23:43:16 +08:00
10c94b0128 chore: add goreleaser 2024-04-26 23:37:20 +08:00
8aebafd531 feat: embed frontend dist 2024-04-26 23:31:05 +08:00
70602b8c6c feat: add last visited path 2024-04-25 21:43:17 +08:00
832b3945d9 chore: bump modernc.org/sqlite from 1.29.6 to 1.29.8 (#97)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.29.6 to 1.29.8.
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.29.6...v1.29.8)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 21:12:10 +08:00
7eeef74f4c chore: bump actions/setup-go from 3 to 5 (#98)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 21:12:02 +08:00
c708585a0b chore: bump docker/build-push-action from 3 to 5 (#100)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 21:11:56 +08:00
6393531ac5 chore: bump golangci/golangci-lint-action from 3 to 4 (#99)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 21:11:49 +08:00
549dad7261 chore: bump actions/setup-node from 3 to 4 (#101)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 21:11:39 +08:00
b883905f8a chore: update dependencies 2024-04-16 21:27:47 +08:00
91e0fae1d9 chore: bump @types/react from 18.2.74 to 18.2.79 in /frontend/extension (#92)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.74 to 18.2.79.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 08:43:13 +08:00
9a2618f42b chore: upgrade jwt to v5 2024-04-16 08:42:44 +08:00
6bb99ed3cc chore: bump react-i18next from 13.5.0 to 14.1.0 in /frontend/web (#95)
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 13.5.0 to 14.1.0.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v13.5.0...v14.1.0)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:48:38 +08:00
6e11c28d3e chore: bump vite from 5.2.7 to 5.2.8 in /frontend/web (#94)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.7 to 5.2.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:48:33 +08:00
f6f564913a chore: bump @types/react-dom in /frontend/extension (#93)
Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.24 to 18.2.25.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:48:26 +08:00
40deb997ea chore: bump @types/react from 18.2.74 to 18.2.79 in /frontend/web (#91)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.74 to 18.2.79.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:48:13 +08:00
59118109bd chore: bump typescript from 5.4.4 to 5.4.5 in /frontend/extension (#90)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.4 to 5.4.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.4...v5.4.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:48:08 +08:00
971eb4e8f7 chore: bump actions/checkout from 3 to 4 (#84)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:47:52 +08:00
1c70d9484e chore: bump @types/chrome from 0.0.241 to 0.0.266 in /frontend/extension (#89)
Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.241 to 0.0.266.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome)

---
updated-dependencies:
- dependency-name: "@types/chrome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:47:39 +08:00
6a8c07f93a chore: bump eslint-config-prettier from 8.10.0 to 9.1.0 in /frontend/web (#88)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.10.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.10.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:47:31 +08:00
0ef6a6038a chore: bump @types/node from 20.12.4 to 20.12.7 in /frontend/extension (#87)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.4 to 20.12.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:47:26 +08:00
dd521103c9 chore: bump docker/login-action from 2 to 3 (#86)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:47:18 +08:00
b04ea04062 chore: bump docker/setup-qemu-action from 2 to 3 (#85)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:47:12 +08:00
1774e525b3 chore: bump pnpm/action-setup from 2.2.4 to 3.0.0 (#83)
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 2.2.4 to 3.0.0.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v2.2.4...v3.0.0)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:46:55 +08:00
d502e3ce74 chore: bump docker/setup-buildx-action from 2 to 3 (#82)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 07:46:27 +08:00
80e52829fa chore: add dependabot 2024-04-16 07:40:29 +08:00
c61aa8020a chore: update backend dependencies 2024-04-16 07:40:17 +08:00
d2d63836d4 chore: tweak api name 2024-04-15 22:52:21 +08:00
e0ad25b2c6 chore: tweak readme 2024-04-08 22:37:36 +08:00
cc669f1be0 chore: tweak frontend imports 2024-04-08 22:30:28 +08:00
5bf86601e6 chore: tweak favicon provider description 2024-04-07 21:58:52 +08:00
b7484363dc chore: tweak store imports 2024-04-07 21:23:14 +08:00
5264dc9d8a feat(web): use favicon provider 2024-04-07 20:28:21 +08:00
8649e562dc refactor: update imports 2024-04-07 19:35:13 +08:00
905b962e0b chore: add favicon provider to workspace setting section 2024-04-07 00:16:42 +08:00
07c863b251 chore: add favicon provider workspace setting 2024-04-06 23:58:56 +08:00
69f2c7ad89 chore: bump extension version 2024-04-05 23:02:04 +08:00
e2c7b8c7b9 feat: add default visibility setting to extension 2024-04-05 22:54:03 +08:00
c6821a7090 chore: update dependencies 2024-04-05 10:28:50 +08:00
b1125f3727 chore: update dependencies 2024-04-02 23:40:38 +08:00
c7af8d6afa chore: move frontend package 2024-03-26 20:35:36 +08:00
1025d8a2ed chore: tweak styles 2024-03-25 21:48:23 +08:00
3f3d7a4c58 chore(deps): bump follow-redirects in /frontend/extension (#75)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 11:30:32 +08:00
80f0af8723 chore: update backend dependencies 2024-03-24 22:25:07 +08:00
730cff1148 fix: license time parser 2024-03-24 21:56:07 +08:00
0e3481b593 chore: handle unspecified visibility 2024-03-20 00:07:23 +08:00
abacc9af8b chore: remove default visibility field 2024-03-20 00:07:07 +08:00
d837cbd0ff chore: tweak words 2024-03-18 10:07:02 +08:00
3f7abce427 chore: add openapiv2 docs 2024-03-17 20:20:52 +08:00
b6bcc3cda6 chore: tweak logo 2024-03-17 19:52:59 +08:00
07d9436e1e chore: code clean 2024-03-12 21:45:19 +08:00
5c1c238453 chore: remove unused log package 2024-03-06 00:45:35 +08:00
02fb415260 chore: update server logger 2024-03-06 00:43:13 +08:00
d866268a7a chore: tweak page styles 2024-03-06 00:35:04 +08:00
98d73e81c0 chore: update dependencies 2024-03-06 00:29:34 +08:00
47821879fa chore: add tag input 2024-03-06 00:22:39 +08:00
7c16b1e00f chore: update frontend buf generator 2024-03-06 00:22:31 +08:00
29043f63b6 chore: fix set state 2024-03-05 22:26:52 +08:00
87d626cd1d chore: move api to route package 2024-03-01 00:08:05 +08:00
201cf83afe chore: bump extension version 2024-02-27 00:38:25 +08:00
35de611fd1 fix: api base url 2024-02-27 00:37:33 +08:00
5c02bb98bf chore: upgrade backend dependencies 2024-02-19 21:39:23 +08:00
c1f915ae31 chore: tweak golangci 2024-02-19 21:15:32 +08:00
faae146a86 chore: bump version 2024-02-19 21:13:10 +08:00
4a6c6b4b2a feat: add default visibility workspace setting 2024-02-19 21:11:09 +08:00
fafacc92eb refactor: update api version 2024-02-19 20:45:54 +08:00
b5f5ae2483 chore: update title dark mode style 2024-02-07 21:11:02 +08:00
323 changed files with 27053 additions and 26992 deletions

26
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: "github-actions"
commit-message:
prefix: "chore"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: npm
commit-message:
prefix: "chore"
directory: "/frontend/web"
schedule:
interval: "monthly"
- package-ecosystem: npm
commit-message:
prefix: "chore"
directory: "/frontend/extension"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
commit-message:
prefix: "chore"
directory: "/"
schedule:
interval: "monthly"

View File

@ -12,10 +12,10 @@ jobs:
go-static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.23
check-latest: true
cache: true
- name: Verify go.mod is tidy
@ -23,19 +23,19 @@ jobs:
go mod tidy
git diff --exit-code
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.54.1
version: v1.61.0
args: --verbose --timeout=3m
skip-cache: true
go-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.23
check-latest: true
cache: true
- name: Run all tests

View File

@ -1,44 +1,85 @@
name: build-and-push-release-image
name: build-and-push-stable-image
on:
push:
branches:
# Run on pushing branches like `release/1.0.0`
- "release/*.*.*"
tags:
# Match stable and rc versions, such as 'v1.0.0' or 'v0.23.0-rc.0'
# - "v*.*.*"
# - "v*.*.*-rc.*"
- "v*.*.*-e"
- "v*.*.*-rc.*-e"
jobs:
build-and-push-release-image:
build-and-push-stable-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Extract build args
# Extract version from branch name
# Example: branch name `release/1.0.0` sets up env.VERSION=1.0.0
# Extract version number and check if it's an rc version
run: |
echo "VERSION=${GITHUB_REF_NAME#release/}" >> $GITHUB_ENV
if [[ "${GITHUB_REF_NAME}" =~ -rc ]]; then
echo "PRE_RELEASE=true" >> $GITHUB_ENV
else
echo "PRE_RELEASE=false" >> $GITHUB_ENV
fi
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: yourselfhosted
username: aykhans
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
install: true
version: v0.9.1
# Metadata for stable versions
- name: Docker meta for stable
id: meta-stable
if: env.PRE_RELEASE == 'false'
uses: docker/metadata-action@v5
with:
images: |
aykhans/slash
tags: |
type=semver,pattern={{version}},value=${{ env.VERSION }}
type=raw,value=stable
flavor: |
latest=true
labels: |
org.opencontainers.image.version=${{ env.VERSION }}
# Metadata for rc versions
- name: Docker meta for rc
id: meta-rc
if: env.PRE_RELEASE == 'true'
uses: docker/metadata-action@v5
with:
images: |
aykhans/slash
tags: |
type=raw,value=${{ env.VERSION }}
labels: |
org.opencontainers.image.version=${{ env.VERSION }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: yourselfhosted/slash:latest, yourselfhosted/slash:${{ env.VERSION }}
tags: ${{ steps.meta-stable.outputs.tags || steps.meta-rc.outputs.tags }}
labels: ${{ steps.meta-stable.outputs.labels || steps.meta-rc.outputs.labels }}

View File

@ -8,27 +8,27 @@ jobs:
build-and-push-test-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: yourselfhosted
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
install: true
version: v0.9.1
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile

33
.github/workflows/build-artifacts.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build artifacts
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.23
check-latest: true
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -14,11 +14,11 @@ jobs:
eslint-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4.0.0
with:
version: 8
- uses: actions/setup-node@v3
version: 9
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: pnpm
@ -32,11 +32,11 @@ jobs:
extension-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4.0.0
with:
version: 8
- uses: actions/setup-node@v3
version: 9
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: pnpm

View File

@ -14,11 +14,11 @@ jobs:
eslint-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4.0.0
with:
version: 8
- uses: actions/setup-node@v3
version: 9
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: pnpm
@ -28,15 +28,18 @@ jobs:
- name: Run eslint check
run: pnpm lint
working-directory: frontend/web
- name: Run type check
run: pnpm type-check
working-directory: frontend/web
frontend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4.0.0
with:
version: 8
- uses: actions/setup-node@v3
version: 9
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: pnpm

View File

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup buf

2
.gitignore vendored
View File

@ -12,3 +12,5 @@ build
node_modules
.env
dist/

View File

@ -20,11 +20,7 @@ issues:
# https://golangci-lint.run/usage/configuration/#command-line-options
exclude:
- Rollback
- logger.Sync
- pgInstance.Stop
- fmt.Printf
- Enter(.*)_(.*)
- Exit(.*)_(.*)
linters-settings:
goimports:
@ -69,6 +65,10 @@ linters-settings:
disabled: true
- name: var-naming
disabled: true
- name: unchecked-type-assertion
disabled: true
- name: max-control-nesting
disabled: true
- name: exported
arguments:
- "disableStutteringCheck"

38
.goreleaser.yaml Normal file
View File

@ -0,0 +1,38 @@
version: 1
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
main: ./bin/slash
binary: slash
goos:
- linux
- darwin
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
checksum:
disable: true
release:
draft: true
replace_existing_draft: true
make_latest: true
mode: replace
skip_upload: false

View File

@ -1,4 +0,0 @@
{
"go.lintOnSave": "workspace",
"go.lintTool": "golangci-lint"
}

View File

@ -11,10 +11,11 @@ RUN corepack enable && pnpm i --frozen-lockfile
RUN pnpm build
# Build backend exec file.
FROM golang:1.21-alpine AS backend
FROM golang:1.23-alpine AS backend
WORKDIR /backend-build
COPY . .
COPY --from=frontend /frontend-build/frontend/web/dist /backend-build/server/route/frontend/dist
RUN CGO_ENABLED=0 go build -o slash ./bin/slash/main.go
@ -25,7 +26,6 @@ WORKDIR /usr/local/slash
RUN apk add --no-cache tzdata
ENV TZ="UTC"
COPY --from=frontend /frontend-build/frontend/web/dist /usr/local/slash/dist
COPY --from=backend /backend-build/slash /usr/local/slash/
EXPOSE 5231

View File

@ -1,14 +1,12 @@
# Slash
<img align="right" src="./docs/assets/logo.png" height="64px" alt="logo">
**Slash** is an open source, self-hosted bookmarks and link sharing platform. It allows you to organize your links with tags, and share them with custom shortened URLs. Slash also supports team sharing of link libraries for easy collaboration.
**Slash** is an open source, self-hosted platform designed to help you organize, manage, and share your most important links. Easily create customizable, human-readable shortcuts to streamline your link management. Use tags to categorize your links and share them easily with your team or publicly.
🧩 Browser extension(v1.0.0) now available! - [Chrome Web Store](https://chrome.google.com/webstore/detail/slash/ebaiehmkammnacjadffpicipfckgeobg), [Firefox Add-on](https://addons.mozilla.org/firefox/addon/your-slash/)
Getting started with Slash's [Shortcuts](https://github.com/yourselfhosted/slash/blob/main/docs/getting-started/shortcuts.md) and [Collections](https://github.com/yourselfhosted/slash/blob/main/docs/getting-started/collections.md).
<a href="https://demo.slash.yourselfhosted.com">Live Demo</a><a href="https://discord.gg/QZqUuUAhDV">Join our Discord</a>
[👉 Join our Discord 💬](https://discord.gg/QZqUuUAhDV)
<p>
<a href="https://hub.docker.com/r/yourselfhosted/slash"><img alt="Docker pull" src="https://img.shields.io/docker/pulls/yourselfhosted/slash.svg"/></a>

View File

@ -1 +0,0 @@
> The v1 API has been deprecated. Please use the v2 API instead.

View File

@ -1,12 +0,0 @@
package v1
type ActivityShorcutCreatePayload struct {
ShortcutID int32 `json:"shortcutId"`
}
type ActivityShorcutViewPayload struct {
ShortcutID int32 `json:"shortcutId"`
IP string `json:"ip"`
Referer string `json:"referer"`
UserAgent string `json:"userAgent"`
}

View File

@ -1,131 +0,0 @@
package v1
import (
"encoding/json"
"fmt"
"net/http"
"github.com/labstack/echo/v4"
"github.com/mssola/useragent"
"golang.org/x/exp/slices"
"github.com/yourselfhosted/slash/internal/util"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/store"
)
type ReferenceInfo struct {
Name string `json:"name"`
Count int `json:"count"`
}
type DeviceInfo struct {
Name string `json:"name"`
Count int `json:"count"`
}
type BrowserInfo struct {
Name string `json:"name"`
Count int `json:"count"`
}
type AnalysisData struct {
ReferenceData []ReferenceInfo `json:"referenceData"`
DeviceData []DeviceInfo `json:"deviceData"`
BrowserData []BrowserInfo `json:"browserData"`
}
func (s *APIV1Service) registerAnalyticsRoutes(g *echo.Group) {
g.GET("/shortcut/:shortcutId/analytics", func(c echo.Context) error {
ctx := c.Request().Context()
shortcutID, err := util.ConvertStringToInt32(c.Param("shortcutId"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("shortcut id is not a number: %s", c.Param("shortcutId"))).SetInternal(err)
}
activities, err := s.Store.ListActivities(ctx, &store.FindActivity{
Type: store.ActivityShortcutView,
PayloadShortcutID: &shortcutID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to get activities, err: %s", err)).SetInternal(err)
}
referenceMap := make(map[string]int)
deviceMap := make(map[string]int)
browserMap := make(map[string]int)
for _, activity := range activities {
payload := &ActivityShorcutViewPayload{}
if err := json.Unmarshal([]byte(activity.Payload), payload); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to unmarshal payload, err: %s", err)).SetInternal(err)
}
if _, ok := referenceMap[payload.Referer]; !ok {
referenceMap[payload.Referer] = 0
}
referenceMap[payload.Referer]++
ua := useragent.New(payload.UserAgent)
deviceName := ua.OSInfo().Name
browserName, _ := ua.Browser()
if _, ok := deviceMap[deviceName]; !ok {
deviceMap[deviceName] = 0
}
deviceMap[deviceName]++
if _, ok := browserMap[browserName]; !ok {
browserMap[browserName] = 0
}
browserMap[browserName]++
}
metric.Enqueue("shortcut analytics")
return c.JSON(http.StatusOK, &AnalysisData{
ReferenceData: mapToReferenceInfoSlice(referenceMap),
DeviceData: mapToDeviceInfoSlice(deviceMap),
BrowserData: mapToBrowserInfoSlice(browserMap),
})
})
}
func mapToReferenceInfoSlice(m map[string]int) []ReferenceInfo {
referenceInfoSlice := make([]ReferenceInfo, 0)
for key, value := range m {
referenceInfoSlice = append(referenceInfoSlice, ReferenceInfo{
Name: key,
Count: value,
})
}
slices.SortFunc(referenceInfoSlice, func(i, j ReferenceInfo) int {
return i.Count - j.Count
})
return referenceInfoSlice
}
func mapToDeviceInfoSlice(m map[string]int) []DeviceInfo {
deviceInfoSlice := make([]DeviceInfo, 0)
for key, value := range m {
deviceInfoSlice = append(deviceInfoSlice, DeviceInfo{
Name: key,
Count: value,
})
}
slices.SortFunc(deviceInfoSlice, func(i, j DeviceInfo) int {
return i.Count - j.Count
})
return deviceInfoSlice
}
func mapToBrowserInfoSlice(m map[string]int) []BrowserInfo {
browserInfoSlice := make([]BrowserInfo, 0)
for key, value := range m {
browserInfoSlice = append(browserInfoSlice, BrowserInfo{
Name: key,
Count: value,
})
}
slices.SortFunc(browserInfoSlice, func(i, j BrowserInfo) int {
return i.Count - j.Count
})
return browserInfoSlice
}

View File

@ -1,211 +0,0 @@
package v1
import (
"context"
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
"golang.org/x/crypto/bcrypt"
"github.com/yourselfhosted/slash/api/auth"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
type SignInRequest struct {
Email string `json:"email"`
Password string `json:"password"`
}
type SignUpRequest struct {
Nickname string `json:"nickname"`
Email string `json:"email"`
Password string `json:"password"`
}
func (s *APIV1Service) registerAuthRoutes(g *echo.Group, secret string) {
g.POST("/auth/signin", func(c echo.Context) error {
ctx := c.Request().Context()
signin := &SignInRequest{}
if err := json.NewDecoder(c.Request().Body).Decode(signin); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("malformatted signin request, err: %s", err))
}
user, err := s.Store.GetUser(ctx, &store.FindUser{
Email: &signin.Email,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to find user by email %s", signin.Email)).SetInternal(err)
}
if user == nil {
return echo.NewHTTPError(http.StatusUnauthorized, fmt.Sprintf("user not found with email %s", signin.Email))
} else if user.RowStatus == store.Archived {
return echo.NewHTTPError(http.StatusForbidden, fmt.Sprintf("user has been archived with email %s", signin.Email))
}
// Compare the stored hashed password, with the hashed version of the password that was received.
if err := bcrypt.CompareHashAndPassword([]byte(user.PasswordHash), []byte(signin.Password)); err != nil {
return echo.NewHTTPError(http.StatusUnauthorized, "unmatched email and password")
}
accessToken, err := auth.GenerateAccessToken(user.Email, user.ID, time.Now().Add(auth.AccessTokenDuration), []byte(secret))
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to generate tokens, err: %s", err)).SetInternal(err)
}
if err := s.UpsertAccessTokenToStore(ctx, user, accessToken); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to upsert access token, err: %s", err)).SetInternal(err)
}
cookieExp := time.Now().Add(auth.CookieExpDuration)
setTokenCookie(c, auth.AccessTokenCookieName, accessToken, cookieExp)
metric.Enqueue("user sign in")
return c.JSON(http.StatusOK, convertUserFromStore(user))
})
g.POST("/auth/signup", func(c echo.Context) error {
ctx := c.Request().Context()
enableSignUpSetting, err := s.Store.GetWorkspaceSetting(ctx, &store.FindWorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSAPCE_SETTING_ENABLE_SIGNUP,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to get workspace setting, err: %s", err)).SetInternal(err)
}
if enableSignUpSetting != nil && !enableSignUpSetting.GetEnableSignup() {
return echo.NewHTTPError(http.StatusForbidden, "sign up has been disabled")
}
if !s.LicenseService.IsFeatureEnabled(license.FeatureTypeUnlimitedAccounts) {
userList, err := s.Store.ListUsers(ctx, &store.FindUser{})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to list users").SetInternal(err)
}
if len(userList) >= 5 {
return echo.NewHTTPError(http.StatusBadRequest, "Maximum number of users reached")
}
}
signup := &SignUpRequest{}
if err := json.NewDecoder(c.Request().Body).Decode(signup); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("malformatted signup request, err: %s", err)).SetInternal(err)
}
passwordHash, err := bcrypt.GenerateFromPassword([]byte(signup.Password), bcrypt.DefaultCost)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "failed to generate password hash").SetInternal(err)
}
create := &store.User{
Email: signup.Email,
Nickname: signup.Nickname,
PasswordHash: string(passwordHash),
}
existingUsers, err := s.Store.ListUsers(ctx, &store.FindUser{})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to find existing users, err: %s", err)).SetInternal(err)
}
// The first user to sign up is an admin by default.
if len(existingUsers) == 0 {
create.Role = store.RoleAdmin
} else {
create.Role = store.RoleUser
}
user, err := s.Store.CreateUser(ctx, create)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to create user, err: %s", err)).SetInternal(err)
}
accessToken, err := auth.GenerateAccessToken(user.Email, user.ID, time.Now().Add(auth.AccessTokenDuration), []byte(secret))
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to generate tokens, err: %s", err)).SetInternal(err)
}
if err := s.UpsertAccessTokenToStore(ctx, user, accessToken); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to upsert access token, err: %s", err)).SetInternal(err)
}
cookieExp := time.Now().Add(auth.CookieExpDuration)
setTokenCookie(c, auth.AccessTokenCookieName, accessToken, cookieExp)
metric.Enqueue("user sign up")
return c.JSON(http.StatusOK, convertUserFromStore(user))
})
g.POST("/auth/logout", func(c echo.Context) error {
ctx := c.Request().Context()
RemoveTokensAndCookies(c)
accessToken := findAccessToken(c)
userID, _ := getUserIDFromAccessToken(accessToken, secret)
userAccessTokens, err := s.Store.GetUserAccessTokens(ctx, userID)
// Auto remove the current access token from the user access tokens.
if err == nil && len(userAccessTokens) != 0 {
accessTokens := []*storepb.AccessTokensUserSetting_AccessToken{}
for _, userAccessToken := range userAccessTokens {
if accessToken != userAccessToken.AccessToken {
accessTokens = append(accessTokens, userAccessToken)
}
}
if _, err := s.Store.UpsertUserSetting(ctx, &storepb.UserSetting{
UserId: userID,
Key: storepb.UserSettingKey_USER_SETTING_ACCESS_TOKENS,
Value: &storepb.UserSetting_AccessTokens{
AccessTokens: &storepb.AccessTokensUserSetting{
AccessTokens: accessTokens,
},
},
}); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to upsert user setting, err: %s", err)).SetInternal(err)
}
}
c.Response().WriteHeader(http.StatusOK)
return nil
})
}
func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store.User, accessToken string) error {
userAccessTokens, err := s.Store.GetUserAccessTokens(ctx, user.ID)
if err != nil {
return errors.Wrap(err, "failed to get user access tokens")
}
userAccessToken := storepb.AccessTokensUserSetting_AccessToken{
AccessToken: accessToken,
Description: "Account sign in",
}
userAccessTokens = append(userAccessTokens, &userAccessToken)
if _, err := s.Store.UpsertUserSetting(ctx, &storepb.UserSetting{
UserId: user.ID,
Key: storepb.UserSettingKey_USER_SETTING_ACCESS_TOKENS,
Value: &storepb.UserSetting_AccessTokens{
AccessTokens: &storepb.AccessTokensUserSetting{
AccessTokens: userAccessTokens,
},
},
}); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to upsert user setting, err: %s", err)).SetInternal(err)
}
return nil
}
// RemoveTokensAndCookies removes the jwt token from the cookies.
func RemoveTokensAndCookies(c echo.Context) {
cookieExp := time.Now().Add(-1 * time.Hour)
setTokenCookie(c, auth.AccessTokenCookieName, "", cookieExp)
}
// setTokenCookie sets the token to the cookie.
func setTokenCookie(c echo.Context, name, token string, expiration time.Time) {
cookie := new(http.Cookie)
cookie.Name = name
cookie.Value = token
cookie.Expires = expiration
cookie.Path = "/"
// Http-only helps mitigate the risk of client side script accessing the protected cookie.
cookie.HttpOnly = true
cookie.SameSite = http.SameSiteStrictMode
c.SetCookie(cookie)
}

View File

@ -1,15 +0,0 @@
package v1
// RowStatus is the status for a row.
type RowStatus string
const (
// Normal is the status for a normal row.
Normal RowStatus = "NORMAL"
// Archived is the status for an archived row.
Archived RowStatus = "ARCHIVED"
)
func (s RowStatus) String() string {
return string(s)
}

View File

@ -1,133 +0,0 @@
package v1
import (
"fmt"
"net/http"
"strings"
"github.com/golang-jwt/jwt/v4"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
"github.com/yourselfhosted/slash/api/auth"
"github.com/yourselfhosted/slash/internal/util"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/store"
)
const (
// The key name used to store user id in the context
// user id is extracted from the jwt token subject field.
userIDContextKey = "user-id"
)
func extractTokenFromHeader(c echo.Context) (string, error) {
authHeader := c.Request().Header.Get("Authorization")
if authHeader == "" {
return "", nil
}
authHeaderParts := strings.Fields(authHeader)
if len(authHeaderParts) != 2 || strings.ToLower(authHeaderParts[0]) != "bearer" {
return "", errors.New("Authorization header format must be Bearer {token}")
}
return authHeaderParts[1], nil
}
func findAccessToken(c echo.Context) string {
// Check the HTTP request header first.
accessToken, _ := extractTokenFromHeader(c)
if accessToken == "" {
// Check the cookie.
cookie, _ := c.Cookie(auth.AccessTokenCookieName)
if cookie != nil {
accessToken = cookie.Value
}
}
return accessToken
}
// JWTMiddleware validates the access token.
func JWTMiddleware(s *APIV1Service, next echo.HandlerFunc, secret string) echo.HandlerFunc {
return func(c echo.Context) error {
ctx := c.Request().Context()
path := c.Request().URL.Path
method := c.Request().Method
// Pass auth and profile endpoints.
if util.HasPrefixes(path, "/api/v1/auth", "/api/v1/workspace/profile") {
return next(c)
}
accessToken := findAccessToken(c)
if accessToken == "" {
// When the request is not authenticated, we allow the user to access the shortcut endpoints for those public shortcuts.
if util.HasPrefixes(path, "/s/", "/api/v1/user/") && method == http.MethodGet {
return next(c)
}
return echo.NewHTTPError(http.StatusUnauthorized, "Missing access token")
}
userID, err := getUserIDFromAccessToken(accessToken, secret)
if err != nil {
return echo.NewHTTPError(http.StatusUnauthorized, "Invalid or expired access token")
}
accessTokens, err := s.Store.GetUserAccessTokens(ctx, userID)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to get user access tokens.").WithInternal(err)
}
if !validateAccessToken(accessToken, accessTokens) {
return echo.NewHTTPError(http.StatusUnauthorized, "Invalid access token.")
}
// Even if there is no error, we still need to make sure the user still exists.
user, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Server error to find user ID: %d", userID)).SetInternal(err)
}
if user == nil {
return echo.NewHTTPError(http.StatusUnauthorized, fmt.Sprintf("Failed to find user ID: %d", userID))
}
// Stores userID into context.
c.Set(userIDContextKey, userID)
return next(c)
}
}
func getUserIDFromAccessToken(accessToken, secret string) (int32, error) {
claims := &auth.ClaimsMessage{}
_, err := jwt.ParseWithClaims(accessToken, claims, func(t *jwt.Token) (any, error) {
if t.Method.Alg() != jwt.SigningMethodHS256.Name {
return nil, errors.Errorf("unexpected access token signing method=%v, expect %v", t.Header["alg"], jwt.SigningMethodHS256)
}
if kid, ok := t.Header["kid"].(string); ok {
if kid == "v1" {
return []byte(secret), nil
}
}
return nil, errors.Errorf("unexpected access token kid=%v", t.Header["kid"])
})
if err != nil {
return 0, errors.Wrap(err, "Invalid or expired access token")
}
// We either have a valid access token or we will attempt to generate new access token.
userID, err := util.ConvertStringToInt32(claims.Subject)
if err != nil {
return 0, errors.Wrap(err, "Malformed ID in the token")
}
return userID, nil
}
func validateAccessToken(accessTokenString string, userAccessTokens []*storepb.AccessTokensUserSetting_AccessToken) bool {
for _, userAccessToken := range userAccessTokens {
if accessTokenString == userAccessToken.AccessToken {
return true
}
}
return false
}

View File

@ -1,386 +0,0 @@
package v1
import (
"context"
"encoding/json"
"fmt"
"net/http"
"strings"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
"github.com/yourselfhosted/slash/internal/util"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/store"
)
// Visibility is the type of a shortcut visibility.
type Visibility string
const (
// VisibilityPublic is the PUBLIC visibility.
VisibilityPublic Visibility = "PUBLIC"
// VisibilityWorkspace is the WORKSPACE visibility.
VisibilityWorkspace Visibility = "WORKSPACE"
// VisibilityPrivate is the PRIVATE visibility.
VisibilityPrivate Visibility = "PRIVATE"
)
func (v Visibility) String() string {
return string(v)
}
type OpenGraphMetadata struct {
Title string `json:"title"`
Description string `json:"description"`
Image string `json:"image"`
}
type Shortcut struct {
ID int32 `json:"id"`
// Standard fields
CreatorID int32 `json:"creatorId"`
Creator *User `json:"creator"`
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
RowStatus RowStatus `json:"rowStatus"`
// Domain specific fields
Name string `json:"name"`
Link string `json:"link"`
Title string `json:"title"`
Description string `json:"description"`
Visibility Visibility `json:"visibility"`
Tags []string `json:"tags"`
View int `json:"view"`
OpenGraphMetadata *OpenGraphMetadata `json:"openGraphMetadata"`
}
type CreateShortcutRequest struct {
Name string `json:"name"`
Link string `json:"link"`
Title string `json:"title"`
Description string `json:"description"`
Visibility Visibility `json:"visibility"`
Tags []string `json:"tags"`
OpenGraphMetadata *OpenGraphMetadata `json:"openGraphMetadata"`
}
type PatchShortcutRequest struct {
RowStatus *RowStatus `json:"rowStatus"`
Name *string `json:"name"`
Link *string `json:"link"`
Title *string `json:"title"`
Description *string `json:"description"`
Visibility *Visibility `json:"visibility"`
Tags []string `json:"tags"`
OpenGraphMetadata *OpenGraphMetadata `json:"openGraphMetadata"`
}
func (s *APIV1Service) registerShortcutRoutes(g *echo.Group) {
g.POST("/shortcut", func(c echo.Context) error {
ctx := c.Request().Context()
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "missing user in session")
}
create := &CreateShortcutRequest{}
if err := json.NewDecoder(c.Request().Body).Decode(create); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("malformatted post shortcut request, err: %s", err)).SetInternal(err)
}
shortcut := &storepb.Shortcut{
CreatorId: userID,
Name: create.Name,
Link: create.Link,
Title: create.Title,
Description: create.Description,
Visibility: convertVisibilityToStorepb(create.Visibility),
Tags: create.Tags,
OgMetadata: &storepb.OpenGraphMetadata{},
}
if create.Name == "" {
return echo.NewHTTPError(http.StatusBadRequest, "name is required")
}
if create.OpenGraphMetadata != nil {
shortcut.OgMetadata = &storepb.OpenGraphMetadata{
Title: create.OpenGraphMetadata.Title,
Description: create.OpenGraphMetadata.Description,
Image: create.OpenGraphMetadata.Image,
}
}
shortcut, err := s.Store.CreateShortcut(ctx, shortcut)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to create shortcut, err: %s", err)).SetInternal(err)
}
if err := s.createShortcutCreateActivity(ctx, shortcut); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to create shortcut activity, err: %s", err)).SetInternal(err)
}
shortcutMessage, err := s.composeShortcut(ctx, convertShortcutFromStorepb(shortcut))
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to compose shortcut, err: %s", err)).SetInternal(err)
}
metric.Enqueue("shortcut create")
return c.JSON(http.StatusOK, shortcutMessage)
})
g.PATCH("/shortcut/:shortcutId", func(c echo.Context) error {
ctx := c.Request().Context()
shortcutID, err := util.ConvertStringToInt32(c.Param("shortcutId"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("shortcut ID is not a number: %s", c.Param("shortcutId"))).SetInternal(err)
}
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "missing user in session")
}
currentUser, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to find user, err: %s", err)).SetInternal(err)
}
shortcut, err := s.Store.GetShortcut(ctx, &store.FindShortcut{
ID: &shortcutID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to find shortcut, err: %s", err)).SetInternal(err)
}
if shortcut == nil {
return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("not found shortcut with id: %d", shortcutID))
}
if shortcut.CreatorId != userID && currentUser.Role != store.RoleAdmin {
return echo.NewHTTPError(http.StatusForbidden, "unauthorized to update shortcut")
}
patch := &PatchShortcutRequest{}
if err := json.NewDecoder(c.Request().Body).Decode(patch); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("failed to decode patch shortcut request, err: %s", err)).SetInternal(err)
}
shortcutUpdate := &store.UpdateShortcut{
ID: shortcutID,
Name: patch.Name,
Link: patch.Link,
Title: patch.Title,
Description: patch.Description,
}
if patch.RowStatus != nil {
shortcutUpdate.RowStatus = (*store.RowStatus)(patch.RowStatus)
}
if patch.Visibility != nil {
shortcutUpdate.Visibility = (*store.Visibility)(patch.Visibility)
}
if patch.Tags != nil {
tag := strings.Join(patch.Tags, " ")
shortcutUpdate.Tag = &tag
}
if patch.OpenGraphMetadata != nil {
shortcutUpdate.OpenGraphMetadata = &storepb.OpenGraphMetadata{
Title: patch.OpenGraphMetadata.Title,
Description: patch.OpenGraphMetadata.Description,
Image: patch.OpenGraphMetadata.Image,
}
}
shortcut, err = s.Store.UpdateShortcut(ctx, shortcutUpdate)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to patch shortcut, err: %s", err)).SetInternal(err)
}
shortcutMessage, err := s.composeShortcut(ctx, convertShortcutFromStorepb(shortcut))
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to compose shortcut, err: %s", err)).SetInternal(err)
}
return c.JSON(http.StatusOK, shortcutMessage)
})
g.GET("/shortcut", func(c echo.Context) error {
ctx := c.Request().Context()
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "missing user in session")
}
find := &store.FindShortcut{}
if tag := c.QueryParam("tag"); tag != "" {
find.Tag = &tag
}
list := []*storepb.Shortcut{}
find.VisibilityList = []store.Visibility{store.VisibilityWorkspace, store.VisibilityPublic}
visibleShortcutList, err := s.Store.ListShortcuts(ctx, find)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to fetch shortcut list, err: %s", err)).SetInternal(err)
}
list = append(list, visibleShortcutList...)
find.VisibilityList = []store.Visibility{store.VisibilityPrivate}
find.CreatorID = &userID
privateShortcutList, err := s.Store.ListShortcuts(ctx, find)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to fetch private shortcut list, err: %s", err)).SetInternal(err)
}
list = append(list, privateShortcutList...)
shortcutMessageList := []*Shortcut{}
for _, shortcut := range list {
shortcutMessage, err := s.composeShortcut(ctx, convertShortcutFromStorepb(shortcut))
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to compose shortcut, err: %s", err)).SetInternal(err)
}
shortcutMessageList = append(shortcutMessageList, shortcutMessage)
}
return c.JSON(http.StatusOK, shortcutMessageList)
})
g.GET("/shortcut/:id", func(c echo.Context) error {
ctx := c.Request().Context()
shortcutID, err := util.ConvertStringToInt32(c.Param("id"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("shortcut id is not a number: %s", c.Param("id"))).SetInternal(err)
}
shortcut, err := s.Store.GetShortcut(ctx, &store.FindShortcut{
ID: &shortcutID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to fetch shortcut by id, err: %s", err)).SetInternal(err)
}
if shortcut == nil {
return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("not found shortcut with id: %d", shortcutID))
}
shortcutMessage, err := s.composeShortcut(ctx, convertShortcutFromStorepb(shortcut))
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to compose shortcut, err: %s", err)).SetInternal(err)
}
return c.JSON(http.StatusOK, shortcutMessage)
})
g.DELETE("/shortcut/:id", func(c echo.Context) error {
ctx := c.Request().Context()
shortcutID, err := util.ConvertStringToInt32(c.Param("id"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("shortcut id is not a number: %s", c.Param("id"))).SetInternal(err)
}
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "missing user in session")
}
currentUser, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to find user, err: %s", err)).SetInternal(err)
}
shortcut, err := s.Store.GetShortcut(ctx, &store.FindShortcut{
ID: &shortcutID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to fetch shortcut by id, err: %s", err)).SetInternal(err)
}
if shortcut == nil {
return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("not found shortcut with id: %d", shortcutID))
}
if shortcut.CreatorId != userID && currentUser.Role != store.RoleAdmin {
return echo.NewHTTPError(http.StatusForbidden, "Unauthorized to delete shortcut")
}
err = s.Store.DeleteShortcut(ctx, &store.DeleteShortcut{ID: shortcutID})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to delete shortcut, err: %s", err)).SetInternal(err)
}
return c.JSON(http.StatusOK, true)
})
}
func (s *APIV1Service) composeShortcut(ctx context.Context, shortcut *Shortcut) (*Shortcut, error) {
if shortcut == nil {
return nil, nil
}
user, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &shortcut.CreatorID,
})
if err != nil {
return nil, errors.Wrap(err, "Failed to get creator")
}
if user == nil {
return nil, errors.New("Creator not found")
}
shortcut.Creator = convertUserFromStore(user)
activityList, err := s.Store.ListActivities(ctx, &store.FindActivity{
Type: store.ActivityShortcutView,
Level: store.ActivityInfo,
PayloadShortcutID: &shortcut.ID,
})
if err != nil {
return nil, errors.Wrap(err, "Failed to list activities")
}
shortcut.View = len(activityList)
return shortcut, nil
}
func convertShortcutFromStorepb(shortcut *storepb.Shortcut) *Shortcut {
return &Shortcut{
ID: shortcut.Id,
CreatedTs: shortcut.CreatedTs,
UpdatedTs: shortcut.UpdatedTs,
CreatorID: shortcut.CreatorId,
RowStatus: RowStatus(shortcut.RowStatus.String()),
Name: shortcut.Name,
Link: shortcut.Link,
Title: shortcut.Title,
Description: shortcut.Description,
Visibility: Visibility(shortcut.Visibility.String()),
Tags: shortcut.Tags,
OpenGraphMetadata: &OpenGraphMetadata{
Title: shortcut.OgMetadata.Title,
Description: shortcut.OgMetadata.Description,
Image: shortcut.OgMetadata.Image,
},
}
}
func convertVisibilityToStorepb(visibility Visibility) storepb.Visibility {
switch visibility {
case VisibilityPublic:
return storepb.Visibility_PUBLIC
case VisibilityWorkspace:
return storepb.Visibility_WORKSPACE
case VisibilityPrivate:
return storepb.Visibility_PRIVATE
default:
return storepb.Visibility_PUBLIC
}
}
func (s *APIV1Service) createShortcutCreateActivity(ctx context.Context, shortcut *storepb.Shortcut) error {
payload := &ActivityShorcutCreatePayload{
ShortcutID: shortcut.Id,
}
payloadStr, err := json.Marshal(payload)
if err != nil {
return errors.Wrap(err, "Failed to marshal activity payload")
}
activity := &store.Activity{
CreatorID: shortcut.CreatorId,
Type: store.ActivityShortcutCreate,
Level: store.ActivityInfo,
Payload: string(payloadStr),
}
_, err = s.Store.CreateActivity(ctx, activity)
if err != nil {
return errors.Wrap(err, "Failed to create activity")
}
return nil
}

View File

@ -1,340 +0,0 @@
package v1
import (
"encoding/json"
"fmt"
"net/http"
"net/mail"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
"golang.org/x/crypto/bcrypt"
"github.com/yourselfhosted/slash/internal/util"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
const (
// BotID is the id of bot.
BotID = 0
)
// Role is the type of a role.
type Role string
const (
// RoleAdmin is the ADMIN role.
RoleAdmin Role = "ADMIN"
// RoleUser is the USER role.
RoleUser Role = "USER"
)
func (r Role) String() string {
switch r {
case RoleAdmin:
return "ADMIN"
case RoleUser:
return "USER"
}
return "USER"
}
type User struct {
ID int32 `json:"id"`
// Standard fields
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
RowStatus RowStatus `json:"rowStatus"`
// Domain specific fields
Email string `json:"email"`
Nickname string `json:"nickname"`
Role Role `json:"role"`
}
type CreateUserRequest struct {
Email string `json:"email"`
Nickname string `json:"nickname"`
Password string `json:"password"`
Role Role `json:"role"`
}
func (create CreateUserRequest) Validate() error {
if create.Email != "" && !validateEmail(create.Email) {
return errors.New("invalid email format")
}
if create.Nickname != "" && len(create.Nickname) < 3 {
return errors.New("nickname is too short, minimum length is 3")
}
if len(create.Password) < 3 {
return errors.New("password is too short, minimum length is 3")
}
return nil
}
type PatchUserRequest struct {
RowStatus *RowStatus `json:"rowStatus"`
Email *string `json:"email"`
Nickname *string `json:"nickname"`
Password *string `json:"password"`
Role *Role `json:"role"`
}
func (s *APIV1Service) registerUserRoutes(g *echo.Group) {
g.POST("/user", func(c echo.Context) error {
ctx := c.Request().Context()
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "Missing auth session")
}
currentUser, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find user by id").SetInternal(err)
}
if currentUser == nil {
return echo.NewHTTPError(http.StatusUnauthorized, "Missing auth session")
}
if currentUser.Role != store.RoleAdmin {
return echo.NewHTTPError(http.StatusUnauthorized, "Unauthorized to create user")
}
if !s.LicenseService.IsFeatureEnabled(license.FeatureTypeUnlimitedAccounts) {
userList, err := s.Store.ListUsers(ctx, &store.FindUser{})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to list users").SetInternal(err)
}
if len(userList) >= 5 {
return echo.NewHTTPError(http.StatusBadRequest, "Maximum number of users reached")
}
}
userCreate := &CreateUserRequest{}
if err := json.NewDecoder(c.Request().Body).Decode(userCreate); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Malformatted post user request").SetInternal(err)
}
if err := userCreate.Validate(); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Invalid user create format").SetInternal(err)
}
passwordHash, err := bcrypt.GenerateFromPassword([]byte(userCreate.Password), bcrypt.DefaultCost)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to generate password hash").SetInternal(err)
}
user, err := s.Store.CreateUser(ctx, &store.User{
Role: store.Role(userCreate.Role),
Email: userCreate.Email,
Nickname: userCreate.Nickname,
PasswordHash: string(passwordHash),
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create user").SetInternal(err)
}
userMessage := convertUserFromStore(user)
metric.Enqueue("user create")
return c.JSON(http.StatusOK, userMessage)
})
g.GET("/user", func(c echo.Context) error {
ctx := c.Request().Context()
list, err := s.Store.ListUsers(ctx, &store.FindUser{})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to list users, err: %s", err)).SetInternal(err)
}
userList := []*User{}
for _, user := range list {
userList = append(userList, convertUserFromStore(user))
}
return c.JSON(http.StatusOK, userList)
})
// GET /api/user/me is used to check if the user is logged in.
g.GET("/user/me", func(c echo.Context) error {
ctx := c.Request().Context()
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "missing auth session")
}
user, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find user, err: %s", err)).SetInternal(err)
}
return c.JSON(http.StatusOK, convertUserFromStore(user))
})
g.GET("/user/:id", func(c echo.Context) error {
ctx := c.Request().Context()
userID, err := util.ConvertStringToInt32(c.Param("id"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("user id is not a number: %s", c.Param("id"))).SetInternal(err)
}
user, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find user, err: %s", err)).SetInternal(err)
}
userMessage := convertUserFromStore(user)
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
userMessage.Email = ""
}
return c.JSON(http.StatusOK, userMessage)
})
g.PATCH("/user/:id", func(c echo.Context) error {
ctx := c.Request().Context()
userID, err := util.ConvertStringToInt32(c.Param("id"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("user id is not a number: %s", c.Param("id"))).SetInternal(err)
}
currentUserID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "missing user in session")
}
currentUser, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &currentUserID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "failed to find current user").SetInternal(err)
}
if currentUser == nil {
return echo.NewHTTPError(http.StatusUnauthorized, "missing user in session")
}
if currentUser.ID != userID && currentUser.Role != store.RoleAdmin {
return echo.NewHTTPError(http.StatusForbidden, "access forbidden for current session user").SetInternal(err)
}
userPatch := &PatchUserRequest{}
if err := json.NewDecoder(c.Request().Body).Decode(userPatch); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("failed to decode request body, err: %s", err)).SetInternal(err)
}
updateUser := &store.UpdateUser{
ID: userID,
}
if userPatch.Email != nil {
if !validateEmail(*userPatch.Email) {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("invalid email format: %s", *userPatch.Email))
}
updateUser.Email = userPatch.Email
}
if userPatch.Nickname != nil {
updateUser.Nickname = userPatch.Nickname
}
if userPatch.Password != nil && *userPatch.Password != "" {
passwordHash, err := bcrypt.GenerateFromPassword([]byte(*userPatch.Password), bcrypt.DefaultCost)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to hash password, err: %s", err)).SetInternal(err)
}
passwordHashStr := string(passwordHash)
updateUser.PasswordHash = &passwordHashStr
}
if userPatch.RowStatus != nil {
rowStatus := store.RowStatus(*userPatch.RowStatus)
updateUser.RowStatus = &rowStatus
}
if userPatch.Role != nil {
adminRole := store.RoleAdmin
adminUsers, err := s.Store.ListUsers(ctx, &store.FindUser{
Role: &adminRole,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to list admin users, err: %s", err)).SetInternal(err)
}
if len(adminUsers) == 1 && adminUsers[0].ID == userID && *userPatch.Role != RoleAdmin {
return echo.NewHTTPError(http.StatusBadRequest, "cannot remove admin role from the last admin user")
}
role := store.Role(*userPatch.Role)
updateUser.Role = &role
}
user, err := s.Store.UpdateUser(ctx, updateUser)
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to update user, err: %s", err)).SetInternal(err)
}
return c.JSON(http.StatusOK, convertUserFromStore(user))
})
g.DELETE("/user/:id", func(c echo.Context) error {
ctx := c.Request().Context()
currentUserID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "missing user in session")
}
currentUser, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &currentUserID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to find current session user, err: %s", err)).SetInternal(err)
}
if currentUser == nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("current session user not found with ID: %d", currentUserID)).SetInternal(err)
}
if currentUser.Role != store.RoleAdmin {
return echo.NewHTTPError(http.StatusForbidden, "access forbidden for current session user").SetInternal(err)
}
userID, err := util.ConvertStringToInt32(c.Param("id"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("user id is not a number: %s", c.Param("id"))).SetInternal(err)
}
user, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find user, err: %s", err)).SetInternal(err)
}
if user == nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("user not found with ID: %d", userID)).SetInternal(err)
}
if user.Role == store.RoleAdmin {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("cannot delete admin user with ID: %d", userID)).SetInternal(err)
}
if err := s.Store.DeleteUser(ctx, &store.DeleteUser{
ID: userID,
}); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to delete user, err: %s", err)).SetInternal(err)
}
return c.JSON(http.StatusOK, true)
})
}
// validateEmail validates the email.
func validateEmail(email string) bool {
if _, err := mail.ParseAddress(email); err != nil {
return false
}
return true
}
// convertUserFromStore converts a store user to a user.
func convertUserFromStore(user *store.User) *User {
return &User{
ID: user.ID,
CreatedTs: user.CreatedTs,
UpdatedTs: user.UpdatedTs,
RowStatus: RowStatus(user.RowStatus),
Email: user.Email,
Nickname: user.Nickname,
Role: Role(user.Role),
}
}

View File

@ -1,67 +0,0 @@
package v1
import (
"encoding/json"
"github.com/pkg/errors"
)
type UserSettingKey string
const (
// UserSettingLocaleKey is the key type for user locale.
UserSettingLocaleKey UserSettingKey = "locale"
)
// String returns the string format of UserSettingKey type.
func (k UserSettingKey) String() string {
return string(k)
}
var (
UserSettingLocaleValue = []string{"en", "zh"}
)
type UserSetting struct {
UserID int
Key UserSettingKey `json:"key"`
// Value is a JSON string with basic value.
Value string `json:"value"`
}
type UserSettingUpsert struct {
UserID int
Key UserSettingKey `json:"key"`
Value string `json:"value"`
}
func (upsert UserSettingUpsert) Validate() error {
if upsert.Key == UserSettingLocaleKey {
localeValue := "en"
err := json.Unmarshal([]byte(upsert.Value), &localeValue)
if err != nil {
return errors.New("failed to unmarshal user setting locale value")
}
invalid := true
for _, value := range UserSettingLocaleValue {
if localeValue == value {
invalid = false
break
}
}
if invalid {
return errors.New("invalid user setting locale value")
}
} else {
return errors.New("invalid user setting key")
}
return nil
}
type UserSettingFind struct {
UserID int
Key *UserSettingKey `json:"key"`
}

View File

@ -1,35 +0,0 @@
package v1
import (
"github.com/labstack/echo/v4"
"github.com/yourselfhosted/slash/server/profile"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
type APIV1Service struct {
Profile *profile.Profile
Store *store.Store
LicenseService *license.LicenseService
}
func NewAPIV1Service(profile *profile.Profile, store *store.Store, licenseService *license.LicenseService) *APIV1Service {
return &APIV1Service{
Profile: profile,
Store: store,
LicenseService: licenseService,
}
}
func (s *APIV1Service) Start(apiGroup *echo.Group, secret string) {
apiV1Group := apiGroup.Group("/api/v1")
apiV1Group.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
return JWTMiddleware(s, next, secret)
})
s.registerWorkspaceRoutes(apiV1Group)
s.registerAuthRoutes(apiV1Group, secret)
s.registerUserRoutes(apiV1Group)
s.registerShortcutRoutes(apiV1Group)
s.registerAnalyticsRoutes(apiV1Group)
}

View File

@ -1,39 +0,0 @@
package v1
import (
"fmt"
"net/http"
"github.com/labstack/echo/v4"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/server/profile"
"github.com/yourselfhosted/slash/store"
)
type WorkspaceProfile struct {
Profile *profile.Profile `json:"profile"`
DisallowSignUp bool `json:"disallowSignUp"`
}
func (s *APIV1Service) registerWorkspaceRoutes(g *echo.Group) {
g.GET("/workspace/profile", func(c echo.Context) error {
ctx := c.Request().Context()
workspaceProfile := WorkspaceProfile{
Profile: s.Profile,
DisallowSignUp: false,
}
enableSignUpSetting, err := s.Store.GetWorkspaceSetting(ctx, &store.FindWorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSAPCE_SETTING_ENABLE_SIGNUP,
})
if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to find workspace setting, err: %s", err)).SetInternal(err)
}
if enableSignUpSetting != nil {
workspaceProfile.DisallowSignUp = !enableSignUpSetting.GetEnableSignup()
}
return c.JSON(http.StatusOK, workspaceProfile)
})
}

View File

@ -1,35 +0,0 @@
package v2
import "strings"
var allowedMethodsWhenUnauthorized = map[string]bool{
"/slash.api.v2.WorkspaceService/GetWorkspaceProfile": true,
"/slash.api.v2.WorkspaceService/GetWorkspaceSetting": true,
"/slash.api.v2.AuthService/SignIn": true,
"/slash.api.v2.AuthService/SignUp": true,
"/slash.api.v2.AuthService/SignOut": true,
"/memos.api.v2.AuthService/GetAuthStatus": true,
"/slash.api.v2.ShortcutService/GetShortcutByName": true,
"/slash.api.v2.ShortcutService/GetShortcut": true,
"/slash.api.v2.CollectionService/GetCollectionByName": true,
}
// isUnauthorizeAllowedMethod returns true if the method is allowed to be called when the user is not authorized.
func isUnauthorizeAllowedMethod(methodName string) bool {
if strings.HasPrefix(methodName, "/grpc.reflection") {
return true
}
return allowedMethodsWhenUnauthorized[methodName]
}
var allowedMethodsOnlyForAdmin = map[string]bool{
"/slash.api.v2.UserService/CreateUser": true,
"/slash.api.v2.UserService/DeleteUser": true,
"/slash.api.v2.WorkspaceService/UpdateWorkspaceSetting": true,
"/slash.api.v2.SubscriptionService/UpdateSubscription": true,
}
// isOnlyForAdminAllowedMethod returns true if the method is allowed to be called only by admin.
func isOnlyForAdminAllowedMethod(methodName string) bool {
return allowedMethodsOnlyForAdmin[methodName]
}

View File

@ -1,149 +0,0 @@
package v2
import (
"context"
"fmt"
"time"
"golang.org/x/crypto/bcrypt"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"github.com/yourselfhosted/slash/api/auth"
apiv2pb "github.com/yourselfhosted/slash/proto/gen/api/v2"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
func (s *APIV2Service) GetAuthStatus(ctx context.Context, _ *apiv2pb.GetAuthStatusRequest) (*apiv2pb.GetAuthStatusResponse, error) {
user, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Unauthenticated, "failed to get current user: %v", err)
}
if user == nil {
return nil, status.Errorf(codes.Unauthenticated, "user not found")
}
return &apiv2pb.GetAuthStatusResponse{
User: convertUserFromStore(user),
}, nil
}
func (s *APIV2Service) SignIn(ctx context.Context, request *apiv2pb.SignInRequest) (*apiv2pb.SignInResponse, error) {
user, err := s.Store.GetUser(ctx, &store.FindUser{
Email: &request.Email,
})
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to find user by email %s", request.Email))
}
if user == nil {
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("user not found with email %s", request.Email))
} else if user.RowStatus == store.Archived {
return nil, status.Errorf(codes.PermissionDenied, fmt.Sprintf("user has been archived with email %s", request.Email))
}
// Compare the stored hashed password, with the hashed version of the password that was received.
if err := bcrypt.CompareHashAndPassword([]byte(user.PasswordHash), []byte(request.Password)); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "unmatched email and password")
}
accessToken, err := auth.GenerateAccessToken(user.Email, user.ID, time.Now().Add(auth.AccessTokenDuration), []byte(s.Secret))
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to generate tokens, err: %s", err))
}
if err := s.UpsertAccessTokenToStore(ctx, user, accessToken, "user login"); err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to upsert access token to store, err: %s", err))
}
if err := grpc.SetHeader(ctx, metadata.New(map[string]string{
"Set-Cookie": fmt.Sprintf("%s=%s; Path=/; Expires=%s; HttpOnly; SameSite=Strict", auth.AccessTokenCookieName, accessToken, time.Now().Add(auth.AccessTokenDuration).Format(time.RFC1123)),
})); err != nil {
return nil, status.Errorf(codes.Internal, "failed to set grpc header, error: %v", err)
}
metric.Enqueue("user sign in")
return &apiv2pb.SignInResponse{
User: convertUserFromStore(user),
}, nil
}
func (s *APIV2Service) SignUp(ctx context.Context, request *apiv2pb.SignUpRequest) (*apiv2pb.SignUpResponse, error) {
enableSignUpSetting, err := s.Store.GetWorkspaceSetting(ctx, &store.FindWorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSAPCE_SETTING_ENABLE_SIGNUP,
})
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get workspace setting, err: %s", err))
}
if enableSignUpSetting != nil && !enableSignUpSetting.GetEnableSignup() {
return nil, status.Errorf(codes.PermissionDenied, "sign up is not allowed")
}
if !s.LicenseService.IsFeatureEnabled(license.FeatureTypeUnlimitedAccounts) {
userList, err := s.Store.ListUsers(ctx, &store.FindUser{})
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to list users, err: %s", err))
}
if len(userList) >= 5 {
return nil, status.Errorf(codes.InvalidArgument, "maximum number of users reached")
}
}
passwordHash, err := bcrypt.GenerateFromPassword([]byte(request.Password), bcrypt.DefaultCost)
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to generate password hash, err: %s", err))
}
create := &store.User{
Email: request.Email,
Nickname: request.Nickname,
PasswordHash: string(passwordHash),
}
existingUsers, err := s.Store.ListUsers(ctx, &store.FindUser{})
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to list users, err: %s", err))
}
// The first user to sign up is an admin by default.
if len(existingUsers) == 0 {
create.Role = store.RoleAdmin
} else {
create.Role = store.RoleUser
}
user, err := s.Store.CreateUser(ctx, create)
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to create user, err: %s", err))
}
accessToken, err := auth.GenerateAccessToken(user.Email, user.ID, time.Now().Add(auth.AccessTokenDuration), []byte(s.Secret))
if err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to generate tokens, err: %s", err))
}
if err := s.UpsertAccessTokenToStore(ctx, user, accessToken, "user login"); err != nil {
return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to upsert access token to store, err: %s", err))
}
if err := grpc.SetHeader(ctx, metadata.New(map[string]string{
"Set-Cookie": fmt.Sprintf("%s=%s; Path=/; Expires=%s; HttpOnly; SameSite=Strict", auth.AccessTokenCookieName, accessToken, time.Now().Add(auth.AccessTokenDuration).Format(time.RFC1123)),
})); err != nil {
return nil, status.Errorf(codes.Internal, "failed to set grpc header, error: %v", err)
}
metric.Enqueue("user sign up")
return &apiv2pb.SignUpResponse{
User: convertUserFromStore(user),
}, nil
}
func (*APIV2Service) SignOut(ctx context.Context, _ *apiv2pb.SignOutRequest) (*apiv2pb.SignOutResponse, error) {
// Set the cookie header to expire access token.
if err := grpc.SetHeader(ctx, metadata.New(map[string]string{
"Set-Cookie": fmt.Sprintf("%s=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly; SameSite=Strict", auth.AccessTokenCookieName),
})); err != nil {
return nil, status.Errorf(codes.Internal, "failed to set grpc header, error: %v", err)
}
return &apiv2pb.SignOutResponse{}, nil
}

View File

@ -1,33 +0,0 @@
package v2
import (
"context"
apiv2pb "github.com/yourselfhosted/slash/proto/gen/api/v2"
"github.com/yourselfhosted/slash/store"
)
func convertRowStatusFromStore(rowStatus store.RowStatus) apiv2pb.RowStatus {
switch rowStatus {
case store.Normal:
return apiv2pb.RowStatus_NORMAL
case store.Archived:
return apiv2pb.RowStatus_ARCHIVED
default:
return apiv2pb.RowStatus_ROW_STATUS_UNSPECIFIED
}
}
func getCurrentUser(ctx context.Context, s *store.Store) (*store.User, error) {
userID, ok := ctx.Value(userIDContextKey).(int32)
if !ok {
return nil, nil
}
user, err := s.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return nil, err
}
return user, nil
}

View File

@ -1,187 +0,0 @@
package v2
import (
"context"
"strings"
"time"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/timestamppb"
apiv2pb "github.com/yourselfhosted/slash/proto/gen/api/v2"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/store"
)
func (s *APIV2Service) ListMemos(ctx context.Context, _ *apiv2pb.ListMemosRequest) (*apiv2pb.ListMemosResponse, error) {
find := &store.FindMemo{}
memos, err := s.Store.ListMemos(ctx, find)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to fetch memo list, err: %v", err)
}
composedMemos := []*apiv2pb.Memo{}
for _, memo := range memos {
composedMemo, err := s.convertMemoFromStorepb(ctx, memo)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert memo, err: %v", err)
}
composedMemos = append(composedMemos, composedMemo)
}
response := &apiv2pb.ListMemosResponse{
Memos: composedMemos,
}
return response, nil
}
func (s *APIV2Service) GetMemo(ctx context.Context, request *apiv2pb.GetMemoRequest) (*apiv2pb.GetMemoResponse, error) {
memo, err := s.Store.GetMemo(ctx, &store.FindMemo{
ID: &request.Id,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get memo by ID: %v", err)
}
if memo == nil {
return nil, status.Errorf(codes.NotFound, "memo not found")
}
composedMemo, err := s.convertMemoFromStorepb(ctx, memo)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert memo, err: %v", err)
}
response := &apiv2pb.GetMemoResponse{
Memo: composedMemo,
}
return response, nil
}
func (s *APIV2Service) CreateMemo(ctx context.Context, request *apiv2pb.CreateMemoRequest) (*apiv2pb.CreateMemoResponse, error) {
userID := ctx.Value(userIDContextKey).(int32)
memo := &storepb.Memo{
CreatorId: userID,
Name: request.Memo.Name,
Title: request.Memo.Title,
Content: request.Memo.Content,
Tags: request.Memo.Tags,
Visibility: storepb.Visibility(request.Memo.Visibility),
}
memo, err := s.Store.CreateMemo(ctx, memo)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to create memo, err: %v", err)
}
composedMemo, err := s.convertMemoFromStorepb(ctx, memo)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert memo, err: %v", err)
}
response := &apiv2pb.CreateMemoResponse{
Memo: composedMemo,
}
return response, nil
}
func (s *APIV2Service) UpdateMemo(ctx context.Context, request *apiv2pb.UpdateMemoRequest) (*apiv2pb.UpdateMemoResponse, error) {
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "updateMask is required")
}
userID := ctx.Value(userIDContextKey).(int32)
currentUser, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user, err: %v", err)
}
memo, err := s.Store.GetMemo(ctx, &store.FindMemo{
ID: &request.Memo.Id,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get memo by ID: %v", err)
}
if memo == nil {
return nil, status.Errorf(codes.NotFound, "memo not found")
}
if memo.CreatorId != userID && currentUser.Role != store.RoleAdmin {
return nil, status.Errorf(codes.PermissionDenied, "Permission denied")
}
update := &store.UpdateMemo{
ID: memo.Id,
}
for _, path := range request.UpdateMask.Paths {
switch path {
case "name":
update.Name = &request.Memo.Name
case "title":
update.Title = &request.Memo.Title
case "content":
update.Content = &request.Memo.Content
case "tags":
tag := strings.Join(request.Memo.Tags, " ")
update.Tag = &tag
case "visibility":
visibility := store.Visibility(request.Memo.Visibility.String())
update.Visibility = &visibility
}
}
memo, err = s.Store.UpdateMemo(ctx, update)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to update memo, err: %v", err)
}
composedMemo, err := s.convertMemoFromStorepb(ctx, memo)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert memo, err: %v", err)
}
response := &apiv2pb.UpdateMemoResponse{
Memo: composedMemo,
}
return response, nil
}
func (s *APIV2Service) DeleteMemo(ctx context.Context, request *apiv2pb.DeleteMemoRequest) (*apiv2pb.DeleteMemoResponse, error) {
userID := ctx.Value(userIDContextKey).(int32)
currentUser, err := s.Store.GetUser(ctx, &store.FindUser{
ID: &userID,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user, err: %v", err)
}
memo, err := s.Store.GetMemo(ctx, &store.FindMemo{
ID: &request.Id,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get memo by ID: %v", err)
}
if memo == nil {
return nil, status.Errorf(codes.NotFound, "memo not found")
}
if memo.CreatorId != userID && currentUser.Role != store.RoleAdmin {
return nil, status.Errorf(codes.PermissionDenied, "Permission denied")
}
err = s.Store.DeleteMemo(ctx, &store.DeleteMemo{
ID: memo.Id,
})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to delete memo, err: %v", err)
}
response := &apiv2pb.DeleteMemoResponse{}
return response, nil
}
func (*APIV2Service) convertMemoFromStorepb(_ context.Context, memo *storepb.Memo) (*apiv2pb.Memo, error) {
return &apiv2pb.Memo{
Id: memo.Id,
CreatedTime: timestamppb.New(time.Unix(memo.CreatedTs, 0)),
UpdatedTime: timestamppb.New(time.Unix(memo.UpdatedTs, 0)),
CreatorId: memo.CreatorId,
Name: memo.Name,
Title: memo.Title,
Content: memo.Content,
Tags: memo.Tags,
Visibility: apiv2pb.Visibility(memo.Visibility),
}, nil
}

View File

@ -1,30 +0,0 @@
package v2
import (
"context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
apiv2pb "github.com/yourselfhosted/slash/proto/gen/api/v2"
)
func (s *APIV2Service) GetSubscription(ctx context.Context, _ *apiv2pb.GetSubscriptionRequest) (*apiv2pb.GetSubscriptionResponse, error) {
subscription, err := s.LicenseService.LoadSubscription(ctx)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to load subscription: %v", err)
}
return &apiv2pb.GetSubscriptionResponse{
Subscription: subscription,
}, nil
}
func (s *APIV2Service) UpdateSubscription(ctx context.Context, request *apiv2pb.UpdateSubscriptionRequest) (*apiv2pb.UpdateSubscriptionResponse, error) {
subscription, err := s.LicenseService.UpdateSubscription(ctx, request.LicenseKey)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to load subscription: %v", err)
}
return &apiv2pb.UpdateSubscriptionResponse{
Subscription: subscription,
}, nil
}

View File

@ -1,135 +0,0 @@
package v2
import (
"context"
"github.com/pkg/errors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
apiv2pb "github.com/yourselfhosted/slash/proto/gen/api/v2"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/store"
)
func (s *APIV2Service) GetUserSetting(ctx context.Context, request *apiv2pb.GetUserSettingRequest) (*apiv2pb.GetUserSettingResponse, error) {
userSetting, err := getUserSetting(ctx, s.Store, request.Id)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user setting: %v", err)
}
return &apiv2pb.GetUserSettingResponse{
UserSetting: userSetting,
}, nil
}
func (s *APIV2Service) UpdateUserSetting(ctx context.Context, request *apiv2pb.UpdateUserSettingRequest) (*apiv2pb.UpdateUserSettingResponse, error) {
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "update mask is empty")
}
userID := ctx.Value(userIDContextKey).(int32)
for _, path := range request.UpdateMask.Paths {
if path == "locale" {
if _, err := s.Store.UpsertUserSetting(ctx, &storepb.UserSetting{
UserId: userID,
Key: storepb.UserSettingKey_USER_SETTING_LOCALE,
Value: &storepb.UserSetting_Locale{
Locale: convertUserSettingLocaleToStore(request.UserSetting.Locale),
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update user setting: %v", err)
}
} else if path == "color_theme" {
if _, err := s.Store.UpsertUserSetting(ctx, &storepb.UserSetting{
UserId: userID,
Key: storepb.UserSettingKey_USER_SETTING_COLOR_THEME,
Value: &storepb.UserSetting_ColorTheme{
ColorTheme: convertUserSettingColorThemeToStore(request.UserSetting.ColorTheme),
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update user setting: %v", err)
}
} else {
return nil, status.Errorf(codes.InvalidArgument, "invalid path: %s", path)
}
}
userSetting, err := getUserSetting(ctx, s.Store, request.Id)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user setting: %v", err)
}
return &apiv2pb.UpdateUserSettingResponse{
UserSetting: userSetting,
}, nil
}
func getUserSetting(ctx context.Context, s *store.Store, userID int32) (*apiv2pb.UserSetting, error) {
userSettings, err := s.ListUserSettings(ctx, &store.FindUserSetting{
UserID: &userID,
})
if err != nil {
return nil, errors.Wrap(err, "failed to find user setting")
}
userSetting := &apiv2pb.UserSetting{
Id: userID,
Locale: apiv2pb.UserSetting_LOCALE_EN,
ColorTheme: apiv2pb.UserSetting_COLOR_THEME_SYSTEM,
}
for _, setting := range userSettings {
if setting.Key == storepb.UserSettingKey_USER_SETTING_LOCALE {
userSetting.Locale = convertUserSettingLocaleFromStore(setting.GetLocale())
} else if setting.Key == storepb.UserSettingKey_USER_SETTING_COLOR_THEME {
userSetting.ColorTheme = convertUserSettingColorThemeFromStore(setting.GetColorTheme())
}
}
return userSetting, nil
}
func convertUserSettingLocaleToStore(locale apiv2pb.UserSetting_Locale) storepb.LocaleUserSetting {
switch locale {
case apiv2pb.UserSetting_LOCALE_EN:
return storepb.LocaleUserSetting_LOCALE_USER_SETTING_EN
case apiv2pb.UserSetting_LOCALE_ZH:
return storepb.LocaleUserSetting_LOCALE_USER_SETTING_ZH
default:
return storepb.LocaleUserSetting_LOCALE_USER_SETTING_UNSPECIFIED
}
}
func convertUserSettingLocaleFromStore(locale storepb.LocaleUserSetting) apiv2pb.UserSetting_Locale {
switch locale {
case storepb.LocaleUserSetting_LOCALE_USER_SETTING_EN:
return apiv2pb.UserSetting_LOCALE_EN
case storepb.LocaleUserSetting_LOCALE_USER_SETTING_ZH:
return apiv2pb.UserSetting_LOCALE_ZH
default:
return apiv2pb.UserSetting_LOCALE_UNSPECIFIED
}
}
func convertUserSettingColorThemeToStore(colorTheme apiv2pb.UserSetting_ColorTheme) storepb.ColorThemeUserSetting {
switch colorTheme {
case apiv2pb.UserSetting_COLOR_THEME_SYSTEM:
return storepb.ColorThemeUserSetting_COLOR_THEME_USER_SETTING_SYSTEM
case apiv2pb.UserSetting_COLOR_THEME_LIGHT:
return storepb.ColorThemeUserSetting_COLOR_THEME_USER_SETTING_LIGHT
case apiv2pb.UserSetting_COLOR_THEME_DARK:
return storepb.ColorThemeUserSetting_COLOR_THEME_USER_SETTING_DARK
default:
return storepb.ColorThemeUserSetting_COLOR_THEME_USER_SETTING_UNSPECIFIED
}
}
func convertUserSettingColorThemeFromStore(colorTheme storepb.ColorThemeUserSetting) apiv2pb.UserSetting_ColorTheme {
switch colorTheme {
case storepb.ColorThemeUserSetting_COLOR_THEME_USER_SETTING_SYSTEM:
return apiv2pb.UserSetting_COLOR_THEME_SYSTEM
case storepb.ColorThemeUserSetting_COLOR_THEME_USER_SETTING_LIGHT:
return apiv2pb.UserSetting_COLOR_THEME_LIGHT
case storepb.ColorThemeUserSetting_COLOR_THEME_USER_SETTING_DARK:
return apiv2pb.UserSetting_COLOR_THEME_DARK
default:
return apiv2pb.UserSetting_COLOR_THEME_UNSPECIFIED
}
}

View File

@ -1,123 +0,0 @@
package v2
import (
"context"
"fmt"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/improbable-eng/grpc-web/go/grpcweb"
"github.com/labstack/echo/v4"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/reflection"
apiv2pb "github.com/yourselfhosted/slash/proto/gen/api/v2"
"github.com/yourselfhosted/slash/server/profile"
"github.com/yourselfhosted/slash/server/service/license"
"github.com/yourselfhosted/slash/store"
)
type APIV2Service struct {
apiv2pb.UnimplementedWorkspaceServiceServer
apiv2pb.UnimplementedSubscriptionServiceServer
apiv2pb.UnimplementedAuthServiceServer
apiv2pb.UnimplementedUserServiceServer
apiv2pb.UnimplementedUserSettingServiceServer
apiv2pb.UnimplementedShortcutServiceServer
apiv2pb.UnimplementedCollectionServiceServer
apiv2pb.UnimplementedMemoServiceServer
Secret string
Profile *profile.Profile
Store *store.Store
LicenseService *license.LicenseService
grpcServer *grpc.Server
grpcServerPort int
}
func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store, licenseService *license.LicenseService, grpcServerPort int) *APIV2Service {
authProvider := NewGRPCAuthInterceptor(store, secret)
grpcServer := grpc.NewServer(
grpc.ChainUnaryInterceptor(
authProvider.AuthenticationInterceptor,
),
)
apiV2Service := &APIV2Service{
Secret: secret,
Profile: profile,
Store: store,
LicenseService: licenseService,
grpcServer: grpcServer,
grpcServerPort: grpcServerPort,
}
apiv2pb.RegisterSubscriptionServiceServer(grpcServer, apiV2Service)
apiv2pb.RegisterWorkspaceServiceServer(grpcServer, apiV2Service)
apiv2pb.RegisterAuthServiceServer(grpcServer, apiV2Service)
apiv2pb.RegisterUserServiceServer(grpcServer, apiV2Service)
apiv2pb.RegisterUserSettingServiceServer(grpcServer, apiV2Service)
apiv2pb.RegisterShortcutServiceServer(grpcServer, apiV2Service)
apiv2pb.RegisterCollectionServiceServer(grpcServer, apiV2Service)
apiv2pb.RegisterMemoServiceServer(grpcServer, apiV2Service)
reflection.Register(grpcServer)
return apiV2Service
}
func (s *APIV2Service) GetGRPCServer() *grpc.Server {
return s.grpcServer
}
// RegisterGateway registers the gRPC-Gateway with the given Echo instance.
func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error {
// Create a client connection to the gRPC Server we just started.
// This is where the gRPC-Gateway proxies the requests.
conn, err := grpc.DialContext(
ctx,
fmt.Sprintf(":%d", s.grpcServerPort),
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
return err
}
gwMux := runtime.NewServeMux()
if err := apiv2pb.RegisterSubscriptionServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterWorkspaceServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterAuthServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterUserServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterUserSettingServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterShortcutServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterCollectionServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
if err := apiv2pb.RegisterMemoServiceHandler(context.Background(), gwMux, conn); err != nil {
return err
}
e.Any("/api/v2/*", echo.WrapHandler(gwMux))
// GRPC web proxy.
options := []grpcweb.Option{
grpcweb.WithCorsForRegisteredEndpointsOnly(false),
grpcweb.WithOriginFunc(func(origin string) bool {
return true
}),
}
wrappedGrpc := grpcweb.WrapServer(s.grpcServer, options...)
e.Any("/slash.api.v2.*", echo.WrapHandler(wrappedGrpc))
return nil
}

View File

@ -1,146 +0,0 @@
package v2
import (
"context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
apiv2pb "github.com/yourselfhosted/slash/proto/gen/api/v2"
storepb "github.com/yourselfhosted/slash/proto/gen/store"
"github.com/yourselfhosted/slash/store"
)
func (s *APIV2Service) GetWorkspaceProfile(ctx context.Context, _ *apiv2pb.GetWorkspaceProfileRequest) (*apiv2pb.GetWorkspaceProfileResponse, error) {
profile := &apiv2pb.WorkspaceProfile{
Mode: s.Profile.Mode,
Version: s.Profile.Version,
Plan: apiv2pb.PlanType_FREE,
}
// Load subscription plan from license service.
subscription, err := s.LicenseService.GetSubscription(ctx)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get subscription: %v", err)
}
profile.Plan = subscription.Plan
workspaceSetting, err := s.GetWorkspaceSetting(ctx, &apiv2pb.GetWorkspaceSettingRequest{})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err)
}
if workspaceSetting != nil {
setting := workspaceSetting.GetSetting()
profile.EnableSignup = setting.GetEnableSignup()
profile.CustomStyle = setting.GetCustomStyle()
profile.CustomScript = setting.GetCustomScript()
}
return &apiv2pb.GetWorkspaceProfileResponse{
Profile: profile,
}, nil
}
func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, _ *apiv2pb.GetWorkspaceSettingRequest) (*apiv2pb.GetWorkspaceSettingResponse, error) {
isAdmin := false
userID, ok := ctx.Value(userIDContextKey).(int32)
if ok {
user, err := s.Store.GetUser(ctx, &store.FindUser{ID: &userID})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get user: %v", err)
}
if user.Role == store.RoleAdmin {
isAdmin = true
}
}
workspaceSettings, err := s.Store.ListWorkspaceSettings(ctx, &store.FindWorkspaceSetting{})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to list workspace settings: %v", err)
}
workspaceSetting := &apiv2pb.WorkspaceSetting{
EnableSignup: true,
}
for _, v := range workspaceSettings {
if v.Key == storepb.WorkspaceSettingKey_WORKSAPCE_SETTING_ENABLE_SIGNUP {
workspaceSetting.EnableSignup = v.GetEnableSignup()
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_INSTANCE_URL {
workspaceSetting.InstanceUrl = v.GetInstanceUrl()
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE {
workspaceSetting.CustomStyle = v.GetCustomStyle()
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_SCRIPT {
workspaceSetting.CustomScript = v.GetCustomScript()
} else if isAdmin {
// For some settings, only admin can get the value.
if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_LICENSE_KEY {
workspaceSetting.LicenseKey = v.GetLicenseKey()
}
}
}
return &apiv2pb.GetWorkspaceSettingResponse{
Setting: workspaceSetting,
}, nil
}
func (s *APIV2Service) UpdateWorkspaceSetting(ctx context.Context, request *apiv2pb.UpdateWorkspaceSettingRequest) (*apiv2pb.UpdateWorkspaceSettingResponse, error) {
if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "update mask is empty")
}
for _, path := range request.UpdateMask.Paths {
if path == "license_key" {
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_LICENSE_KEY,
Value: &storepb.WorkspaceSetting_LicenseKey{
LicenseKey: request.Setting.LicenseKey,
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "enable_signup" {
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSAPCE_SETTING_ENABLE_SIGNUP,
Value: &storepb.WorkspaceSetting_EnableSignup{
EnableSignup: request.Setting.EnableSignup,
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "instance_url" {
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_INSTANCE_URL,
Value: &storepb.WorkspaceSetting_InstanceUrl{
InstanceUrl: request.Setting.InstanceUrl,
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "custom_style" {
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE,
Value: &storepb.WorkspaceSetting_CustomStyle{
CustomStyle: request.Setting.CustomStyle,
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "custom_script" {
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_SCRIPT,
Value: &storepb.WorkspaceSetting_CustomScript{
CustomScript: request.Setting.CustomScript,
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else {
return nil, status.Errorf(codes.InvalidArgument, "invalid path: %s", path)
}
}
getWorkspaceSettingResponse, err := s.GetWorkspaceSetting(ctx, &apiv2pb.GetWorkspaceSettingRequest{})
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err)
}
return &apiv2pb.UpdateWorkspaceSettingResponse{
Setting: getWorkspaceSettingResponse.Setting,
}, nil
}

View File

@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"log/slog"
"net/http"
"os"
"os/signal"
@ -10,11 +11,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.uber.org/zap"
"github.com/yourselfhosted/slash/internal/log"
"github.com/yourselfhosted/slash/server"
"github.com/yourselfhosted/slash/server/metric"
"github.com/yourselfhosted/slash/server/common"
"github.com/yourselfhosted/slash/server/profile"
"github.com/yourselfhosted/slash/store"
"github.com/yourselfhosted/slash/store/db"
@ -25,44 +24,43 @@ const (
)
var (
serverProfile *profile.Profile
mode string
port int
data string
driver string
dsn string
enableMetric bool
rootCmd = &cobra.Command{
Use: "slash",
Short: `An open source, self-hosted bookmarks and link sharing platform.`,
Run: func(_cmd *cobra.Command, _args []string) {
Short: `An open source, self-hosted platform for sharing and managing your most frequently used links.`,
Run: func(_ *cobra.Command, _ []string) {
serverProfile := &profile.Profile{
Mode: viper.GetString("mode"),
Port: viper.GetInt("port"),
Data: viper.GetString("data"),
DSN: viper.GetString("dsn"),
Driver: viper.GetString("driver"),
Version: common.GetCurrentVersion(viper.GetString("mode")),
}
if err := serverProfile.Validate(); err != nil {
panic(err)
}
ctx, cancel := context.WithCancel(context.Background())
dbDriver, err := db.NewDBDriver(serverProfile)
if err != nil {
cancel()
log.Error("failed to create db driver", zap.Error(err))
return
}
if err := dbDriver.Migrate(ctx); err != nil {
cancel()
log.Error("failed to migrate db", zap.Error(err))
slog.Error("failed to create db driver", "error", err)
return
}
storeInstance := store.New(dbDriver, serverProfile)
if err := storeInstance.Migrate(ctx); err != nil {
cancel()
slog.Error("failed to migrate db", "error", err)
return
}
s, err := server.NewServer(ctx, serverProfile, storeInstance)
if err != nil {
cancel()
log.Error("failed to create server", zap.Error(err))
slog.Error("failed to create server", "error", err)
return
}
if serverProfile.Metric {
// nolint
metric.NewMetricClient(s.Secret, *serverProfile)
}
c := make(chan os.Signal, 1)
// Trigger graceful shutdown on SIGINT or SIGTERM.
// The default signal sent by the `kill` command is SIGTERM,
@ -70,16 +68,16 @@ var (
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
sig := <-c
log.Info(fmt.Sprintf("%s received.\n", sig.String()))
slog.Info(fmt.Sprintf("%s received.\n", sig.String()))
s.Shutdown(ctx)
cancel()
}()
printGreetings()
printGreetings(serverProfile)
if err := s.Start(ctx); err != nil {
if err != http.ErrServerClosed {
log.Error("failed to start server", zap.Error(err))
slog.Error("failed to start server", "error", err)
cancel()
}
}
@ -90,73 +88,46 @@ var (
}
)
func Execute() error {
defer log.Sync()
return rootCmd.Execute()
}
func init() {
cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().StringVarP(&mode, "mode", "m", "demo", `mode of server, can be "prod" or "dev" or "demo"`)
rootCmd.PersistentFlags().IntVarP(&port, "port", "p", 8082, "port of server")
rootCmd.PersistentFlags().StringVarP(&data, "data", "d", "", "data directory")
rootCmd.PersistentFlags().StringVarP(&driver, "driver", "", "", "database driver")
rootCmd.PersistentFlags().StringVarP(&dsn, "dsn", "", "", "database source name(aka. DSN)")
rootCmd.PersistentFlags().BoolVarP(&enableMetric, "metric", "", true, "allow metric collection")
err := viper.BindPFlag("mode", rootCmd.PersistentFlags().Lookup("mode"))
if err != nil {
panic(err)
}
err = viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port"))
if err != nil {
panic(err)
}
err = viper.BindPFlag("data", rootCmd.PersistentFlags().Lookup("data"))
if err != nil {
panic(err)
}
err = viper.BindPFlag("driver", rootCmd.PersistentFlags().Lookup("driver"))
if err != nil {
panic(err)
}
err = viper.BindPFlag("dsn", rootCmd.PersistentFlags().Lookup("dsn"))
if err != nil {
panic(err)
}
err = viper.BindPFlag("metric", rootCmd.PersistentFlags().Lookup("metric"))
if err != nil {
panic(err)
}
viper.SetDefault("mode", "demo")
viper.SetDefault("port", 8082)
viper.SetDefault("driver", "sqlite")
viper.SetDefault("metric", true)
viper.SetDefault("port", 8082)
rootCmd.PersistentFlags().String("mode", "demo", `mode of server, can be "prod" or "dev" or "demo"`)
rootCmd.PersistentFlags().String("addr", "", "address of server")
rootCmd.PersistentFlags().Int("port", 8082, "port of server")
rootCmd.PersistentFlags().String("data", "", "data directory")
rootCmd.PersistentFlags().String("driver", "sqlite", "database driver")
rootCmd.PersistentFlags().String("dsn", "", "database source name(aka. DSN)")
if err := viper.BindPFlag("mode", rootCmd.PersistentFlags().Lookup("mode")); err != nil {
panic(err)
}
if err := viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port")); err != nil {
panic(err)
}
if err := viper.BindPFlag("data", rootCmd.PersistentFlags().Lookup("data")); err != nil {
panic(err)
}
if err := viper.BindPFlag("driver", rootCmd.PersistentFlags().Lookup("driver")); err != nil {
panic(err)
}
if err := viper.BindPFlag("dsn", rootCmd.PersistentFlags().Lookup("dsn")); err != nil {
panic(err)
}
viper.SetEnvPrefix("slash")
}
func initConfig() {
viper.AutomaticEnv()
var err error
serverProfile, err = profile.GetProfile()
if err != nil {
log.Error("failed to get profile", zap.Error(err))
return
}
func printGreetings(serverProfile *profile.Profile) {
println("---")
println("Server profile")
println("dsn:", serverProfile.DSN)
println("port:", serverProfile.Port)
println("mode:", serverProfile.Mode)
println("version:", serverProfile.Version)
println("metric:", serverProfile.Metric)
println("---")
}
func printGreetings() {
println(greetingBanner)
fmt.Printf("Version %s has been started on port %d\n", serverProfile.Version, serverProfile.Port)
println("---")
@ -166,8 +137,7 @@ func printGreetings() {
}
func main() {
err := Execute()
if err != nil {
if err := rootCmd.Execute(); err != nil {
panic(err)
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 KiB

After

Width:  |  Height:  |  Size: 613 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

BIN
docs/assets/wechat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -0,0 +1,37 @@
# Single Sign-On(SSO)
> **Note**: This feature is only available in the **Enterprise** plan.
**Single Sign-On (SSO)** is an authentication method that enables users to securely authenticate with multiple applications and websites by using just one set of credentials.
Slash supports SSO integration with **OAuth 2.0** standard.
## Create a new SSO provider
As an Admin user, you can create a new SSO provider in Setting > Workspace settings > SSO.
![sso-setting](../assets/getting-started/sso-setting.png)
For example, to integrate with GitHub, you might need to fill in the following fields:
![github-sso](../assets/getting-started/github-sso.png)
### Identity provider information
The information is the base concept of OAuth 2.0 and comes from your provider.
- **Client ID** is a public identifier of the custom provider;
- **Client Secret** is the OAuth2 client secret from identity provider;
- **Authorization endpoint** is the custom provider's OAuth2 login page address;
- **Token endpoint** is the API address for obtaining access token;
- **User endpoint** URL is the API address for obtaining user information by access token;
- **Scopes** is the scope parameter carried when accessing the OAuth2 URL, which is filled in according to the custom provider;
### User information mapping
For different providers, the structures returned by their user information API are usually not the same. In order to know how to map the user information from an provider into user fields, you need to fill the user information mapping form.
Slash will use the mapping to import the user profile fields when creating new accounts. The most important user field mapping is the identifier which is used to identify the Slash account associated with the OAuth 2.0 login.
- **Identifier** is the field name of primary email in 3rd-party user info;
- **Display name** is the field name of display name in 3rd-party user info (optional);

View File

@ -0,0 +1,44 @@
# Subscription
Slash is an open source, self-hosted platform for sharing and managing your most frequently used links. Easily create customizable, human-readable shortcuts to streamline your link management. Our source code is available and accessible on GitHub so anyone can get it, inspect it and review it.
## Plans
### Free
The Free plan is designed for personal use not for commercial use. It allows you to create up to 100 shortcuts and invite up to 5 members.
### Pro
The Pro plan is designed for teams and businesses. It allows you to create unlimited shortcuts and invite unlimited members. It also includes priority support. The Pro plan is $4 per month.
### Team
The Team plan is designed for teams that need more than the Pro plan. It allows you to use Single Sign-On(SSO) and other advanced features. If you need a team plan, please contact us at `yourselfhosted@gmail.com`.
## Using a License Key
After purchasing a Pro or Team plan, you will receive a license key. You can use the license key to activate your plan. Here is how to do it:
1. Log in to your Slash instance as an Admin user.
2. Go to Settings > Subscription. `https://your-slash-instance.com/setting/subscription`
3. You will see a form to enter your license key. Enter your license key and click the **Upload license** button.
4. If the license key is valid, your plan will be activated.
## FAQ
### Can I use the Free plan in my team?
Of course you can. In the free plan, you can invite up to 5 members to your team. If you need more, you should upgrade to the Pro plan.
### How many devices can the license key be used on?
It's unlimited for now, but please do not abuse it.
### Can I get a refund if Slash doesn't meet my needs?
Yes, absolutely! You can contact us with `yourselfhosted@gmail.com`. I will refund you as soon as possible.
### Is there a Lifetime license?
As software requires someone to maintain it, so we won't sell a lifetime service, since humans are not immortal yet. But if you really want it, please contact us `yourselfhosted@gmail.com`.

View File

@ -10,34 +10,23 @@ For Chromuim based browsers, you can install the extension from the [Chrome Web
For Firefox, you can install the extension from the [Firefox Add-ons](https://addons.mozilla.org/en-US/firefox/addon/your-slash/).
### Generate an access token
### Prerequisites
1. Go to your Slash instance and sign in with your account.
2. Go to the settings page and click on the "Create" button to create an access token.
![](./assets/extension-usage/create-access-token.png)
3. Copy the access token and save it somewhere safe.
![](./assets/extension-usage/copy-access-token.png)
- You need to have a Slash instance running.
- Sign in with your account on the Slash instance.
### Configure the extension
The extension needs to know the instance url of your Slash. You can configure it by following the steps below:
1. Click on the extension icon and click on the "Settings" button.
![](./assets/extension-usage/extension-setting-button.png)
2. Enter your Slash's domain and paste the access token you generated in the previous step.
2. Enter the instance url of your Slash and then "Save".
![](./assets/extension-usage/extension-setting-page.png)
3. Click on the "Save" button to save the settings.
4. Click on the extension icon again, you will see a list of your shortcuts.
![](./assets/extension-usage/extension-screenshot.png)
### Use your shortcuts in the search bar
You can use your shortcuts in the search bar of your browser. For example, if you have a shortcut named `gh` for [GitHub](https://github.com), you can type `s/gh` in the search bar and press `Enter` to go to [GitHub](https://github.com).

View File

@ -50,10 +50,32 @@ docker compose up -d
This will start Slash in the background and expose it on port `5231`. Data is stored in Docker Volume `slash_slash`. You can customize the port and backup your volume.
### Upgrade
## Use PostgreSQL as Database
```bash
cd /opt/slash
docker compose pull
docker compose up -d
Slash supports the following database types:
- SQLite (default)
- PostgreSQL
### Using PostgreSQL
To switch to PostgreSQL, you can use the following steps:
- **--driver** _postgres_ : This argument specifies that Slash should use the `postgres` driver instead of the default `sqlite`.
- **--dsn** _postgresql://postgres:PASSWORD@localhost:5432/slash_ : Provides the connection details for your PostgreSQL server.
You can start Slash with Docker using the following command:
```shell
docker run -d --name slash --publish 5231:5231 --volume ~/.slash/:/var/opt/slash yourselfhosted/slash:latest --driver postgres --dsn 'postgresql://postgres:PASSWORD@localhost:5432/slash'
```
Additionally, you can set these configurations via environment variables:
```shell
SLASH_DRIVER=postgres
SLASH_DSN=postgresql://root:password@localhost:5432/slash
```
Note that if the PostgreSQL server is not configured to support SSL connections you will need to add `?sslmode=disable` to the DSN.

7
docs/privacy-policy.md Normal file
View File

@ -0,0 +1,7 @@
# Privacy Policy
Slash does not collect, store, or share any data from you.
You can use our application freely and without concern about your personal data being tracked or stored.
Our primary goal is to provide you with a secure and private experience.

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 yourselfhosted
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1,52 +1,44 @@
{
"name": "slash-extension",
"displayName": "Slash",
"version": "1.0.4",
"description": "An open source, self-hosted bookmarks and link sharing platform. Save and share your links very easily.",
"version": "1.0.11",
"description": "An open source, self-hosted platform for sharing and managing your most frequently used links. Save and share your links very easily.",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
"package": "plasmo package",
"lint": "eslint --ext .js,.ts,.tsx, src",
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix",
"postinstall": "cd ../../proto && buf generate"
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix"
},
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/joy": "5.0.0-beta.23",
"@plasmohq/storage": "^1.9.0",
"axios": "^1.6.5",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/joy": "5.0.0-beta.48",
"@plasmohq/storage": "^1.12.0",
"classnames": "^2.5.1",
"lodash-es": "^4.17.21",
"lucide-react": "^0.312.0",
"plasmo": "^0.83.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"zustand": "^4.5.0"
"lucide-react": "^0.454.0",
"plasmo": "^0.89.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hot-toast": "^2.4.1"
},
"devDependencies": {
"@bufbuild/buf": "^1.28.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/chrome": "^0.0.241",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.11.5",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"autoprefixer": "^10.4.17",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.33.2",
"long": "^5.2.3",
"postcss": "^8.4.33",
"prettier": "^2.8.8",
"protobufjs": "^7.2.6",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3"
"@types/chrome": "^0.0.280",
"@types/node": "^22.8.6",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3"
},
"manifest": {
"permissions": [

File diff suppressed because it is too large Load Diff

View File

@ -12,12 +12,13 @@ chrome.webRequest.onBeforeRequest.addListener(
const shortcutName = getShortcutNameFromUrl(param.url);
if (shortcutName) {
const instanceUrl = (await storage.getItem<string>("domain")) || "";
return chrome.tabs.update({ url: `${instanceUrl}/s/${shortcutName}` });
const instanceUrl = (await storage.getItem<string>("instance_url")) || "";
const url = new URL(`/s/${shortcutName}`, instanceUrl);
return chrome.tabs.update({ url: url.toString() });
}
})();
},
{ urls: ["*://s/*", "*://*/search*"] }
{ urls: ["*://s/*", "*://*/search*"] },
);
const getShortcutNameFromUrl = (urlString: string) => {
@ -30,19 +31,19 @@ const getShortcutNameFromUrl = (urlString: string) => {
const getShortcutNameFromSearchUrl = (urlString: string) => {
const url = new URL(urlString);
if ((url.hostname === "www.google.com" || url.hostname === "www.bing.com") && url.pathname === "/search") {
if ((url.hostname.endsWith("google.com") || url.hostname.endsWith("bing.com")) && url.pathname === "/search") {
const params = new URLSearchParams(url.search);
const shortcutName = params.get("q");
if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) {
return shortcutName.slice(2);
}
} else if (url.hostname === "www.baidu.com" && url.pathname === "/s") {
} else if (url.hostname.endsWith("baidu.com") && url.pathname === "/s") {
const params = new URLSearchParams(url.search);
const shortcutName = params.get("wd");
if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) {
return shortcutName.slice(2);
}
} else if (url.hostname === "duckduckgo.com" && url.pathname === "/") {
} else if (url.hostname.endsWith("duckduckgo.com") && url.pathname === "/") {
const params = new URLSearchParams(url.search);
const shortcutName = params.get("q");
if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) {

View File

@ -1,176 +0,0 @@
import { Button, IconButton, Input, Modal, ModalDialog } from "@mui/joy";
import { useStorage } from "@plasmohq/storage/hook";
import { useEffect, useState } from "react";
import { toast } from "react-hot-toast";
import useShortcutStore from "@/store/shortcut";
import { Visibility } from "@/types/proto/api/v2/common";
import { Shortcut } from "@/types/proto/api/v2/shortcut_service";
import Icon from "./Icon";
interface State {
name: string;
title: string;
link: string;
}
const CreateShortcutButton = () => {
const [instanceUrl] = useStorage("domain");
const [accessToken] = useStorage("access_token");
const shortcutStore = useShortcutStore();
const [state, setState] = useState<State>({
name: "",
title: "",
link: "",
});
const [isLoading, setIsLoading] = useState(false);
const [showModal, setShowModal] = useState(false);
useEffect(() => {
if (showModal) {
document.body.style.height = "384px";
} else {
document.body.style.height = "auto";
}
}, [showModal]);
const handleCreateShortcutButtonClick = async () => {
chrome.tabs.query({ active: true, currentWindow: true }, async (tabs) => {
if (tabs.length === 0) {
toast.error("No active tab found");
return;
}
const tab = tabs[0];
setState((state) => ({
...state,
name: "",
title: tab.title || "",
link: tab.url || "",
}));
setShowModal(true);
});
};
const generateRandomName = () => {
const chars = "abcdefghijklmnopqrstuvwxyz0123456789";
let name = "";
for (let i = 0; i < 8; i++) {
name += chars.charAt(Math.floor(Math.random() * chars.length));
}
setState((state) => ({
...state,
name,
}));
};
const handleNameInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setState((state) => ({
...state,
name: e.target.value,
}));
};
const handleTitleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setState((state) => ({
...state,
title: e.target.value,
}));
};
const handleLinkInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setState((state) => ({
...state,
link: e.target.value,
}));
};
const handleSaveBtnClick = async () => {
if (isLoading) {
return;
}
if (!state.name) {
toast.error("Name is required");
return;
}
setIsLoading(true);
try {
await shortcutStore.createShortcut(
instanceUrl,
accessToken,
Shortcut.fromPartial({
name: state.name,
title: state.title,
link: state.link,
visibility: Visibility.PUBLIC,
})
);
toast.success("Shortcut created successfully");
setShowModal(false);
} catch (error: any) {
console.error(error);
toast.error(error.details);
}
setIsLoading(false);
};
return (
<>
<IconButton color="primary" variant="solid" size="sm" onClick={() => handleCreateShortcutButtonClick()}>
<Icon.Plus className="w-5 h-auto" />
</IconButton>
<Modal container={() => document.body} open={showModal} onClose={() => setShowModal(false)}>
<ModalDialog className="w-3/4">
<div className="w-full flex flex-row justify-between items-center mb-2">
<span className="text-base font-medium">Create Shortcut</span>
<Button size="sm" variant="plain" onClick={() => setShowModal(false)}>
<Icon.X className="w-5 h-auto text-gray-600" />
</Button>
</div>
<div className="overflow-x-hidden w-full flex flex-col justify-start items-center">
<div className="w-full flex flex-row justify-start items-center mb-2">
<span className="block w-12 mr-2 shrink-0">Name</span>
<Input
className="grow"
type="text"
placeholder="Unique shortcut name"
value={state.name}
onChange={handleNameInputChange}
endDecorator={
<IconButton size="sm" onClick={generateRandomName}>
<Icon.RefreshCcw className="w-4 h-auto cursor-pointer" />
</IconButton>
}
/>
</div>
<div className="w-full flex flex-row justify-start items-center mb-2">
<span className="block w-12 mr-2 shrink-0">Title</span>
<Input className="grow" type="text" placeholder="Shortcut title" value={state.title} onChange={handleTitleInputChange} />
</div>
<div className="w-full flex flex-row justify-start items-center mb-2">
<span className="block w-12 mr-2 shrink-0">Link</span>
<Input
className="grow"
type="text"
placeholder="e.g., https://github.com/yourselfhosted/slash"
value={state.link}
onChange={handleLinkInputChange}
/>
</div>
<div className="w-full flex flex-row justify-end items-center mt-2 space-x-2">
<Button color="neutral" variant="plain" onClick={() => setShowModal(false)}>
Cancel
</Button>
<Button color="primary" disabled={isLoading} loading={isLoading} onClick={handleSaveBtnClick}>
Save
</Button>
</div>
</div>
</ModalDialog>
</Modal>
</>
);
};
export default CreateShortcutButton;

View File

@ -1,12 +1,12 @@
import classNames from "classnames";
import LogoBase64 from "data-base64:../../assets/icon.png";
import Icon from "./Icon";
interface Props {
className?: string;
}
const Logo = ({ className }: Props) => {
return <img className={classNames("rounded-full", className)} src={LogoBase64} alt="" />;
return <Icon.CircleSlash className={classNames("dark:text-gray-500", className)} strokeWidth={1.5} />;
};
export default Logo;

View File

@ -1,37 +0,0 @@
import { IconButton } from "@mui/joy";
import { useStorage } from "@plasmohq/storage/hook";
import { useEffect } from "react";
import { toast } from "react-hot-toast";
import useShortcutStore from "@/store/shortcut";
import Icon from "./Icon";
const PullShortcutsButton = () => {
const [instanceUrl] = useStorage("domain");
const [accessToken] = useStorage("access_token");
const shortcutStore = useShortcutStore();
useEffect(() => {
if (instanceUrl && accessToken) {
handlePullShortcuts(true);
}
}, [instanceUrl, accessToken]);
const handlePullShortcuts = async (silence = false) => {
try {
await shortcutStore.fetchShortcutList(instanceUrl, accessToken);
if (!silence) {
toast.success("Shortcuts pulled");
}
} catch (error) {
toast.error("Failed to pull shortcuts, error: " + error.message);
}
};
return (
<IconButton color="neutral" variant="plain" size="sm" onClick={() => handlePullShortcuts()}>
<Icon.RefreshCcw className="w-4 h-auto" />
</IconButton>
);
};
export default PullShortcutsButton;

View File

@ -1,66 +0,0 @@
import { useStorage } from "@plasmohq/storage/hook";
import classNames from "classnames";
import { getFaviconWithGoogleS2 } from "@/helpers/utils";
import type { Shortcut } from "@/types/proto/api/v2/shortcut_service";
import Icon from "./Icon";
interface Props {
shortcut: Shortcut;
}
const ShortcutView = (props: Props) => {
const { shortcut } = props;
const [domain] = useStorage<string>("domain", "");
const favicon = getFaviconWithGoogleS2(shortcut.link);
const handleShortcutLinkClick = () => {
const shortcutLink = `${domain}/s/${shortcut.name}`;
chrome.tabs.create({ url: shortcutLink });
};
return (
<>
<div
className={classNames(
"group w-auto px-3 py-2 flex flex-col justify-start items-start border rounded-lg hover:bg-gray-100 hover:shadow dark:border-zinc-800 dark:hover:bg-zinc-800"
)}
>
<div className="w-full flex flex-row justify-start items-center">
<span className={classNames("w-5 h-5 flex justify-center items-center overflow-clip shrink-0")}>
{favicon ? (
<img className="w-full h-auto rounded" src={favicon} decoding="async" loading="lazy" />
) : (
<Icon.CircleSlash className="w-full h-auto text-gray-400" />
)}
</span>
<div className="ml-1 w-[calc(100%-20px)] flex flex-col justify-start items-start">
<div className="w-full flex flex-row justify-start items-center">
<button
className={classNames(
"max-w-full flex flex-row px-1 mr-1 justify-start items-center cursor-pointer rounded-md hover:underline"
)}
onClick={handleShortcutLinkClick}
>
<div className="truncate">
<span className="dark:text-gray-400">{shortcut.title}</span>
{shortcut.title ? (
<span className="text-gray-500">({shortcut.name})</span>
) : (
<>
<span className="truncate dark:text-gray-400">{shortcut.name}</span>
</>
)}
</div>
<span className="ml-1 cursor-pointer shrink-0 opacity-80">
<Icon.ExternalLink className="w-4 h-auto text-gray-600" />
</span>
</button>
</div>
</div>
</div>
</div>
</>
);
};
export default ShortcutView;

View File

@ -1,26 +0,0 @@
import classNames from "classnames";
import useShortcutStore from "@/store/shortcut";
import Icon from "./Icon";
import ShortcutView from "./ShortcutView";
const ShortcutsContainer = () => {
const shortcuts = useShortcutStore().getShortcutList();
return (
<div>
<div className="w-full flex flex-row justify-start items-center mb-4">
<a className="bg-blue-100 dark:bg-blue-500 dark:opacity-70 py-2 px-3 rounded-full border dark:border-blue-600 flex flex-row justify-start items-center cursor-pointer shadow">
<Icon.AlertCircle className="w-4 h-auto" />
<span className="mx-1 text-sm">Please make sure you have signed in your instance.</span>
</a>
</div>
<div className={classNames("w-full flex flex-row justify-start items-start flex-wrap gap-2")}>
{shortcuts.map((shortcut) => {
return <ShortcutView key={shortcut.id} shortcut={shortcut} />;
})}
</div>
</div>
);
};
export default ShortcutsContainer;

View File

@ -0,0 +1,18 @@
import { createContext, useContext } from "react";
interface Context {
instanceUrl?: string;
setInstanceUrl: (instanceUrl: string) => void;
}
export const StorageContext = createContext<Context>({
instanceUrl: undefined,
setInstanceUrl: () => {},
});
const useStorageContext = () => {
const context = useContext(StorageContext);
return context;
};
export default useStorageContext;

View File

@ -0,0 +1,4 @@
import useStorageContext from "./context";
import StorageContextProvider from "./provider";
export { useStorageContext, StorageContextProvider };

View File

@ -0,0 +1,41 @@
import { Storage } from "@plasmohq/storage";
import { useEffect, useState } from "react";
import { StorageContext } from "./context";
interface Props {
children: React.ReactNode;
}
const StorageContextProvider = ({ children }: Props) => {
const storage = new Storage();
const [instanceUrl, setInstanceUrl] = useState<string | undefined>(undefined);
const [isInitialized, setIsInitialized] = useState(false);
useEffect(() => {
(async () => {
const instanceUrl = await storage.get("instance_url");
setInstanceUrl(instanceUrl);
setIsInitialized(true);
})();
storage.watch({
instance_url: (c) => {
setInstanceUrl(c.newValue);
},
});
}, []);
return (
<StorageContext.Provider
value={{
instanceUrl,
setInstanceUrl: (instanceUrl: string) => storage.set("instance_url", instanceUrl),
}}
>
{isInitialized && children}
</StorageContext.Provider>
);
};
export default StorageContextProvider;

View File

@ -1,14 +0,0 @@
import { isNull, isUndefined } from "lodash-es";
export const isNullorUndefined = (value: any) => {
return isNull(value) || isUndefined(value);
};
export const getFaviconWithGoogleS2 = (url: string) => {
try {
const urlObject = new URL(url);
return `https://www.google.com/s2/favicons?sz=128&domain=${urlObject.hostname}`;
} catch (error) {
return undefined;
}
};

View File

@ -1,43 +0,0 @@
import { useColorScheme } from "@mui/joy";
import { useEffect } from "react";
const useColorTheme = () => {
const { mode: colorTheme, setMode: setColorTheme } = useColorScheme();
useEffect(() => {
const root = document.documentElement;
if (colorTheme === "light") {
root.classList.remove("dark");
} else if (colorTheme === "dark") {
root.classList.add("dark");
} else {
const darkMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
if (darkMediaQuery.matches) {
root.classList.add("dark");
} else {
root.classList.remove("dark");
}
const handleColorSchemeChange = (e: MediaQueryListEvent) => {
if (e.matches) {
root.classList.add("dark");
} else {
root.classList.remove("dark");
}
};
try {
darkMediaQuery.addEventListener("change", handleColorSchemeChange);
} catch (error) {
console.error("failed to initial color scheme listener", error);
}
return () => {
darkMediaQuery.removeEventListener("change", handleColorSchemeChange);
};
}
}, [colorTheme]);
return { colorTheme, setColorTheme };
};
export default useColorTheme;

View File

@ -1,53 +1,26 @@
import { Button, CssVarsProvider, Divider, Input, Select, Option } from "@mui/joy";
import { useStorage } from "@plasmohq/storage/hook";
import { Button, CssVarsProvider, Input } from "@mui/joy";
import { useEffect, useState } from "react";
import { Toaster, toast } from "react-hot-toast";
import Icon from "./components/Icon";
import Logo from "./components/Logo";
import PullShortcutsButton from "./components/PullShortcutsButton";
import ShortcutsContainer from "./components/ShortcutsContainer";
import useColorTheme from "./hooks/useColorTheme";
import useShortcutStore from "./store/shortcut";
import { StorageContextProvider, useStorageContext } from "./context";
import "./style.css";
interface SettingState {
domain: string;
accessToken: string;
instanceUrl: string;
}
const colorThemeOptions = [
{
value: "system",
label: "System",
},
{
value: "light",
label: "Light",
},
{
value: "dark",
label: "Dark",
},
];
const IndexOptions = () => {
const { colorTheme, setColorTheme } = useColorTheme();
const [domain, setDomain] = useStorage<string>("domain", (v) => (v ? v : ""));
const [accessToken, setAccessToken] = useStorage<string>("access_token", (v) => (v ? v : ""));
const context = useStorageContext();
const [settingState, setSettingState] = useState<SettingState>({
domain,
accessToken,
instanceUrl: context.instanceUrl || "",
});
const shortcutStore = useShortcutStore();
const shortcuts = shortcutStore.getShortcutList();
const isInitialized = domain && accessToken;
useEffect(() => {
setSettingState({
domain,
accessToken,
instanceUrl: context.instanceUrl || "",
});
}, [domain, accessToken]);
}, [context]);
const setPartialSettingState = (partialSettingState: Partial<SettingState>) => {
setSettingState((prevState) => ({
@ -57,15 +30,10 @@ const IndexOptions = () => {
};
const handleSaveSetting = () => {
setDomain(settingState.domain);
setAccessToken(settingState.accessToken);
context.setInstanceUrl(settingState.instanceUrl);
toast.success("Setting saved");
};
const handleSelectColorTheme = async (colorTheme: string) => {
setColorTheme(colorTheme as any);
};
return (
<div className="w-full px-4">
<div className="w-full flex flex-row justify-center items-center">
@ -92,10 +60,10 @@ const IndexOptions = () => {
<div className="w-full flex flex-col justify-start items-start mb-4">
<div className="mb-2 text-base w-full flex flex-row justify-between items-center">
<span className="dark:text-gray-400">Instance URL</span>
{domain !== "" && (
{context.instanceUrl !== "" && (
<a
className="text-sm flex flex-row justify-start items-center underline text-blue-600 hover:opacity-80"
href={domain}
href={context.instanceUrl}
target="_blank"
>
<span className="mr-1">Go to my Slash</span>
@ -108,21 +76,8 @@ const IndexOptions = () => {
className="w-full"
type="text"
placeholder="The url of your Slash instance. e.g., https://slash.example.com"
value={settingState.domain}
onChange={(e) => setPartialSettingState({ domain: e.target.value })}
/>
</div>
</div>
<div className="w-full flex flex-col justify-start items-start">
<span className="mb-2 text-base dark:text-gray-400">Access Token</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="An available access token of your account."
value={settingState.accessToken}
onChange={(e) => setPartialSettingState({ accessToken: e.target.value })}
value={settingState.instanceUrl}
onChange={(e) => setPartialSettingState({ instanceUrl: e.target.value })}
/>
</div>
</div>
@ -130,39 +85,7 @@ const IndexOptions = () => {
<div className="w-full mt-6 flex flex-row justify-end">
<Button onClick={handleSaveSetting}>Save</Button>
</div>
<Divider className="!my-6" />
<p className="text-base font-semibold leading-6 text-gray-900 dark:text-gray-500">Preference</p>
<div className="w-full flex flex-row justify-between items-center">
<div className="flex flex-row justify-start items-center gap-x-1">
<span className="dark:text-gray-400">Color Theme</span>
</div>
<Select defaultValue={colorTheme} onChange={(_, value) => handleSelectColorTheme(value)}>
{colorThemeOptions.map((option) => {
return (
<Option key={option.value} value={option.value}>
{option.label}
</Option>
);
})}
</Select>
</div>
</div>
{isInitialized && (
<>
<Divider className="!my-6" />
<h2 className="flex flex-row justify-start items-center mb-4">
<span className="text-lg dark:text-gray-400">Shortcuts</span>
<span className="text-gray-500 mr-1">({shortcuts.length})</span>
<PullShortcutsButton />
</h2>
<ShortcutsContainer />
</>
)}
</div>
</div>
);
@ -170,10 +93,12 @@ const IndexOptions = () => {
const Options = () => {
return (
<StorageContextProvider>
<CssVarsProvider>
<IndexOptions />
<Toaster position="top-center" />
</CssVarsProvider>
</StorageContextProvider>
);
};

View File

@ -1,31 +1,13 @@
import { Button, CssVarsProvider, Divider, IconButton } from "@mui/joy";
import { useStorage } from "@plasmohq/storage/hook";
import { useEffect } from "react";
import { Button, CssVarsProvider } from "@mui/joy";
import { Toaster } from "react-hot-toast";
import CreateShortcutButton from "@/components/CreateShortcutButton";
import Icon from "@/components/Icon";
import Logo from "@/components/Logo";
import PullShortcutsButton from "@/components/PullShortcutsButton";
import ShortcutsContainer from "@/components/ShortcutsContainer";
import useColorTheme from "./hooks/useColorTheme";
import useShortcutStore from "./store/shortcut";
import { StorageContextProvider, useStorageContext } from "./context";
import "./style.css";
const IndexPopup = () => {
useColorTheme();
const [instanceUrl] = useStorage<string>("domain", "");
const [accessToken] = useStorage<string>("access_token", "");
const shortcutStore = useShortcutStore();
const shortcuts = shortcutStore.getShortcutList();
const isInitialized = instanceUrl && accessToken;
useEffect(() => {
if (!isInitialized) {
return;
}
shortcutStore.fetchShortcutList(instanceUrl, accessToken);
}, [isInitialized]);
const context = useStorageContext();
const isInitialized = context.instanceUrl;
const handleSettingButtonClick = () => {
chrome.runtime.openOptionsPage();
@ -42,63 +24,47 @@ const IndexPopup = () => {
<div className="flex flex-row justify-start items-center dark:text-gray-400">
<Logo className="w-6 h-auto mr-1" />
<span className="">Slash</span>
{isInitialized && (
<>
<span className="mx-1 text-gray-400">/</span>
<span>Shortcuts</span>
<span className="text-gray-500 mr-0.5">({shortcuts.length})</span>
<PullShortcutsButton />
</>
)}
</div>
<div>{isInitialized && <CreateShortcutButton />}</div>
</div>
<div className="w-full mt-4">
{isInitialized ? (
<>
{shortcuts.length !== 0 ? (
<ShortcutsContainer />
) : (
<div className="w-full flex flex-col justify-center items-center">
<p>No shortcut found.</p>
</div>
)}
<Divider className="!mt-4 !mb-2 opacity-40" />
<p className="w-full mb-2">
<span>Your instance URL is </span>
<a
className="inline-flex flex-row justify-start items-center underline text-blue-600 hover:opacity-80"
href={context.instanceUrl}
target="_blank"
>
<span className="mr-1">{context.instanceUrl}</span>
<Icon.ExternalLink className="w-4 h-auto" />
</a>
</p>
<div className="w-full flex flex-row justify-between items-center mb-2">
<div className="flex flex-row justify-start items-center">
<IconButton size="sm" variant="plain" color="neutral" onClick={handleSettingButtonClick}>
<Icon.Settings className="w-5 h-auto text-gray-500 dark:text-gray-400" />
</IconButton>
<IconButton
<div className="flex flex-row justify-start items-center gap-2">
<Button size="sm" variant="outlined" color="neutral" onClick={handleSettingButtonClick}>
<Icon.Settings className="w-5 h-auto text-gray-500 dark:text-gray-400 mr-1" />
Setting
</Button>
<Button
size="sm"
variant="plain"
variant="outlined"
color="neutral"
component="a"
href="https://github.com/yourselfhosted/slash"
target="_blank"
>
<Icon.Github className="w-5 h-auto text-gray-500 dark:text-gray-400" />
</IconButton>
</div>
<div className="flex flex-row justify-end items-center">
<a
className="text-sm flex flex-row justify-start items-center underline text-blue-600 hover:opacity-80"
href={instanceUrl}
target="_blank"
>
<span className="mr-1">Go to my Slash</span>
<Icon.ExternalLink className="w-4 h-auto" />
</a>
<Icon.Github className="w-5 h-auto text-gray-500 dark:text-gray-400 mr-1" />
GitHub
</Button>
</div>
</div>
</>
) : (
<div className="w-full flex flex-col justify-start items-center">
<Icon.Cookie strokeWidth={1} className="w-20 h-auto mb-4 text-gray-400" />
<p className="dark:text-gray-400">Please set your instance URL and access token first.</p>
<p className="dark:text-gray-400">Please set your instance URL first.</p>
<div className="w-full flex flex-row justify-center items-center py-4">
<Button size="sm" color="primary" onClick={handleSettingButtonClick}>
<Icon.Settings className="w-5 h-auto mr-1" /> Go to Setting
@ -117,10 +83,12 @@ const IndexPopup = () => {
const Popup = () => {
return (
<StorageContextProvider>
<CssVarsProvider>
<IndexPopup />
<Toaster position="top-center" />
</CssVarsProvider>
</StorageContextProvider>
);
};

View File

@ -1,55 +0,0 @@
import axios from "axios";
import { create } from "zustand";
import { combine } from "zustand/middleware";
import { CreateShortcutResponse, ListShortcutsResponse, Shortcut } from "@/types/proto/api/v2/shortcut_service";
interface State {
shortcutMapById: Record<number, Shortcut>;
}
const getDefaultState = (): State => {
return {
shortcutMapById: {},
};
};
const useShortcutStore = create(
combine(getDefaultState(), (set, get) => ({
fetchShortcutList: async (instanceUrl: string, accessToken: string) => {
const {
data: { shortcuts },
} = await axios.get<ListShortcutsResponse>(`${instanceUrl}/api/v2/shortcuts`, {
headers: {
Authorization: `Bearer ${accessToken}`,
},
});
const shortcutMap = get().shortcutMapById;
shortcuts.forEach((shortcut) => {
shortcutMap[shortcut.id] = shortcut;
});
set({ shortcutMapById: shortcutMap });
return shortcuts;
},
getShortcutList: () => {
return Object.values(get().shortcutMapById);
},
createShortcut: async (instanceUrl: string, accessToken: string, create: Shortcut) => {
const {
data: { shortcut },
} = await axios.post<CreateShortcutResponse>(`${instanceUrl}/api/v2/shortcuts`, create, {
headers: {
Authorization: `Bearer ${accessToken}`,
},
});
if (!shortcut) {
throw new Error(`Failed to create shortcut`);
}
const shortcutMap = get().shortcutMapById;
shortcutMap[shortcut.id] = shortcut;
set({ shortcutMapById: shortcutMap });
return shortcut;
},
}))
);
export default useShortcutStore;

View File

@ -1,19 +1,10 @@
{
"extends": "plasmo/templates/tsconfig.base",
"exclude": [
"node_modules"
],
"include": [
".plasmo/index.d.ts",
"./**/*.ts",
"./**/*.tsx",
"../types"
],
"exclude": ["node_modules"],
"include": [".plasmo/index.d.ts", "./**/*.ts", "./**/*.tsx"],
"compilerOptions": {
"paths": {
"@/*": [
"./src/*"
],
"@/*": ["./src/*"]
},
"baseUrl": "."
}

View File

@ -12,13 +12,16 @@
"search": "Search",
"email": "Email",
"password": "Password",
"account": "Account"
"account": "Account",
"or": "Or"
},
"auth": {
"sign-in": "Sign in",
"sign-up": "Sign up",
"sign-out": "Sign out",
"create-your-account": "Create your account"
"create-your-account": "Create your account",
"host-tip": "You are registering as Admin.",
"sign-in-with": "Sign in with {{provider}}"
},
"analytics": {
"self": "Analytics",
@ -33,23 +36,19 @@
"shortcut": {
"visits": "{{count}} visits",
"visibility": {
"private": {
"self": "Private",
"description": "Only you can access"
},
"workspace": {
"self": "Workspace",
"description": "Workspace members can access"
},
"public": {
"self": "Public",
"description": "Visible to everyone on the internet"
"description": "Public on the internet"
}
}
},
"filter": {
"all": "All",
"mine": "Mine",
"personal": "Personal",
"compact-mode": "Compact mode",
"order-by": "Order by",
"direction": "Direction"
@ -59,10 +58,7 @@
"nickname": "Nickname",
"email": "Email",
"role": "Role",
"profile": "Profile",
"action": {
"add-user": "Add user"
}
"profile": "Profile"
},
"settings": {
"self": "Setting",
@ -73,9 +69,13 @@
"workspace": {
"self": "Workspace settings",
"custom-style": "Custom style",
"enable-user-signup": {
"self": "Enable user signup",
"description": "Once enabled, other users can signup."
"disallow-user-registration": {
"self": "Disallow user registration"
},
"default-visibility": "Default visibility",
"member": {
"self": "Member",
"add": "Add member"
}
}
}

79
frontend/locales/fr.json Normal file
View File

@ -0,0 +1,79 @@
{
"common": {
"about": "À propos",
"loading": "Chargement",
"cancel": "Annuler",
"save": "Sauver",
"create": "Créer",
"download": "Télécharger",
"edit": "Modifier",
"delete": "Supprimer",
"language": "Langue",
"search": "Recherche",
"email": "E-mail",
"password": "Mot de passe",
"account": "Compte"
},
"auth": {
"sign-in": "Se connecter",
"sign-up": "S'inscrire",
"sign-out": "Se déconnecter",
"create-your-account": "Créez votre compte"
},
"analytics": {
"self": "Analyse",
"top-sources": "Principales sources",
"source": "Source",
"visitors": "Visiteurs",
"devices": "Dispositifs",
"browser": "Navigateur",
"browsers": "Navigateurs",
"operating-system": "Systèmes d'exploitation"
},
"shortcut": {
"visits": "{{count}} visites",
"visibility": {
"workspace": {
"self": "Espace de travail",
"description": "Les membres de l'espace de travail ont accès"
},
"public": {
"self": "Public",
"description": "Visible par tous sur Internet"
}
}
},
"filter": {
"all": "Tout",
"mine": "Le mien",
"compact-mode": "Mode compact",
"order-by": "Commandé par",
"direction": "Direction"
},
"user": {
"self": "Utilisateur",
"nickname": "Surnom",
"email": "E-mail",
"role": "Rôle",
"profile": "Profil",
"action": {
"add-user": "Ajouter utilisateur"
}
},
"settings": {
"self": "Paramètres",
"preference": {
"self": "Préférence",
"color-theme": "Thème de couleur"
},
"workspace": {
"self": "Paramètres de l'espace de travail",
"custom-style": "Style personnalisé",
"enable-user-signup": {
"self": "Activer l'inscription des utilisateurs",
"description": "Une fois activé, d'autres utilisateurs peuvent s'inscrire."
},
"default-visibility": "Visibilité par défaut"
}
}
}

80
frontend/locales/hu.json Normal file
View File

@ -0,0 +1,80 @@
{
"common": {
"about": "Névjegy",
"loading": "Betöltés",
"cancel": "Mégse",
"save": "Mentés",
"create": "Létrehozás",
"download": "Letöltés",
"edit": "Szerkesztés",
"delete": "Törlés",
"language": "Nyelv",
"search": "Keresés",
"email": "Email",
"password": "Jelszó",
"account": "Fiók"
},
"auth": {
"sign-in": "Bejelentkezés",
"sign-up": "Regisztráció",
"sign-out": "Kijelentkezés",
"create-your-account": "Fiók létrehozás",
"host-tip": "Adminisztrátorként regisztrál."
},
"analytics": {
"self": "Analitika",
"top-sources": "Legfontosabb források",
"source": "Forrás",
"visitors": "Látogatók",
"devices": "Eszközök",
"browser": "Böngésző",
"browsers": "Böngészők",
"operating-system": "Operációs rendszer"
},
"shortcut": {
"visits": "{{count}} látogatás",
"visibility": {
"workspace": {
"self": "Munkaterület",
"description": "A munkaterület tagjai hozzáférhetnek"
},
"public": {
"self": "Nyilvános",
"description": "Mindenki számára látható az interneten"
}
}
},
"filter": {
"all": "Összes",
"mine": "Saját",
"compact-mode": "Kompakt mód",
"order-by": "Rendezés",
"direction": "Irány"
},
"user": {
"self": "Felhasználó",
"nickname": "Becenév",
"email": "Email",
"role": "Szerep",
"profile": "Profil",
"action": {
"add-user": "Felhasználó hozzáadása"
}
},
"settings": {
"self": "Beállítás",
"preference": {
"self": "Preferencia",
"color-theme": "Színtéma"
},
"workspace": {
"self": "Munkaterület beállítások",
"custom-style": "Egyéni stílus",
"enable-user-signup": {
"self": "Felhasználói regisztráció engedélyezése",
"description": "Ha engedélyezve van, más felhasználók is regisztrálhatnak."
},
"default-visibility": "Alapértelmezett láthatóság"
}
}
}

80
frontend/locales/ja.json Normal file
View File

@ -0,0 +1,80 @@
{
"common": {
"about": "About",
"loading": "読込中",
"cancel": "取消",
"save": "保存",
"create": "作成",
"download": "ダウンロード",
"edit": "編集",
"delete": "削除",
"language": "言語",
"search": "検索",
"email": "Eメール",
"password": "パスワード",
"account": "アカウント"
},
"auth": {
"sign-in": "サインイン",
"sign-up": "登録",
"sign-out": "サインアウト",
"create-your-account": "アカウントを作成してください",
"host-tip": "管理者として登録されています。"
},
"analytics": {
"self": "分析",
"top-sources": "トップソース",
"source": "ソース",
"visitors": "訪問者",
"devices": "デバイス",
"browser": "ブラウザ",
"browsers": "ブラウザ",
"operating-system": "オペレーティングシステム"
},
"shortcut": {
"visits": "{{count}} 回訪問",
"visibility": {
"workspace": {
"self": "ワークスペース",
"description": "ワークスペースメンバーがアクセスできます"
},
"public": {
"self": "公開",
"description": "誰でもアクセスできます"
}
}
},
"filter": {
"all": "全て",
"mine": "自分",
"compact-mode": "コンパクトモード",
"order-by": "順序",
"direction": "方向"
},
"user": {
"self": "ユーザー",
"nickname": "ニックネーム",
"email": "Eメール",
"role": "役割",
"profile": "プロフィール",
"action": {
"add-user": "ユーザーの追加"
}
},
"settings": {
"self": "設定",
"preference": {
"self": "プリファレンス",
"color-theme": "カラーテーマ"
},
"workspace": {
"self": "ワークスペースの設定",
"custom-style": "カスタムスタイル",
"enable-user-signup": {
"self": "ユーザーの登録を有効にする",
"description": "有効にすると他のユーザーが登録できるようになります。"
},
"default-visibility": "デフォルトの表示"
}
}
}

80
frontend/locales/ru.json Normal file
View File

@ -0,0 +1,80 @@
{
"common": {
"about": "Информация",
"loading": "Загружается",
"cancel": "Отменить",
"save": "Сохранить",
"create": "Создать",
"download": "Загрузить",
"edit": "Редактировать",
"delete": "Удалить",
"language": "Язык",
"search": "Поиск",
"email": "Email",
"password": "Пароль",
"account": "Аккаунт"
},
"auth": {
"sign-in": "Войти",
"sign-up": "Регистрация",
"sign-out": "Выйти",
"create-your-account": "Создать аккаунт",
"host-tip": "Вы зарегистрированы как Admin."
},
"analytics": {
"self": "Аналитика",
"top-sources": "Лучшие источники",
"source": "Источник",
"visitors": "Посетители",
"devices": "Устройства",
"browser": "Браузер",
"browsers": "Браузеры",
"operating-system": "Операционная система"
},
"shortcut": {
"visits": "{{count}} перехода",
"visibility": {
"workspace": {
"self": "Команда",
"description": "Члены команды имеют доступ"
},
"public": {
"self": "Публичная",
"description": "Видимая для всех из интернета"
}
}
},
"filter": {
"all": "Все",
"mine": "Мои",
"compact-mode": "Компактный режим",
"order-by": "Создана",
"direction": "Путь"
},
"user": {
"self": "Пользователь",
"nickname": "Имя пользователя",
"email": "Email",
"role": "Роль",
"profile": "Профиль",
"action": {
"add-user": "Добавить пользователя"
}
},
"settings": {
"self": "Настройки",
"preference": {
"self": "Внешний вид",
"color-theme": "Цветовая схема"
},
"workspace": {
"self": "Настройки команды",
"custom-style": "Пользовательский стиль",
"enable-user-signup": {
"self": "Разрешить регистрацию пользователей",
"description": "После включения, другие пользователи смогут зарегистрироваться."
},
"default-visibility": "Отображение по умолчанию"
}
}
}

79
frontend/locales/tr.json Normal file
View File

@ -0,0 +1,79 @@
{
"common": {
"about": "Hakkında",
"loading": "Yükleniyor",
"cancel": "İptal",
"save": "Kaydet",
"create": "Oluştur",
"download": "İndir",
"edit": "Düzenle",
"delete": "Sil",
"language": "Dil",
"search": "Ara",
"email": "E-posta",
"password": "Şifre",
"account": "Hesap"
},
"auth": {
"sign-in": "Giriş yap",
"sign-up": "Kaydol",
"sign-out": ıkış yap",
"create-your-account": "Hesabınızı oluşturun"
},
"analytics": {
"self": "Analizler",
"top-sources": "En İyi Kaynaklar",
"source": "Kaynak",
"visitors": "Ziyâretçiler",
"devices": "Cihazlar",
"browser": "Tarayıcı",
"browsers": "Tarayıcılar",
"operating-system": "İşletim Sistemi"
},
"shortcut": {
"visits": "{{count}} ziyaret",
"visibility": {
"workspace": {
"self": "Çalışma Alanı",
"description": "Çalışma alanı üyeleri erişebilir"
},
"public": {
"self": "Herkese açık",
"description": "İnternette herkese görünür"
}
}
},
"filter": {
"all": "Hepsi",
"mine": "Benim",
"compact-mode": "Kompakt mod",
"order-by": "Sırala",
"direction": "Yön"
},
"user": {
"self": "Kullanıcı",
"nickname": "Takma ad",
"email": "E-posta",
"role": "Rol",
"profile": "Profil",
"action": {
"add-user": "Kullanıcı ekle"
}
},
"settings": {
"self": "Ayarlar",
"preference": {
"self": "Tercihler",
"color-theme": "Renk teması"
},
"workspace": {
"self": "Çalışma alanı ayarları",
"custom-style": "Özel stil",
"enable-user-signup": {
"self": "Kullanıcı kaydını etkinleştir",
"description": "Etkinleştirildiğinde, diğer kullanıcılar kaydolabilir."
},
"default-visibility": "Varsayılan görünürlük"
}
}
}

View File

@ -33,23 +33,19 @@
"shortcut": {
"visits": "{{count}} 次访问",
"visibility": {
"private": {
"self": "私有的",
"description": "仅您可以访问"
},
"workspace": {
"self": "工作区",
"description": "工作区成员可以访问"
},
"public": {
"self": "公开的",
"description": "对任何人可见"
"description": "公开至互联网"
}
}
},
"filter": {
"all": "所有",
"mine": "我的",
"personal": "我的",
"compact-mode": "紧凑模式",
"order-by": "排序方式",
"direction": "方向"
@ -76,7 +72,8 @@
"enable-user-signup": {
"self": "启用用户注册",
"description": "允许其他用户注册新账号"
}
},
"default-visibility": "默认可见性"
}
}
}

View File

@ -1,6 +0,0 @@
{
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/logo.png" type="image/*" />
<link rel="icon" href="/logo.svg" type="image/*" />
<meta name="theme-color" content="#FFFFFF" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<!-- slash.metadata -->

View File

@ -2,54 +2,58 @@
"name": "slash",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"serve": "vite preview",
"lint": "eslint --ext .js,.ts,.tsx, src",
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix",
"type-check": "tsc --noEmit --skipLibCheck",
"postinstall": "cd ../../proto && buf generate"
},
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/joy": "5.0.0-beta.23",
"@reduxjs/toolkit": "^1.9.7",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/joy": "5.0.0-beta.48",
"@reduxjs/toolkit": "^2.3.0",
"classnames": "^2.5.1",
"copy-to-clipboard": "^3.3.3",
"dayjs": "^1.11.10",
"i18next": "^23.7.18",
"dayjs": "^1.11.13",
"i18next": "^23.16.4",
"lodash-es": "^4.17.21",
"lucide-react": "^0.312.0",
"nice-grpc-web": "^3.3.2",
"qrcode.react": "^3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"lucide-react": "^0.446.0",
"nice-grpc-web": "^3.3.5",
"qrcode.react": "^4.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hot-toast": "^2.4.1",
"react-i18next": "^13.5.0",
"react-router-dom": "^6.21.3",
"react-use": "^17.4.3",
"tailwindcss": "^3.4.1",
"zustand": "^4.5.0"
"react-i18next": "^15.1.0",
"react-router-dom": "^6.27.0",
"react-use": "^17.5.1",
"tailwindcss": "^3.4.14",
"uuid": "^10.0.0",
"zustand": "^5.0.1"
},
"devDependencies": {
"@bufbuild/buf": "^1.28.1",
"@bufbuild/buf": "^1.46.0",
"@bufbuild/protobuf": "^2.2.2",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/lodash-es": "^4.17.12",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.17",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.33.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitejs/plugin-react-swc": "^3.7.1",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"long": "^5.2.3",
"postcss": "^8.4.33",
"prettier": "2.6.2",
"protobufjs": "^7.2.6",
"typescript": "^5.3.3",
"vite": "^5.0.12"
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"protobufjs": "^7.4.0",
"typescript": "^5.6.3",
"vite": "^5.4.10"
},
"resolutions": {
"csstype": "3.1.2"

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-slash"><line x1="9" x2="15" y1="15" y2="9"/><circle cx="12" cy="12" r="10"/></svg>

After

Width:  |  Height:  |  Size: 291 B

View File

@ -1,26 +1,24 @@
import { useColorScheme } from "@mui/joy";
import { useEffect, useState } from "react";
import { useEffect } from "react";
import { Outlet } from "react-router-dom";
import DemoBanner from "./components/DemoBanner";
import useUserStore from "./stores/v1/user";
import useWorkspaceStore from "./stores/v1/workspace";
import DemoBanner from "@/components/DemoBanner";
import { useWorkspaceStore } from "@/stores";
import useNavigateTo from "./hooks/useNavigateTo";
import { FeatureType } from "./stores/workspace";
function App() {
const navigateTo = useNavigateTo();
const { mode: colorScheme } = useColorScheme();
const userStore = useUserStore();
const workspaceStore = useWorkspaceStore();
const [loading, setLoading] = useState(true);
// Redirect to sign up page if no instance owner.
useEffect(() => {
(async () => {
try {
await Promise.all([workspaceStore.fetchWorkspaceProfile(), workspaceStore.fetchWorkspaceSetting(), userStore.fetchCurrentUser()]);
} catch (error) {
// Do nothing.
if (!workspaceStore.profile.owner) {
navigateTo("/auth/signup", {
replace: true,
});
}
setLoading(false);
})();
}, []);
}, [workspaceStore.profile]);
useEffect(() => {
const styleEl = document.createElement("style");
@ -29,6 +27,16 @@ function App() {
document.body.insertAdjacentElement("beforeend", styleEl);
}, [workspaceStore.setting.customStyle]);
useEffect(() => {
const hasCustomBranding = workspaceStore.checkFeatureAvailable(FeatureType.CustomeBranding);
if (!hasCustomBranding || !workspaceStore.setting.branding) {
return;
}
const favicon = document.querySelector("link[rel='icon']") as HTMLLinkElement;
favicon.href = new TextDecoder().decode(workspaceStore.setting.branding);
}, [workspaceStore.setting.branding]);
useEffect(() => {
const root = document.documentElement;
if (colorScheme === "light") {
@ -62,13 +70,11 @@ function App() {
}
}, [colorScheme]);
return !loading ? (
return (
<>
<DemoBanner />
<Outlet />
</>
) : (
<></>
);
}

View File

@ -21,10 +21,11 @@ const AboutDialog: React.FC<Props> = (props: Props) => {
</div>
<div className="max-w-full w-80 sm:w-96">
<p>
<span className="font-medium">Slash</span>: An open source, self-hosted bookmarks and link sharing platform.
<span className="font-medium">Slash</span> is an open source, self-hosted platform for sharing and managing your most frequently
used links.
</p>
<div className="mt-1">
<span className="mr-2">See more in</span>
<span className="mr-2">Source code:</span>
<Link variant="plain" href="https://github.com/yourselfhosted/slash" target="_blank">
GitHub
</Link>

View File

@ -2,7 +2,7 @@ import classNames from "classnames";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { shortcutServiceClient } from "@/grpcweb";
import { GetShortcutAnalyticsResponse } from "@/types/proto/api/v2/shortcut_service";
import { GetShortcutAnalyticsResponse } from "@/types/proto/api/v1/shortcut_service";
import Icon from "./Icon";
interface Props {
@ -23,7 +23,7 @@ const AnalyticsView: React.FC<Props> = (props: Props) => {
}, []);
return (
<div className={classNames("w-full", className)}>
<div className={classNames("relative w-full", className)}>
{analytics ? (
<>
<div className="w-full">
@ -138,7 +138,7 @@ const AnalyticsView: React.FC<Props> = (props: Props) => {
</div>
</>
) : (
<div className="py-12 w-full flex flex-row justify-center items-center opacity-80">
<div className="absolute py-12 w-full flex flex-row justify-center items-center opacity-80">
<Icon.Loader className="mr-2 w-5 h-auto animate-spin" />
{t("common.loading")}
</div>

View File

@ -2,8 +2,8 @@ import { Button, Input, Modal, ModalDialog } from "@mui/joy";
import { useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import useLoading from "../hooks/useLoading";
import useUserStore from "../stores/v1/user";
import useLoading from "@/hooks/useLoading";
import { useUserStore } from "@/stores";
import Icon from "./Icon";
interface Props {
@ -46,10 +46,13 @@ const ChangePasswordDialog: React.FC<Props> = (props: Props) => {
requestState.setLoading();
try {
userStore.patchUser({
userStore.patchUser(
{
id: userStore.getCurrentUser().id,
password: newPassword,
});
},
["password"],
);
onClose();
toast("Password changed");
} catch (error: any) {

View File

@ -1,3 +1,4 @@
import { Tooltip } from "@mui/joy";
import classNames from "classnames";
import copy from "copy-to-clipboard";
import { useState } from "react";
@ -7,11 +8,9 @@ import { Link } from "react-router-dom";
import { absolutifyLink } from "@/helpers/utils";
import useNavigateTo from "@/hooks/useNavigateTo";
import useResponsiveWidth from "@/hooks/useResponsiveWidth";
import useCollectionStore from "@/stores/v1/collection";
import useShortcutStore from "@/stores/v1/shortcut";
import useUserStore from "@/stores/v1/user";
import { Collection } from "@/types/proto/api/v2/collection_service";
import { Shortcut } from "@/types/proto/api/v2/shortcut_service";
import { useCollectionStore, useShortcutStore, useUserStore } from "@/stores";
import { Collection } from "@/types/proto/api/v1/collection_service";
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
import { showCommonDialog } from "./Alert";
import CreateCollectionDialog from "./CreateCollectionDrawer";
import Icon from "./Icon";
@ -57,13 +56,17 @@ const CollectionView = (props: Props) => {
navigateTo(`/shortcut/${shortcut.id}`);
};
const handleOpenAllShortcutsButtonClick = () => {
shortcuts.forEach((shortcut: Shortcut) => window.open(`/s/${shortcut.name}`));
};
return (
<>
<div className={classNames("w-full flex flex-col justify-start items-start border rounded-lg hover:shadow dark:border-zinc-800")}>
<div className="bg-gray-100 dark:bg-zinc-800 px-3 py-2 w-full flex flex-row justify-between items-center rounded-t-lg">
<div className="w-auto flex flex-col justify-start items-start mr-2">
<div className="w-full truncate">
<Link className="leading-6 font-medium dark:text-gray-400" to={`/c/${collection.name}`} unstable_viewTransition>
<Link className="leading-6 font-medium dark:text-gray-400" to={`/c/${collection.name}`} viewTransition>
{collection.title}
</Link>
<span className="ml-1 leading-6 text-gray-500 dark:text-gray-400" onClick={handleCopyCollectionLink}>
@ -73,9 +76,19 @@ const CollectionView = (props: Props) => {
<p className="text-sm text-gray-500">{collection.description}</p>
</div>
<div className="flex flex-row justify-end items-center shrink-0 gap-2">
<Link className="w-full text-gray-400 cursor-pointer hover:text-gray-500" to={`/c/${collection.name}`} target="_blank">
<Tooltip title="Share" placement="top" arrow>
<Link className="w-auto text-gray-400 cursor-pointer hover:text-gray-500" to={`/c/${collection.name}`} target="_blank">
<Icon.Share className="w-4 h-auto" />
</Link>
</Tooltip>
<Tooltip title="Open all" placement="top" arrow>
<button
className="w-auto text-gray-400 cursor-pointer hover:text-gray-500"
onClick={() => handleOpenAllShortcutsButtonClick()}
>
<Icon.ArrowUpRight className="w-5 h-auto" />
</button>
</Tooltip>
{showAdminActions && (
<Dropdown
trigger={

View File

@ -3,8 +3,8 @@ import { useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { userServiceClient } from "@/grpcweb";
import useLoading from "../hooks/useLoading";
import useUserStore from "../stores/v1/user";
import useLoading from "@/hooks/useLoading";
import { useUserStore } from "@/stores";
import Icon from "./Icon";
interface Props {

View File

@ -1,15 +1,13 @@
import { Button, DialogActions, DialogContent, DialogTitle, Drawer, Input, ModalClose, Radio, RadioGroup } from "@mui/joy";
import { Button, Checkbox, DialogActions, DialogContent, DialogTitle, Divider, Drawer, Input, ModalClose } from "@mui/joy";
import { isUndefined } from "lodash-es";
import { useEffect, useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import useCollectionStore from "@/stores/v1/collection";
import useShortcutStore from "@/stores/v1/shortcut";
import { Collection } from "@/types/proto/api/v2/collection_service";
import { Visibility } from "@/types/proto/api/v2/common";
import { Shortcut } from "@/types/proto/api/v2/shortcut_service";
import { convertVisibilityFromPb } from "@/utils/visibility";
import useLoading from "../hooks/useLoading";
import useLoading from "@/hooks/useLoading";
import { useCollectionStore, useShortcutStore, useWorkspaceStore } from "@/stores";
import { Collection } from "@/types/proto/api/v1/collection_service";
import { Visibility } from "@/types/proto/api/v1/common";
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
import Icon from "./Icon";
import ShortcutView from "./ShortcutView";
@ -26,11 +24,12 @@ interface State {
const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
const { onClose, onConfirm, collectionId } = props;
const { t } = useTranslation();
const workspaceStore = useWorkspaceStore();
const collectionStore = useCollectionStore();
const shortcutList = useShortcutStore().getShortcutList();
const [state, setState] = useState<State>({
collectionCreate: Collection.fromPartial({
visibility: Visibility.PRIVATE,
visibility: Visibility.WORKSPACE,
}),
});
const [selectedShortcuts, setSelectedShortcuts] = useState<Shortcut[]>([]);
@ -49,6 +48,23 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
})
.filter((shortcut) => !selectedShortcuts.find((selectedShortcut) => selectedShortcut.id === shortcut.id));
const setPartialState = (partialState: Partial<State>) => {
setState({
...state,
...partialState,
});
};
useEffect(() => {
if (workspaceStore.setting.defaultVisibility !== Visibility.VISIBILITY_UNSPECIFIED) {
setPartialState({
collectionCreate: Object.assign(state.collectionCreate, {
visibility: workspaceStore.setting.defaultVisibility,
}),
});
}
}, []);
useEffect(() => {
(async () => {
if (collectionId) {
@ -63,7 +79,7 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
setSelectedShortcuts(
collection.shortcutIds
.map((shortcutId) => shortcutList.find((shortcut) => shortcut.id === shortcutId))
.filter(Boolean) as Shortcut[]
.filter(Boolean) as Shortcut[],
);
loadingState.setFinish();
}
@ -75,13 +91,6 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
return null;
}
const setPartialState = (partialState: Partial<State>) => {
setState({
...state,
...partialState,
});
};
const handleNameInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setPartialState({
collectionCreate: Object.assign(state.collectionCreate, {
@ -98,14 +107,6 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
});
};
const handleVisibilityInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setPartialState({
collectionCreate: Object.assign(state.collectionCreate, {
visibility: Number(e.target.value),
}),
});
};
const handleDescriptionInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setPartialState({
collectionCreate: Object.assign(state.collectionCreate, {
@ -135,7 +136,7 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
visibility: state.collectionCreate.visibility,
shortcutIds: selectedShortcuts.map((shortcut) => shortcut.id),
},
["name", "title", "description", "visibility", "shortcut_ids"]
["name", "title", "description", "visibility", "shortcut_ids"],
);
} else {
await collectionStore.createCollection({
@ -159,8 +160,8 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
<Drawer anchor="right" open={true} onClose={onClose}>
<DialogTitle>{isCreating ? "Create Collection" : "Edit Collection"}</DialogTitle>
<ModalClose />
<DialogContent className="w-full max-w-full sm:max-w-[24rem]">
<div className="overflow-y-auto w-full mt-2 px-3 pb-4">
<DialogContent className="w-full max-w-full">
<div className="overflow-y-auto w-full mt-2 px-4 pb-4 sm:w-[24rem]">
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Name <span className="text-red-600">*</span>
@ -168,7 +169,8 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
<Input
className="w-full"
type="text"
placeholder="The memorable name of the collection"
startDecorator="c/"
placeholder="An easy name to remember"
value={state.collectionCreate.name}
onChange={handleNameInputChange}
/>
@ -181,7 +183,7 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
<Input
className="w-full"
type="text"
placeholder="A short title to describe your collection"
placeholder="A short title of your collection"
value={state.collectionCreate.title}
onChange={handleTitleInputChange}
/>
@ -200,19 +202,21 @@ const CreateCollectionDrawer: React.FC<Props> = (props: Props) => {
</div>
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">Visibility</span>
<div className="w-full flex flex-row justify-start items-center text-base">
<RadioGroup orientation="horizontal" value={state.collectionCreate.visibility} onChange={handleVisibilityInputChange}>
<Radio value={Visibility.PRIVATE} label={t(`shortcut.visibility.private.self`)} />
<Radio value={Visibility.WORKSPACE} label={t(`shortcut.visibility.workspace.self`)} />
<Radio value={Visibility.PUBLIC} label={t(`shortcut.visibility.public.self`)} />
</RadioGroup>
<Checkbox
className="w-full dark:text-gray-400"
checked={state.collectionCreate.visibility === Visibility.PUBLIC}
label={t(`shortcut.visibility.public.description`)}
onChange={(e) =>
setPartialState({
collectionCreate: Object.assign(state.collectionCreate, {
visibility: e.target.checked ? Visibility.PUBLIC : Visibility.WORKSPACE,
}),
})
}
/>
</div>
<p className="mt-3 text-sm text-gray-500 w-full bg-gray-100 border border-gray-200 dark:bg-zinc-800 dark:border-zinc-700 dark:text-gray-400 px-2 py-1 rounded-md">
{t(`shortcut.visibility.${convertVisibilityFromPb(state.collectionCreate.visibility).toLowerCase()}.description`)}
</p>
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<Divider className="text-gray-500" />
<div className="w-full flex flex-col justify-start items-start mt-3 mb-3">
<p className="mb-2">
<span>Shortcuts</span>
<span className="opacity-60">({selectedShortcuts.length})</span>

View File

@ -0,0 +1,291 @@
import { Button, DialogActions, DialogContent, DialogTitle, Divider, Drawer, Input, ModalClose } from "@mui/joy";
import { isUndefined } from "lodash-es";
import { useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { v4 as uuidv4 } from "uuid";
import { workspaceServiceClient } from "@/grpcweb";
import { absolutifyLink } from "@/helpers/utils";
import useLoading from "@/hooks/useLoading";
import { useWorkspaceStore } from "@/stores";
import { IdentityProvider, IdentityProvider_Type, IdentityProviderConfig_OAuth2Config } from "@/types/proto/api/v1/workspace_service";
interface Props {
identityProvider?: IdentityProvider;
onClose: () => void;
onConfirm?: () => void;
}
interface State {
identityProviderCreate: IdentityProvider;
}
const CreateIdentityProviderDrawer: React.FC<Props> = (props: Props) => {
const { onClose, onConfirm, identityProvider } = props;
const { t } = useTranslation();
const workspaceStore = useWorkspaceStore();
const [state, setState] = useState<State>({
identityProviderCreate: IdentityProvider.fromPartial(
identityProvider || {
id: uuidv4(),
type: IdentityProvider_Type.OAUTH2,
config: {
oauth2: IdentityProviderConfig_OAuth2Config.fromPartial({
scopes: [],
fieldMapping: {},
}),
},
},
),
});
const isCreating = isUndefined(identityProvider);
const requestState = useLoading(false);
const setPartialState = (partialState: Partial<State>) => {
setState({
...state,
...partialState,
});
};
const handleTitleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setPartialState({
identityProviderCreate: Object.assign(state.identityProviderCreate, {
title: e.target.value,
}),
});
};
const handleOAuth2ConfigChange = (e: React.ChangeEvent<HTMLInputElement>, field: string) => {
if (!state.identityProviderCreate.config || !state.identityProviderCreate.config.oauth2) {
return;
}
const value = field === "scopes" ? e.target.value.split(" ") : e.target.value;
setPartialState({
identityProviderCreate: Object.assign(state.identityProviderCreate, {
config: Object.assign(state.identityProviderCreate.config, {
oauth2: Object.assign(state.identityProviderCreate.config.oauth2, {
[field]: value,
}),
}),
}),
});
};
const handleFieldMappingChange = (e: React.ChangeEvent<HTMLInputElement>, field: string) => {
if (
!state.identityProviderCreate.config ||
!state.identityProviderCreate.config.oauth2 ||
!state.identityProviderCreate.config.oauth2.fieldMapping
) {
return;
}
setPartialState({
identityProviderCreate: Object.assign(state.identityProviderCreate, {
config: Object.assign(state.identityProviderCreate.config, {
oauth2: Object.assign(state.identityProviderCreate.config.oauth2, {
fieldMapping: Object.assign(state.identityProviderCreate.config.oauth2.fieldMapping, {
[field]: e.target.value,
}),
}),
}),
}),
});
};
const onSave = async () => {
if (!state.identityProviderCreate.id || !state.identityProviderCreate.title) {
toast.error("Please fill in required fields.");
return;
}
try {
if (!isCreating) {
await workspaceServiceClient.updateWorkspaceSetting({
setting: {
identityProviders: workspaceStore.setting.identityProviders.map((idp) =>
idp.id === state.identityProviderCreate.id ? state.identityProviderCreate : idp,
),
},
updateMask: ["identity_providers"],
});
} else {
await workspaceServiceClient.updateWorkspaceSetting({
setting: {
identityProviders: [...workspaceStore.setting.identityProviders, state.identityProviderCreate],
},
updateMask: ["identity_providers"],
});
}
if (onConfirm) {
onConfirm();
} else {
onClose();
}
} catch (error: any) {
console.error(error);
toast.error(error.details);
}
};
return (
<Drawer anchor="right" open={true} onClose={onClose}>
<DialogTitle>{isCreating ? "Create Identity Provider" : "Edit Identity Provider"}</DialogTitle>
<ModalClose />
<DialogContent className="w-full max-w-full">
<div className="overflow-y-auto w-full mt-2 px-4 pb-4 sm:w-[24rem]">
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Title <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="A short title will be displayed in the UI"
value={state.identityProviderCreate.title}
onChange={handleTitleInputChange}
/>
</div>
</div>
<Divider className="!mb-3" />
<p className="font-medium mb-2">Identity provider information</p>
{isCreating && (
<p className="shadow-sm rounded-md py-1 px-2 bg-zinc-100 dark:bg-zinc-900 text-sm w-full mb-2 break-all">
<span className="opacity-60">Redirect URL</span>
<br />
<code>{absolutifyLink("/auth/callback")}</code>
</p>
)}
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Client ID <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="Client ID of the OAuth2 provider"
value={state.identityProviderCreate.config?.oauth2?.clientId}
onChange={(e) => handleOAuth2ConfigChange(e, "clientId")}
/>
</div>
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Client Secret <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="Client Secret of the OAuth2 provider"
value={state.identityProviderCreate.config?.oauth2?.clientSecret}
onChange={(e) => handleOAuth2ConfigChange(e, "clientSecret")}
/>
</div>
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Authorization endpoint <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="Authorization endpoint of the OAuth2 provider"
value={state.identityProviderCreate.config?.oauth2?.authUrl}
onChange={(e) => handleOAuth2ConfigChange(e, "authUrl")}
/>
</div>
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Token endpoint <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="Token endpoint of the OAuth2 provider"
value={state.identityProviderCreate.config?.oauth2?.tokenUrl}
onChange={(e) => handleOAuth2ConfigChange(e, "tokenUrl")}
/>
</div>
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
User endpoint <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="User endpoint of the OAuth2 provider"
value={state.identityProviderCreate.config?.oauth2?.userInfoUrl}
onChange={(e) => handleOAuth2ConfigChange(e, "userInfoUrl")}
/>
</div>
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Scopes <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="Scopes of the OAuth2 provider, separated by space"
value={state.identityProviderCreate.config?.oauth2?.scopes.join(" ")}
onChange={(e) => handleOAuth2ConfigChange(e, "scopes")}
/>
</div>
</div>
<Divider className="!mb-3" />
<p className="font-medium mb-2">Field mapping</p>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Identifier <span className="text-red-600">*</span>
</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="The field in the user info response to identify the user"
value={state.identityProviderCreate.config?.oauth2?.fieldMapping?.identifier}
onChange={(e) => handleFieldMappingChange(e, "identifier")}
/>
</div>
</div>
<div className="w-full flex flex-col justify-start items-start">
<span className="mb-2">Display name</span>
<div className="relative w-full">
<Input
className="w-full"
type="text"
placeholder="The field in the user info response to display the user"
value={state.identityProviderCreate.config?.oauth2?.fieldMapping?.displayName}
onChange={(e) => handleFieldMappingChange(e, "displayName")}
/>
</div>
</div>
</div>
</DialogContent>
<DialogActions>
<div className="w-full flex flex-row justify-end items-center px-3 py-4 space-x-2">
<Button color="neutral" variant="plain" disabled={requestState.isLoading} loading={requestState.isLoading} onClick={onClose}>
{t("common.cancel")}
</Button>
<Button color="primary" disabled={requestState.isLoading} loading={requestState.isLoading} onClick={onSave}>
{t("common.save")}
</Button>
</div>
</DialogActions>
</Drawer>
);
};
export default CreateIdentityProviderDrawer;

View File

@ -1,26 +1,14 @@
import {
Button,
DialogActions,
DialogContent,
DialogTitle,
Divider,
Drawer,
Input,
ModalClose,
Radio,
RadioGroup,
Textarea,
} from "@mui/joy";
import { Button, Checkbox, DialogActions, DialogContent, DialogTitle, Divider, Drawer, Input, ModalClose, Textarea } from "@mui/joy";
import classnames from "classnames";
import { isUndefined, uniq } from "lodash-es";
import { useEffect, useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import useShortcutStore, { getShortcutUpdateMask } from "@/stores/v1/shortcut";
import { Visibility } from "@/types/proto/api/v2/common";
import { Shortcut } from "@/types/proto/api/v2/shortcut_service";
import { convertVisibilityFromPb } from "@/utils/visibility";
import useLoading from "../hooks/useLoading";
import useLoading from "@/hooks/useLoading";
import { useShortcutStore, useWorkspaceStore } from "@/stores";
import { getShortcutUpdateMask } from "@/stores/shortcut";
import { Visibility } from "@/types/proto/api/v1/common";
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
import Icon from "./Icon";
interface Props {
@ -39,7 +27,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
const { t } = useTranslation();
const [state, setState] = useState<State>({
shortcutCreate: Shortcut.fromPartial({
visibility: Visibility.PUBLIC,
visibility: Visibility.WORKSPACE,
ogMetadata: {
title: "",
description: "",
@ -49,6 +37,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
}),
});
const shortcutStore = useShortcutStore();
const workspaceStore = useWorkspaceStore();
const [showOpenGraphMetadata, setShowOpenGraphMetadata] = useState<boolean>(false);
const shortcutList = shortcutStore.getShortcutList();
const [tag, setTag] = useState<string>("");
@ -57,6 +46,23 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
const loadingState = useLoading(!isCreating);
const requestState = useLoading(false);
const setPartialState = (partialState: Partial<State>) => {
setState({
...state,
...partialState,
});
};
useEffect(() => {
if (workspaceStore.setting.defaultVisibility !== Visibility.VISIBILITY_UNSPECIFIED) {
setPartialState({
shortcutCreate: Object.assign(state.shortcutCreate, {
visibility: workspaceStore.setting.defaultVisibility,
}),
});
}
}, []);
useEffect(() => {
if (shortcutId) {
const shortcut = shortcutStore.getShortcutById(shortcutId);
@ -82,13 +88,6 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
return null;
}
const setPartialState = (partialState: Partial<State>) => {
setState({
...state,
...partialState,
});
};
const handleNameInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setPartialState({
shortcutCreate: Object.assign(state.shortcutCreate, {
@ -113,14 +112,6 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
});
};
const handleVisibilityInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setPartialState({
shortcutCreate: Object.assign(state.shortcutCreate, {
visibility: Number(e.target.value),
}),
});
};
const handleDescriptionInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setPartialState({
shortcutCreate: Object.assign(state.shortcutCreate, {
@ -213,8 +204,8 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
<Drawer anchor="right" open={true} onClose={onClose}>
<DialogTitle>{isCreating ? "Create Shortcut" : "Edit Shortcut"}</DialogTitle>
<ModalClose />
<DialogContent className="w-full max-w-full sm:max-w-[24rem]">
<div className="overflow-y-auto w-full mt-2 px-3 pb-4">
<DialogContent className="w-full max-w-full">
<div className="overflow-y-auto w-full mt-2 px-4 pb-4 sm:w-[24rem]">
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">
Name <span className="text-red-600">*</span>
@ -222,7 +213,8 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
<Input
className="w-full"
type="text"
placeholder="The memorable name of the shortcut"
startDecorator="s/"
placeholder="An easy name to remember"
value={state.shortcutCreate.name}
onChange={handleNameInputChange}
/>
@ -280,24 +272,25 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
)}
</div>
<div className="w-full flex flex-col justify-start items-start mb-3">
<span className="mb-2">Visibility</span>
<div className="w-full flex flex-row justify-start items-center text-base">
<RadioGroup orientation="horizontal" value={state.shortcutCreate.visibility} onChange={handleVisibilityInputChange}>
<Radio value={Visibility.PRIVATE} label={t(`shortcut.visibility.private.self`)} />
<Radio value={Visibility.WORKSPACE} label={t(`shortcut.visibility.workspace.self`)} />
<Radio value={Visibility.PUBLIC} label={t(`shortcut.visibility.public.self`)} />
</RadioGroup>
</div>
<p className="mt-3 text-sm text-gray-500 w-full bg-gray-100 border border-gray-200 dark:bg-zinc-800 dark:border-zinc-700 dark:text-gray-400 px-2 py-1 rounded-md">
{t(`shortcut.visibility.${convertVisibilityFromPb(state.shortcutCreate.visibility).toLowerCase()}.description`)}
</p>
<Checkbox
className="w-full dark:text-gray-400"
checked={state.shortcutCreate.visibility === Visibility.PUBLIC}
label={t(`shortcut.visibility.public.description`)}
onChange={(e) =>
setPartialState({
shortcutCreate: Object.assign(state.shortcutCreate, {
visibility: e.target.checked ? Visibility.PUBLIC : Visibility.WORKSPACE,
}),
})
}
/>
</div>
<Divider className="text-gray-500">More</Divider>
<div className="w-full flex flex-col justify-start items-start border rounded-md mt-3 overflow-hidden dark:border-zinc-800">
<div
className={classnames(
"w-full flex flex-row justify-between items-center px-2 py-1 cursor-pointer hover:bg-gray-100 dark:hover:bg-zinc-800",
showOpenGraphMetadata ? "bg-gray-100 border-b dark:bg-zinc-800 dark:border-b-zinc-700" : ""
showOpenGraphMetadata ? "bg-gray-100 border-b dark:bg-zinc-800 dark:border-b-zinc-700" : "",
)}
onClick={() => setShowOpenGraphMetadata(!showOpenGraphMetadata)}
>
@ -327,7 +320,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
<Input
className="w-full"
type="text"
placeholder="Slash - An open source, self-hosted bookmarks and link sharing platform"
placeholder="Slash - An open source, self-hosted platform for sharing and managing your most frequently used links"
size="sm"
value={state.shortcutCreate.ogMetadata?.title}
onChange={handleOpenGraphMetadataTitleChange}
@ -337,7 +330,7 @@ const CreateShortcutDrawer: React.FC<Props> = (props: Props) => {
<span className="mb-2 text-sm">Description</span>
<Textarea
className="w-full"
placeholder="An open source, self-hosted bookmarks and link sharing platform."
placeholder="An open source, self-hosted platform for sharing and managing your most frequently used links."
size="sm"
maxRows={3}
value={state.shortcutCreate.ogMetadata?.description}

View File

@ -3,9 +3,9 @@ import { isUndefined } from "lodash-es";
import { useEffect, useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { Role, User } from "@/types/proto/api/v2/user_service";
import useLoading from "../hooks/useLoading";
import useUserStore from "../stores/v1/user";
import useLoading from "@/hooks/useLoading";
import { useUserStore } from "@/stores";
import { Role, User } from "@/types/proto/api/v1/user_service";
import Icon from "./Icon";
interface Props {
@ -97,16 +97,20 @@ const CreateUserDialog: React.FC<Props> = (props: Props) => {
const userPatch: Partial<User> = {
id: user.id,
};
const updateMask: string[] = [];
if (user.email !== state.userCreate.email) {
userPatch.email = state.userCreate.email;
updateMask.push("email");
}
if (user.nickname !== state.userCreate.nickname) {
userPatch.nickname = state.userCreate.nickname;
updateMask.push("nickname");
}
if (user.role !== state.userCreate.role) {
userPatch.role = state.userCreate.role;
updateMask.push("role");
}
await userStore.patchUser(userPatch);
await userStore.patchUser(userPatch, updateMask);
} else {
await userStore.createUser(state.userCreate);
}

View File

@ -1,4 +1,4 @@
import useWorkspaceStore from "@/stores/v1/workspace";
import { useWorkspaceStore } from "@/stores";
import Icon from "./Icon";
const DemoBanner: React.FC = () => {
@ -10,7 +10,7 @@ const DemoBanner: React.FC = () => {
return (
<div className="z-10 relative flex flex-row items-center justify-center w-full py-2 text-sm sm:text-lg font-medium dark:text-gray-300 bg-white dark:bg-zinc-700 shadow">
<div className="w-full max-w-8xl px-4 md:px-12 flex flex-row justify-between items-center gap-x-3">
<span>🔗 Slash - An open source, self-hosted bookmarks and link sharing platform</span>
<span>🔗 Slash - An open source, self-hosted platform for sharing and managing your most frequently used links.</span>
<a
className="shadow flex flex-row justify-center items-center px-2 py-1 rounded-md text-sm sm:text-base text-white bg-blue-600 hover:bg-blue-700"
href="https://github.com/yourselfhosted/slash#deploy-with-docker-in-seconds"

View File

@ -2,8 +2,8 @@ import { Button, Input, Modal, ModalDialog } from "@mui/joy";
import { useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import useLoading from "../hooks/useLoading";
import useUserStore from "../stores/v1/user";
import useLoading from "@/hooks/useLoading";
import { useUserStore } from "@/stores";
import Icon from "./Icon";
interface Props {
@ -41,11 +41,14 @@ const EditUserinfoDialog: React.FC<Props> = (props: Props) => {
requestState.setLoading();
try {
await userStore.patchUser({
await userStore.patchUser(
{
id: currentUser.id,
email,
nickname,
});
},
["email", "nickname"],
);
onClose();
toast("User information updated");
} catch (error: any) {

View File

@ -0,0 +1,25 @@
import { Tooltip } from "@mui/joy";
import { useWorkspaceStore } from "@/stores";
import { FeatureType } from "@/stores/workspace";
import Icon from "./Icon";
interface Props {
feature: FeatureType;
className?: string;
}
const FeatureBadge = ({ feature, className }: Props) => {
const workspaceStore = useWorkspaceStore();
const isFeatureEnabled = workspaceStore.checkFeatureAvailable(feature);
if (isFeatureEnabled) {
return null;
}
return (
<Tooltip title="This feature is not available on your plan." className={className} placement="top" arrow>
<Icon.Sparkles />
</Tooltip>
);
};
export default FeatureBadge;

View File

@ -1,6 +1,5 @@
import { useTranslation } from "react-i18next";
import { convertVisibilityFromPb } from "@/utils/visibility";
import useViewStore from "../stores/v1/view";
import { useViewStore } from "@/stores";
import Icon from "./Icon";
import VisibilityIcon from "./VisibilityIcon";
@ -33,7 +32,7 @@ const FilterView = () => {
onClick={() => viewStore.setFilter({ visibility: undefined })}
>
<VisibilityIcon className="w-4 h-auto mr-1" visibility={filter.visibility} />
{t(`shortcut.visibility.${convertVisibilityFromPb(filter.visibility).toLowerCase()}.self`)}
{t(`shortcut.visibility.${filter.visibility.toLowerCase()}.self`)}
<Icon.X className="w-4 h-auto ml-1" />
</button>
)}

View File

@ -3,8 +3,8 @@ import { QRCodeCanvas } from "qrcode.react";
import { useRef } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { Shortcut } from "@/types/proto/api/v2/shortcut_service";
import { absolutifyLink } from "../helpers/utils";
import { absolutifyLink } from "@/helpers/utils";
import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
import Icon from "./Icon";
interface Props {
@ -25,12 +25,12 @@ const GenerateQRCodeDialog: React.FC<Props> = (props: Props) => {
const handleDownloadQRCodeClick = () => {
const canvas = containerRef.current?.querySelector("canvas");
if (!canvas) {
toast.error("Failed to get qr code canvas");
toast.error("Failed to get QR code canvas");
return;
}
const link = document.createElement("a");
link.download = "filename.png";
link.download = `${shortcut.title || shortcut.name}-qrcode.png`;
link.href = canvas.toDataURL();
link.click();
handleCloseBtnClick();
@ -47,7 +47,7 @@ const GenerateQRCodeDialog: React.FC<Props> = (props: Props) => {
</div>
<div>
<div ref={containerRef} className="w-full flex flex-row justify-center items-center mt-2 mb-6">
<QRCodeCanvas value={shortcutLink} size={128} bgColor={"#ffffff"} fgColor={"#000000"} includeMargin={false} level={"L"} />
<QRCodeCanvas value={shortcutLink} size={180} bgColor={"#ffffff"} fgColor={"#000000"} includeMargin={false} level={"L"} />
</div>
<div className="w-full flex flex-row justify-center items-center px-4">
<Button className="w-full" color="neutral" onClick={handleDownloadQRCodeClick}>

View File

@ -1,14 +1,13 @@
import { Avatar } from "@mui/joy";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { Link, useLocation } from "react-router-dom";
import { authServiceClient } from "@/grpcweb";
import useWorkspaceStore from "@/stores/v1/workspace";
import { PlanType } from "@/types/proto/api/v2/subscription_service";
import { Role } from "@/types/proto/api/v2/user_service";
import useUserStore from "../stores/v1/user";
import { useWorkspaceStore, useUserStore } from "@/stores";
import { PlanType } from "@/types/proto/api/v1/subscription_service";
import { Role } from "@/types/proto/api/v1/user_service";
import AboutDialog from "./AboutDialog";
import Icon from "./Icon";
import Logo from "./Logo";
import Dropdown from "./common/Dropdown";
const Header: React.FC = () => {
@ -17,10 +16,10 @@ const Header: React.FC = () => {
const workspaceStore = useWorkspaceStore();
const currentUser = useUserStore().getCurrentUser();
const [showAboutDialog, setShowAboutDialog] = useState<boolean>(false);
const profile = workspaceStore.profile;
const subscription = workspaceStore.getSubscription();
const isAdmin = currentUser.role === Role.ADMIN;
const shouldShowRouterSwitch = location.pathname === "/" || location.pathname === "/collections" || location.pathname === "/memos";
const selectedSection = location.pathname === "/" ? "Shortcuts" : location.pathname === "/collections" ? "Collections" : "Memos";
const shouldShowRouterSwitch = location.pathname === "/shortcuts" || location.pathname === "/collections";
const selectedSection = location.pathname === "/shortcuts" ? "Shortcuts" : location.pathname === "/collections" ? "Collections" : "";
const handleSignOutButtonClick = async () => {
await authServiceClient.signOut({});
@ -29,16 +28,17 @@ const Header: React.FC = () => {
return (
<>
<div className="w-full bg-gray-50 dark:bg-zinc-800 border-b border-b-gray-200 dark:border-b-zinc-800">
<div className="w-full max-w-8xl mx-auto px-3 md:px-12 py-3 flex flex-row justify-between items-center">
<div className="w-full bg-gray-50 dark:bg-black border-b border-b-gray-200 dark:border-b-zinc-800">
<div className="w-full max-w-8xl mx-auto px-4 sm:px-6 md:px-12 py-3 flex flex-row justify-between items-center">
<div className="flex flex-row justify-start items-center shrink mr-2">
<Link to="/" className="cursor-pointer flex flex-row justify-start items-center dark:text-gray-400" unstable_viewTransition>
<img id="logo-img" src="/logo.png" className="w-7 h-auto mr-2 -mt-0.5 dark:opacity-80 rounded-full shadow" alt="" />
<Link to="/" className="cursor-pointer flex flex-row justify-start items-center dark:text-gray-400" viewTransition>
<Logo className="mr-2" />
Slash
</Link>
{profile.plan === PlanType.PRO && (
{[PlanType.PRO, PlanType.ENTERPRISE].includes(subscription.plan) && (
<span className="ml-1 text-xs px-1.5 leading-5 border rounded-full bg-blue-600 border-blue-700 text-white shadow dark:opacity-70">
PRO
{/* PRO or ENT */}
{subscription.plan.substring(0, 3)}
</span>
)}
{shouldShowRouterSwitch && (
@ -56,15 +56,15 @@ const Header: React.FC = () => {
<>
<Link
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
to="/"
unstable_viewTransition
to="/shortcuts"
viewTransition
>
<Icon.SquareSlash className="w-5 h-auto mr-2 opacity-70" /> Shortcuts
</Link>
<Link
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
to="/collections"
unstable_viewTransition
viewTransition
>
<Icon.LibrarySquare className="w-5 h-auto mr-2 opacity-70" /> Collections
</Link>
@ -74,13 +74,12 @@ const Header: React.FC = () => {
</>
)}
</div>
<div className="relative flex-shrink-0">
<div className="relative shrink-0">
<Dropdown
trigger={
<button className="flex flex-row justify-end items-center cursor-pointer">
<Avatar size="sm" variant="plain" />
<span className="dark:text-gray-400">{currentUser.nickname}</span>
<Icon.ChevronDown className="ml-2 w-5 h-auto text-gray-600 dark:text-gray-400" />
<span className="dark:text-gray-400 max-w-20 truncate">{currentUser.nickname}</span>
<Icon.ChevronDown className="ml-1 w-5 h-auto text-gray-600 dark:text-gray-400" />
</button>
}
actionsClassName="!w-32"
@ -89,7 +88,7 @@ const Header: React.FC = () => {
<Link
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
to="/setting/general"
unstable_viewTransition
viewTransition
>
<Icon.User className="w-5 h-auto mr-2 opacity-70" /> {t("user.profile")}
</Link>
@ -97,7 +96,7 @@ const Header: React.FC = () => {
<Link
className="w-full px-2 flex flex-row justify-start items-center text-left dark:text-gray-400 leading-8 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-800 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:opacity-60"
to="/setting/workspace"
unstable_viewTransition
viewTransition
>
<Icon.Settings className="w-5 h-auto mr-2 opacity-70" /> {t("settings.self")}
</Link>

View File

@ -0,0 +1,35 @@
import { useState } from "react";
import Icon from "./Icon";
interface Props {
url: string;
}
const getFaviconUrlWithProvider = (url: string, provider: string) => {
try {
const searchParams = new URLSearchParams();
searchParams.set("domain", new URL(url).hostname);
searchParams.set("sz", "64");
return new URL(`?${searchParams.toString()}`, provider).toString();
} catch (error) {
return "";
}
};
const LinkFavicon = (props: Props) => {
const { url } = props;
const faviconProvider = "https://www.google.com/s2/favicons";
const [faviconUrl, setFaviconUrl] = useState<string>(getFaviconUrlWithProvider(url, faviconProvider));
const handleImgError = () => {
setFaviconUrl("");
};
return faviconUrl ? (
<img className="w-full h-auto rounded" src={faviconUrl} decoding="async" loading="lazy" onError={handleImgError} />
) : (
<Icon.CircleSlash className="w-full h-auto text-gray-400" strokeWidth={1.5} />
);
};
export default LinkFavicon;

View File

@ -0,0 +1,25 @@
import classNames from "classnames";
import { useWorkspaceStore } from "@/stores";
import { FeatureType } from "@/stores/workspace";
import Icon from "./Icon";
interface Props {
className?: string;
}
const Logo = ({ className }: Props) => {
const workspaceStore = useWorkspaceStore();
const hasCustomBranding = workspaceStore.checkFeatureAvailable(FeatureType.CustomeBranding);
const branding = hasCustomBranding && workspaceStore.setting.branding ? new TextDecoder().decode(workspaceStore.setting.branding) : "";
return (
<div className={classNames("w-8 h-auto dark:text-gray-500 rounded-lg overflow-hidden", className)}>
{branding ? (
<img src={branding} alt="branding" className="max-w-full max-h-full" />
) : (
<Icon.CircleSlash className="w-full h-auto" strokeWidth={1.5} />
)}
</div>
);
};
export default Logo;

View File

@ -0,0 +1,86 @@
import { Button, Input } from "@mui/joy";
import { FormEvent, useState } from "react";
import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { authServiceClient } from "@/grpcweb";
import useLoading from "@/hooks/useLoading";
import useNavigateTo from "@/hooks/useNavigateTo";
import { useUserStore } from "@/stores";
const PasswordAuthForm = () => {
const { t } = useTranslation();
const navigateTo = useNavigateTo();
const userStore = useUserStore();
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const actionBtnLoadingState = useLoading(false);
const allowConfirm = email.length > 0 && password.length > 0;
const handleEmailInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
const text = e.target.value as string;
setEmail(text);
};
const handlePasswordInputChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
const text = e.target.value as string;
setPassword(text);
};
const handleSigninBtnClick = async (e: FormEvent) => {
e.preventDefault();
if (actionBtnLoadingState.isLoading) {
return;
}
try {
actionBtnLoadingState.setLoading();
const user = await authServiceClient.signIn({ email, password });
if (user) {
userStore.setCurrentUserId(user.id);
await userStore.fetchCurrentUser();
navigateTo("/");
} else {
toast.error("Signin failed");
}
} catch (error: any) {
console.error(error);
toast.error(error.details);
}
actionBtnLoadingState.setFinish();
};
return (
<form className="w-full mt-6" onSubmit={handleSigninBtnClick}>
<div className={`flex flex-col justify-start items-start w-full ${actionBtnLoadingState.isLoading ? "opacity-80" : ""}`}>
<div className="w-full flex flex-col mb-2">
<span className="leading-8 mb-1 text-gray-600">{t("common.email")}</span>
<Input
className="w-full py-3"
type="email"
value={email}
placeholder="slash@yourselfhosted.com"
onChange={handleEmailInputChanged}
/>
</div>
<div className="w-full flex flex-col mb-2">
<span className="leading-8 text-gray-600">{t("common.password")}</span>
<Input className="w-full py-3" type="password" value={password} placeholder="····" onChange={handlePasswordInputChanged} />
</div>
</div>
<div className="w-full flex flex-row justify-end items-center mt-4 space-x-2">
<Button
className="w-full"
type="submit"
color="primary"
loading={actionBtnLoadingState.isLoading}
disabled={actionBtnLoadingState.isLoading || !allowConfirm}
onClick={handleSigninBtnClick}
>
{t("auth.sign-in")}
</Button>
</div>
</form>
);
};
export default PasswordAuthForm;

Some files were not shown because too many files have changed in this diff Show More