Compare commits

..

1 Commits

Author SHA1 Message Date
izzy lyseggen 9aea5ddc97 fix(metrics): remove suuid as it is no longer used (#60) 2022-09-07 10:08:29 +01:00
5 changed files with 7 additions and 19 deletions
-8
View File
@@ -28,14 +28,6 @@ module SpeckleSystems::SpeckleConnector
accts.select { |acc| acc["isDefault"] }[0] || accts[0]
end
def self.get_suuid
dir = _get_speckle_dir
suuid_path = File.join(dir, "suuid")
return unless File.exist?(suuid_path)
File.read(suuid_path)
end
def self._get_speckle_dir
speckle_dir =
case Sketchup.platform
+1 -1
View File
@@ -147,7 +147,7 @@ module SpeckleSystems::SpeckleConnector
def self.init_local_accounts
puts("Initialisation of Speckle accounts requested by plugin")
@dialog.execute_script("loadAccounts(#{Accounts.load_accounts.to_json}, #{Accounts.get_suuid.to_json})")
@dialog.execute_script("loadAccounts(#{Accounts.load_accounts.to_json})")
end
def self.reload_accounts
+6 -8
View File
@@ -96,16 +96,14 @@ import { bus } from './main'
import userQuery from './graphql/user.gql'
import { onLogin } from './vue-apollo'
global.loadAccounts = function (accounts, suuid) {
console.log('>>> SpeckleSketchup: Loading accounts', accounts, `suuid: ${suuid}`)
global.loadAccounts = function (accounts) {
console.log('>>> SpeckleSketchup: Loading accounts', accounts)
localStorage.setItem('localAccounts', JSON.stringify(accounts))
if (suuid) {
localStorage.setItem('suuid', suuid)
global.setSelectedAccount(accounts.find((acct) => acct['isDefault']))
let uuid = localStorage.getItem('uuid')
if (uuid) {
global.setSelectedAccount(accounts.find((acct) => acct['userInfo']['id'] == uuid))
} else {
global.setSelectedAccount(
accounts.find((acct) => acct['userInfo']['id'] == localStorage.getItem('uuid'))
)
global.setSelectedAccount(accounts.find((acct) => acct['isDefault']))
}
}
-1
View File
@@ -9,7 +9,6 @@ query {
verified
profiles
role
suuid
streams {
totalCount
}
-1
View File
@@ -9,6 +9,5 @@ query User($id: String!) {
verified
profiles
role
suuid
}
}