mirror of
https://github.com/perfect-panel/ppanel-web.git
synced 2026-02-17 13:51:10 -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_name: '',
|
||||||
site_desc: '',
|
site_desc: '',
|
||||||
site_logo: '',
|
site_logo: '',
|
||||||
|
keywords: '',
|
||||||
|
custom_html: '',
|
||||||
},
|
},
|
||||||
verify: {
|
verify: {
|
||||||
turnstile_site_key: '',
|
turnstile_site_key: '',
|
||||||
|
|||||||
@ -45,7 +45,7 @@ import Subscribe from '../subscribe/page';
|
|||||||
|
|
||||||
const platforms: (keyof API.ApplicationPlatform)[] = [
|
const platforms: (keyof API.ApplicationPlatform)[] = [
|
||||||
'windows',
|
'windows',
|
||||||
'mac',
|
'macos',
|
||||||
'linux',
|
'linux',
|
||||||
'ios',
|
'ios',
|
||||||
'android',
|
'android',
|
||||||
@ -106,7 +106,7 @@ export default function Content() {
|
|||||||
icon={`${
|
icon={`${
|
||||||
{
|
{
|
||||||
windows: 'mdi:microsoft-windows',
|
windows: 'mdi:microsoft-windows',
|
||||||
mac: 'uil:apple',
|
macos: 'uil:apple',
|
||||||
linux: 'uil:linux',
|
linux: 'uil:linux',
|
||||||
ios: 'simple-icons:ios',
|
ios: 'simple-icons:ios',
|
||||||
android: 'uil:android',
|
android: 'uil:android',
|
||||||
@ -261,6 +261,7 @@ export default function Content() {
|
|||||||
toast.success(
|
toast.success(
|
||||||
<>
|
<>
|
||||||
<p>{t('copySuccess')}</p>
|
<p>{t('copySuccess')}</p>
|
||||||
|
<br />
|
||||||
<p>{t('manualImportMessage')}</p>
|
<p>{t('manualImportMessage')}</p>
|
||||||
</>,
|
</>,
|
||||||
);
|
);
|
||||||
@ -307,7 +308,10 @@ export default function Content() {
|
|||||||
<Link href={app.url}>{t('download')}</Link>
|
<Link href={app.url}>{t('download')}</Link>
|
||||||
</Button>
|
</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'>
|
<Button size='sm' className='rounded-l-none p-2'>
|
||||||
{t('import')}
|
{t('import')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -20,6 +20,8 @@ export const useGlobalStore = create<GlobalStore>((set, get) => ({
|
|||||||
site_name: '',
|
site_name: '',
|
||||||
site_desc: '',
|
site_desc: '',
|
||||||
site_logo: '',
|
site_logo: '',
|
||||||
|
keywords: '',
|
||||||
|
custom_html: '',
|
||||||
},
|
},
|
||||||
verify: {
|
verify: {
|
||||||
turnstile_site_key: '',
|
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 parser = new UAParser();
|
||||||
const os = parser.getOS();
|
const os = parser.getOS();
|
||||||
const osName = os.name?.toLowerCase() || '';
|
const osName = os.name?.toLowerCase() || '';
|
||||||
|
|
||||||
if (osName.includes('windows')) return 'windows';
|
if (osName.includes('windows')) return 'windows';
|
||||||
if (osName.includes('mac')) return 'mac';
|
if (osName.includes('mac')) return 'macos';
|
||||||
if (
|
if (
|
||||||
osName.includes('linux') ||
|
osName.includes('linux') ||
|
||||||
osName.includes('ubuntu') ||
|
osName.includes('ubuntu') ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user