Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e64f7454ce | |||
| 9d2ef1e26e | |||
| c781534950 |
+4
-8
@@ -59,7 +59,7 @@
|
||||
<b>{{ user.email }}</b>
|
||||
</div>
|
||||
<div class="caption">
|
||||
<b>{{ serverInfo.canonicalUrl }}</b>
|
||||
<b>{{ activeAccount().serverInfo.url }}</b>
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-card-text v-if="accounts()">
|
||||
@@ -155,10 +155,8 @@ global.loadAccounts = function (accounts) {
|
||||
var account = accounts.find((acct) => acct['userInfo']['id'] === uuid)
|
||||
if (account){
|
||||
global.setSelectedAccount(account)
|
||||
}else{
|
||||
global.setSelectedAccount(accounts.find((acct) => acct['isDefault']))
|
||||
return
|
||||
}
|
||||
} else {
|
||||
global.setSelectedAccount(accounts.find((acct) => acct['isDefault']))
|
||||
}
|
||||
}
|
||||
@@ -250,19 +248,17 @@ export default {
|
||||
return JSON.parse(localStorage.getItem('localAccounts'))
|
||||
},
|
||||
activeAccount(){
|
||||
return this.accounts().find((account) => account['isDefault'])
|
||||
return JSON.parse(localStorage.getItem('selectedAccount'))
|
||||
},
|
||||
switchAccount(account) {
|
||||
this.$mixpanel.track('Connector Action', { name: 'Account Select' })
|
||||
global.setSelectedAccount(account)
|
||||
|
||||
|
||||
// Force pushes to reload page to create ApolloClient from scratch
|
||||
// setTimeout(() => {
|
||||
// // timeout to wait a bit for potential sketchup.exec in the mean time calls
|
||||
// location.reload()
|
||||
// }, 200);
|
||||
this.$apollo.queries.user.refetch()
|
||||
this.$apollo.queries.serverInfo.refetch()
|
||||
},
|
||||
requestRefresh() {
|
||||
sketchup.exec({name: 'reload_accounts', data: {}})
|
||||
|
||||
@@ -145,7 +145,8 @@ export default {
|
||||
prefetch: true,
|
||||
variables() {
|
||||
return {
|
||||
id: this.sourceStreamId
|
||||
id: this.sourceStreamId,
|
||||
limit: 100
|
||||
}
|
||||
},
|
||||
skip() {
|
||||
|
||||
@@ -221,7 +221,8 @@ export default {
|
||||
query: streamQuery,
|
||||
variables() {
|
||||
return {
|
||||
id: this.streamId
|
||||
id: this.streamId,
|
||||
limit: 100
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
query Stream($id: String!) {
|
||||
query Stream($id: String!, $limit: Int!) {
|
||||
stream(id: $id) {
|
||||
id
|
||||
name
|
||||
@@ -27,7 +27,7 @@ query Stream($id: String!) {
|
||||
referencedObject
|
||||
}
|
||||
}
|
||||
branches {
|
||||
branches (limit: $limit) {
|
||||
totalCount
|
||||
items {
|
||||
id
|
||||
|
||||
@@ -124,12 +124,13 @@ export default {
|
||||
if (!this.savedStreams){
|
||||
this.savedStreams = []
|
||||
this.savedStreams.push(streamId)
|
||||
sketchup.exec({name: "save_stream", data: {stream_id: streamId}})
|
||||
} else {
|
||||
if (!this.savedStreams.includes(streamId)){
|
||||
this.savedStreams.push(streamId)
|
||||
sketchup.exec({name: "save_stream", data: {stream_id: streamId}})
|
||||
}
|
||||
}
|
||||
sketchup.exec({name: "save_stream", data: {stream_id: streamId}})
|
||||
})
|
||||
sketchup.exec({name: "load_saved_streams", data: {}})
|
||||
console.log('LAUNCHED')
|
||||
|
||||
Reference in New Issue
Block a user