diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-10-26 14:58:58 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2022-11-28 17:29:11 +0100 |
commit | 348796892b0cff6dfe38ce4d6761309552cc8c05 (patch) | |
tree | 77fa78833844940aaa4551ae361354ccf35eeca9 /apps/files_versions | |
parent | 7888aaf34f4f315e4cd71172213e64b4af095521 (diff) | |
download | nextcloud-server-348796892b0cff6dfe38ce4d6761309552cc8c05.tar.gz nextcloud-server-348796892b0cff6dfe38ce4d6761309552cc8c05.zip |
Use NcListItem
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/src/views/VersionTab.vue | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/apps/files_versions/src/views/VersionTab.vue b/apps/files_versions/src/views/VersionTab.vue index 7c5da82ad2e..119dc95a60d 100644 --- a/apps/files_versions/src/views/VersionTab.vue +++ b/apps/files_versions/src/views/VersionTab.vue @@ -17,50 +17,52 @@ --> <template> <div> - <NcListItem v-for="version in versions" - class="version" - key="version.url" - :title="version.title" - :href="version.url"> - <template #icon> - <img lazy="true" - :src="version.preview" - alt="" - height="256" - width="256" - class="version-image"> - </template> - <template #subtitle> - <div class="version-info"> - <a v-tooltip="version.dateTime" :href="version.url">{{ version.relativeTime }}</a> - <span class="version-info-size">•</span> - <span class="version-info-size"> - {{ version.size }} - </span> - </div> - </template> - <template #actions> - <NcActionLink :href="version.url"> - <template #icon> - <Download :size="22" /> - </template> - {{ t('files_versions', `Download file ${fileInfo.name} with version ${version.displayVersionName}`) }} - </NcActionLink> - <NcActionButton @click="restoreVersion(version)" v-if="!version.isCurrent"> - <template #icon> - <BackupRestore :size="22" /> - </template> - {{ t('files_versions', `Restore file ${fileInfo.name} with version ${version.displayVersionName}`) }} - </NcActionButton> - </template> - </NcListItem> - <NcEmptyContent v-if="!loading && versions.length === 1" - :title="t('files_version', 'No versions yet')"> - <!-- length === 1, since we don't want to show versions if there is only the current file --> - <template #icon> - <BackupRestore /> - </template> - </NcEmptyContent> + <ul> + <NcListItem v-for="version in versions" + class="version" + key="version.url" + :title="version.title" + :href="version.url"> + <template #icon> + <img lazy="true" + :src="version.preview" + alt="" + height="256" + width="256" + class="version-image"> + </template> + <template #subtitle> + <div class="version-info"> + <a v-tooltip="version.dateTime" :href="version.url">{{ version.relativeTime }}</a> + <span class="version-info-size">•</span> + <span class="version-info-size"> + {{ version.size }} + </span> + </div> + </template> + <template #actions> + <NcActionLink :href="version.url"> + <template #icon> + <Download :size="22" /> + </template> + {{ t('files_versions', 'Download version') }} + </NcActionLink> + <NcActionButton @click="restoreVersion(version)" v-if="!version.isCurrent"> + <template #icon> + <BackupRestore :size="22" /> + </template> + {{ t('files_versions', 'Restore version') }} + </NcActionButton> + </template> + </NcListItem> + <NcEmptyContent v-if="!loading && versions.length === 1" + :title="t('files_version', 'No versions yet')"> + <!-- length === 1, since we don't want to show versions if there is only the current file --> + <template #icon> + <BackupRestore /> + </template> + </NcEmptyContent> + </ul> </div> </template> |