From c4aedf813988a40d731cfdca706060b348613b5d Mon Sep 17 00:00:00 2001 From: Stanislav Romanov Date: Wed, 13 Apr 2022 10:52:57 +0300 Subject: [PATCH] Add addon ember-royal-table --- app/styles/app.css | 39 +++++++ app/templates/admin/indexes/item/settings.hbs | 103 +++++++----------- ember-cli-build.js | 13 +-- package-lock.json | 23 ++++ package.json | 1 + 5 files changed, 107 insertions(+), 72 deletions(-) diff --git a/app/styles/app.css b/app/styles/app.css index 7d91700..f65e707 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -6,3 +6,42 @@ .md-icon { fill: currentColor; } + +.royal-table { + @apply border border-light text-left mb-4; + + thead { + @apply bg-light; + + tr { + @apply border-b border-light; + + th { + @apply px-4 py-4 text-dark font-normal whitespace-nowrap; + + &[type="button"] { + @apply cursor-pointer select-none; + } + + svg { + width: 1em; + height: 1em; + bottom: .1em; + position: relative; + } + } + } + } + + tbody { + tr { + &:nth-child(even) { + @apply bg-light; + } + + td { + @apply px-4 py-2 text-dark; + } + } + } +} diff --git a/app/templates/admin/indexes/item/settings.hbs b/app/templates/admin/indexes/item/settings.hbs index b52e888..801c536 100644 --- a/app/templates/admin/indexes/item/settings.hbs +++ b/app/templates/admin/indexes/item/settings.hbs @@ -1,63 +1,47 @@ -{{page-title "Settings"}} - -{{#let (hash td="px-4 py-2 text-left whitespace-nowrap") as |classes|}} - - - - - - - - - - - - - {{#each @model.attributes as |attribute|}} - - - - - - - - {{/each}} - -
#DisplayedFilterableSearchableSortable
{{attribute.name}} - - - - - - - -
-{{/let}} - +{{page-title 'Settings'}} + + + + + + + + + + + + + + + + + @allowClear={{true}} as |option| +> {{option}} -
- + - + {{item}} + @placeholder="Add field" as |option| + > {{option}} {{/if}}
- - -