Fix minor web bugs
This commit is contained in:
parent
6aa6d0e911
commit
c746778f3f
|
@ -42,7 +42,7 @@ class Avatar extends StatelessWidget {
|
||||||
backgroundImage: mxContent.mxc?.isNotEmpty ?? false
|
backgroundImage: mxContent.mxc?.isNotEmpty ?? false
|
||||||
? AdvancedNetworkImage(
|
? AdvancedNetworkImage(
|
||||||
src,
|
src,
|
||||||
useDiskCache: true,
|
useDiskCache: !kIsWeb,
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
backgroundColor: mxContent.mxc.isEmpty
|
backgroundColor: mxContent.mxc.isEmpty
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ContentBanner extends StatelessWidget {
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
image: AdvancedNetworkImage(
|
image: AdvancedNetworkImage(
|
||||||
src,
|
src,
|
||||||
useDiskCache: true,
|
useDiskCache: !kIsWeb,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Icon(defaultIcon, size: 300)
|
: Icon(defaultIcon, size: 300)
|
||||||
|
|
|
@ -18,7 +18,9 @@ extension MatrixFileExtension on MatrixFile {
|
||||||
var element = html.document.createElement('a');
|
var element = html.document.createElement('a');
|
||||||
element.setAttribute(
|
element.setAttribute(
|
||||||
'href', html.Url.createObjectUrlFromBlob(html.Blob([bytes])));
|
'href', html.Url.createObjectUrlFromBlob(html.Blob([bytes])));
|
||||||
element.setAttribute('target', "new");
|
element.setAttribute('target', "_blank");
|
||||||
|
element.setAttribute('rel', "noopener");
|
||||||
|
element.setAttribute('download', fileName);
|
||||||
element.setAttribute('type', mimeType);
|
element.setAttribute('type', mimeType);
|
||||||
element.style.display = 'none';
|
element.style.display = 'none';
|
||||||
html.document.body.append(element);
|
html.document.body.append(element);
|
||||||
|
|
Loading…
Reference in a new issue