debian-mirror-gitlab/app/assets/javascripts/groups/store/utils.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
750 B
JavaScript
Raw Normal View History

2023-05-27 22:25:52 +05:30
import { WORKSPACE_GROUP, WORKSPACE_PROJECT } from '~/issues/constants';
2021-02-22 17:27:13 +05:30
export const getGroupItemMicrodata = ({ type }) => {
const defaultMicrodata = {
itemscope: true,
itemtype: 'https://schema.org/Thing',
itemprop: 'owns',
imageItemprop: 'image',
nameItemprop: 'name',
descriptionItemprop: 'description',
};
switch (type) {
2023-05-27 22:25:52 +05:30
case WORKSPACE_GROUP:
2021-02-22 17:27:13 +05:30
return {
...defaultMicrodata,
itemtype: 'https://schema.org/Organization',
itemprop: 'subOrganization',
imageItemprop: 'logo',
};
2023-05-27 22:25:52 +05:30
case WORKSPACE_PROJECT:
2021-02-22 17:27:13 +05:30
return {
...defaultMicrodata,
itemtype: 'https://schema.org/SoftwareSourceCode',
};
default:
return defaultMicrodata;
}
};