2019-06-12 15:58:48 +00:00
|
|
|
<script>
|
|
|
|
import { mapGetters } from 'vuex';
|
2020-07-08 06:09:13 +00:00
|
|
|
import { GlLink, GlTooltipDirective } from '@gitlab/ui';
|
2020-05-29 18:08:26 +00:00
|
|
|
import TerminalSyncStatusSafe from './terminal_sync/terminal_sync_status_safe.vue';
|
2020-09-17 09:09:32 +00:00
|
|
|
import { isTextFile, getFileEOL } from '~/ide/utils';
|
2019-06-12 15:58:48 +00:00
|
|
|
|
|
|
|
export default {
|
2020-05-29 18:08:26 +00:00
|
|
|
components: {
|
2020-07-08 06:09:13 +00:00
|
|
|
GlLink,
|
2020-05-29 18:08:26 +00:00
|
|
|
TerminalSyncStatusSafe,
|
|
|
|
},
|
2020-07-08 06:09:13 +00:00
|
|
|
directives: {
|
|
|
|
GlTooltip: GlTooltipDirective,
|
|
|
|
},
|
2019-06-12 15:58:48 +00:00
|
|
|
computed: {
|
|
|
|
...mapGetters(['activeFile']),
|
2020-11-02 18:09:03 +00:00
|
|
|
...mapGetters('editor', ['activeFileEditor']),
|
2020-06-10 12:08:58 +00:00
|
|
|
activeFileEOL() {
|
|
|
|
return getFileEOL(this.activeFile.content);
|
|
|
|
},
|
2020-09-17 09:09:32 +00:00
|
|
|
activeFileIsText() {
|
|
|
|
return isTextFile(this.activeFile);
|
|
|
|
},
|
2019-06-12 15:58:48 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="ide-status-list d-flex">
|
|
|
|
<template v-if="activeFile">
|
2020-07-08 06:09:13 +00:00
|
|
|
<div>
|
|
|
|
<gl-link v-gl-tooltip.hover :href="activeFile.permalink" :title="__('Open in file view')">
|
|
|
|
{{ activeFile.name }}
|
|
|
|
</gl-link>
|
2019-06-12 15:58:48 +00:00
|
|
|
</div>
|
2020-07-08 06:09:13 +00:00
|
|
|
<div>{{ activeFileEOL }}</div>
|
2020-11-02 18:09:03 +00:00
|
|
|
<div v-if="activeFileIsText">
|
|
|
|
{{ activeFileEditor.editorRow }}:{{ activeFileEditor.editorColumn }}
|
|
|
|
</div>
|
|
|
|
<div>{{ activeFileEditor.fileLanguage }}</div>
|
2019-06-12 15:58:48 +00:00
|
|
|
</template>
|
2020-05-29 18:08:26 +00:00
|
|
|
<terminal-sync-status-safe />
|
2019-06-12 15:58:48 +00:00
|
|
|
</div>
|
|
|
|
</template>
|