|
|
@@ -1,4 +1,4 @@
|
|
|
-import { Plugin } from 'app/types';
|
|
|
+import { Plugin, PanelPlugin } from 'app/types';
|
|
|
|
|
|
export const getMockPlugins = (amount: number): Plugin[] => {
|
|
|
const plugins = [];
|
|
|
@@ -17,7 +17,7 @@ export const getMockPlugins = (amount: number): Plugin[] => {
|
|
|
description: 'pretty decent plugin',
|
|
|
links: ['one link'],
|
|
|
logos: { small: 'small/logo', large: 'large/logo' },
|
|
|
- screenshots: `screenshot/${i}`,
|
|
|
+ screenshots: [{ path: `screenshot/${i}` }],
|
|
|
updated: '2018-09-26',
|
|
|
version: '1',
|
|
|
},
|
|
|
@@ -33,6 +33,39 @@ export const getMockPlugins = (amount: number): Plugin[] => {
|
|
|
return plugins;
|
|
|
};
|
|
|
|
|
|
+export const getPanelPlugin = (options: { id: string; sort?: number; hideFromList?: boolean }): PanelPlugin => {
|
|
|
+ const info = {
|
|
|
+ author: {
|
|
|
+ name: options.id + 'name',
|
|
|
+ },
|
|
|
+ description: '',
|
|
|
+ links: [],
|
|
|
+ logos: {
|
|
|
+ large: '',
|
|
|
+ small: '',
|
|
|
+ },
|
|
|
+ screenshots: [],
|
|
|
+ updated: '',
|
|
|
+ version: '',
|
|
|
+ };
|
|
|
+
|
|
|
+ return {
|
|
|
+ id: options.id,
|
|
|
+ name: options.id,
|
|
|
+ sort: options.sort || 1,
|
|
|
+ meta: {
|
|
|
+ id: options.id,
|
|
|
+ name: options.id,
|
|
|
+ info: info,
|
|
|
+ includes: [],
|
|
|
+ },
|
|
|
+ info: info,
|
|
|
+ hideFromList: options.hideFromList,
|
|
|
+ module: '',
|
|
|
+ baseUrl: '',
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
export const getMockPlugin = () => {
|
|
|
return {
|
|
|
defaultNavUrl: 'some/url',
|
|
|
@@ -47,7 +80,7 @@ export const getMockPlugin = () => {
|
|
|
description: 'pretty decent plugin',
|
|
|
links: ['one link'],
|
|
|
logos: { small: 'small/logo', large: 'large/logo' },
|
|
|
- screenshots: 'screenshot/1',
|
|
|
+ screenshots: [{ path: `screenshot` }],
|
|
|
updated: '2018-09-26',
|
|
|
version: '1',
|
|
|
},
|