@symbo.ls/preview 2.7.15 → 2.7.16

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "symbo.ls",
5
- "version": "2.7.15",
5
+ "version": "2.7.16",
6
6
  "main": "src/app.js",
7
7
  "scripts": {
8
8
  "link:all": "yarn link smbls domql css-in-props @symbo.ls/icons @symbo.ls/config @symbo.ls/components @symbo.ls/scratch @symbo.ls/playground @symbo.ls/utils @symbo.ls/init @symbo.ls/config-default @domql/router @domql/utils @domql/router",
@@ -52,6 +52,7 @@ export default {
52
52
  $all: true
53
53
  }, icon => {
54
54
  if (icon.progress) {
55
+ delete s.icon.pending
55
56
  set({
56
57
  $id: s.projectId,
57
58
  type: 'project',
@@ -4,9 +4,11 @@ import { InitPage } from '../../../components'
4
4
 
5
5
  import { Flex, Form } from '@symbo.ls/components'
6
6
  import { router } from '@domql/router'
7
+ import { isArray } from '@domql/utils'
7
8
 
8
9
  import icon from './icon'
9
10
  import fields from './fields'
11
+ import { set } from '@symbo.ls/based'
10
12
 
11
13
  export const Personalize = {
12
14
  extend: InitPage,
@@ -53,7 +55,7 @@ export const Personalize = {
53
55
  on: {
54
56
  submit: (ev, el, s) => {
55
57
  ev.preventDefault()
56
- console.log(s.parse())
58
+ console.log(1, s.parse())
57
59
  router(el.__root, '/init/theme', {})
58
60
  }
59
61
  }
@@ -91,7 +93,26 @@ export const CreateProject = {
91
93
  on: {
92
94
  submit: (ev, el, s) => {
93
95
  ev.preventDefault()
94
- console.log(s.parse())
96
+ console.log(2, s.parse())
97
+ const parentState = s.parent
98
+ const { projects, userId, username } = parentState
99
+ const setProject = {
100
+ type: 'project',
101
+ key: s.appKey,
102
+ name: s.projectName,
103
+ icon: s.icon,
104
+ visibility: s.visibility || 'private',
105
+ users: userId
106
+ }
107
+ console.log(setProject)
108
+ set(setProject, async d => {
109
+ await el.context.fetchProject(el, s.parent, {
110
+ username,
111
+ projectId: d.id,
112
+ activeProject: isArray(projects) ? projects.length : 0
113
+ })
114
+ router(el.__root, '/init/theme', {})
115
+ })
95
116
  // router(el.__root, '/init/theme', {})
96
117
  }
97
118
  }