-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathfileStatus.js
More file actions
46 lines (42 loc) · 1.04 KB
/
fileStatus.js
File metadata and controls
46 lines (42 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* SPDX-FileCopyrightText: 2025 LibreCode coop and contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import svgFile from '@mdi/svg/svg/file.svg?raw'
import svgFractionOneHalf from '@mdi/svg/svg/fraction-one-half.svg?raw'
import svgSignatureFreehand from '@mdi/svg/svg/signature-freehand.svg?raw'
import svgSignature from '@mdi/svg/svg/signature.svg?raw'
import { translate as t } from '@nextcloud/l10n'
const colorize = (svg, color) => {
return svg.replace('<path ', `<path fill="${color}" `)
}
export const fileStatus = [
{
id: -1,
label: t('libresign', 'not a LibreSign file'),
},
{
id: 0,
icon: colorize(svgFile, '#9E9E9E'),
label: t('libresign', 'draft'),
},
{
id: 1,
icon: colorize(svgSignature, '#D4A843'),
label: t('libresign', 'available for signature'),
},
{
id: 2,
icon: colorize(svgFractionOneHalf, '#D4A843'),
label: t('libresign', 'partially signed'),
},
{
id: 3,
icon: colorize(svgSignatureFreehand, '#4CAF50'),
label: t('libresign', 'signed'),
},
{
id: 4,
label: t('deleted'),
},
]