diff --git a/components/core/SearchModal.js b/components/core/SearchModal.js index 738334de..5ea1a7d5 100644 --- a/components/core/SearchModal.js +++ b/components/core/SearchModal.js @@ -903,18 +903,8 @@ export class SearchModal extends React.Component { await this.props.onAction({ type: "NAVIGATE", value: "V1_NAVIGATION_SLATE", - data: value.data.data.slate, + data: { ...value.data.data.slate, pageState: { id: value.data.data.file.id } }, }); - if (value.data.data.slate) { - let ids = value.data.data.slate.data.objects.map((obj) => obj.id); - let index = ids.indexOf(value.data.data.file.id); - if (index !== -1) { - Events.dispatchCustomEvent({ - name: "slate-global-open-carousel", - detail: { index }, - }); - } - } } this._handleHide(); }; diff --git a/node_common/data/methods/get-activity-for-slate-id.js b/node_common/data/methods/get-activity-for-slate-id.js index bd637ae3..78ec27b5 100644 --- a/node_common/data/methods/get-activity-for-slate-id.js +++ b/node_common/data/methods/get-activity-for-slate-id.js @@ -6,7 +6,8 @@ export default async ({ slateId }) => { queryFn: async (DB) => { const query = await DB.select("*") .from("activity") - .where({ owner_slate_id: slateId }); + .where({ owner_slate_id: slateId }) + .orderBy("created_at", "desc"); if (!query || query.error) { return []; diff --git a/node_common/data/methods/get-activity-for-user-id.js b/node_common/data/methods/get-activity-for-user-id.js index 0a212aab..5c12fea9 100644 --- a/node_common/data/methods/get-activity-for-user-id.js +++ b/node_common/data/methods/get-activity-for-user-id.js @@ -6,7 +6,8 @@ export default async ({ userId }) => { queryFn: async (DB) => { const query = await DB.select("*") .from("activity") - .where({ owner_user_id: userId }); + .where({ owner_user_id: userId }) + .orderBy("created_at", "desc"); if (!query || query.error) { return []; diff --git a/scenes/SceneHome.js b/scenes/SceneHome.js index 72f6f07e..efc0f154 100644 --- a/scenes/SceneHome.js +++ b/scenes/SceneHome.js @@ -35,8 +35,6 @@ const STYLES_VIDEO_BIG = css` const STYLES_IMAGE_BOX = css` cursor: pointer; - ${"" /* background-size: cover; - background-position: 50% 50%; */} position: relative; box-shadow: ${Constants.shadow.light}; margin: 10px; @@ -58,29 +56,25 @@ const STYLES_PROFILE_IMAGE_BOX = css` height: 24px; `; -const STYLES_SLATE_NAME = css` +const STYLES_TEXT_AREA = css` position: absolute; bottom: 16px; left: 16px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-family: ${Constants.font.medium}; - font-size: ${Constants.typescale.lvlN1}; - color: ${Constants.system.white}; - ${"" /* text-shadow: 0px 0px 7px rgba(0, 0, 0, 0.5), 1px 1px 4px rgba(0, 0, 0, 0.1), - -1px -1px 4px rgba(0, 0, 0, 0.1); */} `; const STYLES_TITLE = css` - position: absolute; - bottom: 16px; - left: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${Constants.system.white}; - ${"" /* text-shadow: 0px 0px 7px rgba(0, 0, 0, 0.5), 0px 0px 1px rgba(0, 0, 0, 0.3); */} + font-family: ${Constants.font.medium}; + margin-bottom: 4px; +`; + +const STYLES_SECONDARY = css` + ${STYLES_TITLE} + font-size: ${Constants.typescale.lvlN1}; + margin-bottom: 0px; `; const STYLES_GRADIENT = css` @@ -98,8 +92,16 @@ const STYLES_GRADIENT = css` left: 0px; `; +const STYLES_ACTIVITY_GRID = css` + margin: -10px; + margin-top: 0px; + display: flex; + flex-direction: row; + flex-wrap: wrap; +`; + const ActivitySquare = ({ item, size }) => { - console.log(item); + let isImage = Validations.isPreviewableImage(item.file.type); return (