Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
improved logging
add global logging
bugfixes
add itch icon
  • Loading branch information
Armaldio committed Jan 17, 2025
1 parent f808c46 commit cafa159
Show file tree
Hide file tree
Showing 14 changed files with 222 additions and 128 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Add own timers for electorn export & such
si tu appuies sur New Project, puis que tu selectionne direct le dropdown pour choisir Local/Cloud, ça ferme le popup et c'est impossible de rappuyer sur New Project
C3 Preview ne fonctionne pas
Steam achievement test c3 example
Itch plugin
Filesystem plugin: overwrite parameter + better sentences/descriptions

Convert dektop app to web app + node backend
Expand Down
12 changes: 12 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
Accordion: typeof import('primevue/accordion')['default']
AccordionContent: typeof import('primevue/accordioncontent')['default']
AccordionHeader: typeof import('primevue/accordionheader')['default']
AccordionPanel: typeof import('primevue/accordionpanel')['default']
Avatar: typeof import('primevue/avatar')['default']
Badge: typeof import('primevue/badge')['default']
Button: typeof import('primevue/button')['default']
Checkbox: typeof import('primevue/checkbox')['default']
Chip: typeof import('primevue/chip')['default']
Expand All @@ -25,9 +31,15 @@ declare module 'vue' {
Password: typeof import('primevue/password')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
ScrollPanel: typeof import('primevue/scrollpanel')['default']
Select: typeof import('primevue/select')['default']
SelectButton: typeof import('primevue/selectbutton')['default']
Skeleton: typeof import('primevue/skeleton')['default']
Tab: typeof import('primevue/tab')['default']
TabList: typeof import('primevue/tablist')['default']
TabPanel: typeof import('primevue/tabpanel')['default']
TabPanels: typeof import('primevue/tabpanels')['default']
Tabs: typeof import('primevue/tabs')['default']
Toast: typeof import('primevue/toast')['default']
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"change-case": "5.4.4",
"code-tag": "1.2.0",
"d3-shape": "3.2.0",
"date-fns": "4.1.0",
"dompurify": "3.1.7",
"ejs": "3.1.10",
"electron-squirrel-startup": "1.0.1",
Expand Down
8 changes: 8 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions src/main/handler-func.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,16 @@ export const handleActionExecute = async (
await node.runner({
inputs: resolvedInputs,
log: (...args) => {
const logArgs = [`[${node.node.name}]`, ...args]
const decorator = `[${node.node.name}]`
const logArgs = [decorator, ...args]
logger().info(...logArgs)
send({
type: 'log',
data: logArgs
data: {
decorator,
time: Date.now(),
message: args
}
})
},
setOutput: (key, value) => {
Expand Down
59 changes: 3 additions & 56 deletions src/renderer/components/nodes/EditorNodeAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@
icon="pi pi-exclamation-triangle"
size="small"
text
@click.stop.prevent="isLogDialogOpened = true"
/>
<Button
v-else-if="hasLines"
class="small-btn"
icon="pi pi-exclamation-triangle"
size="small"
text
@click.stop.prevent="isLogDialogOpened = true"
/>
</div>
<!-- <span class="type-icon pi pi-play"></span> -->
Expand Down Expand Up @@ -140,25 +131,6 @@
@add-node="addNode"
>
</AddNodeButton>

<Dialog
v-model:visible="isLogDialogOpened"
modal
:style="{ width: '80vw' }"
:breakpoints="{ '575px': '90vw' }"
>
<template #header>
<div class="flex flex-column w-full">
<p class="text-xl text-center">Logs</p>
</div>
</template>

<div class="logs">
<div v-for="(line, index) of nodeLogLines" :key="index" class="line">
<div v-for="(cell, index2) of line" :key="index2" class="cell">{{ cell }}</div>
</div>
</div>
</Dialog>
</div>
</template>

Expand Down Expand Up @@ -207,8 +179,6 @@ const props = defineProps({
const menu = ref()
const { value, steps, index } = toRefs(props)
const isLogDialogOpened = ref(false)
/*
<div class="left">
<Button @click="swapNodes(index, 'up')">
Expand Down Expand Up @@ -341,7 +311,7 @@ const {
disableNode,
enableNode
} = editor
const { activeNode, variables, logLines } = storeToRefs(editor)
const { activeNode, variables } = storeToRefs(editor)
const nodeDefinition = computed(() => {
const def = getNodeDefinition(value.value.origin.nodeId, value.value.origin.pluginId)
Expand Down Expand Up @@ -431,18 +401,6 @@ watchDebounced(
const showSidebar = ref(false)
const nodeLogLines = computed(() => {
const item = logLines.value[value.value.uid]
if (item) {
return item
}
return []
})
const hasLines = computed(() => {
return nodeLogLines.value.length > 0
})
const hasErrored = computed(() => {
return false
})
Expand All @@ -466,8 +424,8 @@ const hasErrored = computed(() => {
border: 1px solid #c2c9d1;
padding: 4px 16px 4px 16px;
border-radius: 4px;
width: fit-content;
min-width: 300px;
// width: fit-content;
// min-width: 300px;
background-color: white;
display: flex;
Expand Down Expand Up @@ -598,17 +556,6 @@ const hasErrored = computed(() => {
color: red;
}
.logs {
.line {
display: flex;
gap: 4px;
.cell {
flex: 0 0 auto;
}
}
}
@keyframes clippath {
0%,
100% {
Expand Down
Loading

0 comments on commit cafa159

Please sign in to comment.