Skip to content

Commit a8fe103

Browse files
authored
Merge pull request #2 from Qualsu/0.4.0
0.4.0
2 parents fc56c9c + d04205b commit a8fe103

111 files changed

Lines changed: 2081 additions & 1262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ yarn-error.log*
3535
next-env.d.ts
3636

3737
public/*.js
38-
public/*.map
38+
public/*.map
39+
certificates

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
# Notter
44

5-
[notter.tech](https://notter.tech)
5+
[notter.su](https://notter.su)
66

77
# Stack
88

9-
<p>
10-
<img src="https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white" width="150px" height="33px">
11-
<img src="https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB" width="105px" height="35px">
12-
<img src="https://img.shields.io/badge/Next-black?style=for-the-badge&logo=next.js&logoColor=white" width="100px" height="35px">
13-
<img src="https://camo.githubusercontent.com/fec464f064b78abf13719d8fb0450ea14277a027e61643d7252d1ef4a4e1a72b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73686164636e2f75692d3030303030302e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d73686164636e2f7569266c6f676f436f6c6f723d7768697465" width="145px" height="34px">
14-
<img src="https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white" width="140px" height="32px">
15-
<img src="https://i.ibb.co/pvMBqZp/convex-Badge.png" width="100px" height="33px">
16-
<img src="https://camo.githubusercontent.com/b9a0233829c27ddd06dccd50688eb9b01a68f9f86c0375235736d0a00cf23a82/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436c65726b2d3643343746462e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d436c65726b266c6f676f436f6c6f723d7768697465" width="105px" height="33px">
17-
</p>
9+
![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white)
10+
![React](https://img.shields.io/badge/React-61DAFB?style=flat-square&logo=react&logoColor=black)
11+
![Next.js](https://img.shields.io/badge/Next.js-000000?style=flat-square&logo=next.js&logoColor=white)
12+
![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-38B2AC?style=flat-square&logo=tailwind-css&logoColor=white)
13+
![shadcn/ui](https://img.shields.io/badge/shadcn/ui-000000?style=flat-square&logo=shadcn/ui&logoColor=white)
14+
![Convex](https://img.shields.io/badge/Convex-FF6B35?style=flat-square&logo=data:image/svg+xml,)
15+
![Clerk](https://img.shields.io/badge/Clerk-6C4CF3?style=flat-square&logo=clerk&logoColor=white)

convex/document.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,23 @@ export const removeCoverImage = mutation({
475475
}
476476
})
477477

478+
export const incrementViews = mutation({
479+
args: {
480+
id: v.id("documents"),
481+
},
482+
handler: async (ctx, args) => {
483+
const document = await ctx.db.get(args.id)
484+
485+
if (!document || !document.isPublished || document.isAcrhived) {
486+
return
487+
}
488+
489+
await ctx.db.patch(args.id, {
490+
views: (document.views ?? 0) + 1,
491+
})
492+
}
493+
})
494+
478495
export const getTestPage = query({
479496
handler: async (ctx) => {
480497
const document = await ctx.db.query("documents")

convex/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default defineSchema({
1717
isPublished: v.boolean(),
1818
lastEditor: v.optional(v.string()),
1919
verifed: v.optional(v.boolean()),
20+
views: v.optional(v.number()),
2021
})
2122
.index("by_user", ["userId"])
2223
.index("by_user_parent", ["userId", "parentDocument"])

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "notter",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7+
"dev-https": "next dev --experimental-https",
78
"build": "next build",
89
"start": "next start",
910
"lint": "next lint"

public/badge/verifed.png

19.8 KB
Loading

public/icon/Gem.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

public/icon/ecosystemDark.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

public/icon/lampDark.svg

Lines changed: 0 additions & 6 deletions
This file was deleted.

public/icon/optionsDark.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)