File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,6 @@ export default {
260260 },
261261 },
262262 async mounted () {
263- // Store and update favicon
264263 this .storeFavicon ()
265264 this .updateFavicon ()
266265
@@ -574,6 +573,25 @@ export default {
574573 return ' x-office-document'
575574 },
576575
576+ storeFavicon () {
577+ const link = document .querySelector (' link[rel*="icon"]' )
578+ if (link) {
579+ this .originalFavicon = link .href
580+ }
581+ },
582+
583+ updateFavicon () {
584+ const link = document .querySelector (' link[rel*="icon"]' )
585+ if (link) {
586+ const iconPath = generateFilePath (
587+ ' richdocuments' ,
588+ ' img' ,
589+ this .getDocumentTypeIcon () + ' .svg' ,
590+ )
591+ link .href = window .location .protocol + ' //' + getNextcloudUrl () + iconPath
592+ }
593+ },
594+
577595 restoreFavicon () {
578596 if (this .originalFavicon ) {
579597 const link = document .querySelector (' link[rel*="icon"]' )
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ namespace OC\Files\Storage\Wrapper {
6363 public function getInstanceOfStorage(string $class): ?IStorage {};
6464 public function __call(string $method, array $args) {};
6565 public function getDirectDownload(string $path): array|false {};
66+ public function getDirectDownloadById(string $fileId): array|false {};
6667 public function getAvailability(): array {};
6768 public function setAvailability(bool $isAvailable): void {};
6869 public function verifyPath(string $path, string $fileName): void {};
You can’t perform that action at this time.
0 commit comments