Commit 3b531032 authored by Nick Kipling's avatar Nick Kipling

Applying UX feedback

parent d854f68b
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import PackageTags from '../../shared/components/package_tags.vue'; import PackageTags from '../../shared/components/package_tags.vue';
import PublishMethod from './publish_method.vue'; import PublishMethod from './publish_method.vue';
import { GlNewButton, GlIcon, GlLink, GlSprintf, GlTooltipDirective } from '@gitlab/ui'; import { GlNewButton, GlIcon, GlLink, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale';
import { getPackageType } from '../../shared/utils'; import { getPackageType } from '../../shared/utils';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
...@@ -31,16 +30,12 @@ export default { ...@@ -31,16 +30,12 @@ export default {
...mapState({ ...mapState({
isGroupPage: state => state.config.isGroupPage, isGroupPage: state => state.config.isGroupPage,
}), }),
createdBy() {
if (this.packageEntity.pipeline) {
return s__('PackageRegistry|%{version} published by %{author}');
}
return '%{version}';
},
packageType() { packageType() {
return getPackageType(this.packageEntity.package_type); return getPackageType(this.packageEntity.package_type);
}, },
hasPipeline() {
return Boolean(this.packageEntity.pipeline);
},
hasProjectLink() { hasProjectLink() {
return Boolean(this.packageEntity.project_path); return Boolean(this.packageEntity.project_path);
}, },
...@@ -68,14 +63,13 @@ export default { ...@@ -68,14 +63,13 @@ export default {
</div> </div>
<div class="d-flex text-secondary text-truncate mt-md-2"> <div class="d-flex text-secondary text-truncate mt-md-2">
<gl-sprintf :message="createdBy"> <span>{{ packageEntity.version }}</span>
<template #version>
<gl-icon name="eye" class="text-secondary mr-1" />
{{ packageEntity.version }}
</template>
<template #author>{{ packageEntity.pipeline.user.name }}</template> <div v-if="hasPipeline" class="d-none d-md-inline-block ml-1">
</gl-sprintf> <gl-sprintf :message="s__('PackageRegistry|published by %{author}')">
<template #author>{{ packageEntity.pipeline.user.name }}</template>
</gl-sprintf>
</div>
<div v-if="hasProjectLink" class="d-flex align-items-center"> <div v-if="hasProjectLink" class="d-flex align-items-center">
<gl-icon name="review-list" class="text-secondary ml-2 mr-1" /> <gl-icon name="review-list" class="text-secondary ml-2 mr-1" />
......
...@@ -24,9 +24,11 @@ exports[`packages_list_row renders 1`] = ` ...@@ -24,9 +24,11 @@ exports[`packages_list_row renders 1`] = `
<div <div
class="d-flex text-secondary text-truncate mt-md-2" class="d-flex text-secondary text-truncate mt-md-2"
> >
<gl-sprintf-stub <span>
message="%{version}" 1.0.0
/> </span>
<!---->
<div <div
class="d-flex align-items-center" class="d-flex align-items-center"
......
...@@ -14263,9 +14263,6 @@ msgstr "" ...@@ -14263,9 +14263,6 @@ msgstr ""
msgid "Package was removed" msgid "Package was removed"
msgstr "" msgstr ""
msgid "PackageRegistry|%{version} published by %{author}"
msgstr ""
msgid "PackageRegistry|Add Conan Remote" msgid "PackageRegistry|Add Conan Remote"
msgstr "" msgstr ""
...@@ -14404,6 +14401,9 @@ msgstr "" ...@@ -14404,6 +14401,9 @@ msgstr ""
msgid "PackageRegistry|npm" msgid "PackageRegistry|npm"
msgstr "" msgstr ""
msgid "PackageRegistry|published by %{author}"
msgstr ""
msgid "PackageRegistry|yarn" msgid "PackageRegistry|yarn"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment