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:
Rijk van Zanten
2021-09-14 18:07:46 -04:00
committed by GitHub
parent 1f94542c2c
commit d750c7ebc4
19 changed files with 560 additions and 220 deletions

View 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');
});
}