Skip to content

Commit

Permalink
Install "@riddled/4play" at 1.15.9
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Nov 30, 2023
1 parent 811a211 commit 79b7af5
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@babel/runtime": "^7.15.4",
"@fortawesome/fontawesome-free": "^5.15.4",
"@popperjs/core": "^2.10.2",
"@riddled/4play": "1.15.7",
"@riddled/4play": "1.15.9",
"@sentry/browser": "^6.16.1",
"@sentry/webpack-plugin": "^1.18.3",
"@tinymce/tinymce-vue": "^3.0.1",
Expand Down
73 changes: 71 additions & 2 deletions resources/js/components/forms/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import Vue from 'vue';
import Component from 'vue-class-component';
import {Emit, Prop, Ref, Watch} from "vue-property-decorator";
import {Editor4Play, EditorState} from "@riddled/4play/index.js";
import {CodeBlockLanguages, Editor4Play, EditorState} from "@riddled/4play";
@Component
export default class VueEditor extends Vue {
Expand All @@ -31,7 +31,8 @@ export default class VueEditor extends Vue {
this.value,
{onChange: this.input, onSubmit: this.submit, onCancel: this.cancel, onStateChange: this.state},
username => this.autocompleteSource(username),
'Zwykły tekst'
'Zwykły tekst',
this.codeBlockLanguages(),
);
}
Expand Down Expand Up @@ -137,5 +138,73 @@ export default class VueEditor extends Vue {
focus() {
this.editor!.focus();
}
codeBlockLanguages(): CodeBlockLanguages {
return Object.fromEntries(
languages()
.flatMap(({title, codes}) => codes.map(code => [code, title])));
function languages() {
function language(title: string, codes: string[]) {
return {title, codes};
}
return [
language('Ada', ['ada']),
language('Asembler', ['asm']),
language('Basic', ['basic']),
language('Plik wsadowy', ['batch', 'bat']),
language('BrainFuck', ['brainfuck', 'bf']),
language('Język C', ['c']),
language('C++', ['c++', 'cpp']),
language('C#', ['c#', 'cs']),
language('Clojure', ['clojure', 'clj']),
language('Format CSV', ['csv']),
language('Delphi/Pascal', ['pascal', 'delphi']),
language('Format Dockerfile', ['dockerfile']),
language('Elixir', ['elixir']),
language('Erlang', ['erlang']),
language('F#', ['f#', 'fsharp']),
language('Fortran', ['fortran']),
language('Go', ['go']),
language('Groovy', ['groovy']),
language('GraphQL', ['graphql']),
language('HTML', ['html']),
language('Haskell', ['hs', 'haskell']),
language('Format INI', ['ini']),
language('Java', ['java']),
language('JavaScript', ['js']),
language('Format JSON', ['json']),
language('Julia', ['julia']),
language('JSX', ['jsx']),
language('Kotlin', ['kt', 'kotlin']),
language('Składnia LaTeX', ['latex', 'tex']),
language('Lisp', ['lisp']),
language('Lua', ['lua']),
language('Markdown', ['markdown', 'md']),
language('MatLab', ['matlab']),
language('Perl', ['perl']),
language('PHP', ['php']),
language('Prolog', ['prolog']),
language('PowerShell', ['powershell', 'ps']),
language('Python', ['py', 'python']),
language('Język R', ['r']),
language('Rust', ['rs', 'rust']),
language('Ruby', ['rb', 'ruby']),
language('RSS', ['atom', 'rss']),
language('Scala', ['scala']),
language('Skrypt powłoki', ['bash', 'sh']),
language('Arkusz stylów', ['css', 'scss', 'sass', 'less']),
language('Język SQL', ['sql']),
language('Szablon Twig', ['twig']),
language('TypeScript/JSX', ['tsx']),
language('TypeScript', ['ts']),
language('Visual Basic', ['vb']),
language('Format XML', ['xml', 'svg']),
language('Format YAML', ['yaml', 'yml']),
];
}
}
}
</script>
2 changes: 1 addition & 1 deletion resources/js/components/forms/help.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="markdown-help">
<div class="card card-info">
<div class="card-header">Pomoc <span class="card-version">1.15.7</span></div>
<div class="card-header">Pomoc <span class="card-version">1.15.9</span></div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1375,10 +1375,10 @@
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.2.tgz#830beaec4b4091a9e9398ac50f865ddea52186b9"
integrity sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA==

"@riddled/4play@1.15.7":
version "1.15.7"
resolved "https://registry.yarnpkg.com/@riddled/4play/-/4play-1.15.7.tgz#e5b04c92732096fa7db78e3904cbea14f4b70087"
integrity sha512-QBa7elLpndkQPgm9hSo7F4EFWiKJD61eLydvMi3yqGTsxZaVZ0nwSNMpVa8vFwUsuNYTL+qE78BWjVEgDLEd8g==
"@riddled/4play@1.15.9":
version "1.15.9"
resolved "https://registry.yarnpkg.com/@riddled/4play/-/4play-1.15.9.tgz#6ec8c8f649b4c0c2e0c48cfda49e3560555ee869"
integrity sha512-XD/1sHnb1nSJI6W+8iCHk2NXtHzyjaS6zZgzfWvUGfMmturZIhQ7hzoeI1yRJMa/7dmTixSJKci8euBnm5hSnQ==
dependencies:
"@codemirror/autocomplete" "*"
"@codemirror/commands" "^6.3.0"
Expand Down

0 comments on commit 79b7af5

Please sign in to comment.