@open-commune/web 0.2.3 → 0.2.4
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/constants/statuses.ts +29 -0
- package/package.json +2 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PUBLICATION_STATUSES,
|
|
3
|
+
type PublicationStatus,
|
|
4
|
+
} from '@open-commune/core/collections/constants';
|
|
5
|
+
|
|
6
|
+
interface Presentation {
|
|
7
|
+
label: string;
|
|
8
|
+
color: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* How each publication status is shown. Typed against the core's union, so a
|
|
13
|
+
* status added there fails to compile here rather than reaching a screen that
|
|
14
|
+
* quietly ignores it.
|
|
15
|
+
*/
|
|
16
|
+
const PRESENTATION: Record<PublicationStatus, Presentation> = {
|
|
17
|
+
draft: { label: 'Brouillon', color: '#9ca3af' },
|
|
18
|
+
waiting: { label: 'À valider', color: '#facc15' },
|
|
19
|
+
ready: { label: 'Prêt', color: '#60a5fa' },
|
|
20
|
+
scheduled: { label: 'Programmé', color: '#c4b5fd' },
|
|
21
|
+
published: { label: 'Publié', color: '#34d399' },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const STATUSES = PUBLICATION_STATUSES.map((value) => ({
|
|
25
|
+
value,
|
|
26
|
+
...PRESENTATION[value],
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
export const ALL_STATUSES = [...PUBLICATION_STATUSES];
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"description": "The Open Commune application: the admin interface and the server, on a single origin.",
|
|
42
42
|
"license": "AGPL-3.0-or-later",
|
|
43
|
-
"version": "0.2.
|
|
43
|
+
"version": "0.2.4",
|
|
44
44
|
"type": "module",
|
|
45
45
|
"main": "./nuxt.config.ts",
|
|
46
46
|
"files": [
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"nuxt.config.ts",
|
|
50
50
|
"assets",
|
|
51
51
|
"components",
|
|
52
|
+
"constants",
|
|
52
53
|
"composables",
|
|
53
54
|
"editor",
|
|
54
55
|
"layouts",
|