mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 14:54:12 +00:00
Added messaging to the checkbox states
This commit is contained in:
parent
2ba4656c24
commit
54719d904c
2 changed files with 17 additions and 5 deletions
|
@ -227,7 +227,8 @@ export const defaultDevices: Device[] = [
|
|||
width: 390,
|
||||
height: 844,
|
||||
capabilities: ['touch', 'mobile'],
|
||||
userAgent:'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
||||
userAgent:
|
||||
'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
||||
type: 'phone',
|
||||
isTouchCapable: true,
|
||||
isMobileCapable: true,
|
||||
|
@ -239,7 +240,8 @@ export const defaultDevices: Device[] = [
|
|||
height: 926,
|
||||
dpi: 3,
|
||||
capabilities: ['touch', 'mobile'],
|
||||
userAgent:'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
||||
userAgent:
|
||||
'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
||||
type: 'phone',
|
||||
isTouchCapable: true,
|
||||
isMobileCapable: true,
|
||||
|
@ -249,9 +251,10 @@ export const defaultDevices: Device[] = [
|
|||
name: 'iPhone 14 Pro',
|
||||
width: 393,
|
||||
height: 852,
|
||||
dpi:3,
|
||||
dpi: 3,
|
||||
capabilities: ['touch', 'mobile'],
|
||||
userAgent:'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
||||
userAgent:
|
||||
'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53',
|
||||
type: 'phone',
|
||||
isTouchCapable: true,
|
||||
isMobileCapable: true,
|
||||
|
|
|
@ -64,6 +64,7 @@ const DeviceLabel = ({
|
|||
);
|
||||
|
||||
const opacity = isDragging ? 0 : 1;
|
||||
const isChecked = devices.find((d) => d.name === device.name) != null;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -78,7 +79,15 @@ const DeviceLabel = ({
|
|||
})}
|
||||
type="checkbox"
|
||||
disabled={disableSelectionControls}
|
||||
checked={devices.find((d) => d.name === device.name) != null}
|
||||
title={
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
disableSelectionControls
|
||||
? 'Cannot make the suite empty add another device to remove this one'
|
||||
: isChecked
|
||||
? 'Click to remove the device'
|
||||
: 'Click to add the device'
|
||||
}
|
||||
checked={isChecked}
|
||||
onChange={(e) => {
|
||||
if (e.target.checked) {
|
||||
dispatch(
|
||||
|
|
Loading…
Reference in a new issue