Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The package is available from

## 1.1 Consolidate Android Login

+ Remove redundant webid in menu [1.0.25 20260730 jesscmoore]
+ Dismiss snackbars with buttons [1.0.24 20260731 gjw]
+ Bug fix autologin when no domain folder on server [1.0.23 20260729 gjw]
+ Add webid to profile [1.0.22 20260726 jesscmoore]
Expand Down
59 changes: 0 additions & 59 deletions lib/src/widgets/solid_scaffold_appbar_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import 'package:gap/gap.dart';
import 'package:markdown_tooltip/markdown_tooltip.dart';
import 'package:solidpod/solidpod.dart'
show NotLoggedInException, getWebId, isUserLoggedIn;
import 'package:url_launcher/url_launcher.dart';

import 'package:solidui/src/handlers/solid_auth_handler.dart';
import 'package:solidui/src/services/solid_profile_notifier.dart';
Expand Down Expand Up @@ -227,7 +226,6 @@ class _ProfileMenuChip extends StatefulWidget {
class _ProfileMenuChipState extends State<_ProfileMenuChip> {
bool _isLoggedIn = false;
bool _statusLoaded = false;
String? _webId;

@override
void initState() {
Expand All @@ -248,7 +246,6 @@ class _ProfileMenuChipState extends State<_ProfileMenuChip> {
setState(() {
_isLoggedIn = false;
_statusLoaded = true;
_webId = null;
});
}
return;
Expand All @@ -258,7 +255,6 @@ class _ProfileMenuChipState extends State<_ProfileMenuChip> {
setState(() {
_isLoggedIn = loggedIn;
_statusLoaded = true;
_webId = webId;
});
}
} catch (e) {
Expand All @@ -267,24 +263,11 @@ class _ProfileMenuChipState extends State<_ProfileMenuChip> {
setState(() {
_isLoggedIn = false;
_statusLoaded = true;
_webId = null;
});
}
}
}

/// Opens the user's WebID profile in the default browser, mirroring
/// solid_status_bar.dart's `_launchUrl`.

Future<void> _launchWebId() async {
final webId = _webId;
if (webId == null) return;
final uri = Uri.parse(webId);
if (await canLaunchUrl(uri)) {
await launchUrl(uri);
}
}

void _handleSelection(String value) {
switch (value) {
case 'settings':
Expand Down Expand Up @@ -366,48 +349,6 @@ class _ProfileMenuChipState extends State<_ProfileMenuChip> {
itemBuilder: (menuContext) {
final items = <PopupMenuEntry<String>>[];

// WebID — always visible identity header when signed in, so
// the user's WebID is discoverable/copyable regardless of
// screen width (unlike the drawer/status-bar surfaces, which
// are shown one-or-the-other depending on window size).
// `enabled: false` stops the item's own tap-to-select
// behaviour from swallowing the SelectableText's gestures.

if (_isLoggedIn && _webId != null && _webId!.isNotEmpty) {
items.add(
PopupMenuItem<String>(
enabled: false,
child: MarkdownTooltip(
message: '**WebId**\n\n$_webId - this is the Solid '
'server of your webid identifier. You can tap '
'here to open your webid profile in a web '
'browser.',
child: SizedBox(
width: 280,
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Icon(Icons.badge_outlined, size: 20),
const SizedBox(width: 12),
Expanded(
child: SelectableText(
'Webid: $_webId!',
maxLines: 2,
onTap: _launchWebId,
),
),
],
),
),
),
),
),
);
items.add(const PopupMenuDivider());
}

// Settings — always available; opens the profile editor
// dialog hosting display name, avatar and privacy.

Expand Down
Loading