Commit 8f6c9c59 by Torkel Ödegaard

dasboard_history: some polish around styles & diff colors, and minor fixes

parent ef1dfed0
......@@ -35,7 +35,7 @@ type DashboardRedirect struct {
type CalculateDiffOptions struct {
Base CalculateDiffTarget `json:"base" binding:"Required"`
New CalculateDiffTarget `json:"new" binding:"Required"`
DiffType string `json:"DiffType" binding:"Required"`
DiffType string `json:"diffType" binding:"Required"`
}
type CalculateDiffTarget struct {
......
......@@ -248,11 +248,11 @@ var (
<!-- Overview -->
{{ if .Old }}
<div class="change list-change diff-label">{{ .Old }}</div>
<div class="diff-label">{{ .Old }}</div>
<i class="diff-arrow fa fa-long-arrow-right"></i>
{{ end }}
{{ if .New }}
<div class="change list-change diff-label">{{ .New }}</div>
<div class="diff-label">{{ .New }}</div>
{{ end }}
{{ if .LineStart }}
......@@ -289,11 +289,11 @@ var (
<div class="diff-change-item">
{{ if .Old }}
<div class="change list-change diff-label">{{ .Old }}</div>
<div class="diff-label">{{ .Old }}</div>
<i class="diff-arrow fa fa-long-arrow-right"></i>
{{ end }}
{{ if .New }}
<div class="change list-change diff-label">{{ .New }}</div>
<div class="diff-label">{{ .New }}</div>
{{ end }}
</div>
......@@ -301,7 +301,7 @@ var (
<diff-link-json
line-link="{{ .LineStart }}"
line-display="{{ .LineStart }}{{ if .LineEnd }} - {{ .LineEnd }}{{ end }}"
switch-view="ctrl.getDiff('html')"
switch-view="ctrl.getDiff('json')"
/>
{{ end }}
</span>
......@@ -326,7 +326,7 @@ var (
<diff-link-json
line-link="{{ .LineStart }}"
line-display="{{ .LineStart }}{{ if .LineEnd }} - {{ .LineEnd }}{{ end }}"
switch-view="ctrl.getDiff('html')"
switch-view="ctrl.getDiff('json')"
/>
{{ end }}
</div>
......
......@@ -71,7 +71,7 @@ export function linkJson() {
link: '@lineLink',
switchView: '&',
},
templateUrl: 'public/app/features/dashboard/history/partials/link-json.html',
template: `<a class="diff-linenum btn btn-inverse btn-small" ng-click="ctrl.goToLine(link)">Line {{ line }}</a>`
};
}
coreModule.directive('diffLinkJson', linkJson);
......@@ -100,7 +100,7 @@
<aside class="edit-sidemenu-aside">
<ul class="edit-sidemenu">
<li ng-class="{active: ctrl.diff === 'basic'}"><a ng-click="ctrl.getDiff('basic')" href="">Change Summary</a></li>
<li ng-class="{active: ctrl.diff === 'html'}"><a ng-click="ctrl.getDiff('json')" href="">JSON Code View</a></li>
<li ng-class="{active: ctrl.diff === 'html'}"><a ng-click="ctrl.getDiff('json')" href="">JSON Diff</a></li>
</ul>
</aside>
......
<a class="change list-linenum diff-linenum btn btn-inverse btn-small" ng-click="ctrl.goToLine(link)">
Line {{ line }}
</a>
......@@ -292,13 +292,13 @@ $diff-arrow-color: $white;
$diff-json-bg: $dark-4;
$diff-json-fg: $gray-5;
$diff-json-added: #2f5f40;
$diff-json-deleted: #862d2d;
$diff-json-added: #457740;
$diff-json-deleted: #a04338;
$diff-json-old: #5a372a;
$diff-json-new: #664e33;
$diff-json-old: #a04338;
$diff-json-new: #457740;
$diff-json-changed-fg: $gray-5;
$diff-json-changed-num: $text-muted;
$diff-json-changed-num: $text-color;
$diff-json-icon: $gray-7;
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