@things-factory/operato-codelingua 8.0.0-beta.9 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.dockerignore +6 -24
  2. package/client/bootstrap.ts +206 -0
  3. package/client/icons/menu-icons.ts +91 -0
  4. package/client/index.ts +0 -0
  5. package/client/pages/git-project/git-project-list-page.ts +427 -0
  6. package/client/route.ts +8 -0
  7. package/client/themes/dark.css +51 -0
  8. package/client/themes/light.css +51 -0
  9. package/client/tsconfig.json +12 -0
  10. package/client/viewparts/menu-tools.ts +170 -0
  11. package/client/viewparts/user-circle.ts +24 -0
  12. package/dist-client/tsconfig.tsbuildinfo +1 -1
  13. package/dist-server/tsconfig.tsbuildinfo +1 -1
  14. package/installer/config.production.js +40 -0
  15. package/installer/docker-compose.yml +42 -0
  16. package/installer/install.sh +54 -0
  17. package/installer/migrate.sh +1 -0
  18. package/installer/start.sh +18 -0
  19. package/installer/stop.sh +1 -0
  20. package/installer/upgrade.sh +1 -0
  21. package/package.json +48 -48
  22. package/server/controllers/github-controller.ts +98 -0
  23. package/server/controllers/index.ts +0 -0
  24. package/server/index.ts +7 -0
  25. package/server/middlewares/index.ts +3 -0
  26. package/server/migrations/index.ts +9 -0
  27. package/server/routers/github-webhook-router.ts +45 -0
  28. package/server/routes.ts +30 -0
  29. package/server/service/git-project/git-project-mutation.ts +179 -0
  30. package/server/service/git-project/git-project-query.ts +48 -0
  31. package/server/service/git-project/git-project-type.ts +76 -0
  32. package/server/service/git-project/git-project.ts +114 -0
  33. package/server/service/git-project/index.ts +7 -0
  34. package/server/service/index.ts +21 -0
  35. package/server/tsconfig.json +9 -0
