mirror of
https://github.com/localsend/localsend.git
synced 2026-06-23 04:10:07 +00:00
feat: treat any URI as link (#1662)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
## 1.15.4 (unreleased)
|
||||
|
||||
- feat: show tooltip on the "Scan" button (@Tienisto)
|
||||
- feat: treat any URI as link, so it becomes clickable on receiver (e.g. file://, obsidian://) (@Tienisto)
|
||||
- feat(mobile): adjust padding between buttons in send tab to indicate that it's scrollable (@Tienisto)
|
||||
- feat(windows): title bar color should match the system theme (@FutoTan)
|
||||
- fix: memory leak when sending files (1.15.0 only fixed receiving files while causing regression bug) (@Tienisto)
|
||||
|
||||
@@ -109,7 +109,7 @@ class InitReceivePageAction extends ReduxAction<ReceivePageController, ReceivePa
|
||||
showSenderInfo: true,
|
||||
fileCount: receiveSession.files.length,
|
||||
message: receiveSession.message,
|
||||
isLink: receiveSession.message != null && (receiveSession.message!.startsWith('http://') || receiveSession.message!.startsWith('https')),
|
||||
isLink: receiveSession.message != null && (receiveSession.message!.isLink),
|
||||
showFullIp: false,
|
||||
onAccept: () async {
|
||||
if (state.message != null) {
|
||||
@@ -167,7 +167,7 @@ class InitReceivePageFromHistoryMessageAction extends ReduxAction<ReceivePageCon
|
||||
showSenderInfo: false,
|
||||
fileCount: 1,
|
||||
message: entry.fileName,
|
||||
isLink: entry.fileName.startsWith('http://') || entry.fileName.startsWith('https'),
|
||||
isLink: entry.fileName.isLink,
|
||||
showFullIp: false,
|
||||
onAccept: () {},
|
||||
onDecline: () {},
|
||||
@@ -188,3 +188,7 @@ class SetShowFullIpAction extends ReduxAction<ReceivePageController, ReceivePage
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension on String {
|
||||
bool get isLink => Uri.tryParse(this)?.isAbsolute ?? false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user