diff options
Diffstat (limited to 'app/assets/javascripts/releases')
10 files changed, 49 insertions, 16 deletions
diff --git a/app/assets/javascripts/releases/components/app_new.vue b/app/assets/javascripts/releases/components/app_new.vue new file mode 100644 index 00000000000..563f76b3281 --- /dev/null +++ b/app/assets/javascripts/releases/components/app_new.vue @@ -0,0 +1,9 @@ +<script> +export default { + name: 'ReleaseNewApp', + components: {}, +}; +</script> +<template> + <div></div> +</template> diff --git a/app/assets/javascripts/releases/components/app_show.vue b/app/assets/javascripts/releases/components/app_show.vue index d521edcc361..0e65d722952 100644 --- a/app/assets/javascripts/releases/components/app_show.vue +++ b/app/assets/javascripts/releases/components/app_show.vue @@ -21,7 +21,7 @@ export default { }; </script> <template> - <div class="prepend-top-default"> + <div class="gl-mt-3"> <gl-skeleton-loading v-if="isFetchingRelease" /> <release-block v-else-if="!fetchError" :release="release" /> diff --git a/app/assets/javascripts/releases/components/evidence_block.vue b/app/assets/javascripts/releases/components/evidence_block.vue index 2cc15777343..6468e2ded62 100644 --- a/app/assets/javascripts/releases/components/evidence_block.vue +++ b/app/assets/javascripts/releases/components/evidence_block.vue @@ -59,7 +59,7 @@ export default { <template> <div> - <div class="card-text prepend-top-default"> + <div class="card-text gl-mt-3"> <b>{{ __('Evidence collection') }}</b> </div> <div v-for="(evidence, index) in evidences" :key="evidenceTitle(index)" class="mb-2"> diff --git a/app/assets/javascripts/releases/components/release_block.vue b/app/assets/javascripts/releases/components/release_block.vue index adb0e69b786..e0061d88ccb 100644 --- a/app/assets/javascripts/releases/components/release_block.vue +++ b/app/assets/javascripts/releases/components/release_block.vue @@ -108,7 +108,7 @@ export default { <release-block-assets v-if="shouldRenderAssets" :assets="assets" /> <evidence-block v-if="hasEvidence && shouldShowEvidence" :release="release" /> - <div ref="gfm-content" class="card-text prepend-top-default"> + <div ref="gfm-content" class="card-text gl-mt-3"> <div class="md" v-html="release.descriptionHtml"></div> </div> </div> diff --git a/app/assets/javascripts/releases/components/release_block_assets.vue b/app/assets/javascripts/releases/components/release_block_assets.vue index e07646e9a9f..ab29ceb0ce6 100644 --- a/app/assets/javascripts/releases/components/release_block_assets.vue +++ b/app/assets/javascripts/releases/components/release_block_assets.vue @@ -4,7 +4,7 @@ import Icon from '~/vue_shared/components/icon.vue'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { ASSET_LINK_TYPE } from '../constants'; import { __, s__, sprintf } from '~/locale'; -import { difference } from 'lodash'; +import { difference, get } from 'lodash'; export default { name: 'ReleaseBlockAssets', @@ -54,7 +54,7 @@ export default { sections() { return [ { - links: this.assets.sources.map(s => ({ + links: get(this.assets, 'sources', []).map(s => ({ url: s.url, name: sprintf(__('Source code (%{fileExtension})'), { fileExtension: s.format }), })), @@ -96,7 +96,7 @@ export default { </script> <template> - <div class="card-text prepend-top-default"> + <div class="card-text gl-mt-3"> <template v-if="glFeatures.releaseAssetLinkType"> <gl-button data-testid="accordion-button" @@ -157,7 +157,7 @@ export default { <ul v-if="assets.links.length" class="pl-0 mb-0 gl-mt-3 list-unstyled js-assets-list"> <li v-for="link in assets.links" :key="link.name" class="gl-mb-3"> <gl-link v-gl-tooltip.bottom :title="__('Download asset')" :href="link.directAssetUrl"> - <icon name="package" class="align-middle append-right-4 align-text-bottom" /> + <icon name="package" class="align-middle gl-mr-2 align-text-bottom" /> {{ link.name }} <span v-if="link.external" data-testid="external-link-indicator">{{ __('(external source)') @@ -174,7 +174,7 @@ export default { aria-haspopup="true" aria-expanded="false" > - <icon name="doc-code" class="align-top append-right-4" /> + <icon name="doc-code" class="align-top gl-mr-2" /> {{ __('Source code') }} <icon name="chevron-down" /> </button> diff --git a/app/assets/javascripts/releases/components/release_block_header.vue b/app/assets/javascripts/releases/components/release_block_header.vue index ed49841757a..310fba0fe76 100644 --- a/app/assets/javascripts/releases/components/release_block_header.vue +++ b/app/assets/javascripts/releases/components/release_block_header.vue @@ -56,7 +56,7 @@ export default { v-gl-tooltip category="primary" variant="default" - class="append-right-10 js-edit-button ml-2 pb-2" + class="gl-mr-3 js-edit-button ml-2 pb-2" :title="__('Edit this release')" :href="editLink" > diff --git a/app/assets/javascripts/releases/components/release_block_metadata.vue b/app/assets/javascripts/releases/components/release_block_metadata.vue index a3377ce044a..861c2e11798 100644 --- a/app/assets/javascripts/releases/components/release_block_metadata.vue +++ b/app/assets/javascripts/releases/components/release_block_metadata.vue @@ -75,7 +75,7 @@ export default { <release-block-milestones v-if="shouldRenderMilestones" :milestones="release.milestones" /> - <div class="append-right-4"> + <div class="gl-mr-2"> • <span v-gl-tooltip.bottom diff --git a/app/assets/javascripts/releases/components/release_block_milestone_info.vue b/app/assets/javascripts/releases/components/release_block_milestone_info.vue index 4f75e15a149..b16ae400d6b 100644 --- a/app/assets/javascripts/releases/components/release_block_milestone_info.vue +++ b/app/assets/javascripts/releases/components/release_block_milestone_info.vue @@ -126,12 +126,12 @@ export default { v-gl-tooltip :title="milestone.description" :href="milestone.webUrl" - class="append-right-4" + class="gl-mr-2" > {{ milestone.title }} </gl-link> <template v-if="shouldRenderBullet(index)"> - <span :key="'bullet-' + milestone.id" class="append-right-4">•</span> + <span :key="'bullet-' + milestone.id" class="gl-mr-2">•</span> </template> <template v-if="shouldRenderShowMoreLink(index)"> <gl-button :key="'more-button-' + milestone.id" variant="link" @click="toggleShowAll"> diff --git a/app/assets/javascripts/releases/mount_new.js b/app/assets/javascripts/releases/mount_new.js new file mode 100644 index 00000000000..eb02c194c59 --- /dev/null +++ b/app/assets/javascripts/releases/mount_new.js @@ -0,0 +1,20 @@ +import Vue from 'vue'; +import ReleaseNewApp from './components/app_new.vue'; +import createStore from './stores'; +import createDetailModule from './stores/modules/detail'; + +export default () => { + const el = document.getElementById('js-new-release-page'); + + const store = createStore({ + modules: { + detail: createDetailModule(el.dataset), + }, + }); + + return new Vue({ + el, + store, + render: h => h(ReleaseNewApp), + }); +}; diff --git a/app/assets/javascripts/releases/stores/modules/detail/state.js b/app/assets/javascripts/releases/stores/modules/detail/state.js index 6d0d102c719..966c1c00ef5 100644 --- a/app/assets/javascripts/releases/stores/modules/detail/state.js +++ b/app/assets/javascripts/releases/stores/modules/detail/state.js @@ -1,17 +1,17 @@ export default ({ projectId, - tagName, - releasesPagePath, markdownDocsPath, markdownPreviewPath, updateReleaseApiDocsPath, releaseAssetsDocsPath, manageMilestonesPath, newMilestonePath, + + tagName = null, + releasesPagePath = null, + defaultBranch = null, }) => ({ projectId, - tagName, - releasesPagePath, markdownDocsPath, markdownPreviewPath, updateReleaseApiDocsPath, @@ -19,6 +19,10 @@ export default ({ manageMilestonesPath, newMilestonePath, + tagName, + releasesPagePath, + defaultBranch, + /** The Release object */ release: null, |