fix: reduce footer text, move project information to faq page
All checks were successful
Build and Deploy / build (push) Successful in 1m36s

This commit is contained in:
鲁树人 2025-06-16 22:31:08 +09:00
parent ff79b4ce27
commit d57cdcdb49
5 changed files with 69 additions and 16 deletions

View File

@ -16,6 +16,7 @@ test('should be able to render App', async () => {
await waitFor(() => screen.getByTestId('sdk-version')); await waitFor(() => screen.getByTestId('sdk-version'));
// Quick sanity check of known strings. // Quick sanity check of known strings.
expect(screen.getByText(/在浏览器内对文件进行解锁/i)).toBeInTheDocument(); expect(screen.getByText(/音乐解锁/i)).toBeInTheDocument();
expect(screen.getByText(/UnlockMusic 团队/i)).toBeInTheDocument(); expect(screen.getByText(/Unlock Music/i)).toBeInTheDocument();
expect(screen.getByText(/MIT/i)).toBeInTheDocument();
}); });

View File

@ -5,24 +5,28 @@ export function Footer() {
const appVersionShort = '__APP_VERSION_SHORT__'; const appVersionShort = '__APP_VERSION_SHORT__';
return ( return (
<footer className="flex flex-col text-center p-4 bg-base-200"> <footer className="flex flex-col text-center p-4 bg-base-200">
<div className="flex flex-row justify-center items-center h-[1em]"> <p className="flex flex-row justify-center items-center h-[1em]">
<a className="link link-info mr-1" href="https://git.unlock-music.dev/um/um-react"> <a className="link link-info mr-1" href="https://git.unlock-music.dev/um/um-react">
</a> </a>
(v{appVersionShort} (
<SDKVersion />) - <a
</div> title="使用 MIT 授权协议"
<div> className="link link-info"
href="https://git.unlock-music.dev/um/um-react/src/branch/main/LICENSE"
>
MIT
</a>
, v{appVersionShort}
<SDKVersion />)
</p>
<p>
{'© 2019 - '} {'© 2019 - '}
<CurrentYear />{' '} <CurrentYear />
<a className="link link-info" href="https://git.unlock-music.dev/um"> <a className="ml-1 link link-info" href="https://git.unlock-music.dev/um">
UnlockMusic Unlock Music
</a> </a>
{' | '} </p>
<a className="link link-info" href="https://git.unlock-music.dev/um/um-react/src/branch/main/LICENSE">
使 MIT
</a>
</div>
</footer> </footer>
); );
} }

45
src/faq/FAQAbout.tsx Normal file
View File

@ -0,0 +1,45 @@
import { Header2, Header3 } from '~/components/HelpText/Headers';
import { FaRust } from 'react-icons/fa';
export function FAQAboutProject() {
return (
<div className="flex flex-col gap-4">
<Header2></Header2>
<Header3 id="failed">um-react </Header3>
<p>
um-react
<a className="mx-1 link link-info" href="https://git.unlock-music.dev/um">
Unlock Music
</a>
React 使
<a className="mx-1 link link-info" href="https://git.unlock-music.dev/um/um-react/src/branch/main/LICENSE">
MIT
</a>
</p>
<p>
<FaRust className="inline" />
<a className="mx-1 link link-info" href="https://git.unlock-music.dev/um/lib_um_crypto_rust">
<code>lib_um_crypto_rust</code>
</a>
使
<a
className="mx-1 link link-info"
href="https://git.unlock-music.dev/um/lib_um_crypto_rust/src/branch/main/LICENSE_MIT"
>
MIT
</a>
+
<a
className="mx-1 link link-info"
href="https://git.unlock-music.dev/um/lib_um_crypto_rust/src/branch/main/LICENSE_APACHE"
>
Apache
</a>
</p>
<p>使</p>
</div>
);
}

View File

@ -4,6 +4,7 @@ import { KuwoFAQ } from './KuwoFAQ';
import { KugouFAQ } from './KugouFAQ'; import { KugouFAQ } from './KugouFAQ';
import { OtherFAQ } from './OtherFAQ'; import { OtherFAQ } from './OtherFAQ';
import { AndroidEmulatorFAQ } from './AndroidEmulatorFAQ'; import { AndroidEmulatorFAQ } from './AndroidEmulatorFAQ';
import { FAQAboutProject } from './FAQAbout';
export type FAQEntry = { export type FAQEntry = {
id: string; id: string;
@ -17,4 +18,5 @@ export const FAQ_PAGES: FAQEntry[] = [
{ id: 'kugou', name: '酷狗音乐', Component: KugouFAQ }, { id: 'kugou', name: '酷狗音乐', Component: KugouFAQ },
{ id: 'android-emu', name: '安卓模拟器', Component: AndroidEmulatorFAQ }, { id: 'android-emu', name: '安卓模拟器', Component: AndroidEmulatorFAQ },
{ id: 'other', name: '其它问题', Component: OtherFAQ }, { id: 'other', name: '其它问题', Component: OtherFAQ },
{ id: 'about', name: '关于项目', Component: FAQAboutProject },
]; ];

View File

@ -1,9 +1,10 @@
import { ExtLink } from '~/components/ExtLink'; import { ExtLink } from '~/components/ExtLink';
import { Header2 } from '~/components/HelpText/Headers';
export function FaqHome() { export function FaqHome() {
return ( return (
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4">
<h1 className="text-2xl font-bold"></h1> <Header2></Header2>
<p></p> <p></p>
<p> <p>
访 访