mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Create define (#156)
* Delete unused styles from linear progress * Allow vuei18n result as name in table haeder * Rename createX to defineX * Fix styling glitch in private view
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
class="v-progress-linear"
|
||||
:style="styles"
|
||||
:class="{
|
||||
absolute,
|
||||
bottom,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import VueI18n from 'vue-i18n';
|
||||
|
||||
export type Alignment = 'left' | 'center' | 'right';
|
||||
|
||||
export type HeaderRaw = {
|
||||
text: string;
|
||||
text: string | VueI18n.TranslateResult;
|
||||
value: string;
|
||||
align?: Alignment;
|
||||
sortable?: boolean;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { i18n } from '@/lang/';
|
||||
import { Layout, LayoutOptions, LayoutContext } from './types';
|
||||
|
||||
export function createLayout(options: LayoutOptions): Layout {
|
||||
export function defineLayout(options: LayoutOptions): Layout {
|
||||
const context: LayoutContext = { i18n };
|
||||
|
||||
const config = {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createLayout } from '@/layouts/create';
|
||||
import { defineLayout } from '@/layouts/define';
|
||||
import TabularLayout from './tabular.vue';
|
||||
|
||||
export default createLayout({
|
||||
export default defineLayout({
|
||||
id: 'tabular',
|
||||
register: ({ i18n }) => ({
|
||||
name: i18n.t('layouts.tabular.tabular'),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import CollectionsOverview from './routes/collections-overview.vue';
|
||||
import { createModule } from '@/modules/create';
|
||||
import { defineModule } from '@/modules/define';
|
||||
|
||||
export default createModule({
|
||||
export default defineModule({
|
||||
id: 'collections',
|
||||
register: ({ i18n }) => ({
|
||||
name: i18n.tc('collection', 2),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { i18n } from '@/lang/';
|
||||
import { Module, ModuleOptions, ModuleContext } from './types';
|
||||
|
||||
export function createModule(options: ModuleOptions): Module {
|
||||
export function defineModule(options: ModuleOptions): Module {
|
||||
const context: ModuleContext = { i18n };
|
||||
|
||||
const config = {
|
||||
@@ -140,8 +140,11 @@ export default defineComponent({
|
||||
|
||||
.content {
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
main {
|
||||
height: calc(100% - 112px); /* TODO: add "collapsed" header state support */
|
||||
padding: var(--private-view-content-padding);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user