show info to users that edits to location will only be seen within Ente

This commit is contained in:
ashilkn 2023-12-16 12:39:07 +05:30
parent eab3ef2862
commit 2f528e33ac
14 changed files with 101 additions and 18 deletions

View file

@ -8197,6 +8197,16 @@ class S {
args: [],
);
}
/// `Edits to location will only be seen within Ente`
String get editsToLocationWillOnlyBeSeenWithinEnte {
return Intl.message(
'Edits to location will only be seen within Ente',
name: 'editsToLocationWillOnlyBeSeenWithinEnte',
desc: '',
args: [],
);
}
}
class AppLocalizationDelegate extends LocalizationsDelegate<S> {

View file

@ -9,5 +9,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -1162,5 +1162,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -1162,5 +1162,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -972,5 +972,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -1153,5 +1153,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -1115,5 +1115,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -9,5 +9,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -1162,5 +1162,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -23,5 +23,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -110,5 +110,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -276,5 +276,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -1162,5 +1162,6 @@
"editLocation": "Edit location",
"selectALocation": "Select a location",
"selectALocationFirst": "Select a location first",
"changeLocationOfSelectedItems": "Change location of selected items?"
"changeLocationOfSelectedItems": "Change location of selected items?",
"editsToLocationWillOnlyBeSeenWithinEnte": "Edits to location will only be seen within Ente"
}

View file

@ -75,6 +75,9 @@ class _UpdateLocationDataWidgetState extends State<UpdateLocationDataWidget> {
}
},
),
nonRotatedChildren: const [
OSMFranceTileAttributes(),
],
children: const [
OSMFranceTileLayer(),
],
@ -102,8 +105,10 @@ class _UpdateLocationDataWidgetState extends State<UpdateLocationDataWidget> {
),
);
return locationInDMS != null
? SizedBox(
width: 80 * MediaQuery.textScaleFactorOf(context),
? ConstrainedBox(
constraints: BoxConstraints(
minWidth: 80 * MediaQuery.textScaleFactorOf(context),
),
child: Column(
children: [
Text(
@ -118,10 +123,7 @@ class _UpdateLocationDataWidgetState extends State<UpdateLocationDataWidget> {
],
),
)
: Text(
S.of(context).selectALocation,
style: textTheme.mini,
);
: const UpdateLocationInfo();
},
),
),
@ -227,3 +229,62 @@ class _UpdateLocationDataWidgetState extends State<UpdateLocationDataWidget> {
);
}
}
class UpdateLocationInfo extends StatefulWidget {
const UpdateLocationInfo({super.key});
@override
State<UpdateLocationInfo> createState() => _UpdateLocationInfoState();
}
class _UpdateLocationInfoState extends State<UpdateLocationInfo> {
bool showSelectLocationText = false;
@override
initState() {
super.initState();
Future.delayed(const Duration(seconds: 3), () {
setState(() {
showSelectLocationText = true;
});
});
}
@override
Widget build(BuildContext context) {
return AnimatedCrossFade(
duration: const Duration(milliseconds: 200),
firstCurve: Curves.easeInOutExpo,
secondCurve: Curves.easeInOutExpo,
sizeCurve: Curves.easeInOutExpo,
crossFadeState: showSelectLocationText
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
firstChild: Text(
S.of(context).selectALocation,
style: getEnteTextTheme(context).mini,
),
secondChild: Text(
S.of(context).editsToLocationWillOnlyBeSeenWithinEnte,
style: getEnteTextTheme(context).mini,
),
layoutBuilder: (topChild, topChildKey, bottomChild, bottomChildKey) {
return Stack(
alignment: Alignment.center,
children: [
Positioned(
top: 0,
key: bottomChildKey,
child: bottomChild,
// top: 0,
),
Positioned(
key: topChildKey,
child: topChild,
),
],
);
},
);
}
}