create-nextop-app 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
1
3
|
import Image from 'next/image'
|
|
2
4
|
import Link from 'next/link'
|
|
3
|
-
|
|
5
|
+
import { useFs, useWindow } from 'nextop-app'
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
|
|
@@ -11,6 +13,9 @@ import Link from 'next/link'
|
|
|
11
13
|
|
|
12
14
|
export default function Page() {
|
|
13
15
|
|
|
16
|
+
const { writeFile } = useFs()
|
|
17
|
+
const { close, maximize, minimize } = useWindow()
|
|
18
|
+
|
|
14
19
|
return (
|
|
15
20
|
<main
|
|
16
21
|
className='flex flex-col gap-4 items-center justify-center h-screen'
|
|
@@ -29,6 +34,43 @@ export default function Page() {
|
|
|
29
34
|
<label>
|
|
30
35
|
For contrubition <Link href={'https://github.com/FlyingTurkman/nextop-app'} className='underline text-lg font-semibold'>NextOP</Link>
|
|
31
36
|
</label>
|
|
37
|
+
<button
|
|
38
|
+
className='p-2 bg-[#1a1a1a] text-white rounded-md cursor-pointer'
|
|
39
|
+
onClick={() => {
|
|
40
|
+
writeFile('nextop.txt', 'This is a text file created by nextop')
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
Create a text file
|
|
44
|
+
</button>
|
|
45
|
+
<div
|
|
46
|
+
className='flex flex-row items-center gap-4'
|
|
47
|
+
>
|
|
48
|
+
<button
|
|
49
|
+
className='p-2 bg-[#1a1a1a] text-white rounded-md cursor-pointer'
|
|
50
|
+
onClick={() => {
|
|
51
|
+
minimize()
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
Minimize
|
|
55
|
+
</button>
|
|
56
|
+
<button
|
|
57
|
+
className='p-2 bg-[#1a1a1a] text-white rounded-md cursor-pointer'
|
|
58
|
+
onClick={() => {
|
|
59
|
+
maximize()
|
|
60
|
+
}}
|
|
61
|
+
>
|
|
62
|
+
Maximize
|
|
63
|
+
</button>
|
|
64
|
+
<button
|
|
65
|
+
className='p-2 bg-[#1a1a1a] text-white rounded-md cursor-pointer'
|
|
66
|
+
onClick={() => {
|
|
67
|
+
close()
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
Close
|
|
71
|
+
</button>
|
|
72
|
+
|
|
73
|
+
</div>
|
|
32
74
|
</main>
|
|
33
75
|
)
|
|
34
76
|
}
|