darabos commited on
Commit
cd932aa
·
1 Parent(s): 1a96959

Tweak parameter visuals.

Browse files
web/src/LynxKiteNode.svelte CHANGED
@@ -51,14 +51,14 @@
51
  <Handle
52
  id={name} type="target" position={targetPosition || 'left'}
53
  style="{handleOffsetDirection[targetPosition || 'left']}: {100 * (i + 1) / (inputs.length + 1)}%">
54
- {#if inputs.length>1}<span class="handle-name">{name.replace("_", " ")}</span>{/if}
55
  </Handle>
56
  {/each}
57
  {#each outputs as [name, output], i}
58
  <Handle
59
  id={name} type="source" position={sourcePosition || 'right'}
60
  style="{handleOffsetDirection[sourcePosition || 'right']}: {100 * (i + 1) / (outputs.length + 1)}%">
61
- {#if outputs.length>1}<span class="handle-name">{name.replace("_", " ")}</span>{/if}
62
  </Handle>
63
  {/each}
64
  </div>
@@ -71,6 +71,7 @@
71
  font-size: 12px;
72
  }
73
  .title-icon {
 
74
  float: right;
75
  }
76
  .node-container {
 
51
  <Handle
52
  id={name} type="target" position={targetPosition || 'left'}
53
  style="{handleOffsetDirection[targetPosition || 'left']}: {100 * (i + 1) / (inputs.length + 1)}%">
54
+ {#if inputs.length>1}<span class="handle-name">{name.replace(/_/g, " ")}</span>{/if}
55
  </Handle>
56
  {/each}
57
  {#each outputs as [name, output], i}
58
  <Handle
59
  id={name} type="source" position={sourcePosition || 'right'}
60
  style="{handleOffsetDirection[sourcePosition || 'right']}: {100 * (i + 1) / (outputs.length + 1)}%">
61
+ {#if outputs.length>1}<span class="handle-name">{name.replace(/_/g, " ")}</span>{/if}
62
  </Handle>
63
  {/each}
64
  </div>
 
71
  font-size: 12px;
72
  }
73
  .title-icon {
74
+ margin-left: 5px;
75
  float: right;
76
  }
77
  .node-container {
web/src/NodeParameter.svelte CHANGED
@@ -5,48 +5,48 @@
5
  export let onChange;
6
  </script>
7
 
8
- <div class="param">
9
- <label>
10
- <span class="param-name">{name.replace('_', ' ')}</span>
11
- {#if meta?.type?.collapsed}
12
- <button class="collapsed-param form-control form-control-sm">
13
-
14
- </button>
15
- {:else if meta?.type?.enum}
16
- <select class="form-select form-select-sm"
17
- value={value}
18
- on:change={(evt) => onChange(evt.currentTarget.value)}
19
- >
20
- {#each meta.type.enum as option}
21
- <option value={option}>{option}</option>
22
- {/each}
23
- </select>
24
- {:else}
25
- <input class="form-control form-control-sm"
26
  value={value}
27
- on:input={(evt) => onChange(evt.currentTarget.value)}
28
- />
29
- {/if}
30
- </label>
31
- </div>
 
 
 
 
 
 
 
 
32
 
33
  <style>
34
  .param {
35
- padding: 0 8px 8px 8px;
36
- }
37
- .param label {
38
- font-size: 12px;
39
  display: block;
40
  }
41
  .param-name {
42
- color: #840;
 
43
  letter-spacing: 0.05em;
44
- margin-left: 4px;
45
- }
46
- .param input,
47
- .param select,
48
- .param button {
 
 
49
  }
50
  .collapsed-param {
 
 
51
  }
52
  </style>
 
5
  export let onChange;
6
  </script>
7
 
8
+ <label class="param">
9
+ <span class="param-name">{name.replace(/_/g, ' ')}</span>
10
+ {#if meta?.type?.collapsed}
11
+ <button class="collapsed-param form-control form-control-sm">
12
+
13
+ </button>
14
+ {:else if meta?.type?.enum}
15
+ <select class="form-select form-select-sm"
 
 
 
 
 
 
 
 
 
 
16
  value={value}
17
+ on:change={(evt) => onChange(evt.currentTarget.value)}
18
+ >
19
+ {#each meta.type.enum as option}
20
+ <option value={option}>{option}</option>
21
+ {/each}
22
+ </select>
23
+ {:else}
24
+ <input class="form-control form-control-sm"
25
+ value={value}
26
+ on:input={(evt) => onChange(evt.currentTarget.value)}
27
+ />
28
+ {/if}
29
+ </label>
30
 
31
  <style>
32
  .param {
33
+ padding: 4px 8px 4px 8px;
 
 
 
34
  display: block;
35
  }
36
  .param-name {
37
+ display: block;
38
+ font-size: 10px;
39
  letter-spacing: 0.05em;
40
+ margin-left: 10px;
41
+ background: oklch(50% 0.13 230);
42
+ background: oklch(95% 0.2 55);
43
+ background:var(--bs-border-color);
44
+ width: fit-content;
45
+ padding: 2px 8px;
46
+ border-radius: 4px 4px 0 0;
47
  }
48
  .collapsed-param {
49
+ min-height: 20px;
50
+ line-height: 10px;
51
  }
52
  </style>
web/src/Workspace.svelte CHANGED
@@ -30,7 +30,7 @@
30
  .top-bar {
31
  display: flex;
32
  justify-content: space-between;
33
- background: #002a4c;
34
  color: white;
35
  }
36
  .ws-name {
@@ -52,7 +52,7 @@
52
  align-items: center;
53
  }
54
  .tools a {
55
- color: #39bcf3;
56
  font-size: 1.5em;
57
  padding: 0 10px;
58
  }
 
30
  .top-bar {
31
  display: flex;
32
  justify-content: space-between;
33
+ background: oklch(30% 0.13 230);
34
  color: white;
35
  }
36
  .ws-name {
 
52
  align-items: center;
53
  }
54
  .tools a {
55
+ color: oklch(75% 0.13 230);
56
  font-size: 1.5em;
57
  padding: 0 10px;
58
  }
web/src/app.scss CHANGED
@@ -1,5 +1,10 @@
1
  // Import all of Bootstrap's CSS
 
2
  @import "bootstrap/scss/bootstrap";
 
 
 
 
3
  path.svelte-flow__edge-path {
4
  stroke-width: 2;
5
  stroke: black;
 
1
  // Import all of Bootstrap's CSS
2
+ $form-select-indicator-color: oklch(90% 0.01 55);
3
  @import "bootstrap/scss/bootstrap";
4
+ :root {
5
+ --bs-border-color: oklch(90% 0.01 55);
6
+ }
7
+
8
  path.svelte-flow__edge-path {
9
  stroke-width: 2;
10
  stroke: black;