fix some typos, add a few tooltips

This commit is contained in:
spencerwooo 2021-12-29 19:58:33 +08:00
parent 09575b85b6
commit d24608b446
No known key found for this signature in database
GPG key ID: 24CD550268849CA0
3 changed files with 8 additions and 4 deletions

View file

@ -8,8 +8,6 @@
<a href="https://github.com/spencerwooo/onedrive-vercel-index/discussions"><img src="https://img.shields.io/github/discussions/spencerwooo/onedrive-vercel-index?color=CF2B5B&labelColor=black&logo=github" alt="GitHub Discussions" /></a> <a href="https://github.com/spencerwooo/onedrive-vercel-index/discussions"><img src="https://img.shields.io/github/discussions/spencerwooo/onedrive-vercel-index?color=CF2B5B&labelColor=black&logo=github" alt="GitHub Discussions" /></a>
</div> </div>
---
## Discussion ## Discussion
Please go to our [discussion forum](https://github.com/spencerwooo/onedrive-vercel-index/discussions) for general questions and FAQs, **issues are for bug reports and bug reports only.** Feature requests may or may not be ignored, as [I (@spencerwooo)](https://spencerwoo.com) am the only one maintaining the project, so **I only prioritise features that I use.** Please go to our [discussion forum](https://github.com/spencerwooo/onedrive-vercel-index/discussions) for general questions and FAQs, **issues are for bug reports and bug reports only.** Feature requests may or may not be ignored, as [I (@spencerwooo)](https://spencerwoo.com) am the only one maintaining the project, so **I only prioritise features that I use.**
@ -89,7 +87,7 @@ Live demo at [Spencer's OneDrive](https://drive.spencerwoo.com).
- Direct raw-file serving, proxied file serving ... - Direct raw-file serving, proxied file serving ...
- Permalink copy, proxied download link copy ... - Permalink copy, proxied download link copy ...
- Full dark mode support, style and website customisations... - Full dark mode support, style and website customisations ...
🍌 More importantly, it's pretty (●'◡'●) 🍌 More importantly, it's pretty (●'◡'●)

View file

@ -35,18 +35,21 @@ export const DownloadButton = ({
btnText, btnText,
btnIcon, btnIcon,
btnImage, btnImage,
btnTitle,
}: { }: {
onClickCallback: MouseEventHandler<HTMLButtonElement> onClickCallback: MouseEventHandler<HTMLButtonElement>
btnColor?: string btnColor?: string
btnText: string btnText: string
btnIcon?: IconProp btnIcon?: IconProp
btnImage?: string btnImage?: string
btnTitle?: string
}) => { }) => {
return ( return (
<button <button
className={`flex items-center space-x-2 py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-lg border hover:bg-gray-100/10 focus:z-10 focus:ring-2 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-900 ${btnStyleMap( className={`flex items-center space-x-2 py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-lg border hover:bg-gray-100/10 focus:z-10 focus:ring-2 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-900 ${btnStyleMap(
btnColor btnColor
)}`} )}`}
title={btnTitle}
onClick={onClickCallback} onClick={onClickCallback}
> >
{btnIcon && <FontAwesomeIcon icon={btnIcon} />} {btnIcon && <FontAwesomeIcon icon={btnIcon} />}
@ -67,12 +70,14 @@ const DownloadButtonGroup: React.FC<{ downloadUrl: string }> = ({ downloadUrl })
btnColor="blue" btnColor="blue"
btnText="Download" btnText="Download"
btnIcon="file-download" btnIcon="file-download"
btnTitle="Download the file directly through OneDrive"
/> />
<DownloadButton <DownloadButton
onClickCallback={() => window.open(`/api/proxy?url=${encodeURIComponent(downloadUrl)}`)} onClickCallback={() => window.open(`/api/proxy?url=${encodeURIComponent(downloadUrl)}`)}
btnColor="teal" btnColor="teal"
btnText="Proxy download" btnText="Proxy download"
btnIcon="download" btnIcon="download"
btnTitle="Download the file with the stream proxied through Vercel Serverless"
/> />
<DownloadButton <DownloadButton
onClickCallback={() => { onClickCallback={() => {
@ -82,6 +87,7 @@ const DownloadButtonGroup: React.FC<{ downloadUrl: string }> = ({ downloadUrl })
btnColor="yellow" btnColor="yellow"
btnText="Copy direct link" btnText="Copy direct link"
btnIcon="copy" btnIcon="copy"
btnTitle="Copy the permalink to the file to the clipboard"
/> />
</div> </div>
) )

View file

@ -995,7 +995,7 @@
background-color: #18181b; background-color: #18181b;
} }
.markdown-body a { .markdown-body a {
color: #58a6ff; color: rgba(2, 132, 199);
} }
.markdown-body hr { .markdown-body hr {
border-bottom: 1px solid #21262d; border-bottom: 1px solid #21262d;