2020-06-28 06:56:01 +08:00
|
|
|
<div>
|
2022-07-25 20:10:27 +08:00
|
|
|
<div components="popup code-editor"
|
|
|
|
option:code-editor:favourites="{{ setting()->getForCurrentUser('code-language-favourites', '') }}"
|
|
|
|
class="popup-background code-editor">
|
2020-06-28 06:56:01 +08:00
|
|
|
<div refs="code-editor@container" class="popup-body" tabindex="-1">
|
2017-07-01 20:23:46 +08:00
|
|
|
|
2022-06-20 20:42:12 +08:00
|
|
|
<div class="popup-header flex-container-row primary-background">
|
2017-07-01 20:23:46 +08:00
|
|
|
<div class="popup-title">{{ trans('components.code_editor') }}</div>
|
2022-06-21 00:11:34 +08:00
|
|
|
<div component="dropdown" refs="code-editor@historyDropDown" class="flex-container-row">
|
|
|
|
<button refs="dropdown@toggle">
|
2022-06-20 20:42:12 +08:00
|
|
|
<span>@icon('history')</span>
|
|
|
|
<span>{{ trans('components.code_session_history') }}</span>
|
|
|
|
</button>
|
|
|
|
<ul refs="dropdown@menu code-editor@historyList" class="dropdown-menu"></ul>
|
|
|
|
</div>
|
2022-06-21 00:11:34 +08:00
|
|
|
<button class="popup-header-close" refs="popup@hide">@icon('close')</button>
|
2017-07-01 20:23:46 +08:00
|
|
|
</div>
|
|
|
|
|
2022-06-21 06:12:07 +08:00
|
|
|
<div class="code-editor-body-wrap flex-container-row flex-fill">
|
2022-06-20 20:42:12 +08:00
|
|
|
<div class="code-editor-language-list flex-container-column flex-fill">
|
2017-07-01 20:23:46 +08:00
|
|
|
<label for="code-editor-language">{{ trans('components.code_language') }}</label>
|
2022-06-20 20:42:12 +08:00
|
|
|
<input refs="code-editor@languageInput" id="code-editor-language" type="text">
|
2022-07-26 02:13:25 +08:00
|
|
|
<div refs="code-editor@language-options-container" class="lang-options">
|
2022-07-25 04:15:43 +08:00
|
|
|
@php
|
|
|
|
$languages = [
|
|
|
|
'Bash', 'CSS', 'C', 'C++', 'C#', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI',
|
|
|
|
'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'Nginx', 'OCaml',
|
|
|
|
'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'SQL', 'TypeScript',
|
|
|
|
'VBScript', 'VB.NET', 'XML', 'YAML',
|
|
|
|
];
|
|
|
|
@endphp
|
|
|
|
|
|
|
|
@foreach($languages as $language)
|
|
|
|
<div class="relative">
|
2022-07-26 02:13:25 +08:00
|
|
|
<button type="button" refs="code-editor@language-button" data-favourite="false" data-lang="{{ strtolower($language) }}">{{ $language }}</button>
|
2022-07-25 20:10:27 +08:00
|
|
|
<button class="lang-option-favorite-toggle action-favourite" data-title="{{ trans('common.favourite') }}">@icon('star-outline')</button>
|
|
|
|
<button class="lang-option-favorite-toggle action-unfavourite" data-title="{{ trans('common.unfavourite') }}">@icon('star')</button>
|
2022-07-25 04:15:43 +08:00
|
|
|
</div>
|
|
|
|
@endforeach
|
2017-07-01 22:50:28 +08:00
|
|
|
</div>
|
2017-07-01 20:23:46 +08:00
|
|
|
</div>
|
|
|
|
|
2022-06-21 00:11:34 +08:00
|
|
|
<div class="code-editor-main flex-fill">
|
2020-06-28 06:56:01 +08:00
|
|
|
<textarea refs="code-editor@editor"></textarea>
|
2017-07-01 20:23:46 +08:00
|
|
|
</div>
|
|
|
|
|
2022-06-20 20:42:12 +08:00
|
|
|
</div>
|
2017-07-01 20:23:46 +08:00
|
|
|
|
2022-06-21 06:02:06 +08:00
|
|
|
<div class="popup-footer">
|
|
|
|
<button refs="code-editor@saveButton" type="button" class="button">{{ trans('components.code_save') }}</button>
|
2017-07-01 20:23:46 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-02 21:13:31 +08:00
|
|
|
</div>
|