mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-06 11:40:28 -05:00
✨ feat(platform): Update platform naming and add keywords and custom HTML fields
This commit is contained in:
parent
557c5cdc29
commit
6384237782
@ -14,6 +14,8 @@ export const useGlobalStore = create<GlobalStore>((set) => ({
|
||||
site_name: '',
|
||||
site_desc: '',
|
||||
site_logo: '',
|
||||
keywords: '',
|
||||
custom_html: '',
|
||||
},
|
||||
verify: {
|
||||
turnstile_site_key: '',
|
||||
|
||||
@ -45,7 +45,7 @@ import Subscribe from '../subscribe/page';
|
||||
|
||||
const platforms: (keyof API.ApplicationPlatform)[] = [
|
||||
'windows',
|
||||
'mac',
|
||||
'macos',
|
||||
'linux',
|
||||
'ios',
|
||||
'android',
|
||||
@ -106,7 +106,7 @@ export default function Content() {
|
||||
icon={`${
|
||||
{
|
||||
windows: 'mdi:microsoft-windows',
|
||||
mac: 'uil:apple',
|
||||
macos: 'uil:apple',
|
||||
linux: 'uil:linux',
|
||||
ios: 'simple-icons:ios',
|
||||
android: 'uil:android',
|
||||
@ -261,6 +261,7 @@ export default function Content() {
|
||||
toast.success(
|
||||
<>
|
||||
<p>{t('copySuccess')}</p>
|
||||
<br />
|
||||
<p>{t('manualImportMessage')}</p>
|
||||
</>,
|
||||
);
|
||||
@ -307,7 +308,10 @@ export default function Content() {
|
||||
<Link href={app.url}>{t('download')}</Link>
|
||||
</Button>
|
||||
|
||||
<CopyToClipboard text={url} onCopy={handleCopy}>
|
||||
<CopyToClipboard
|
||||
text={getAppSubLink(application.subscribe_type, url) || url}
|
||||
onCopy={handleCopy}
|
||||
>
|
||||
<Button size='sm' className='rounded-l-none p-2'>
|
||||
{t('import')}
|
||||
</Button>
|
||||
|
||||
@ -20,6 +20,8 @@ export const useGlobalStore = create<GlobalStore>((set, get) => ({
|
||||
site_name: '',
|
||||
site_desc: '',
|
||||
site_logo: '',
|
||||
keywords: '',
|
||||
custom_html: '',
|
||||
},
|
||||
verify: {
|
||||
turnstile_site_key: '',
|
||||
|
||||
@ -56,13 +56,13 @@ export function Logout() {
|
||||
}
|
||||
}
|
||||
|
||||
export function getPlatform(): 'windows' | 'mac' | 'linux' | 'android' | 'ios' | 'harmony' {
|
||||
export function getPlatform(): 'windows' | 'macos' | 'linux' | 'android' | 'ios' | 'harmony' {
|
||||
const parser = new UAParser();
|
||||
const os = parser.getOS();
|
||||
const osName = os.name?.toLowerCase() || '';
|
||||
|
||||
if (osName.includes('windows')) return 'windows';
|
||||
if (osName.includes('mac')) return 'mac';
|
||||
if (osName.includes('mac')) return 'macos';
|
||||
if (
|
||||
osName.includes('linux') ||
|
||||
osName.includes('ubuntu') ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user