Skip to content
Snippets Groups Projects
Unverified Commit 5b9495c5 authored by Mike Greiling's avatar Mike Greiling
Browse files

Prettify all the things

parent 29d129d2
No related branches found
No related tags found
No related merge requests found
Showing
with 79 additions and 261 deletions
Loading
Loading
@@ -31,9 +31,7 @@ export default {
<div class="info-well prepend-top-default">
<div class="well-segment">
<ul class="blob-commit-info">
<commit-item
:commit="commit"
/>
<commit-item :commit="commit" />
</ul>
</div>
</div>
Loading
Loading
Loading
Loading
@@ -73,27 +73,20 @@ export default {
 
<template>
<div class="mr-version-controls">
<div
class="mr-version-menus-container content-block"
>
<div class="mr-version-menus-container content-block">
<button
v-tooltip.hover
type="button"
class="btn btn-default append-right-8 js-toggle-tree-list"
:class="{
active: showTreeList
active: showTreeList,
}"
:title="__('Toggle file browser')"
@click="toggleShowTreeList"
>
<icon
name="hamburger"
/>
<icon name="hamburger" />
</button>
<div
v-if="showDropdowns"
class="d-flex align-items-center compare-versions-container"
>
<div v-if="showDropdowns" class="d-flex align-items-center compare-versions-container">
Changes between
<compare-versions-dropdown
:other-versions="mergeRequestDiffs"
Loading
Loading
@@ -109,20 +102,11 @@ export default {
class="mr-version-compare-dropdown"
/>
</div>
<div
class="inline-parallel-buttons d-none d-md-flex ml-auto"
>
<a
v-show="hasCollapsedFile"
class="btn btn-default append-right-8"
@click="expandAllFiles"
>
<div class="inline-parallel-buttons d-none d-md-flex ml-auto">
<a v-show="hasCollapsedFile" class="btn btn-default append-right-8" @click="expandAllFiles">
{{ __('Expand all') }}
</a>
<a
:href="toggleWhitespacePath"
class="btn btn-default qa-toggle-whitespace"
>
<a :href="toggleWhitespacePath" class="btn btn-default qa-toggle-whitespace">
{{ toggleWhitespaceText }}
</a>
<div class="btn-group prepend-left-8">
Loading
Loading
Loading
Loading
@@ -112,26 +112,14 @@ export default {
data-toggle="dropdown"
aria-expanded="false"
>
<span>
{{ selectedVersionName }}
</span>
<icon
:size="12"
name="angle-down"
class="position-absolute"
/>
<span> {{ selectedVersionName }} </span>
<icon :size="12" name="angle-down" class="position-absolute" />
</a>
<div class="dropdown-menu dropdown-select dropdown-menu-selectable">
<div class="dropdown-content">
<ul>
<li
v-for="version in targetVersions"
:key="version.id"
>
<a
:class="{ 'is-active': isActive(version) }"
:href="href(version)"
>
<li v-for="version in targetVersions" :key="version.id">
<a :class="{ 'is-active': isActive(version) }" :href="href(version)">
<div>
<strong>
{{ versionName(version) }}
Loading
Loading
@@ -141,9 +129,7 @@ export default {
</strong>
</div>
<div>
<small class="commit-sha">
{{ version.truncated_commit_sha }}
</small>
<small class="commit-sha"> {{ version.truncated_commit_sha }} </small>
</div>
<div>
<small>
Loading
Loading
Loading
Loading
@@ -97,10 +97,7 @@ export default {
:file-hash="diffFile.file_hash"
:can-comment="getNoteableData.current_user.can_create_note"
/>
<div
v-if="showNotesContainer"
class="note-container"
>
<div v-if="showNotesContainer" class="note-container">
<diff-discussions
v-if="diffFile.discussions.length"
class="diff-file-discussions"
Loading
Loading
@@ -115,8 +112,8 @@ export default {
:save-button-title="__('Comment')"
class="diff-comment-form new-note discussion-form discussion-form-container"
@handleFormUpdate="handleSaveNote"
@cancelForm="closeDiffFileCommentForm(diffFile.file_hash)"
/>
@cancelForm="closeDiffFileCommentForm(diffFile.file_hash);"
/>
</div>
</diff-viewer>
</div>
Loading
Loading
Loading
Loading
@@ -45,29 +45,22 @@ export default {
v-for="(discussion, index) in discussions"
:key="discussion.id"
:class="{
collapsed: !isExpanded(discussion)
collapsed: !isExpanded(discussion),
}"
class="discussion-notes diff-discussions position-relative"
>
<ul
:data-discussion-id="discussion.id"
class="notes"
>
<ul :data-discussion-id="discussion.id" class="notes">
<template v-if="shouldCollapseDiscussions">
<button
:class="{
'diff-notes-collapse': discussion.expanded,
'btn-transparent badge badge-pill': !discussion.expanded
'btn-transparent badge badge-pill': !discussion.expanded,
}"
type="button"
class="js-diff-notes-toggle"
@click="toggleDiscussion({ discussionId: discussion.id })"
@click="toggleDiscussion({ discussionId: discussion.id });"
>
<icon
v-if="discussion.expanded"
name="collapse"
class="collapse-icon"
/>
<icon v-if="discussion.expanded" name="collapse" class="collapse-icon" />
<template v-else>
{{ index + 1 }}
</template>
Loading
Loading
@@ -81,11 +74,7 @@ export default {
:discussions-by-diff-order="true"
@noteDeleted="deleteNoteHandler"
>
<span
v-if="renderAvatarBadge"
slot="avatar-badge"
class="badge badge-pill"
>
<span v-if="renderAvatarBadge" slot="avatar-badge" class="badge badge-pill">
{{ index + 1 }}
</span>
</noteable-discussion>
Loading
Loading
Loading
Loading
@@ -119,7 +119,7 @@ export default {
<div
:id="file.file_hash"
:class="{
'is-active': currentDiffFileId === file.file_hash
'is-active': currentDiffFileId === file.file_hash,
}"
class="diff-file file-holder"
>
Loading
Loading
@@ -134,13 +134,11 @@ export default {
@showForkMessage="showForkMessage"
/>
 
<div
v-if="forkMessageVisible"
class="js-file-fork-suggestion-section file-fork-suggestion">
<div v-if="forkMessageVisible" class="js-file-fork-suggestion-section file-fork-suggestion">
<span class="file-fork-suggestion-note">
You're not allowed to <span class="js-file-fork-suggestion-section-action">edit</span>
files in this project directly. Please fork this project,
make your changes there, and submit a merge request.
You're not allowed to <span class="js-file-fork-suggestion-section-action">edit</span> files
in this project directly. Please fork this project, make your changes there, and submit a
merge request.
</span>
<a
:href="file.fork_path"
Loading
Loading
@@ -162,27 +160,14 @@ export default {
:class="{ hidden: isCollapsed || file.too_large }"
:diff-file="file"
/>
<gl-loading-icon
v-if="showLoadingIcon"
class="diff-content loading"
/>
<div
v-else-if="showExpandMessage"
class="nothing-here-block diff-collapsed"
>
<gl-loading-icon v-if="showLoadingIcon" class="diff-content loading" />
<div v-else-if="showExpandMessage" class="nothing-here-block diff-collapsed">
{{ __('This diff is collapsed.') }}
<a
class="click-to-expand js-click-to-expand"
href="#"
@click.prevent="handleToggle"
>
<a class="click-to-expand js-click-to-expand" href="#" @click.prevent="handleToggle">
{{ __('Click to expand it.') }}
</a>
</div>
<div
v-if="file.too_large"
class="nothing-here-block diff-collapsed js-too-large-diff"
>
<div v-if="file.too_large" class="nothing-here-block diff-collapsed js-too-large-diff">
{{ __('This source diff could not be displayed because it is too large.') }}
<span v-html="viewBlobLink"></span>
</div>
Loading
Loading
Loading
Loading
@@ -141,7 +141,7 @@ export default {
<div
ref="header"
class="js-file-title file-title file-title-flex-parent"
@click="handleToggleFile($event, true)"
@click="handleToggleFile($event, true);"
>
<div class="file-header-content">
<icon
Loading
Loading
@@ -152,12 +152,7 @@ export default {
class="diff-toggle-caret append-right-5"
@click.stop="handleToggle"
/>
<a
v-once
ref="titleWrapper"
:href="titleLink"
class="append-right-4 js-title-wrapper"
>
<a v-once ref="titleWrapper" :href="titleLink" class="append-right-4 js-title-wrapper">
<file-icon
:file-name="filePath"
:size="18"
Loading
Loading
@@ -182,13 +177,7 @@ export default {
></strong>
</span>
 
<strong
v-else
v-tooltip
:title="filePath"
class="file-title-name"
data-container="body"
>
<strong v-else v-tooltip :title="filePath" class="file-title-name" data-container="body">
{{ filePath }}
</strong>
</a>
Loading
Loading
@@ -200,28 +189,18 @@ export default {
css-class="btn-default btn-transparent btn-clipboard"
/>
 
<small
v-if="diffFile.mode_changed"
ref="fileMode"
>
<small v-if="diffFile.mode_changed" ref="fileMode">
{{ diffFile.a_mode }} → {{ diffFile.b_mode }}
</small>
 
<span
v-if="isUsingLfs"
class="label label-lfs append-right-5"
>
{{ __('LFS') }}
</span>
<span v-if="isUsingLfs" class="label label-lfs append-right-5"> {{ __('LFS') }} </span>
</div>
 
<div
v-if="!diffFile.submodule && addMergeRequestButtons"
class="file-actions d-none d-sm-block"
>
<template
v-if="diffFile.blob && diffFile.blob.readable_text"
>
<template v-if="diffFile.blob && diffFile.blob.readable_text">
<button
:disabled="!diffHasDiscussions(diffFile)"
:class="{ active: hasExpandedDiscussions }"
Loading
Loading
@@ -249,11 +228,7 @@ export default {
v-html="viewReplacedFileButtonText"
>
</a>
<a
:href="diffFile.view_path"
class="btn view-file js-view-file"
v-html="viewFileButtonText"
>
<a :href="diffFile.view_path" class="btn view-file js-view-file" v-html="viewFileButtonText">
</a>
 
<a
Loading
Loading
Loading
Loading
@@ -75,10 +75,7 @@ export default {
class="diff-notes-collapse js-diff-comment-avatar js-diff-comment-button"
@click="toggleDiscussions"
>
<icon
:size="12"
name="collapse"
/>
<icon :size="12" name="collapse" />
</button>
<template v-else>
<user-avatar-image
Loading
Loading
@@ -99,7 +96,8 @@ export default {
data-placement="top"
role="button"
@click="toggleDiscussions"
>+{{ moreCount }}</span>
>+{{ moreCount }}</span
>
</template>
</div>
</template>
Loading
Loading
@@ -155,15 +155,10 @@ export default {
 
<template>
<div>
<span
v-if="isMatchLine"
class="context-cell"
role="button"
@click="handleLoadMoreLines"
>...</span>
<template
v-else
<span v-if="isMatchLine" class="context-cell" role="button" @click="handleLoadMoreLines"
>...</span
>
<template v-else>
<button
v-if="shouldShowCommentButton"
type="button"
Loading
Loading
@@ -171,21 +166,10 @@ export default {
title="Add a comment to this line"
@click="handleCommentButton"
>
<icon
:size="12"
name="comment"
/>
<icon :size="12" name="comment" />
</button>
<a
v-if="lineNumber"
:data-linenumber="lineNumber"
:href="lineHref"
>
</a>
<diff-gutter-avatars
v-if="shouldShowAvatarsOnGutter"
:discussions="line.discussions"
/>
<a v-if="lineNumber" :data-linenumber="lineNumber" :href="lineHref"> </a>
<diff-gutter-avatars v-if="shouldShowAvatarsOnGutter" :discussions="line.discussions" />
</template>
</div>
</template>
Loading
Loading
@@ -88,9 +88,7 @@ export default {
</script>
 
<template>
<div
class="content discussion-form discussion-form-container discussion-notes"
>
<div class="content discussion-form discussion-form-container discussion-notes">
<note-form
ref="noteForm"
:is-editing="true"
Loading
Loading
Loading
Loading
@@ -103,9 +103,7 @@ export default {
</script>
 
<template>
<td
:class="classNameMap"
>
<td :class="classNameMap">
<diff-line-gutter-content
:line="line"
:file-hash="fileHash"
Loading
Loading
Loading
Loading
@@ -32,11 +32,5 @@ export default {
</script>
 
<template>
<a
:href="editPath"
class="btn btn-default js-edit-blob"
@click="handleEditClick"
>
Edit
</a>
<a :href="editPath" class="btn btn-default js-edit-blob" @click="handleEditClick"> Edit </a>
</template>
Loading
Loading
@@ -10,16 +10,9 @@ export default {
</script>
 
<template>
<span
v-once
class="file-row-stats"
>
<span class="cgreen">
+{{ file.addedLines }}
</span>
<span class="cred">
-{{ file.removedLines }}
</span>
<span v-once class="file-row-stats">
<span class="cgreen"> +{{ file.addedLines }} </span>
<span class="cred"> -{{ file.removedLines }} </span>
</span>
</template>
 
Loading
Loading
Loading
Loading
@@ -26,26 +26,13 @@ export default {
<h4>
{{ __('Too many changes to show.') }}
<div class="pull-right">
<a
:href="plainDiffPath"
class="btn btn-sm"
>
{{ __('Plain diff') }}
</a>
<a
:href="emailPatchPath"
class="btn btn-sm"
>
{{ __('Email patch') }}
</a>
<a :href="plainDiffPath" class="btn btn-sm"> {{ __('Plain diff') }} </a>
<a :href="emailPatchPath" class="btn btn-sm"> {{ __('Email patch') }} </a>
</div>
</h4>
<p>
To preserve performance only
<strong>
{{ visible }} of {{ total }}
</strong>
files are displayed.
To preserve performance only <strong> {{ visible }} of {{ total }} </strong> files are
displayed.
</p>
</div>
</template>
Loading
Loading
@@ -97,11 +97,9 @@ export default {
v-if="canComment"
type="button"
class="btn-transparent position-absolute image-diff-overlay-add-comment w-100 h-100 js-add-image-diff-note-button"
@click="clickedImage($event.offsetX, $event.offsetY)"
@click="clickedImage($event.offsetX, $event.offsetY);"
>
<span class="sr-only">
{{ __('Add image comment') }}
</span>
<span class="sr-only"> {{ __('Add image comment') }} </span>
</button>
<button
v-for="(discussion, index) in allDiscussions"
Loading
Loading
@@ -111,12 +109,9 @@ export default {
:disabled="!shouldToggleDiscussion"
class="js-image-badge"
type="button"
@click="toggleDiscussion({ discussionId: discussion.id })"
@click="toggleDiscussion({ discussionId: discussion.id });"
>
<icon
v-if="showCommentIcon"
name="image-comment-dark"
/>
<icon v-if="showCommentIcon" name="image-comment-dark" />
<template v-else>
{{ index + 1 }}
</template>
Loading
Loading
@@ -125,15 +120,13 @@ export default {
v-if="currentCommentForm"
:style="{
left: `${currentCommentForm.x}px`,
top: `${currentCommentForm.y}px`
top: `${currentCommentForm.y}px`,
}"
:aria-label="__('Comment form position')"
class="btn-transparent comment-indicator"
type="button"
>
<icon
name="image-comment-dark"
/>
<icon name="image-comment-dark" />
</button>
</div>
</template>
Loading
Loading
@@ -34,19 +34,10 @@ export default {
</script>
 
<template>
<tr
:class="className"
class="notes_holder"
>
<td
class="notes_content"
colspan="3"
>
<tr :class="className" class="notes_holder">
<td class="notes_content" colspan="3">
<div class="content">
<diff-discussions
v-if="line.discussions.length"
:discussions="line.discussions"
/>
<diff-discussions v-if="line.discussions.length" :discussions="line.discussions" />
<diff-line-note-form
v-if="diffLineCommentForms[line.line_code]"
:diff-file-hash="diffFileHash"
Loading
Loading
Loading
Loading
@@ -102,11 +102,6 @@ export default {
:is-hover="isHover"
class="diff-line-num new_line qa-new-diff-line"
/>
<td
:class="line.type"
class="line_content"
v-html="line.rich_text"
>
</td>
<td :class="line.type" class="line_content" v-html="line.rich_text"></td>
</tr>
</template>
Loading
Loading
@@ -37,11 +37,10 @@ export default {
<table
:class="userColorScheme"
:data-commit-id="commitId"
class="code diff-wrap-lines js-syntax-highlight text-file js-diff-inline-view">
class="code diff-wrap-lines js-syntax-highlight text-file js-diff-inline-view"
>
<tbody>
<template
v-for="(line, index) in diffLines"
>
<template v-for="(line, index) in diffLines">
<inline-diff-table-row
:key="line.line_code"
:file-hash="diffFile.file_hash"
Loading
Loading
Loading
Loading
@@ -19,29 +19,16 @@ export default {
</script>
 
<template>
<div
class="row empty-state nothing-here-block"
>
<div class="row empty-state nothing-here-block">
<div class="col-xs-12">
<div class="svg-content">
<span
v-html="emptyImage"
></span>
</div>
<div class="svg-content"><span v-html="emptyImage"></span></div>
</div>
<div class="col-xs-12">
<div class="text-content text-center">
No changes between
<span class="ref-name">{{ sourceBranch }}</span>
and
No changes between <span class="ref-name">{{ sourceBranch }}</span> and
<span class="ref-name">{{ targetBranch }}</span>
<div class="text-center">
<a
:href="newBlobPath"
class="btn btn-success"
>
{{ __('Create commit') }}
</a>
<a :href="newBlobPath" class="btn btn-success"> {{ __('Create commit') }} </a>
</div>
</div>
</div>
Loading
Loading
Loading
Loading
@@ -72,17 +72,9 @@ export default {
</script>
 
<template>
<tr
:class="className"
class="notes_holder"
>
<td
class="notes_content parallel old"
colspan="2">
<div
v-if="shouldRenderDiscussionsOnLeft"
class="content"
>
<tr :class="className" class="notes_holder">
<td class="notes_content parallel old" colspan="2">
<div v-if="shouldRenderDiscussionsOnLeft" class="content">
<diff-discussions
v-if="line.left.discussions.length"
:discussions="line.left.discussions"
Loading
Loading
@@ -96,13 +88,8 @@ export default {
line-position="left"
/>
</td>
<td
class="notes_content parallel new"
colspan="2">
<div
v-if="shouldRenderDiscussionsOnRight"
class="content"
>
<td class="notes_content parallel new" colspan="2">
<div v-if="shouldRenderDiscussionsOnRight" class="content">
<diff-discussions
v-if="line.right.discussions.length"
:discussions="line.right.discussions"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment