mirror of
https://github.com/nextcloud/server.git
synced 2026-03-29 22:03:27 -04:00
Merge pull request #49024 from nextcloud/backport/48294/master
This commit is contained in:
commit
b5afb7805c
5 changed files with 12 additions and 4 deletions
|
|
@ -58,6 +58,7 @@ class FilesPlugin extends ServerPlugin {
|
|||
public const HAS_PREVIEW_PROPERTYNAME = '{http://nextcloud.org/ns}has-preview';
|
||||
public const MOUNT_TYPE_PROPERTYNAME = '{http://nextcloud.org/ns}mount-type';
|
||||
public const MOUNT_ROOT_PROPERTYNAME = '{http://nextcloud.org/ns}is-mount-root';
|
||||
public const IS_FEDERATED_PROPERTYNAME = '{http://nextcloud.org/ns}is-federated';
|
||||
public const METADATA_ETAG_PROPERTYNAME = '{http://nextcloud.org/ns}metadata_etag';
|
||||
public const UPLOAD_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}upload_time';
|
||||
public const CREATION_TIME_PROPERTYNAME = '{http://nextcloud.org/ns}creation_time';
|
||||
|
|
@ -119,6 +120,7 @@ class FilesPlugin extends ServerPlugin {
|
|||
$server->protectedProperties[] = self::DATA_FINGERPRINT_PROPERTYNAME;
|
||||
$server->protectedProperties[] = self::HAS_PREVIEW_PROPERTYNAME;
|
||||
$server->protectedProperties[] = self::MOUNT_TYPE_PROPERTYNAME;
|
||||
$server->protectedProperties[] = self::IS_FEDERATED_PROPERTYNAME;
|
||||
$server->protectedProperties[] = self::SHARE_NOTE;
|
||||
|
||||
// normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH
|
||||
|
|
@ -414,6 +416,11 @@ class FilesPlugin extends ServerPlugin {
|
|||
$propFind->handle(self::DISPLAYNAME_PROPERTYNAME, function () use ($node) {
|
||||
return $node->getName();
|
||||
});
|
||||
|
||||
$propFind->handle(self::IS_FEDERATED_PROPERTYNAME, function () use ($node) {
|
||||
return $node->getFileInfo()->getMountPoint()
|
||||
instanceof \OCA\Files_Sharing\External\Mount;
|
||||
});
|
||||
}
|
||||
|
||||
if ($node instanceof File) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import { generateAvatarSvg } from '../utils/AccountIcon'
|
|||
import './sharingStatusAction.scss'
|
||||
|
||||
const isExternal = (node: Node) => {
|
||||
return node.attributes.remote_id !== undefined
|
||||
return node.attributes?.['is-federated'] ?? false
|
||||
}
|
||||
|
||||
export const action = new FileAction({
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export const generateAvatarSvg = (userId: string, isGuest = false) => {
|
|||
|
||||
const url = `${basePath}/32${darkModePath}${guestFallback}`
|
||||
const avatarUrl = generateUrl(url, { userId })
|
||||
|
||||
return `<svg width="32" height="32" viewBox="0 0 32 32"
|
||||
xmlns="http://www.w3.org/2000/svg" class="sharing-status__avatar">
|
||||
<image href="${avatarUrl}" height="32" width="32" />
|
||||
|
|
|
|||
4
dist/files_sharing-init.js
vendored
4
dist/files_sharing-init.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-init.js.map
vendored
2
dist/files_sharing-init.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue