Add titles/tooltips
This commit is contained in:
@@ -3,9 +3,15 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|||||||
import { faCheck } from '@fortawesome/free-solid-svg-icons'
|
import { faCheck } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { SettingProps } from '../types/SettingProps'
|
import { SettingProps } from '../types/SettingProps'
|
||||||
|
|
||||||
export function Setting ({ label, value, onChange, className }: SettingProps) {
|
export function Setting ({
|
||||||
|
label,
|
||||||
|
value,
|
||||||
|
onChange,
|
||||||
|
className,
|
||||||
|
title
|
||||||
|
}: SettingProps) {
|
||||||
return (
|
return (
|
||||||
<div className={`flex items-center gap-2 mb-2 ${className}`}>
|
<div className={`flex items-center gap-2 mb-2 ${className}`} title={title}>
|
||||||
<label className='text-white text-lg'>{label}</label>
|
<label className='text-white text-lg'>{label}</label>
|
||||||
<div className='setting-checkbox-wrapper'>
|
<div className='setting-checkbox-wrapper'>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ export default function Installs () {
|
|||||||
className={`entry-info-item mt-2 ${
|
className={`entry-info-item mt-2 ${
|
||||||
hoveredIds.includes(entry) ? 'btntheme3' : 'btntheme2'
|
hoveredIds.includes(entry) ? 'btntheme3' : 'btntheme2'
|
||||||
}`}
|
}`}
|
||||||
|
title='The date the game was installed in MM/dd/yyyy format'
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
Installed{' '}
|
Installed{' '}
|
||||||
@@ -133,6 +134,7 @@ export default function Installs () {
|
|||||||
setShowPopup(true)
|
setShowPopup(true)
|
||||||
setFadeOut(false)
|
setFadeOut(false)
|
||||||
}}
|
}}
|
||||||
|
title='Click to view version info'
|
||||||
>
|
>
|
||||||
View Info
|
View Info
|
||||||
</button>
|
</button>
|
||||||
@@ -147,6 +149,7 @@ export default function Installs () {
|
|||||||
setShowPopup(true)
|
setShowPopup(true)
|
||||||
setFadeOut(false)
|
setFadeOut(false)
|
||||||
}}
|
}}
|
||||||
|
title='Click to manage this version install'
|
||||||
>
|
>
|
||||||
Manage
|
Manage
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -522,6 +522,11 @@ export default function RootLayout ({
|
|||||||
: [...prev, v.id]
|
: [...prev, v.id]
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
title={
|
||||||
|
selectedVersionList.includes(v.id)
|
||||||
|
? 'This version will be downloaded. Click to remove from the list of versions that will be downloaded.'
|
||||||
|
: 'This version will NOT be downloaded. Click to add from the list of versions that will be downloaded.'
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{selectedVersionList.includes(v.id) ? (
|
{selectedVersionList.includes(v.id) ? (
|
||||||
<>
|
<>
|
||||||
@@ -541,6 +546,7 @@ export default function RootLayout ({
|
|||||||
setViewingInfoFromDownloads(true)
|
setViewingInfoFromDownloads(true)
|
||||||
setPopupMode(3)
|
setPopupMode(3)
|
||||||
}}
|
}}
|
||||||
|
title='Click to view version info'
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faInfo} /> Info
|
<FontAwesomeIcon icon={faInfo} /> Info
|
||||||
</button>
|
</button>
|
||||||
@@ -561,7 +567,10 @@ export default function RootLayout ({
|
|||||||
{v.name}
|
{v.name}
|
||||||
</p>
|
</p>
|
||||||
<div className='flex gap-2'>
|
<div className='flex gap-2'>
|
||||||
<div className='entry-info-item btntheme3'>
|
<div
|
||||||
|
className='entry-info-item btntheme3'
|
||||||
|
title='The amount of versions installed of this game in installed/installable format.'
|
||||||
|
>
|
||||||
<p>
|
<p>
|
||||||
{(() => {
|
{(() => {
|
||||||
const data = getVersionsAmountData(v.id)
|
const data = getVersionsAmountData(v.id)
|
||||||
@@ -574,6 +583,7 @@ export default function RootLayout ({
|
|||||||
<div
|
<div
|
||||||
className='entry-info-item btntheme3'
|
className='entry-info-item btntheme3'
|
||||||
hidden={!v.official}
|
hidden={!v.official}
|
||||||
|
title='This game is official.'
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faCheck}
|
icon={faCheck}
|
||||||
@@ -584,6 +594,11 @@ export default function RootLayout ({
|
|||||||
<div
|
<div
|
||||||
className='entry-info-item btntheme3'
|
className='entry-info-item btntheme3'
|
||||||
hidden={v.official}
|
hidden={v.official}
|
||||||
|
title={
|
||||||
|
v.verified
|
||||||
|
? 'This game is verified to be safe'
|
||||||
|
: 'This game is NOT verified to be save. Proceed with caution.'
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={
|
icon={
|
||||||
@@ -599,6 +614,7 @@ export default function RootLayout ({
|
|||||||
<div
|
<div
|
||||||
className='entry-info-item btntheme3 mt-2'
|
className='entry-info-item btntheme3 mt-2'
|
||||||
hidden={v.developer == null}
|
hidden={v.developer == null}
|
||||||
|
title={`The developer of ${v.name} is ${v.developer}.`}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={faCode}
|
icon={faCode}
|
||||||
@@ -609,6 +625,11 @@ export default function RootLayout ({
|
|||||||
<button
|
<button
|
||||||
className='button btntheme3 right-2 bottom-2'
|
className='button btntheme3 right-2 bottom-2'
|
||||||
onClick={() => setSelectedGame(v.id)}
|
onClick={() => setSelectedGame(v.id)}
|
||||||
|
title={`Click to download specific versions of the game. You have ${(() => {
|
||||||
|
const data = getVersionsAmountData(v.id)
|
||||||
|
if (!data) return 'N/A'
|
||||||
|
return `${data.installed} of ${data.total}`
|
||||||
|
})()} versions downloaded.`}
|
||||||
>
|
>
|
||||||
<>
|
<>
|
||||||
<FontAwesomeIcon icon={faDownload} />{' '}
|
<FontAwesomeIcon icon={faDownload} />{' '}
|
||||||
@@ -657,6 +678,7 @@ export default function RootLayout ({
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
title='Click to remove this version from this menu.'
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@@ -736,6 +758,7 @@ export default function RootLayout ({
|
|||||||
name: managingVersion
|
name: managingVersion
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
title='Click to uninstall this game. This will NOT remove any progress or any save files.'
|
||||||
>
|
>
|
||||||
Uninstall
|
Uninstall
|
||||||
</button>
|
</button>
|
||||||
@@ -746,6 +769,7 @@ export default function RootLayout ({
|
|||||||
name: managingVersion
|
name: managingVersion
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
title="Click to browse the game's files."
|
||||||
>
|
>
|
||||||
Open Folder
|
Open Folder
|
||||||
</button>
|
</button>
|
||||||
@@ -776,6 +800,11 @@ export default function RootLayout ({
|
|||||||
setTimeout(() => setShowPopup(false), 200)
|
setTimeout(() => setShowPopup(false), 200)
|
||||||
downloadVersions()
|
downloadVersions()
|
||||||
}}
|
}}
|
||||||
|
title={`Click to download ${
|
||||||
|
selectedVersionList.length
|
||||||
|
} version${
|
||||||
|
selectedVersionList.length == 1 ? '' : 's'
|
||||||
|
} of ${getVersionGame(selectedGame)?.name}`}
|
||||||
>
|
>
|
||||||
Download {selectedVersionList.length} version
|
Download {selectedVersionList.length} version
|
||||||
{selectedVersionList.length == 1 ? '' : 's'}
|
{selectedVersionList.length == 1 ? '' : 's'}
|
||||||
@@ -790,6 +819,12 @@ export default function RootLayout ({
|
|||||||
prev.length === allIds.length ? [] : allIds
|
prev.length === allIds.length ? [] : allIds
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
title={
|
||||||
|
selectedVersionList.length ===
|
||||||
|
getSpecialVersionsList(selectedGame).length
|
||||||
|
? 'Click to remove all selected versions for download.'
|
||||||
|
: 'Click to add all selected versions for download.'
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{selectedVersionList.length ===
|
{selectedVersionList.length ===
|
||||||
getSpecialVersionsList(selectedGame).length
|
getSpecialVersionsList(selectedGame).length
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ export default function Installs () {
|
|||||||
className={`entry-info-item ${
|
className={`entry-info-item ${
|
||||||
hoveredIds.includes(i.id) ? 'btntheme3' : 'btntheme2'
|
hoveredIds.includes(i.id) ? 'btntheme3' : 'btntheme2'
|
||||||
}`}
|
}`}
|
||||||
|
title='The amount of versions installed of this game in installed/installable format.'
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
{(() => {
|
{(() => {
|
||||||
@@ -110,6 +111,7 @@ export default function Installs () {
|
|||||||
hoveredIds.includes(i.id) ? 'btntheme3' : 'btntheme2'
|
hoveredIds.includes(i.id) ? 'btntheme3' : 'btntheme2'
|
||||||
}`}
|
}`}
|
||||||
hidden={!i.official}
|
hidden={!i.official}
|
||||||
|
title='This game is official.'
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faCheck} color='#19c84b' />
|
<FontAwesomeIcon icon={faCheck} color='#19c84b' />
|
||||||
<p>Official</p>
|
<p>Official</p>
|
||||||
@@ -119,6 +121,11 @@ export default function Installs () {
|
|||||||
hoveredIds.includes(i.id) ? 'btntheme3' : 'btntheme2'
|
hoveredIds.includes(i.id) ? 'btntheme3' : 'btntheme2'
|
||||||
}`}
|
}`}
|
||||||
hidden={i.official}
|
hidden={i.official}
|
||||||
|
title={
|
||||||
|
i.verified
|
||||||
|
? 'This game is verified to be safe'
|
||||||
|
: 'This game is not verified to be save. Proceed with caution.'
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
icon={i.verified ? faShieldHalved : faWarning}
|
icon={i.verified ? faShieldHalved : faWarning}
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export default function Settings () {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
title='This setting does as you expect, allow the launcher to send notifications for when stuff like downloading is done.'
|
||||||
/>
|
/>
|
||||||
<Setting
|
<Setting
|
||||||
label='Always show games in sidebar'
|
label='Always show games in sidebar'
|
||||||
@@ -86,6 +87,7 @@ export default function Settings () {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
title="This setting will make it so when you are on a page like this, the games won't disappear."
|
||||||
/>
|
/>
|
||||||
<Setting
|
<Setting
|
||||||
label='Show Installs/Launch Buttons'
|
label='Show Installs/Launch Buttons'
|
||||||
@@ -110,8 +112,9 @@ export default function Settings () {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
title='Enable the legacy method of using the installs/launch buttons. In the future this setting may be removed so try and get used to the new method.'
|
||||||
/>
|
/>
|
||||||
<div>
|
<div title='The theme you want the launcher to use.'>
|
||||||
<label className='text-lg'>Theme:</label>
|
<label className='text-lg'>Theme:</label>
|
||||||
<select
|
<select
|
||||||
className='ml-2 bg-(--col2) border border-(--col4) rounded-md'
|
className='ml-2 bg-(--col2) border border-(--col4) rounded-md'
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ export type SettingProps = {
|
|||||||
value: boolean
|
value: boolean
|
||||||
onChange: (val: boolean) => void
|
onChange: (val: boolean) => void
|
||||||
className?: string
|
className?: string
|
||||||
|
title?: string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user