Commit 48881a31 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Merge branch 'ide' of gitlab.com:gitlab-org/gitlab-ce into ide

parents d1e80a82 f1d9be0a
...@@ -105,9 +105,7 @@ export default class RepoEditor { ...@@ -105,9 +105,7 @@ export default class RepoEditor {
this.monacoInstance.setModel(null); this.monacoInstance.setModel(null);
const languages = monaco.languages.getLanguages(); const languages = monaco.languages.getLanguages();
console.log(languages)
const languageID = Helper.getLanguageIDForFile(this.activeFile, languages); const languageID = Helper.getLanguageIDForFile(this.activeFile, languages);
console.log('languageID',languageID)
const newModel = monaco.editor.createModel(this.blobRaw, languageID); const newModel = monaco.editor.createModel(this.blobRaw, languageID);
this.monacoInstance.setModel(newModel); this.monacoInstance.setModel(newModel);
......
<script> <script>
import TimeAgoMixin from '../vue_shared/mixins/timeago';
const RepoFile = { const RepoFile = {
mixins: [TimeAgoMixin],
props: { props: {
file: { file: {
type: Object, type: Object,
...@@ -48,7 +51,7 @@ export default RepoFile; ...@@ -48,7 +51,7 @@ export default RepoFile;
</td> </td>
<td v-if="!isMini" class="hidden-xs"> <td v-if="!isMini" class="hidden-xs">
<span class="commit-update">{{file.lastCommitUpdate}}</span> <span>{{timeFormated(file.lastCommitUpdate)}}</span>
</td> </td>
</tr> </tr>
</template> </template>
...@@ -34,7 +34,7 @@ export default RepoTab; ...@@ -34,7 +34,7 @@ export default RepoTab;
<template> <template>
<li> <li>
<a href="#" @click.prevent="xClicked(tab)" v-if="!tab.loading"> <a href="#" class="close" @click.prevent="xClicked(tab)" v-if="!tab.loading">
<i class="fa" :class="changedClass"></i> <i class="fa" :class="changedClass"></i>
</a> </a>
......
...@@ -5,7 +5,7 @@ import RepoMiniMixin from './repo_mini_mixin'; ...@@ -5,7 +5,7 @@ import RepoMiniMixin from './repo_mini_mixin';
export default class RepoTabs { export default class RepoTabs {
constructor(el) { constructor(el) {
RepoTabs.styleTabsForWindows(); // RepoTabs.styleTabsForWindows();
this.initVue(el); this.initVue(el);
} }
...@@ -20,8 +20,8 @@ export default class RepoTabs { ...@@ -20,8 +20,8 @@ export default class RepoTabs {
}); });
} }
static styleTabsForWindows() { // static styleTabsForWindows() {
const scrollWidth = Number(document.body.dataset.scrollWidth); // const scrollWidth = Number(document.body.dataset.scrollWidth);
Store.scrollWidth = scrollWidth; // Store.scrollWidth = scrollWidth;
} // }
} }
...@@ -55,15 +55,15 @@ ...@@ -55,15 +55,15 @@
} }
#tabs { #tabs {
height: 41px; height: 51px;
border-bottom: 1px solid $white-normal; border-bottom: 1px solid $white-normal;
padding-left: 0; padding-left: 0;
margin-bottom: 0; margin-bottom: 0;
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
overflow-y: none; overflow-y: hidden;
overflow-x: scroll; overflow-x: auto;
li { li {
animation: fadein 0.5s; animation: fadein 0.5s;
...@@ -80,6 +80,16 @@ ...@@ -80,6 +80,16 @@
a { a {
color: $black; color: $black;
display: inline-block;
width: 100px;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
&.close {
width: auto;
font-size: 15px;
}
} }
i.fa.fa-times, i.fa.fa-times,
...@@ -98,9 +108,12 @@ ...@@ -98,9 +108,12 @@
#repo-file-buttons { #repo-file-buttons {
background: $gray-light; background: $gray-light;
padding: 5px;
margin-top: -5px;
border-bottom: 1px solid $white-normal; border-bottom: 1px solid $white-normal;
padding: 5px;
margin-top: -15px;
padding: 10px 5px;
position: relative;
border-top: 1px solid $white-normal;
} }
#binary-viewer { #binary-viewer {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
%tr{ is: "repo-loading-file", "v-for" => "n in 5", ":loading" => "loading", ":has-files" => "!!files.length", ":is-mini" => "isMini" } %tr{ is: "repo-loading-file", "v-for" => "n in 5", ":loading" => "loading", ":has-files" => "!!files.length", ":is-mini" => "isMini" }
%tr{ is: "repo-file", "v-for" => "file in files", ":key" => "file.id", ":file" => "file",":is-mini" => "isMini", "@linkclicked" => "linkClicked(file)", ":is-tree" => "isTree", ":loading" => "loading", ":has-files" => "!!files.length", ":active-file" => "activeFile" } %tr{ is: "repo-file", "v-for" => "file in files", ":key" => "file.id", ":file" => "file",":is-mini" => "isMini", "@linkclicked" => "linkClicked(file)", ":is-tree" => "isTree", ":loading" => "loading", ":has-files" => "!!files.length", ":active-file" => "activeFile" }
.panel-right> .panel-right>
%ul#tabs{ "v-if" => "isMini", ":style" => "{height: 41 + scrollWidth + 'px'}", "v-cloak" => "1" } %ul#tabs{ "v-if" => "isMini", "v-cloak" => "1" }
%li{ is: "repo-tab", "v-for" => "tab in openedFiles", ":key" => "tab.id", ":tab" => "tab", ":class" => "{'active' : tab.active}" } %li{ is: "repo-tab", "v-for" => "tab in openedFiles", ":key" => "tab.id", ":tab" => "tab", ":class" => "{'active' : tab.active}" }
#repo-file-buttons #repo-file-buttons
#ide{ data: { url: repo_url(@project) } } #ide{ data: { url: repo_url(@project) } }
......
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