Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e1308bfa21 | |||
| ed1d1f5b44 | |||
| aff871baaa |
@@ -24,7 +24,7 @@ module SpeckleConnector
|
||||
|
||||
# Run from localhost or from build files
|
||||
DEV_MODE = false
|
||||
puts("Loading Speckle Connector v#{CONNECTOR_VERSION} from #{DEV_MODE ? 'dev' : 'build'}")
|
||||
puts("Loading Speckle (Legacy) Connector v#{CONNECTOR_VERSION} from #{DEV_MODE ? 'dev' : 'build'}")
|
||||
|
||||
unless file_loaded?(__FILE__)
|
||||
ex = SketchupExtension.new('Speckle SketchUp', File.join(PATH, 'bootstrap'))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 26 KiB |
@@ -12,7 +12,7 @@ module SpeckleConnector
|
||||
# This is the command where we show UI to user.
|
||||
class InitializeSpeckle < Command
|
||||
def dialog_title
|
||||
"Speckle #{CONNECTOR_VERSION}"
|
||||
"Speckle (Legacy) #{CONNECTOR_VERSION}"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -30,18 +30,14 @@ module SpeckleConnector
|
||||
|
||||
commands[CMD_RESET_WINDOW_LOCATION_SPECKLE] = reset_window_location_command(app)
|
||||
commands.add_to_menu!(CMD_RESET_WINDOW_LOCATION_SPECKLE, speckle_menu)
|
||||
|
||||
# commands[CMD_SEND_TO_SPECKLE] = send_command(app)
|
||||
# commands.add_to_menu!(CMD_SEND_TO_SPECKLE, speckle_menu)
|
||||
# commands.add_to_toolbar!(CMD_SEND_TO_SPECKLE, speckle_toolbar)
|
||||
end
|
||||
|
||||
def self.initialize_speckle_command(app)
|
||||
cmd = MenuCommandHandler.sketchup_command(
|
||||
InitializeSpeckle.new(app), 'Initialize Speckle'
|
||||
InitializeSpeckle.new(app), 'Initialize Speckle (Legacy)'
|
||||
)
|
||||
cmd.tooltip = 'Launch Connector'
|
||||
cmd.status_bar_text = 'Opens the Speckle Connector window'
|
||||
cmd.status_bar_text = 'Opens the Speckle (Legacy) Connector window'
|
||||
cmd.small_icon = '../../img/s2logo.png'
|
||||
cmd.large_icon = '../../img/s2logo.png'
|
||||
cmd
|
||||
@@ -57,18 +53,6 @@ module SpeckleConnector
|
||||
cmd.large_icon = '../../img/s2logo.png'
|
||||
cmd
|
||||
end
|
||||
|
||||
def self.send_command(app)
|
||||
cmd = MenuCommandHandler.sketchup_command(
|
||||
ActionCommand.new(app, Actions::OneClickSend), 'Send to Speckle'
|
||||
)
|
||||
cmd.tooltip = 'Send to Speckle'
|
||||
cmd.status_bar_text = 'Send to Speckle'
|
||||
cmd.small_icon = '../../img/Sender.png'
|
||||
cmd.large_icon = '../../img/Sender.png'
|
||||
cmd.set_validation_proc { MenuCommandHandler.speckle_started(app) }
|
||||
cmd
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ module SpeckleConnector
|
||||
# An interface to Sketchup user interface. This object controls the menu `Extensions->Speckle` in Sketchup's menu,
|
||||
# the Speckle toolbar and sending message to the user via Sketchup.
|
||||
class SketchupUi
|
||||
MENU_TITLE = 'Speckle'
|
||||
MENU_TITLE = 'Speckle (Legacy)'
|
||||
BEFORE_NEVER_SHOWN = -1
|
||||
|
||||
# @return [Sketchup::Menu] the menu of the Speckle
|
||||
|
||||
+4
-1
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<v-app>
|
||||
<v-main>
|
||||
<legacy-dialog/>
|
||||
<v-app-bar app flat height="50">
|
||||
<v-img
|
||||
class="mx-auto px-0"
|
||||
@@ -135,6 +136,7 @@ import userQuery from './graphql/user.gql'
|
||||
import serverInfoQuery from './graphql/serverInfo.gql'
|
||||
import { onLogin } from './vue-apollo'
|
||||
import Login from "@/views/Login";
|
||||
import LegacyDialog from './components/dialogs/LegacyDialog.vue';
|
||||
|
||||
global.collectPreferences = function (preferences) {
|
||||
bus.$emit('update-preferences', preferences)
|
||||
@@ -178,7 +180,8 @@ export default {
|
||||
CreateStreamDialog: () => import('@/components/dialogs/CreateStreamDialog'),
|
||||
SettingsDialog: () => import('@/components/dialogs/SettingsDialog'),
|
||||
GlobalToast: () => import('@/components/GlobalToast'),
|
||||
Mapper: () => import('@/components/Mapper')
|
||||
Mapper: () => import('@/components/Mapper'),
|
||||
LegacyDialog: () => import('@/components/dialogs/LegacyDialog')
|
||||
},
|
||||
props: {
|
||||
size: {
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<v-dialog v-model="dialog" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title class="headline">Legacy Version</v-card-title>
|
||||
<v-card-text>
|
||||
⚠️Warning: This is a legacy connector.
|
||||
<br /><br />
|
||||
<a
|
||||
href="https://app.speckle.systems/connectors"
|
||||
target="_blank"
|
||||
style="color: #1976D2; text-decoration: none; font-weight: 500;"
|
||||
>
|
||||
Download next-gen SketchUp connector
|
||||
</a>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey" text @click="dialog = false">Dismiss</v-btn>
|
||||
<v-btn color="primary" @click="downloadLatest">Download</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialog: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async downloadLatest() {
|
||||
const response = await fetch(
|
||||
`https://releases.speckle.dev/manager2/feeds/sketchup-v3.json`,
|
||||
{
|
||||
method: 'GET'
|
||||
}
|
||||
)
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to fetch versions')
|
||||
}
|
||||
|
||||
const data = await response.json()
|
||||
const sortedVersions = data.Versions.sort(function (a, b) {
|
||||
return new Date(b.Date).getTime() - new Date(a.Date).getTime()
|
||||
})
|
||||
const latestAvailableVersion = sortedVersions[0]
|
||||
|
||||
latestAvailableVersion.value = sortedVersions[0]
|
||||
window.open(latestAvailableVersion.value?.Url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user