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:
Rijk van Zanten
2020-03-11 11:33:57 -04:00
committed by GitHub
parent 971876d018
commit 2c5a56acfc
7 changed files with 12 additions and 8 deletions

View File

@@ -1,7 +1,6 @@
<template>
<div
class="v-progress-linear"
:style="styles"
:class="{
absolute,
bottom,

View File

@@ -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;

View File

@@ -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 = {

View File

@@ -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'),

View File

@@ -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),

View File

@@ -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 = {

View File

@@ -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);
}