Spaces:
Sleeping
Sleeping
Esteves Enzo
commited on
Commit
•
62b480a
1
Parent(s):
f803d8b
add wip badge
Browse files- components/editor/sidebar.tsx +20 -9
- utils/datas/api_collections.ts +1 -0
- utils/type.ts +1 -0
components/editor/sidebar.tsx
CHANGED
@@ -45,20 +45,31 @@ export const EditorSidebar = ({
|
|
45 |
collections.includes(collection.key),
|
46 |
}
|
47 |
)}
|
48 |
-
onClick={() =>
|
|
|
|
|
|
|
|
|
49 |
>
|
50 |
<p className="font-semibold uppercase text-xs flex items-center justify-between">
|
51 |
{collection.key} API
|
52 |
</p>
|
53 |
-
<
|
54 |
-
|
55 |
-
"text-
|
56 |
-
|
57 |
-
|
58 |
-
collections.includes(collection.key),
|
59 |
-
}
|
60 |
)}
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</div>
|
63 |
{collections.includes(collection.key) && (
|
64 |
<div className="bg-slate-700/20 w-full p-3 border-b border-slate-700/70">
|
|
|
45 |
collections.includes(collection.key),
|
46 |
}
|
47 |
)}
|
48 |
+
onClick={() =>
|
49 |
+
collection.wip
|
50 |
+
? () => {}
|
51 |
+
: handleSetActiveCollection(collection.key)
|
52 |
+
}
|
53 |
>
|
54 |
<p className="font-semibold uppercase text-xs flex items-center justify-between">
|
55 |
{collection.key} API
|
56 |
</p>
|
57 |
+
<div className="flex items-center justify-end gap-2">
|
58 |
+
{collection?.wip && (
|
59 |
+
<span className="bg-yellow-500/20 text-yellow-600 text-xs font-semibold uppercase px-2 py-1 rounded-full">
|
60 |
+
wip
|
61 |
+
</span>
|
|
|
|
|
62 |
)}
|
63 |
+
<TbChevronDown
|
64 |
+
className={classNames(
|
65 |
+
"text-slate-400 transition-all duration-200",
|
66 |
+
{
|
67 |
+
"transform rotate-180 !text-slate-100":
|
68 |
+
collections.includes(collection.key),
|
69 |
+
}
|
70 |
+
)}
|
71 |
+
/>
|
72 |
+
</div>
|
73 |
</div>
|
74 |
{collections.includes(collection.key) && (
|
75 |
<div className="bg-slate-700/20 w-full p-3 border-b border-slate-700/70">
|
utils/datas/api_collections.ts
CHANGED
@@ -146,6 +146,7 @@ export const API_COLLECTIONS: Array<ApiCollection> = [{
|
|
146 |
},
|
147 |
{
|
148 |
key: 'collection',
|
|
|
149 |
endpoints: [{
|
150 |
method: 'POST',
|
151 |
path: '/api/collections/create',
|
|
|
146 |
},
|
147 |
{
|
148 |
key: 'collection',
|
149 |
+
wip: true,
|
150 |
endpoints: [{
|
151 |
method: 'POST',
|
152 |
path: '/api/collections/create',
|
utils/type.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
export interface ApiCollection {
|
2 |
key: string
|
3 |
endpoints: Array<ApiRoute>
|
|
|
4 |
}
|
5 |
|
6 |
export interface ApiRoute {
|
|
|
1 |
export interface ApiCollection {
|
2 |
key: string
|
3 |
endpoints: Array<ApiRoute>
|
4 |
+
wip?: boolean
|
5 |
}
|
6 |
|
7 |
export interface ApiRoute {
|