Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Chore UI/UX Page (#85)
Browse files Browse the repository at this point in the history
* Chore UI/UX Page [Change Log]

[+] chore(changelog.tsx): remove unused onClose prop from ChangeLog component
[+] fix(changelog.tsx): fix formatting of descriptionWithLinks variable

* Chore UI/UX Page [Change Log & Privacy Page] [Styles]

[+] chore(changelog.module.scss): add user-select property to enable text selection
[+] chore(privacy.module.scss): add user-select property to enable text selection
  • Loading branch information
H0llyW00dzZ authored Nov 11, 2023
1 parent 5422737 commit a70a9ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/components/changelog.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
overflow: auto; /* Enable scrolling */
width: 95%; /* Set the desired width */
margin-top: auto; /* Add margin for spacing */
user-select: text; /* Copyable */
}

.changelog-actions {
Expand Down
11 changes: 6 additions & 5 deletions app/components/changelog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Markdown = dynamic(async () => (await import("./markdown")).Markdown, {
loading: () => <LoadingIcon />,
});

export function ChangeLog(props: { onClose?: () => void }) {
export function ChangeLog() {
const navigate = useNavigate();
const [mdText, setMdText] = useState("");
const [pageTitle] = useState("📌 Change Log 📝");
Expand Down Expand Up @@ -52,9 +52,11 @@ export function ChangeLog(props: { onClose?: () => void }) {
const authorSection = `[${author.replace("[bot]", "").replace(/\s/g, "")}](https://github.com/${author.replace("[bot]", "").replace(/\s/g, "")}) ${coAuthorsSection}`;
const prLinkRegex = /#(\d+)/g; // Regular expression to match '#<number>' ref : autolinks github
const prLink = commitInfo?.commitMessage.summary.replace(prLinkRegex, '[$&](https://github.com/H0llyW00dzZ/ChatGPT-Next-Web/pull/$1/commits)');
const descriptionWithLinks = commitInfo?.commitMessage.description.map((change: string) =>
change.replace(prLinkRegex, '[$&](https://github.com/H0llyW00dzZ/ChatGPT-Next-Web/pull/$1/commits)')
).join('\n\n\n');
const descriptionWithLinks = commitInfo?.commitMessage.description
.map((change: string) =>
change.replace(prLinkRegex, '[$&](https://github.com/H0llyW00dzZ/ChatGPT-Next-Web/pull/$1/commits)')
)
.join('\n\n\n');

table += `\n\n\n![GitHub contributors](https://img.shields.io/github/contributors/Yidadaa/ChatGPT-Next-Web.svg) ![GitHub commits](https://badgen.net/github/commits/H0llyW00dzZ/ChatGPT-Next-Web) ![GitHub license](https://img.shields.io/github/license/H0llyW00dzZ/ChatGPT-Next-Web) [![GitHub forks](https://img.shields.io/github/forks/Yidadaa/ChatGPT-Next-Web.svg)](https://github.com/Yidadaa/ChatGPT-Next-Web/network/members) [![GitHub stars](https://img.shields.io/github/stars/Yidadaa/ChatGPT-Next-Web.svg)](https://github.com/Yidadaa/ChatGPT-Next-Web/stargazers) [![Github All Releases](https://img.shields.io/github/downloads/Yidadaa/ChatGPT-Next-Web/total.svg)](https://github.com/Yidadaa/ChatGPT-Next-Web/releases/) [![CI: CodeQL Unit Testing Advanced](https://github.com/H0llyW00dzZ/ChatGPT-Next-Web/actions/workflows/codeql.yml/badge.svg)](https://github.com/H0llyW00dzZ/ChatGPT-Next-Web/actions/workflows/codeql.yml) \n\n\n [![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/${author}) ![${author.replace("[bot]", "")}](https://github.com/${author.replace("[bot]", "")}.png?size=25) ${authorSection} :\n\n${prLink}\n\n\n${descriptionWithLinks}\n\n\n\n\n\n`;
} else {
Expand All @@ -65,7 +67,6 @@ export function ChangeLog(props: { onClose?: () => void }) {
};

fetchData();

}, []);

const goHome = () => {
Expand Down
1 change: 1 addition & 0 deletions app/components/privacy.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
overflow: auto; /* Enable scrolling */
width: 95%; /* Set the desired width */
margin-top: auto; /* Add margin for spacing */
user-select: text; /* Copyable */
}

.privacy-actions {
Expand Down

0 comments on commit a70a9ec

Please sign in to comment.