diff --git a/js/src/components/Resource/FolderItem.vue b/js/src/components/Resource/FolderItem.vue index ecda49c88..e254c9224 100644 --- a/js/src/components/Resource/FolderItem.vue +++ b/js/src/components/Resource/FolderItem.vue @@ -29,7 +29,7 @@ class="actions" v-if="!inline" @delete="$emit('delete', resource.id)" - @move="$emit('move', resource.id)" + @move="$emit('move', resource)" @rename="$emit('rename', resource)" /> @@ -70,8 +70,6 @@ export default class FolderItem extends Mixins(ResourceMixin) { usernameWithDomain = usernameWithDomain; async onChange(evt: ChangeEvent): Promise { - console.log("into folder item"); - console.log(evt); if (evt.added && evt.added.element) { const movedResource = evt.added.element as IResource; const updatedResource = await this.moveResource(movedResource); diff --git a/js/src/components/Resource/ResourceItem.vue b/js/src/components/Resource/ResourceItem.vue index 4751e2a3b..c5865ed0d 100644 --- a/js/src/components/Resource/ResourceItem.vue +++ b/js/src/components/Resource/ResourceItem.vue @@ -29,7 +29,7 @@ class="actions" v-if="!inline" @delete="$emit('delete', resource.id)" - @move="$emit('move', resource.id)" + @move="$emit('move', resource)" @rename="$emit('rename', resource)" /> diff --git a/js/src/components/Resource/ResourceSelector.vue b/js/src/components/Resource/ResourceSelector.vue new file mode 100644 index 000000000..a16bb3be1 --- /dev/null +++ b/js/src/components/Resource/ResourceSelector.vue @@ -0,0 +1,129 @@ + + + diff --git a/js/src/graphql/resources.ts b/js/src/graphql/resources.ts index 65ea76422..5b1e90525 100644 --- a/js/src/graphql/resources.ts +++ b/js/src/graphql/resources.ts @@ -18,6 +18,7 @@ export const GET_RESOURCE = gql` summary url path + type metadata { ...ResourceMetadataBasicFields authorName @@ -28,6 +29,8 @@ export const GET_RESOURCE = gql` } parent { id + path + type } actor { id @@ -44,6 +47,11 @@ export const GET_RESOURCE = gql` type path resourceUrl + parent { + id + path + type + } metadata { ...ResourceMetadataBasicFields } @@ -112,7 +120,12 @@ export const UPDATE_RESOURCE = gql` summary url path + type resourceUrl + parent { + id + path + } } } `; diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 951400e12..75cbc481a 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -696,5 +696,12 @@ "Can be an email or a link, or just plain text.": "Can be an email or a link, or just plain text.", "No profiles found": "No profiles found", "URL copied to clipboard": "URL copied to clipboard", - "Report #{reportNumber}": "Report #{reportNumber}" + "Report #{reportNumber}": "Report #{reportNumber}", + "Move \"{resourceName}\"": "Move \"{resourceName}\"", + "Parent folder": "Parent folder", + "(this folder)": "(this folder)", + "(this link)": "(this link)", + "Move resource to {folder}": "Move resource to {folder}", + "Create a folder": "Create a folder", + "No resources in this folder": "No resources in this folder" } diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index fc20e2fc5..450552732 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -696,5 +696,12 @@ "contact uninformed": "contact non renseigné", "Can be an email or a link, or just plain text.": "Peut être une adresse email ou bien un lien, ou alors du simple texte brut.", "URL copied to clipboard": "URL copiée dans le presse-papiers", - "Report #{reportNumber}": "Signalement #{reportNumber}" + "Report #{reportNumber}": "Signalement #{reportNumber}", + "Move \"{resourceName}\"": "Déplacer « {resourceName} »", + "Parent folder": "Dossier parent", + "(this folder)": "(ce dossier)", + "(this link)": "(ce lien)", + "Move resource to {folder}": "Déplacer la ressource dans {folder}", + "Create a folder": "Créer un dossier", + "No resources in this folder": "Aucune ressource dans ce dossier" } diff --git a/js/src/views/Resources/ResourceFolder.vue b/js/src/views/Resources/ResourceFolder.vue index eea87b067..28888591e 100644 --- a/js/src/views/Resources/ResourceFolder.vue +++ b/js/src/views/Resources/ResourceFolder.vue @@ -66,7 +66,7 @@
- +
{{ @@ -85,7 +85,12 @@
- +
@@ -100,18 +105,22 @@ v-if="localResource.type !== 'folder'" @delete="deleteResource" @rename="handleRename" + @move="handleMove" />
+
+

{{ $t("No resources in this folder") }}

+
+ + +