mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-27 19:11:09 +00:00

* feat: support share page * feat: support copy share link * chore: replace share icon * chore: update translations * chore: optimize code * test: add share link test * feat: support copy block link * test: add copy link to block test * chore: refactor share code * fix: doc bloc not found issue
24 lines
603 B
Dart
24 lines
603 B
Dart
class ShareConstants {
|
|
static const String publishBaseUrl = 'https://appflowy.com';
|
|
static const String shareBaseUrl = 'https://appflowy.com/app';
|
|
|
|
static String buildPublishUrl({
|
|
required String nameSpace,
|
|
required String publishName,
|
|
}) {
|
|
return '$publishBaseUrl/$nameSpace/$publishName';
|
|
}
|
|
|
|
static String buildShareUrl({
|
|
required String workspaceId,
|
|
required String viewId,
|
|
String? blockId,
|
|
}) {
|
|
final url = '$shareBaseUrl/$workspaceId/$viewId';
|
|
if (blockId == null || blockId.isEmpty) {
|
|
return url;
|
|
}
|
|
return '$url?blockId=$blockId';
|
|
}
|
|
}
|