Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VULCAN-410: Swap diff view comparison #441

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions app/javascript/components/project/DiffViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@
<b-input-group-text class="rounded-0">Base</b-input-group-text>
</b-input-group-prepend>
<b-form-select
id="baseComponent"
v-model="baseComponent"
id="diffComponent"
v-model="diffComponent"
class="form-select-sm"
@change="updateCompareList"
:disabled="!baseComponent"
@change="compareComponents"
>
<option
v-for="(selectOption, indexOpt) in project.components"
v-for="(selectOption, indexOpt) in compareList"
:key="indexOpt"
:value="selectOption"
>
Expand All @@ -60,20 +61,20 @@
].join(", ")})`
: ""
}}
{{ selectOption.project_name && `- ${selectOption.project_name}` }}
</option>
</b-form-select>
<b-input-group-prepend>
<b-input-group-text class="rounded-0">Compare</b-input-group-text>
</b-input-group-prepend>
<b-form-select
id="diffComponent"
v-model="diffComponent"
id="baseComponent"
v-model="baseComponent"
class="form-select-sm"
:disabled="!baseComponent"
@change="compareComponents"
@change="updateCompareList"
>
<option
v-for="(selectOption, indexOpt) in compareList"
v-for="(selectOption, indexOpt) in project.components"
:key="indexOpt"
:value="selectOption"
>
Expand All @@ -86,7 +87,6 @@
].join(", ")})`
: ""
}}
{{ selectOption.project_name && `- ${selectOption.project_name}` }}
</option>
</b-form-select>
<b-button
Expand All @@ -98,11 +98,11 @@
</b-button>
</b-input-group>
<MonacoEditor
v-if="baseControl || diffControl"
v-if="diffControl || baseControl"
:key="selectedRuleId"
:diff-editor="true"
:original="baseControl"
:value="diffControl"
:original="diffControl"
:value="baseControl"
:options="monacoEditorOptions"
:language="monacoEditorOptions.language"
class="editor"
Expand Down