2017-07-01 08:23:46 -04:00
|
|
|
<div id="code-editor">
|
2017-08-06 16:08:03 -04:00
|
|
|
<div overlay ref="overlay" v-cloak @click="hide()">
|
2019-08-24 13:26:28 -04:00
|
|
|
<div class="popup-body" tabindex="-1" @click.stop>
|
2017-07-01 08:23:46 -04:00
|
|
|
|
|
|
|
<div class="popup-header primary-background">
|
|
|
|
<div class="popup-title">{{ trans('components.code_editor') }}</div>
|
2019-04-07 06:34:40 -04:00
|
|
|
<button class="popup-header-close" @click="hide()">x</button>
|
2017-07-01 08:23:46 -04:00
|
|
|
</div>
|
|
|
|
|
2019-04-07 04:57:48 -04:00
|
|
|
<div class="p-l popup-content">
|
2017-07-01 08:23:46 -04:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="code-editor-language">{{ trans('components.code_language') }}</label>
|
2017-07-01 10:50:28 -04: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>
|
2020-02-07 07:45:19 -05:00
|
|
|
<a @click="updateLanguage('Fortran')">Fortran</a>
|
2017-07-01 10:50:28 -04:00
|
|
|
<a @click="updateLanguage('Go')">Go</a>
|
|
|
|
<a @click="updateLanguage('HTML')">HTML</a>
|
2019-10-17 16:16:55 -04:00
|
|
|
<a @click="updateLanguage('INI')">INI</a>
|
2017-07-01 10:50:28 -04:00
|
|
|
<a @click="updateLanguage('Java')">Java</a>
|
|
|
|
<a @click="updateLanguage('JavaScript')">JavaScript</a>
|
|
|
|
<a @click="updateLanguage('JSON')">JSON</a>
|
2019-03-02 03:52:14 -05:00
|
|
|
<a @click="updateLanguage('Lua')">Lua</a>
|
2017-07-01 10:50:28 -04:00
|
|
|
<a @click="updateLanguage('MarkDown')">MarkDown</a>
|
|
|
|
<a @click="updateLanguage('Nginx')">Nginx</a>
|
2019-12-27 12:14:34 -05:00
|
|
|
<a @click="updateLanguage('PASCAL')">Pascal</a>
|
2020-01-19 00:41:18 -05:00
|
|
|
<a @click="updateLanguage('Perl')">Perl</a>
|
2019-12-27 12:14:34 -05:00
|
|
|
<a @click="updateLanguage('PHP')">PHP</a>
|
|
|
|
<a @click="updateLanguage('Powershell')">Powershell</a>
|
2017-07-01 10:50:28 -04:00
|
|
|
<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 08:23:46 -04: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">
|
2019-08-25 07:40:04 -04:00
|
|
|
<button type="button" class="button" @click="save()">{{ trans('components.code_save') }}</button>
|
2017-07-01 08:23:46 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-02-06 01:06:59 -05:00
|
|
|
</div>
|