@tanglemedia/directus-collection-modal
Version:
Installs the Modal Collection to your Directus project.
46 lines (42 loc) • 819 B
JavaScript
const MODAL_TABLE_NAME = "tngl_modal";
// preset that applies to any user or role
const MODAL_FIELDS_PRESET = [
{
bookmark: null,
user: null,
role: null,
collection: MODAL_TABLE_NAME,
search: null,
layout: "tabular",
layout_query: {
tabular: {
fields: ["enable", "type", "heading", "content"],
},
},
layout_options: {
tabular: {
widths: {
content: 315.807373046875,
heading: 236.56683349609375,
},
},
},
refresh_interval: null,
filter: null,
icon: "bookmark",
color: null,
},
];
export async function up(knex) {
await knex("directus_presets").insert(MODAL_FIELDS_PRESET);
}
export async function down(knex) {
await knex("directus_presets")
.where({
user: null,
role: null,
bookmark: null,
collection: MODAL_TABLE_NAME,
})
.del();
}