mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-02-12 16:52:51 +00:00
log in button, submission guide cancel, filter nsi by popularity and entered text
This commit is contained in:
@@ -81,11 +81,16 @@ class _EditNodeSheetState extends State<EditNodeSheet> {
|
||||
|
||||
if (!hasSeenGuide) {
|
||||
// Show submission guide dialog first
|
||||
await showDialog<void>(
|
||||
final shouldProceed = await showDialog<bool>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => const SubmissionGuideDialog(),
|
||||
);
|
||||
|
||||
// If user canceled the submission guide, don't proceed with submission
|
||||
if (shouldProceed != true) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Now proceed with proximity check
|
||||
@@ -278,6 +283,10 @@ class _EditNodeSheetState extends State<EditNodeSheet> {
|
||||
session.profile != null &&
|
||||
session.profile!.isSubmittable;
|
||||
|
||||
void _navigateToLogin() {
|
||||
Navigator.pushNamed(context, '/settings/osm-account');
|
||||
}
|
||||
|
||||
void _openRefineTags() async {
|
||||
final result = await Navigator.push<RefineTagsResult?>(
|
||||
context,
|
||||
@@ -495,8 +504,8 @@ class _EditNodeSheetState extends State<EditNodeSheet> {
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
onPressed: allowSubmit ? _commit : null,
|
||||
child: Text(locService.t('actions.saveEdit')),
|
||||
onPressed: !appState.isLoggedIn ? _navigateToLogin : (allowSubmit ? _commit : null),
|
||||
child: Text(!appState.isLoggedIn ? locService.t('actions.logIn') : locService.t('actions.saveEdit')),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user