mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
fided left hand mode
This commit is contained in:
1 parent
7a8089a194
commit
8815ec33cd
4 files changed
+23
-5
No files matched your search
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 6.0.4 on 2026-05-08 20:04
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('api', '0033_user_drawer_anchor'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='user',
|
||||||
|
name='drawer_anchor',
|
||||||
|
field=models.CharField(choices=[('left', 'Left'), ('right', 'Right')], default='right', max_length=5),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -32,7 +32,7 @@ class User(AbstractUser):
|
|||||||
]
|
]
|
||||||
theme = models.CharField(max_length=20, choices=THEME_CHOICES, default="holy_light")
|
theme = models.CharField(max_length=20, choices=THEME_CHOICES, default="holy_light")
|
||||||
language = models.CharField(max_length=2, choices=LANGUAGE_CHOICES, default="en")
|
language = models.CharField(max_length=2, choices=LANGUAGE_CHOICES, default="en")
|
||||||
drawer_anchor = models.CharField(max_length=5, choices=DRAWER_ANCHOR_CHOICES, default="left")
|
drawer_anchor = models.CharField(max_length=5, choices=DRAWER_ANCHOR_CHOICES, default="right")
|
||||||
avatar = models.ImageField(upload_to="avatars/", blank=True, null=True)
|
avatar = models.ImageField(upload_to="avatars/", blank=True, null=True)
|
||||||
pending_email = models.EmailField(max_length=254, blank=True, null=True)
|
pending_email = models.EmailField(max_length=254, blank=True, null=True)
|
||||||
email_confirmation_code = models.CharField(max_length=6, blank=True, null=True)
|
email_confirmation_code = models.CharField(max_length=6, blank=True, null=True)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const STORAGE_KEY = 'drawer-anchor';
|
|||||||
|
|
||||||
const readLocal = (): DrawerAnchor => {
|
const readLocal = (): DrawerAnchor => {
|
||||||
const raw = localStorage.getItem(STORAGE_KEY);
|
const raw = localStorage.getItem(STORAGE_KEY);
|
||||||
return raw === 'right' ? 'right' : 'left';
|
return raw === 'left' ? 'left' : 'right';
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface UseDrawerAnchorResult {
|
export interface UseDrawerAnchorResult {
|
||||||
|
|||||||
@@ -305,8 +305,8 @@ const Settings: React.FC<SettingsProps> = ({ themeName, onThemeChange }) => {
|
|||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
control={
|
control={
|
||||||
<Switch
|
<Switch
|
||||||
checked={drawerAnchor === 'right'}
|
checked={drawerAnchor === 'left'}
|
||||||
onChange={(e) => setDrawerAnchor(e.target.checked ? 'right' : 'left')}
|
onChange={(e) => setDrawerAnchor(e.target.checked ? 'left' : 'right')}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
@@ -317,7 +317,7 @@ const Settings: React.FC<SettingsProps> = ({ themeName, onThemeChange }) => {
|
|||||||
<Typography variant="caption" color="text.secondary">
|
<Typography variant="caption" color="text.secondary">
|
||||||
{t('settings.leftHandModeHint', {
|
{t('settings.leftHandModeHint', {
|
||||||
defaultValue:
|
defaultValue:
|
||||||
'Mobile drawer slides in from the right (better for left-handed thumb reach).',
|
'Mobile drawer slides in from the left (better for left-handed thumb reach).',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in new issue
Block a user