Add feature flag to disable edits temporarily during bugfix

This commit is contained in:
stopflock
2025-11-15 14:39:27 -06:00
parent fee557330d
commit fb8260d346
11 changed files with 31 additions and 4 deletions
+19 -2
View File
@@ -157,7 +157,8 @@ class EditNodeSheet extends StatelessWidget {
final submittableProfiles = appState.enabledProfiles.where((p) => p.isSubmittable).toList();
final isSandboxMode = appState.uploadMode == UploadMode.sandbox;
final allowSubmit = appState.isLoggedIn &&
final allowSubmit = kEnableNodeEdits &&
appState.isLoggedIn &&
submittableProfiles.isNotEmpty &&
session.profile != null &&
session.profile!.isSubmittable;
@@ -209,7 +210,23 @@ class EditNodeSheet extends StatelessWidget {
// Direction controls
_buildDirectionControls(context, appState, session, locService),
if (!appState.isLoggedIn)
if (!kEnableNodeEdits)
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 12),
child: Row(
children: [
const Icon(Icons.construction, color: Colors.orange, size: 20),
const SizedBox(width: 6),
Expanded(
child: Text(
locService.t('editNode.temporarilyDisabled'),
style: const TextStyle(color: Colors.orange, fontSize: 13),
),
),
],
),
)
else if (!appState.isLoggedIn)
Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 12),
child: Row(