diff --git a/common/common.scss b/common/common.scss index dbdff97..fc684a4 100644 --- a/common/common.scss +++ b/common/common.scss @@ -67,28 +67,50 @@ } .user-card-directory-footer { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(5em, 1fr)); + padding: 0.75em; background-color: var(--secondary); - padding: 0px 10px 10px 10px; - display: flex; - flex-wrap: wrap; + gap: 0.25em; + border-top: 1px solid var(--primary-low); + + .directory-table__column-header, + .directory-table__cell, + .directory-table__cell--empty, + .directory-table__cell--user-field { + border: none; + } .stat { - flex-basis: 0; - flex-grow: 1; - display: flex; flex-direction: column; align-items: center; - margin: 2px; + gap: 0.1em; + border: none; .label { - font-size: $font-down-2; - + font-size: var(--font-down-2); .d-icon { margin-right: 0.2em; color: var(--primary-medium); } } + + &.stat-type-user_field { + // long user fields can break the layout + // so we truncate these to one line + .value { + display: flex; + overflow: hidden; + justify-content: center; + width: 100%; + min-width: 0; + span { + min-width: 0; + @include ellipsis; + } + } + } } } } diff --git a/javascripts/discourse/components/user-card-static.js b/javascripts/discourse/components/user-card-static.js index 8af9190..0dfad88 100644 --- a/javascripts/discourse/components/user-card-static.js +++ b/javascripts/discourse/components/user-card-static.js @@ -1,4 +1,5 @@ import UserCardContents from "discourse/components/user-card-contents"; +import { action } from "@ember/object"; export default UserCardContents.extend({ layoutName: "components/user-card-contents", @@ -8,4 +9,10 @@ export default UserCardContents.extend({ didInsertElement() {}, willDestroyElement() {}, keyUp() {}, + + // need to override this to work with the loading slider + @action + handleShowUser() { + return; + }, }); diff --git a/javascripts/discourse/templates/users-as-card-directory.hbs b/javascripts/discourse/templates/users-as-card-directory.hbs index 6a2a470..2d8508b 100644 --- a/javascripts/discourse/templates/users-as-card-directory.hbs +++ b/javascripts/discourse/templates/users-as-card-directory.hbs @@ -5,11 +5,11 @@ }}
- {{plugin-outlet - name="users-top" - connectorTagName="div" - args=(hash model=model) - }} +
{{period-chooser @@ -30,12 +30,15 @@ {{i18n "directory.total_rows" count=model.totalRows}} {{/if}} - {{input - value=(readonly nameInput) - input=(action "onUsernameFilterChanged" value="target.value") - placeholderKey="directory.filter_name" + {{#if showGroupFilter}} {{combo-box class="directory-group-selector" @@ -52,12 +55,10 @@ class="btn-default open-edit-columns-btn" }} {{/if}} - {{plugin-outlet - name="users-directory-controls" - connectorTagName="" - tagName="" - args=(hash model=model) - }} +
@@ -76,7 +77,10 @@ {{#if (theme-setting "show_stats")}}