Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/files/src/components/BreadCrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,15 @@ export default defineComponent({

const source = this.getFileSourceFromPath(path)
const node = source ? this.getNodeFromSource(source) : undefined
return node?.displayname || basename(path)
if (node?.displayname) {
return node.displayname
}
// Fallback while the path store is not yet populated (e.g. tag folder
// before the REPORT completes): use the active folder's display name.
if (this.activeStore.activeFolder?.path === path) {
return this.activeStore.activeFolder.displayname || basename(path)
}
return basename(path)
},

getTo(dir: string, node?: Node): Record<string, unknown> {
Expand Down
19 changes: 16 additions & 3 deletions apps/files/src/store/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import type { IFolder, INode } from '@nextcloud/files'
import type { FileSource, FilesStore, RootOptions, RootsStore, Service } from '../types.ts'

import { getRootPath } from '@nextcloud/files/dav'
import { subscribe } from '@nextcloud/event-bus'
import { defineStore } from 'pinia'
import Vue, { ref } from 'vue'
Expand Down Expand Up @@ -215,12 +216,19 @@ export const useFilesStore = defineStore('files', () => {
* @param node - The updated node
*/
async function onUpdatedNode(node: INode) {
// If we have multiple nodes with the same file ID, we need to update all of them
// If we have multiple nodes with the same file ID, we need to update all of them.
// Filter to only nodes under the files DAV root — e.g. systemtag folder nodes share
// an integer ID namespace with regular files but live under /systemtags and cannot
// be fetched via the /files/{uid} DAV client.
const nodes = node.id
? getNodesById(node.id)
: getNodes([node.source])
if (nodes.length > 1) {
await Promise.all(nodes.map((node) => fetchNode(node.path))).then(updateNodes)
const filesRoot = getRootPath()
const fileNodes = nodes.filter((n) => n.root === filesRoot)
if (fileNodes.length > 0) {
await Promise.all(fileNodes.map((n) => fetchNode(n.path))).then(updateNodes)
}
logger.debug(nodes.length + ' nodes updated in store', { fileid: node.id, source: node.source })
return
}
Expand All @@ -231,7 +239,12 @@ export const useFilesStore = defineStore('files', () => {
return
}

// Otherwise, it means we receive an event for a node that is not in the store
// Otherwise, it means we receive an event for a node that is not in the store.
// Skip nodes from non-files roots (e.g. /systemtags) — they cannot be fetched
// via the /files/{uid} DAV client and would result in a spurious 404.
if (node.root !== getRootPath()) {
return
}
fetchNode(node.path).then((n) => updateNodes([n]))
}

Expand Down
2 changes: 1 addition & 1 deletion apps/systemtags/src/files_views/systemtagsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function registerSystemTagsView() {
const Navigation = getNavigation()
Navigation.register(new View({
id: systemTagsViewId,
name: t('systemtags', 'Tags'),
name: t('systemtags', 'All tags'),
caption: t('systemtags', 'List of tags and their associated files and folders.'),

emptyTitle: t('systemtags', 'No tags found'),
Expand Down
4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-sidebar.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/systemtags-init.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import{d as re,b as te,V as oe,D as ae,a as C}from"./index-CsvAZXm-.chunk.mjs";i
<oc:filter-rules>
<oc:systemtag>${e}</oc:systemtag>
</oc:filter-rules>
</oc:filter-files>`}function V(e){return new B({id:e.id,source:`${R()}${I}/${e.id}`,owner:String(Z()?.uid??"anonymous"),root:I,displayname:e.displayName,permissions:P.READ,attributes:{...e,"is-tag":!0}})}async function Je(e="/"){const n=(await W()).filter(l=>l.userVisible);if(e==="/")return{folder:new B({id:0,source:`${R()}${I}`,owner:Z()?.uid,root:I,permissions:P.NONE}),contents:n.map(V)};const r=e.split("/",2)[1];if(!r||isNaN(parseInt(r)))throw new Error("Invalid tag ID");const t=parseInt(r),o=n.find(l=>l.id===t);if(!o)throw new Error("Tag not found");const a=V(o),s=await He.getDirectoryContents(le(),{details:!0,data:Be(t),headers:{method:"REPORT"}});return{folder:a,contents:s.data.map(l=>ie(l))}}const ee="tags";function Ze(){te().register(new oe({id:ee,name:w("systemtags","Tags"),caption:w("systemtags","List of tags and their associated files and folders."),emptyTitle:w("systemtags","No tags found"),emptyCaption:w("systemtags","Tags you have created will show up here."),icon:Y,order:25,getContents:Je}))}const We={id:"systemtags:open-in-files",displayName:()=>w("systemtags","Open in Files"),iconSvgInline:()=>"",enabled({nodes:e,view:n}){return n.id!==ee||e.length!==1||!e[0]?!1:e[0].attributes["is-tag"]!==!0&&e[0].type===D.Folder},async exec({nodes:e}){if(!e[0]||e.length!==1)return!1;let n=e[0].dirname;return e[0].type===D.Folder&&(n=e[0].path),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(e[0].fileid)},{dir:n,openfile:"true"}),null},order:-1e3,default:ae.HIDDEN};he("nc:system-tags"),C(fe),C(Pe),C(We),Ze(),pe();export{Ce as a,Fe as e,fn as i};
</oc:filter-files>`}function V(e){return new B({id:e.id,source:`${R()}${I}/${e.id}`,owner:String(Z()?.uid??"anonymous"),root:I,displayname:e.displayName,permissions:P.READ,attributes:{...e,"is-tag":!0}})}async function Je(e="/"){const n=(await W()).filter(l=>l.userVisible);if(e==="/")return{folder:new B({id:0,source:`${R()}${I}`,owner:Z()?.uid,root:I,permissions:P.NONE}),contents:n.map(V)};const r=e.split("/",2)[1];if(!r||isNaN(parseInt(r)))throw new Error("Invalid tag ID");const t=parseInt(r),o=n.find(l=>l.id===t);if(!o)throw new Error("Tag not found");const a=V(o),s=await He.getDirectoryContents(le(),{details:!0,data:Be(t),headers:{method:"REPORT"}});return{folder:a,contents:s.data.map(l=>ie(l))}}const ee="tags";function Ze(){te().register(new oe({id:ee,name:w("systemtags","All tags"),caption:w("systemtags","List of tags and their associated files and folders."),emptyTitle:w("systemtags","No tags found"),emptyCaption:w("systemtags","Tags you have created will show up here."),icon:Y,order:25,getContents:Je}))}const We={id:"systemtags:open-in-files",displayName:()=>w("systemtags","Open in Files"),iconSvgInline:()=>"",enabled({nodes:e,view:n}){return n.id!==ee||e.length!==1||!e[0]?!1:e[0].attributes["is-tag"]!==!0&&e[0].type===D.Folder},async exec({nodes:e}){if(!e[0]||e.length!==1)return!1;let n=e[0].dirname;return e[0].type===D.Folder&&(n=e[0].path),window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(e[0].fileid)},{dir:n,openfile:"true"}),null},order:-1e3,default:ae.HIDDEN};he("nc:system-tags"),C(fe),C(Pe),C(We),Ze(),pe();export{Ce as a,Fe as e,fn as i};
//# sourceMappingURL=systemtags-init.mjs.map
2 changes: 1 addition & 1 deletion dist/systemtags-init.mjs.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level
// when updating major/minor version number.

$OC_Version = [34, 0, 0, 6];
$OC_Version = [34, 0, 0, 7];

// The human-readable string
$OC_VersionString = '34.0.0 beta 5';
$OC_VersionString = '34.0.0 RC1';

$OC_VersionCanBeUpgradedFrom = [
'nextcloud' => [
Expand Down