From c840a9e6a4643db9b339621255a0198bcb2c8ada Mon Sep 17 00:00:00 2001 From: Jeff Daley Date: Thu, 26 Oct 2023 10:34:00 -0400 Subject: [PATCH 1/3] Add `EmptyStateAddButton` component --- .../sidebar/empty-state-add-button.gts | 40 +++++++++++++++++++ .../sidebar/related-resources/list.hbs | 25 +++--------- web/package.json | 1 + web/yarn.lock | 11 +++++ 4 files changed, 57 insertions(+), 20 deletions(-) create mode 100644 web/app/components/document/sidebar/empty-state-add-button.gts diff --git a/web/app/components/document/sidebar/empty-state-add-button.gts b/web/app/components/document/sidebar/empty-state-add-button.gts new file mode 100644 index 000000000..379bb7fab --- /dev/null +++ b/web/app/components/document/sidebar/empty-state-add-button.gts @@ -0,0 +1,40 @@ +import Component from "@glimmer/component"; +import Action from "hermes/components/action"; +import EmptyStateText from "hermes/components/empty-state-text"; +import FlightIcon from "@hashicorp/ember-flight-icons/components/flight-icon"; +import { on } from "@ember/modifier"; + +interface DocumentSidebarEmptyStateAddButtonSignature { + Element: HTMLButtonElement; + Args: { + editingIsDisabled?: boolean; + action: () => void; + }; +} + +export default class DocumentSidebarEmptyStateAddButton extends Component { + +} + +declare module "@glint/environment-ember-loose/registry" { + export default interface Registry { + "Document::Sidebar::EmptyStateAddButton": typeof DocumentSidebarEmptyStateAddButton; + } +} diff --git a/web/app/components/document/sidebar/related-resources/list.hbs b/web/app/components/document/sidebar/related-resources/list.hbs index e90ef58eb..1f91b44d4 100644 --- a/web/app/components/document/sidebar/related-resources/list.hbs +++ b/web/app/components/document/sidebar/related-resources/list.hbs @@ -1,26 +1,11 @@
{{#if this.listIsEmpty}} -
-
- {{#if @editingIsDisabled}} -
- -
- {{else}} - - - - - - - {{/if}} -
-
+ {{else}}