diff --git a/public/assets/styles/utility/text.scss b/public/assets/styles/utility/text.scss index 803ff8c24..0f54445f7 100644 --- a/public/assets/styles/utility/text.scss +++ b/public/assets/styles/utility/text.scss @@ -20,11 +20,16 @@ pre:last-child { font-weight: get("font.weight.semibold"); } -.text-title { +.text-header { font-size: get("font.size.xl"); font-weight: get("font.weight.medium"); } +.text-title { + font-size: get("font.size.lg"); + font-weight: get("font.weight.medium"); +} + .text-body { font-size: get("font.size.base"); } @@ -49,6 +54,12 @@ pre:last-child { color: get("colors.blue.600"); } +.nowrap { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + .text-link:hover { color: get("colors.blue.800"); text-decoration: underline; diff --git a/public/components/Header.tsx b/public/components/Header.tsx index ca4174d18..65a240f37 100644 --- a/public/components/Header.tsx +++ b/public/components/Header.tsx @@ -23,7 +23,7 @@ export const Header = () => { -

{fider.session.tenant.name}

+

{fider.session.tenant.name}

{fider.session.isAuthenticated && ( diff --git a/public/components/common/form/Form.scss b/public/components/common/form/Form.scss index 5d56ca459..757ff3e03 100644 --- a/public/components/common/form/Form.scss +++ b/public/components/common/form/Form.scss @@ -11,10 +11,10 @@ } &:last-child { - margin-bottom: 0; + // margin-bottom: 0; .flex-x > & { - margin-bottom: spacing(2); + // margin-bottom: spacing(2); } } } diff --git a/public/pages/Administration/components/webhook/WebhookForm.tsx b/public/pages/Administration/components/webhook/WebhookForm.tsx index 02cf50ac5..ca9d93089 100644 --- a/public/pages/Administration/components/webhook/WebhookForm.tsx +++ b/public/pages/Administration/components/webhook/WebhookForm.tsx @@ -152,7 +152,7 @@ export const WebhookForm = (props: WebhookFormProps) => { This webhook has failed )} -

{title}

+

{title}

}> - + {Object.entries(httpHeaders).map(([header, value]) => ( ))} diff --git a/public/pages/Administration/components/webhook/WebhookListItem.tsx b/public/pages/Administration/components/webhook/WebhookListItem.tsx index 51d3b6776..2381fb123 100644 --- a/public/pages/Administration/components/webhook/WebhookListItem.tsx +++ b/public/pages/Administration/components/webhook/WebhookListItem.tsx @@ -1,7 +1,7 @@ import "./WebhookListItem.scss" import React, { useState } from "react" -import { Webhook, WebhookStatus, WebhookTriggerResult } from "@fider/models" +import { Webhook, WebhookStatus, WebhookTriggerResult, WebhookType } from "@fider/models" import { Button, Icon } from "@fider/components" import { actions, notify } from "@fider/services" @@ -63,6 +63,19 @@ export const WebhookListItem = (props: WebhookListItemProps) => { } } + const getWebhookType = (type: WebhookType) => { + switch (type) { + case WebhookType.CHANGE_STATUS: + return "Change Status" + case WebhookType.NEW_COMMENT: + return "New Comment" + case WebhookType.DELETE_POST: + return "Delete Post" + case WebhookType.NEW_POST: + return "New Post" + } + } + const testWebhook = async () => { const result = await actions.testWebhook(props.webhook.id) setTriggerResult(result.data) @@ -100,8 +113,9 @@ export const WebhookListItem = (props: WebhookListItemProps) => { -

- #{props.webhook.id} {props.webhook.name} +

+ #{props.webhook.id} + {getWebhookType(props.webhook.type)} - {props.webhook.name}

{triggerResult?.success === false && ( diff --git a/public/pages/Administration/pages/ManageWebhooks.page.tsx b/public/pages/Administration/pages/ManageWebhooks.page.tsx index f40f8c7e7..19cd6793f 100644 --- a/public/pages/Administration/pages/ManageWebhooks.page.tsx +++ b/public/pages/Administration/pages/ManageWebhooks.page.tsx @@ -30,10 +30,9 @@ interface WebhooksListProps { const WebhooksList = (props: WebhooksListProps) => { return (
-

{props.title}

-

These webhooks are triggered every time {props.description}.

+

Existing Webhooks

- {props.list.length === 0 ?

There aren’t any "{props.title.toLowerCase()}" webhook yet.

: props.list} + {props.list.length === 0 ?

There aren’t any webhooks yet.

: props.list}
) @@ -98,8 +97,8 @@ const ManageWebhooksPage = (props: ManageWebhooksPageProps) => { sortWebhooks() } - const getWebhookList = (filter: (webhook: Webhook) => boolean) => { - return allWebhooks.filter(filter).map((w) => { + const getWebhookItems = () => { + return allWebhooks.map((w) => { return ( { return render() } - const newPostList = getWebhookList((w) => w.type === WebhookType.NEW_POST) - const newCommentList = getWebhookList((w) => w.type === WebhookType.NEW_COMMENT) - const changeStatusList = getWebhookList((w) => w.type === WebhookType.CHANGE_STATUS) - const deletePostList = getWebhookList((w) => w.type === WebhookType.DELETE_POST) - return render(

@@ -140,13 +134,10 @@ const ManageWebhooksPage = (props: ManageWebhooksPageProps) => { .

- - - - +