Commit 9bde4e6c authored by Tim Zallmann's avatar Tim Zallmann Committed by Phil Hughes

Web IDE Visual Polish 26.01

parent 9a6cac5e
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
<template> <template>
<div class="branch-container"> <div class="branch-container">
<div class="branch-header"> <div class="branch-header">
<div class="branch-header-title"> <div class="branch-header-title str-truncated ref-name">
<icon <icon
name="branch" name="branch"
:size="12" :size="12"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<template> <template>
<div class="ide-status-bar"> <div class="ide-status-bar">
<div> <div class="ref-name">
<icon <icon
name="branch" name="branch"
:size="12" :size="12"
......
...@@ -147,7 +147,7 @@ you started editing. Would you like to create a new branch?`)" ...@@ -147,7 +147,7 @@ you started editing. Would you like to create a new branch?`)"
> >
<div class="multi-file-commit-fieldset"> <div class="multi-file-commit-fieldset">
<textarea <textarea
class="form-control multi-file-commit-message" class="form-control multi-file-commit-message ref-name"
name="commit-message" name="commit-message"
v-model="commitMessage" v-model="commitMessage"
placeholder="Commit message" placeholder="Commit message"
......
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
return 'file-open file-active'; return 'file-open file-active';
} }
return this.file.opened ? 'file-open' : ''; return this.file.opened ? 'file-open' : '';
} else if (this.file.type === 'tree') {
return 'folder';
} }
return ''; return '';
}, },
...@@ -95,7 +97,7 @@ ...@@ -95,7 +97,7 @@
:colspan="submoduleColSpan" :colspan="submoduleColSpan"
> >
<a <a
class="repo-file-name" class="repo-file-name str-truncated"
> >
<file-icon <file-icon
:file-name="file.name" :file-name="file.name"
......
...@@ -5,6 +5,8 @@ import Disposable from './common/disposable'; ...@@ -5,6 +5,8 @@ import Disposable from './common/disposable';
import ModelManager from './common/model_manager'; import ModelManager from './common/model_manager';
import editorOptions from './editor_options'; import editorOptions from './editor_options';
import gitlabTheme from './themes/gl_theme';
export default class Editor { export default class Editor {
static create(monaco) { static create(monaco) {
this.editorInstance = new Editor(monaco); this.editorInstance = new Editor(monaco);
...@@ -24,6 +26,8 @@ export default class Editor { ...@@ -24,6 +26,8 @@ export default class Editor {
this.decorationsController = new DecorationsController(this), this.decorationsController = new DecorationsController(this),
); );
this.setupMonacoTheme();
this.debouncedUpdate = _.debounce(() => { this.debouncedUpdate = _.debounce(() => {
this.updateDimensions(); this.updateDimensions();
}, 200); }, 200);
...@@ -71,6 +75,12 @@ export default class Editor { ...@@ -71,6 +75,12 @@ export default class Editor {
if (this.dirtyDiffController) this.dirtyDiffController.reDecorate(model); if (this.dirtyDiffController) this.dirtyDiffController.reDecorate(model);
} }
setupMonacoTheme() {
this.monaco.editor.defineTheme(gitlabTheme.themeName, gitlabTheme.monacoTheme);
this.monaco.editor.setTheme('gitlab');
}
clearEditor() { clearEditor() {
if (this.instance) { if (this.instance) {
this.instance.setModel(null); this.instance.setModel(null);
......
export default {
themeName: 'gitlab',
monacoTheme: {
base: 'vs',
inherit: true,
rules: [],
colors: {
'editorLineNumber.foreground': '#CCCCCC',
},
},
};
...@@ -62,8 +62,7 @@ ...@@ -62,8 +62,7 @@
return `${gon.sprite_file_icons}#${iconName}`; return `${gon.sprite_file_icons}#${iconName}`;
}, },
folderIconName() { folderIconName() {
// We don't have a open folder icon yet return this.opened ? 'folder-open' : 'folder';
return this.opened ? 'folder' : 'folder';
}, },
iconSizeClass() { iconSizeClass() {
return this.size ? `s${this.size}` : ''; return this.size ? `s${this.size}` : '';
......
...@@ -72,6 +72,13 @@ ...@@ -72,6 +72,13 @@
display: none; display: none;
} }
} }
&.folder {
svg {
fill: $gl-text-color-secondary;
}
}
} }
a { a {
...@@ -522,7 +529,10 @@ table.table tr td.multi-file-table-name { ...@@ -522,7 +529,10 @@ table.table tr td.multi-file-table-name {
} }
} }
.ide.nav-only { .ide {
overflow: hidden;
.nav-only {
.flash-container { .flash-container {
margin-top: $header-height; margin-top: $header-height;
margin-bottom: 0; margin-bottom: 0;
...@@ -539,6 +549,7 @@ table.table tr td.multi-file-table-name { ...@@ -539,6 +549,7 @@ table.table tr td.multi-file-table-name {
.multi-file-commit-panel .multi-file-commit-panel-inner-scroll { .multi-file-commit-panel .multi-file-commit-panel-inner-scroll {
max-height: calc(100vh - #{$header-height + $context-header-height}); max-height: calc(100vh - #{$header-height + $context-header-height});
min-height: calc(100vh - #{$header-height + $context-header-height});
} }
&.flash-shown { &.flash-shown {
...@@ -552,6 +563,8 @@ table.table tr td.multi-file-table-name { ...@@ -552,6 +563,8 @@ table.table tr td.multi-file-table-name {
.multi-file-commit-panel .multi-file-commit-panel-inner-scroll { .multi-file-commit-panel .multi-file-commit-panel-inner-scroll {
max-height: calc(100vh - #{$header-height + $flash-height + $context-header-height}); max-height: calc(100vh - #{$header-height + $flash-height + $context-header-height});
min-height: calc(100vh - #{$header-height + $flash-height + $context-header-height});
}
} }
} }
} }
...@@ -571,6 +584,7 @@ table.table tr td.multi-file-table-name { ...@@ -571,6 +584,7 @@ table.table tr td.multi-file-table-name {
.multi-file-commit-panel .multi-file-commit-panel-inner-scroll { .multi-file-commit-panel .multi-file-commit-panel-inner-scroll {
max-height: calc(100vh - #{$header-height + $performance-bar-height + 60}); max-height: calc(100vh - #{$header-height + $performance-bar-height + 60});
min-height: calc(100vh - #{$header-height + $performance-bar-height + 60});
} }
&.flash-shown { &.flash-shown {
...@@ -584,6 +598,7 @@ table.table tr td.multi-file-table-name { ...@@ -584,6 +598,7 @@ table.table tr td.multi-file-table-name {
.multi-file-commit-panel .multi-file-commit-panel-inner-scroll { .multi-file-commit-panel .multi-file-commit-panel-inner-scroll {
max-height: calc(100vh - #{$header-height + $performance-bar-height + $flash-height + $context-header-height}); max-height: calc(100vh - #{$header-height + $performance-bar-height + $flash-height + $context-header-height});
min-height: calc(100vh - #{$header-height + $performance-bar-height + $flash-height + $context-header-height});
} }
} }
} }
......
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