Correct button names

This commit is contained in:
Luke "Jared" Bennett 2017-07-20 16:00:47 +01:00
parent 78c4a27566
commit bf2210c19e
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2
3 changed files with 5 additions and 4 deletions

View file

@ -15,7 +15,7 @@ export default class RepoFileButtons {
mixins: [RepoMiniMixin],
template: `
<div id='repo-file-buttons' v-if='isMini' :style='{"border-bottom": editableBorder}'>
<a :href='rawFileURL' target='_blank' class='btn btn-default'>Download file</a>
<a :href='rawFileURL' target='_blank' class='btn btn-default'>Raw</a>
<div class="btn-group" role="group" aria-label="File actions">
<a :href='blameFileUrl' class='btn btn-default'>Blame</a>
<a :href='historyFileUrl' class='btn btn-default'>History</a>

View file

@ -55,7 +55,7 @@ const RepoStore = {
toggleRawPreview() {
this.activeFile.raw = !this.activeFile.raw;
this.activeFileLabel = this.activeFile.raw ? 'Preview' : 'Raw';
this.activeFileLabel = this.activeFile.raw ? 'Display rendered file' : 'Display source';
},
setActiveFiles(file) {
@ -92,7 +92,7 @@ const RepoStore = {
setActiveToRaw() {
this.activeFile.raw = false;
// can't get vue to listen to raw for some reason so this for now.
this.activeFileLabel = 'Raw';
this.activeFileLabel = 'Display source';
},
/* eslint-disable no-param-reassign */

View file

@ -1,3 +1,4 @@
import RepoHelper from './repo_helper';
import RepoStore from './repo_store';
const RepoTab = {
@ -27,7 +28,7 @@ const RepoTab = {
},
methods: {
tabClicked: RepoStore.setActiveFiles,
tabClicked: RepoStore.setActiveFiles.bind(RepoStore),
xClicked(file) {
if (file.changed) return;