Skip to content

Commit

Permalink
Fix: Execution output not always showing actual output
Browse files Browse the repository at this point in the history
### Changelog:
* Fix: Execution output now works as expected (probably).
* Chore: Update frontend dependencies.
* Chore: Add babel config.
* Chore: Update eslint config.
* Chore: Add vue and corejs dev dependencies.
* Refactor: Remove `OldLinesMixin`, use script setup and use `useAutoUpdate`.

Closes: polemarch/ce#309+

See merge request polemarch/ce!295
  • Loading branch information
onegreyonewhite committed Jan 10, 2023
2 parents 6ea2238 + 9aeea65 commit 3e6e9d3
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 434 deletions.
42 changes: 36 additions & 6 deletions frontend_src/.babelrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
module.exports = {
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-transform-runtime',
],
};
if (process.env.APP_ENV === 'prod') {
module.exports = {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: { version: '3.26.1', proposals: true },
},
],
],
plugins: [
[
'@babel/plugin-transform-runtime',
{
'corejs': false,
'regenerator': false,
'version': '^7.19.6'
}
],
],
}
} else {
module.exports = {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: { version: '3.26.1', proposals: true },
targets: 'last 1 Chrome versions',
},
],
],
}
}
1 change: 1 addition & 0 deletions frontend_src/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
commonjs: true,
es6: true,
node: true,
'vue/setup-compiler-macros': true,
},
rules: {
'no-debugger': 'warn',
Expand Down
16 changes: 16 additions & 0 deletions frontend_src/history/HistoryLine.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="htmlContent" />
</template>

<script setup>
import { computed } from 'vue';
const props = defineProps({
content: { type: String, required: true },
});
const htmlContent = computed(() => {
return spa.colors.ansiToHTML(props.content);
});
</script>
285 changes: 0 additions & 285 deletions frontend_src/history/OldLinesMixin.js

This file was deleted.

Loading

0 comments on commit 3e6e9d3

Please sign in to comment.