mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 16:28:31 +00:00
* chore(deps): update Iconoir to 7.12.2 * test: update grid visibility selector for Iconoir 7 * fix: restore open and slashed eye icons * docs: document Iconoir 7 plugin changes
41 lines
948 B
JavaScript
41 lines
948 B
JavaScript
export const STATES = {
|
|
private: {
|
|
color: 'neutral',
|
|
icon: 'baserow-icon-eye-off',
|
|
label: 'userTemplateList.statePrivate',
|
|
},
|
|
in_review: {
|
|
color: 'yellow',
|
|
icon: 'iconoir-clock',
|
|
label: 'userTemplateList.stateInReview',
|
|
},
|
|
rejected: {
|
|
color: 'red',
|
|
icon: 'baserow-icon-eye-off',
|
|
label: 'userTemplateList.stateRejected',
|
|
},
|
|
blocked: {
|
|
color: 'red',
|
|
icon: 'iconoir-warning-triangle',
|
|
label: 'userTemplateList.stateBlocked',
|
|
},
|
|
public: {
|
|
color: 'green',
|
|
icon: 'baserow-icon-eye',
|
|
label: 'userTemplateList.statePublic',
|
|
},
|
|
}
|
|
|
|
export function getState(state, t) {
|
|
const known = STATES[state]
|
|
return known
|
|
? { color: known.color, icon: known.icon, label: t(known.label) }
|
|
: { color: 'neutral', icon: null, label: state }
|
|
}
|
|
|
|
export function showsListed(template) {
|
|
return Boolean(
|
|
template.listed && ['in_review', 'rejected'].includes(template.state)
|
|
)
|
|
}
|