mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Move module setup to Project Settings (#8012)
* Move module bar setup to project settings * Add system modules interface to dnd configure module bar * Cleanup order * Crucially important typo * Add ability to add custom links * Show correct initial value marker
This commit is contained in:
55
api/src/database/migrations/20210910A-move-module-setup.ts
Normal file
55
api/src/database/migrations/20210910A-move-module-setup.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('directus_roles', (table) => {
|
||||
table.dropColumn('module_list');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('directus_settings', (table) => {
|
||||
table.json('module_bar').defaultTo(
|
||||
JSON.stringify([
|
||||
{
|
||||
type: 'module',
|
||||
id: 'collections',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'users',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'files',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'insights',
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'docs',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'settings',
|
||||
enabled: true,
|
||||
locked: true,
|
||||
},
|
||||
])
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('directus_roles', (table) => {
|
||||
table.json('module_list');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('directus_settings', (table) => {
|
||||
table.dropColumn('module_bar');
|
||||
});
|
||||
}
|
||||
@@ -54,39 +54,6 @@ fields:
|
||||
- last_name
|
||||
width: full
|
||||
|
||||
- field: module_list
|
||||
interface: list
|
||||
options:
|
||||
template: '{{ name }}'
|
||||
addLabel: Add New Module...
|
||||
fields:
|
||||
- name: $t:field_options.directus_roles.fields.icon_name
|
||||
field: icon
|
||||
type: string
|
||||
meta:
|
||||
interface: select-icon
|
||||
width: half
|
||||
- name: $t:field_options.directus_roles.fields.name_name
|
||||
field: name
|
||||
type: string
|
||||
meta:
|
||||
interface: input
|
||||
width: half
|
||||
options:
|
||||
iconRight: title
|
||||
placeholder:
|
||||
- name: $t:field_options.directus_roles.fields.link_name
|
||||
field: link
|
||||
type: string
|
||||
meta:
|
||||
interface: input
|
||||
width: full
|
||||
options:
|
||||
iconRight: link
|
||||
placeholder: $t:field_options.directus_roles.fields.link_placeholder
|
||||
special: json
|
||||
width: full
|
||||
|
||||
- field: collection_list
|
||||
interface: list
|
||||
options:
|
||||
|
||||
@@ -332,3 +332,7 @@ fields:
|
||||
type:
|
||||
_neq: 'raster'
|
||||
hidden: true
|
||||
|
||||
- field: module_bar
|
||||
interface: system-modules
|
||||
special: json
|
||||
|
||||
Reference in New Issue
Block a user