From d715f86b347e39beb1f14964e78cbae32016262f Mon Sep 17 00:00:00 2001 From: Ben Haynes Date: Wed, 13 May 2020 14:06:14 -0400 Subject: [PATCH] Combine layout options (#563) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * icon width * updated pagination style * file preview zoom WIP — shouldn’t show up on MODAL preview * overlay/modal close button styling * duplicate key * bookmark styling * card fade also adds an rgb value for the page background variable * style per page dropdown * cards per page dropdown color * inset non-dense notifications within sidebar * reduce border radius for xs avatars * hide non-expanded prepend/append * reduce sidebar padding this gives content a bit more room * WIP: split and update comments and revisions work in progress * fix collections module name * fix file library title * consistent border on disabled * fix title/breadcrumb positioning * breadcrumb fixes * add “open” button to image interface WIP — this needs the actual logic, and we might want to remove a button * hide presets delete until selection * image shadow and subtext color * Remove breadcrumb calculation * increase contrast for image subtitle * fix textarea hover style * Update src/modules/collections/index.ts * Fix typing of translateresult to format * Add undefined check to collection name * Put v-if on dialog instead of button * Remove breadcrumb logic * Remove breadcrumb calculation * Rename shadow to collapsed in header bar * fix rating star display going over table header * show collection breadcrumb for bookmarks WIP — needs the formatted collection title * shorter error to avoid wrapping * remove periods * new grid layout icon * better inline divier text styling * add v-detail and update layouts to use it * Finish readme of detail * Use translations for default value in title * Add layout options translation * Don't have margin on base component * Add margin to v-detail * Remove duplicated style * Update src/layouts/cards/cards.vue Co-authored-by: rijkvanzanten --- src/components/register.ts | 2 + src/components/v-detail/index.ts | 4 ++ src/components/v-detail/readme.md | 30 ++++++++ src/components/v-detail/v-detail.vue | 64 +++++++++++++++++ src/components/v-divider/v-divider.vue | 3 + src/lang/en-US/index.json | 7 +- src/layouts/cards/cards.vue | 68 +++++++++---------- src/layouts/cards/index.ts | 2 +- src/layouts/tabular/tabular.vue | 50 +++++++------- .../layout-drawer-detail.vue | 31 ++++++++- 10 files changed, 197 insertions(+), 64 deletions(-) create mode 100644 src/components/v-detail/index.ts create mode 100644 src/components/v-detail/readme.md create mode 100644 src/components/v-detail/v-detail.vue diff --git a/src/components/register.ts b/src/components/register.ts index 2495299b21..7980deaef6 100644 --- a/src/components/register.ts +++ b/src/components/register.ts @@ -7,6 +7,7 @@ import VBreadcrumb from './v-breadcrumb'; import VCard, { VCardActions, VCardTitle, VCardSubtitle, VCardText } from './v-card'; import VCheckbox from './v-checkbox/'; import VChip from './v-chip/'; +import VDetail from './v-detail'; import VDialog from './v-dialog'; import VDivider from './v-divider'; import VFancySelect from './v-fancy-select'; @@ -54,6 +55,7 @@ Vue.component('v-card-text', VCardText); Vue.component('v-card-actions', VCardActions); Vue.component('v-checkbox', VCheckbox); Vue.component('v-chip', VChip); +Vue.component('v-detail', VDetail); Vue.component('v-dialog', VDialog); Vue.component('v-divider', VDivider); Vue.component('v-fancy-select', VFancySelect); diff --git a/src/components/v-detail/index.ts b/src/components/v-detail/index.ts new file mode 100644 index 0000000000..151eae0a6a --- /dev/null +++ b/src/components/v-detail/index.ts @@ -0,0 +1,4 @@ +import VDetail from './v-detail.vue'; + +export { VDetail }; +export default VDetail; diff --git a/src/components/v-detail/readme.md b/src/components/v-detail/readme.md new file mode 100644 index 0000000000..b8c8b14f2e --- /dev/null +++ b/src/components/v-detail/readme.md @@ -0,0 +1,30 @@ +# Detail + +Allows for collapsable content + +## Usage + +```html + +``` + +## Props + +| Prop | Description | Default | +|----------|---------------------|---------| +| `active` | Used with `v-model` | `false` | + +## Events +| Event | Description | Value | +|----------|-----------------------------|-----------| +| `toggle` | New active value of divider | `boolean` | + +## Slots + +| Slot | Description | Data | +|-----------|-------------------------------|-----------------------| +| _default_ | Content of the detail section | | +| `title` | Content to render in divider | `{ active: boolean }` | + +## CSS Variables +n/a diff --git a/src/components/v-detail/v-detail.vue b/src/components/v-detail/v-detail.vue new file mode 100644 index 0000000000..a6d4527e53 --- /dev/null +++ b/src/components/v-detail/v-detail.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/src/components/v-divider/v-divider.vue b/src/components/v-divider/v-divider.vue index 3337df6f20..b0a8b84769 100644 --- a/src/components/v-divider/v-divider.vue +++ b/src/components/v-divider/v-divider.vue @@ -73,6 +73,9 @@ body { span.wrapper { order: 0; + margin-right: 8px; + font-weight: 600; + font-size: 14px; } hr { diff --git a/src/lang/en-US/index.json b/src/lang/en-US/index.json index dc5340f259..3f579c15a5 100644 --- a/src/lang/en-US/index.json +++ b/src/lang/en-US/index.json @@ -108,10 +108,9 @@ "date-fns_datetime": "PPP h:mma", "date-fns_date": "PPP", + "date-fns_time": "h:mma", "date-fns_date_short": "MMM d, u", "date-fns_date_short_no_year": "MMM d", - "date-fns_time": "h:mma", - "month": "Month", "date": "Date", "year": "Year", @@ -371,7 +370,8 @@ "upload_pending": "Upload Pending", "drag_file_here": "Drag & Drop a File Here", "click_to_browse": "Click to Browse", - "layout_type": "Layout Type", + "layout_type": "{layout} Layout", + "layout_options": "Layout Options", "setup": "Setup", "none": "None", @@ -518,6 +518,7 @@ "editing_preset": "Editing Preset", "layout_preview": "Layout Preview", + "layout_setup": "Layout Setup", "about_directus": "About Directus", "activity_log": "Activity Log", diff --git a/src/layouts/cards/cards.vue b/src/layouts/cards/cards.vue index 094da4de46..1d59ad426c 100644 --- a/src/layouts/cards/cards.vue +++ b/src/layouts/cards/cards.vue @@ -1,22 +1,32 @@