2017-07-01 14:23:46 +02:00
|
|
|
<div id="code-editor">
|
2017-08-06 22:08:03 +02:00
|
|
|
<div overlay ref="overlay" v-cloak @click="hide()">
|
2017-07-01 14:23:46 +02:00
|
|
|
<div class="popup-body" @click.stop>
|
|
|
|
|
|
|
|
<div class="popup-header primary-background">
|
|
|
|
<div class="popup-title">{{ trans('components.code_editor') }}</div>
|
2017-08-06 22:08:03 +02:00
|
|
|
<button class="overlay-close neg corner-button button" @click="hide()">x</button>
|
2017-07-01 14:23:46 +02:00
|
|
|
</div>
|
|
|
|
|
2018-01-05 21:11:06 +01:00
|
|
|
<div class="padded popup-content">
|
2017-07-01 14:23:46 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="code-editor-language">{{ trans('components.code_language') }}</label>
|
2017-07-01 16:50:28 +02:00
|
|
|
<div class="lang-options">
|
|
|
|
<small>
|
|
|
|
<a @click="updateLanguage('CSS')">CSS</a>
|
|
|
|
<a @click="updateLanguage('C')">C</a>
|
|
|
|
<a @click="updateLanguage('C++')">C++</a>
|
|
|
|
<a @click="updateLanguage('C#')">C#</a>
|
|
|
|
<a @click="updateLanguage('Go')">Go</a>
|
|
|
|
<a @click="updateLanguage('HTML')">HTML</a>
|
|
|
|
<a @click="updateLanguage('Java')">Java</a>
|
|
|
|
<a @click="updateLanguage('JavaScript')">JavaScript</a>
|
|
|
|
<a @click="updateLanguage('JSON')">JSON</a>
|
|
|
|
<a @click="updateLanguage('PHP')">PHP</a>
|
|
|
|
<a @click="updateLanguage('MarkDown')">MarkDown</a>
|
|
|
|
<a @click="updateLanguage('Nginx')">Nginx</a>
|
|
|
|
<a @click="updateLanguage('Python')">Python</a>
|
|
|
|
<a @click="updateLanguage('Ruby')">Ruby</a>
|
|
|
|
<a @click="updateLanguage('shell')">Shell/Bash</a>
|
|
|
|
<a @click="updateLanguage('SQL')">SQL</a>
|
|
|
|
<a @click="updateLanguage('XML')">XML</a>
|
|
|
|
<a @click="updateLanguage('YAML')">YAML</a>
|
|
|
|
</small>
|
|
|
|
</div>
|
2017-07-01 14:23:46 +02:00
|
|
|
<input @keypress.enter="save()" id="code-editor-language" type="text" @input="updateEditorMode(language)" v-model="language">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="code-editor-content">{{ trans('components.code_content') }}</label>
|
|
|
|
<textarea ref="editor" v-model="code"></textarea>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<button type="button" class="button pos" @click="save()">{{ trans('components.code_save') }}</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|