@@ -0,0 +1,170 @@
1
+ import { css, html, LitElement } from 'lit'
2
+ import { customElement, property, query } from 'lit/decorators.js'
3
+
4
+ import { connect } from 'pwa-helpers'
5
+
6
+ import { store } from '@operato/shell'
7
+
8
+ import { ICONS_PROGRESS, ICONS_COMPLETED, ICONS_STATUS, ICONS_OPERATING, ICONS_SETTING } from '../icons/menu-icons'
9
+
10
+ @customElement('menu-tools')
11
+ export class MenuTools extends connect(store)(LitElement) {
12
+ static styles = [
13
+ css`
14
+ :host {
15
+ display: flex;
16
+ background-color: var(--secondary-color);
17
+
18
+ /* for narrow mode */
19
+ flex-direction: column;
20
+ width: 100%;
21
+ --menu-tools-color: rgba(255, 255, 255, 0.9);
22
+ --menu-tools-active-color: rgba(107, 178, 249, 1);
23
+ }
24
+
25
+ :host([width='WIDE']) {
26
+ /* for wide mode */
27
+ flex-direction: row;
28
+ width: initial;
29
+ height: 100%;
30
+ }
31
+
32
+ ul {
33
+ display: flex;
34
+ flex-direction: row;
35
+
36
+ margin: auto;
37
+ padding: 0;
38
+ list-style: none;
39
+ height: 100%;
40
+ overflow: none;
41
+ }
42
+
43
+ :host([width='NARROW']) ul {
44
+ width: 100%;
45
+ justify-content: space-around;
46
+ }
47
+
48
+ :host([width='WIDE']) ul {
49
+ flex-direction: column;
50
+ }
51
+ :host([width='NARROW']) li {
52
+ flex: 1;
53
+ }
54
+
55
+ :host([width='WIDE']) li {
56
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
57
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
58
+ }
59
+
60
+ a {
61
+ display: flex;
62
+ flex-direction: column;
63
+ padding: 5px 0px;
64
+ opacity: 0.7;
65
+ align-items: center;
66
+ text-align: center;
67
+ text-decoration: none;
68
+ text-transform: capitalize;
69
+ color: var(--menu-tools-color);
70
+ border-left: 2px solid transparent;
71
+ }
72
+
73
+ a[active] {
74
+ opacity: 1;
75
+ color: var(--menu-tools-active-color);
76
+ font-weight: bold;
77
+ background-color: rgba(0, 0, 0, 0.15);
78
+ border-left: 2px solid var(--menu-tools-active-color);
79
+ }
80
+
81
+ :host([width='NARROW']) a {
82
+ padding: 0px 0px 5px 0px;
83
+ opacity: 0.8;
84
+ color: var(--menu-tools-color);
85
+ border-left: none;
86
+ border-top: 2px solid transparent;
87
+ }
88
+
89
+ :host([width='NARROW']) a[active] {
90
+ opacity: 1;
91
+ color: var(--menu-tools-active-color);
92
+ font-weight: bold;
93
+ background-color: rgba(0, 0, 0, 0.15);
94
+ border-left: none;
95
+ border-top: 2px solid var(--menu-tools-active-color);
96
+ }
97
+
98
+ img {
99
+ display: block;
100
+ width: 35px;
101
+ padding: 5px 10px 0px 10px;
102
+ }
103
+
104
+ :host([width='NARROW']) img {
105
+ padding: 0;
106
+ }
107
+
108
+ div {
109
+ font-size: 0.6em;
110
+ }
111
+ `
112
+ ]
113
+
114
+ @property({ type: String }) page?: string
115
+ @property({ type: String, reflect: true }) width?: string
116
+
117
+ private menus: { name: string; path: string; icons: string[] }[] = []
118
+
119
+ render() {
120
+ this.menus = [
121
+ {
122
+ name: '진행중',
123
+ path: 'git-project-list',
124
+ icons: ICONS_PROGRESS
125
+ },
126
+ {
127
+ name: '완료',
128
+ path: 'project-completed-list',
129
+ icons: ICONS_COMPLETED
130
+ },
131
+ {
132
+ name: '현황',
133
+ path: 'dssp-status',
134
+ icons: ICONS_STATUS
135
+ },
136
+ {
137
+ name: '공정표',
138
+ path: 'project-schedule-list',
139
+ icons: ICONS_OPERATING
140
+ },
141
+ {
142
+ name: '셋팅',
143
+ path: 'project-setting-list',
144
+ icons: ICONS_SETTING
145
+ }
146
+ ]
147
+
148
+ var page = this.page || ''
149
+
150
+ return html`
151
+ <ul>
152
+ ${this.menus.map(
153
+ menu => html`
154
+ <li>
155
+ <a href=${menu.path} ?active=${!!~page.indexOf(menu.path)}>
156
+ <img src=${!!~page.indexOf(menu.path) ? menu.icons[1] : menu.icons[0]} />
157
+ <div>${menu.name}</div>
158
+ </a>
159
+ </li>
160
+ `
161
+ )}
162
+ </ul>
163
+ `
164
+ }
165
+
166
+ stateChanged(state) {
167
+ this.page = state.route.page
168
+ this.width = state.layout.width
169
+ }
170
+ }
@@ -0,0 +1,24 @@
1
+ import { LitElement, html, css } from 'lit'
2
+ import { customElement } from 'lit/decorators.js'
3
+
4
+ const userIcon = new URL('../../assets/images/user.png', import.meta.url).href
5
+
6
+ @customElement('user-circle')
7
+ export class UserCircle extends LitElement {
8
+ static styles = [
9
+ css`
10
+ img {
11
+ display: block;
12
+ width: 36px;
13
+ height: 36px;
14
+ border-radius: 50%;
15
+
16
+ object-fit: cover;
17
+ }
18
+ `
19
+ ]
20
+
21
+ render() {
22
+ return html` <img src=${userIcon} class="user" /> `
23
+ }
24
+ }