Merge branch 'main' into alex/sao-progressive
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
"gqlgen": "graphql-codegen --config codegen.yml"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.6.9",
|
||||
"@apollo/client": "^3.7.0",
|
||||
"@speckle/viewer": "workspace:^",
|
||||
"@tiptap/core": "^2.0.0-beta.176",
|
||||
"@tiptap/extension-bold": "^2.0.0-beta.26",
|
||||
|
||||
@@ -69,7 +69,7 @@ function createCache(): InMemoryCache {
|
||||
}
|
||||
},
|
||||
streams: {
|
||||
keyArgs: false,
|
||||
keyArgs: ['query'],
|
||||
merge: buildAbstractCollectionMergeFunction('StreamCollection', {
|
||||
checkIdentity: true
|
||||
})
|
||||
@@ -79,7 +79,7 @@ function createCache(): InMemoryCache {
|
||||
User: {
|
||||
fields: {
|
||||
timeline: {
|
||||
keyArgs: false,
|
||||
keyArgs: ['after', 'before'],
|
||||
merge: buildAbstractCollectionMergeFunction('ActivityCollection')
|
||||
},
|
||||
commits: {
|
||||
@@ -99,7 +99,7 @@ function createCache(): InMemoryCache {
|
||||
Stream: {
|
||||
fields: {
|
||||
activity: {
|
||||
keyArgs: false,
|
||||
keyArgs: ['after', 'before', 'actionType'],
|
||||
merge: buildAbstractCollectionMergeFunction('ActivityCollection')
|
||||
},
|
||||
commits: {
|
||||
|
||||
@@ -1903,6 +1903,13 @@ export type StreamSettingsQueryVariables = Exact<{
|
||||
|
||||
export type StreamSettingsQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, description?: string | null, isPublic: boolean, isDiscoverable: boolean, allowPublicComments: boolean, role?: string | null } | null };
|
||||
|
||||
export type SearchStreamsQueryVariables = Exact<{
|
||||
query?: InputMaybe<Scalars['String']>;
|
||||
}>;
|
||||
|
||||
|
||||
export type SearchStreamsQuery = { __typename?: 'Query', streams?: { __typename?: 'StreamCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Stream', id: string, name: string, updatedAt: string }> | null } | null };
|
||||
|
||||
export type UpdateStreamSettingsMutationVariables = Exact<{
|
||||
input: StreamUpdateInput;
|
||||
}>;
|
||||
@@ -2577,6 +2584,19 @@ export const StreamSettings = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const SearchStreams = gql`
|
||||
query SearchStreams($query: String) {
|
||||
streams(query: $query) {
|
||||
totalCount
|
||||
cursor
|
||||
items {
|
||||
id
|
||||
name
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UpdateStreamSettings = gql`
|
||||
mutation UpdateStreamSettings($input: StreamUpdateInput!) {
|
||||
streamUpdate(stream: $input)
|
||||
@@ -2836,6 +2856,7 @@ export const UpdateStreamPermissionDocument = {"kind":"Document","definitions":[
|
||||
export const StreamFirstCommitDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamFirstCommit"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}}]}}]}}]}}]}}]} as unknown as DocumentNode<StreamFirstCommitQuery, StreamFirstCommitQueryVariables>;
|
||||
export const StreamBranchFirstCommitDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamBranchFirstCommit"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"branch"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"branch"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"branch"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<StreamBranchFirstCommitQuery, StreamBranchFirstCommitQueryVariables>;
|
||||
export const StreamSettingsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamSettings"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"isDiscoverable"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]} as unknown as DocumentNode<StreamSettingsQuery, StreamSettingsQueryVariables>;
|
||||
export const SearchStreamsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SearchStreams"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streams"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}}]} as unknown as DocumentNode<SearchStreamsQuery, SearchStreamsQueryVariables>;
|
||||
export const UpdateStreamSettingsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateStreamSettings"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StreamUpdateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"stream"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode<UpdateStreamSettingsMutation, UpdateStreamSettingsMutationVariables>;
|
||||
export const DeleteStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteStream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}]}}]} as unknown as DocumentNode<DeleteStreamMutation, DeleteStreamMutationVariables>;
|
||||
export const UserFavoriteStreamsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserFavoriteStreams"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommonUserFields"}},{"kind":"Field","name":{"kind":"Name","value":"favoriteStreams"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"10"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommonStreamFields"}}]}}]}}]}}]}},...CommonUserFieldsFragmentDoc.definitions,...CommonStreamFieldsFragmentDoc.definitions]} as unknown as DocumentNode<UserFavoriteStreamsQuery, UserFavoriteStreamsQueryVariables>;
|
||||
|
||||
@@ -176,6 +176,20 @@ export const streamSettingsQuery = gql`
|
||||
}
|
||||
`
|
||||
|
||||
export const searchStreamsQuery = gql`
|
||||
query SearchStreams($query: String) {
|
||||
streams(query: $query) {
|
||||
totalCount
|
||||
cursor
|
||||
items {
|
||||
id
|
||||
name
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const updateStreamSettingsMutation = gql`
|
||||
mutation UpdateStreamSettings($input: StreamUpdateInput!) {
|
||||
streamUpdate(stream: $input)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
link
|
||||
class="primary mb-4"
|
||||
dark
|
||||
href="https://releases.speckle.systems/"
|
||||
href="https://speckle.systems/download/"
|
||||
target="_blank"
|
||||
>
|
||||
<v-list-item-icon>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="d-flex align-center">
|
||||
<v-autocomplete
|
||||
v-model="selectedSearchResult"
|
||||
:loading="$apollo.loading"
|
||||
:loading="isSearchLoading"
|
||||
:items="items"
|
||||
:search-input.sync="search"
|
||||
no-filter
|
||||
@@ -61,70 +61,57 @@
|
||||
</v-list-item>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<v-dialog v-model="liff" max-width="400" :fullscreen="$vuetify.breakpoint.xsOnly">
|
||||
<v-card>
|
||||
<v-toolbar>
|
||||
<v-toolbar-title>
|
||||
thanks for all the fish
|
||||
<v-icon>mdi-fish</v-icon>
|
||||
<v-icon>mdi-arrow-up</v-icon>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="liff = false"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</v-toolbar>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { gql } from '@apollo/client/core'
|
||||
<script lang="ts">
|
||||
import { SearchStreamsDocument, SearchStreamsQuery } from '@/graphql/generated/graphql'
|
||||
import { Nullable } from '@/helpers/typeHelpers'
|
||||
import { useQuery } from '@vue/apollo-composable'
|
||||
import type { Get } from 'type-fest'
|
||||
import { defineComponent, ref, watch } from 'vue'
|
||||
|
||||
export default {
|
||||
type SearchItemType = NonNullable<Get<SearchStreamsQuery, 'streams.items.0'>>
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
PreviewImage: () => import('@/main/components/common/PreviewImage')
|
||||
PreviewImage: () => import('@/main/components/common/PreviewImage.vue')
|
||||
},
|
||||
props: {
|
||||
gotostreamonclick: { type: Boolean, default: true }
|
||||
},
|
||||
data: () => ({
|
||||
search: '',
|
||||
hasSearched: false,
|
||||
liff: false,
|
||||
items: [],
|
||||
selectedSearchResult: null
|
||||
}),
|
||||
apollo: {
|
||||
streams: {
|
||||
query: gql`
|
||||
query Streams($query: String) {
|
||||
streams(query: $query) {
|
||||
totalCount
|
||||
cursor
|
||||
items {
|
||||
id
|
||||
name
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
variables() {
|
||||
return {
|
||||
query: this.search
|
||||
}
|
||||
setup() {
|
||||
const search = ref('')
|
||||
const items = ref([] as SearchItemType[])
|
||||
|
||||
const { onResult: onSearchResult, loading: isSearchLoading } = useQuery(
|
||||
SearchStreamsDocument,
|
||||
() => {
|
||||
return { query: search.value }
|
||||
},
|
||||
skip() {
|
||||
return !this.search || this.search.length < 3
|
||||
},
|
||||
result({ data }) {
|
||||
this.items = [...data.streams.items]
|
||||
},
|
||||
debounce: 300
|
||||
}
|
||||
() => ({
|
||||
enabled: search.value?.length >= 3,
|
||||
debounce: 300
|
||||
})
|
||||
)
|
||||
onSearchResult((result) => {
|
||||
const newItems = result.data?.streams?.items || []
|
||||
items.value = newItems.slice()
|
||||
})
|
||||
|
||||
watch(search, (newSearch) => {
|
||||
if (!newSearch?.length) {
|
||||
items.value = []
|
||||
}
|
||||
})
|
||||
|
||||
return { search, items, isSearchLoading }
|
||||
},
|
||||
data: () => ({
|
||||
selectedSearchResult: null as Nullable<SearchItemType>
|
||||
}),
|
||||
watch: {
|
||||
selectedSearchResult(val) {
|
||||
selectedSearchResult(val: SearchItemType) {
|
||||
const myStream = this.items.find((s) => s.id === val.id)
|
||||
this.$emit('select', myStream)
|
||||
|
||||
@@ -132,15 +119,9 @@ export default {
|
||||
this.search = ''
|
||||
|
||||
if (val && this.gotostreamonclick) this.$router.push(`/streams/${val.id}`)
|
||||
},
|
||||
search(val) {
|
||||
this.hasSearched = true
|
||||
if (val === '42') this.liff = true
|
||||
if (!val || val === '') this.items = []
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
.results {
|
||||
|
||||
@@ -16,6 +16,38 @@ export default {
|
||||
default: '?'
|
||||
}
|
||||
},
|
||||
data: () => ({
|
||||
apps: [
|
||||
{ name: 'dynamo', color: 'purple', short: 'DYN' },
|
||||
{ name: 'revit', color: 'blue darken-1', short: 'RVT' },
|
||||
{ name: 'autocad', color: 'red lighten-1', short: 'ACAD' },
|
||||
{ name: 'civil', color: 'cyan', short: 'C3D' },
|
||||
{ name: 'blender', color: 'orange darken-1', short: 'BLEND' },
|
||||
{ name: 'rhino', color: 'black', short: 'RH' },
|
||||
{ name: 'grasshopper', color: 'green darken-2', short: 'GH' },
|
||||
{ name: 'excel', color: 'green lighten-1', short: 'XLSX' },
|
||||
{ name: 'unity', color: 'teal', short: 'UNITY' },
|
||||
{ name: 'unreal', color: 'brown', short: 'UE' },
|
||||
{ name: 'python', color: 'yellow darken-1', short: 'PY' },
|
||||
{ name: '.net', color: 'purple darken-2', short: '.NET' },
|
||||
{ name: 'ifc', color: 'red darken-4', short: 'IFC' },
|
||||
{ name: 'qgis', color: 'light-green accent-4', short: 'QGIS' },
|
||||
{ name: 'arcgis', color: 'blue accent-4', short: 'AGIS' },
|
||||
{ name: 'etabs', color: 'grey darken-2', short: 'ETABS' },
|
||||
{ name: 'powerbi', color: 'yellow accent-1', short: 'PBI' },
|
||||
{ name: 'sketchup', color: 'blue accent-1', short: 'SKP' },
|
||||
{ name: 'sap', color: 'grey darken-2', short: 'SAP' },
|
||||
{ name: 'csibridge', color: 'grey darken-2', short: 'CSIB' },
|
||||
{ name: 'safe', color: 'grey darken-2', short: 'SAFE' },
|
||||
{ name: 'archicad', color: 'blue darken-1', short: 'ARCHI' },
|
||||
{ name: 'teklastructures', color: 'blue accent-4', short: 'AGIS' },
|
||||
{ name: 'arcgis', color: 'red accent-4', short: 'TEKLAS' },
|
||||
{ name: 'openroads', color: 'brown accent-4', short: 'OROAD' },
|
||||
{ name: 'openrail', color: 'brown accent-4', short: 'ORAIL' },
|
||||
{ name: 'openbuildings', color: 'brown accent-4', short: 'OBUILD' },
|
||||
{ name: 'microstation', color: 'brown accent-4', short: 'MICRO' }
|
||||
]
|
||||
}),
|
||||
computed: {
|
||||
// adding new colors?
|
||||
// this can help: https://codepen.io/teocomi/pen/vYxvREG?editors=1010
|
||||
@@ -24,21 +56,9 @@ export default {
|
||||
|
||||
const appname = this.applicationName.toLowerCase()
|
||||
|
||||
if (appname.includes('dynamo')) return 'purple'
|
||||
if (appname.includes('revit')) return 'blue darken-3'
|
||||
if (appname.includes('autocad')) return 'red lighten-1'
|
||||
if (appname.includes('civil')) return 'blue lighten-1'
|
||||
if (appname.includes('blender')) return 'orange darken-1'
|
||||
if (appname.includes('rhino')) return 'black'
|
||||
if (appname.includes('grasshopper')) return 'green darken-2'
|
||||
if (appname.includes('excel')) return 'green lighten-1'
|
||||
if (appname.includes('unity')) return 'teal'
|
||||
if (appname.includes('unreal')) return 'brown'
|
||||
if (appname.includes('python')) return 'yellow darken-1'
|
||||
if (appname.includes('.net')) return 'purple darken-2'
|
||||
if (appname.includes('ifc')) return 'red darken-4'
|
||||
if (appname.includes('qgis')) return 'light-green accent-4'
|
||||
if (appname.includes('arcgis')) return 'blue accent-4'
|
||||
for (const app of this.apps) {
|
||||
if (appname.includes(app.name)) return app.color
|
||||
}
|
||||
return 'grey'
|
||||
},
|
||||
shortName() {
|
||||
@@ -46,21 +66,9 @@ export default {
|
||||
|
||||
const appname = this.applicationName.toLowerCase()
|
||||
|
||||
if (appname.includes('dynamo')) return 'DYN'
|
||||
if (appname.includes('revit')) return 'RVT'
|
||||
if (appname.includes('autocad')) return 'ACAD'
|
||||
if (appname.includes('civil')) return 'C3D'
|
||||
if (appname.includes('blender')) return 'BLNDR'
|
||||
if (appname.includes('rhino')) return 'RH'
|
||||
if (appname.includes('grasshopper')) return 'GH'
|
||||
if (appname.includes('excel')) return 'XLSX'
|
||||
if (appname.includes('unity')) return 'UNITY'
|
||||
if (appname.includes('unreal')) return 'UE'
|
||||
if (appname.includes('python')) return 'PY'
|
||||
if (appname.includes('.net')) return '.NET'
|
||||
if (appname.includes('ifc')) return 'IFC'
|
||||
if (appname.includes('qgis')) return 'QGIS'
|
||||
if (appname.includes('arcgis')) return 'AGIS'
|
||||
for (const app of this.apps) {
|
||||
if (appname.includes(app.name)) return app.short
|
||||
}
|
||||
return appname
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,21 +5,20 @@
|
||||
firstResource && (isMultiple || isCommit || isObject) && !singleResourceError
|
||||
"
|
||||
>
|
||||
<commit-toolbar
|
||||
v-if="isCommitResource(firstResource)"
|
||||
:stream="firstResource.data"
|
||||
@edit-commit="showCommitEditDialog = true"
|
||||
/>
|
||||
<object-toolbar
|
||||
v-if="isObjectResource(firstResource)"
|
||||
:stream="firstResource.data"
|
||||
/>
|
||||
<multiple-resources-toolbar
|
||||
v-if="isMultiple && isNotErrorResource(firstResource)"
|
||||
:stream="{ name: firstResource.data.name, id: streamId }"
|
||||
:resources="resources"
|
||||
/>
|
||||
|
||||
<commit-toolbar
|
||||
v-else-if="isCommitResource(firstResource)"
|
||||
:stream="firstResource.data"
|
||||
@edit-commit="showCommitEditDialog = true"
|
||||
/>
|
||||
<object-toolbar
|
||||
v-else-if="isObjectResource(firstResource)"
|
||||
:stream="firstResource.data"
|
||||
/>
|
||||
<prioritized-portal to="nav" identity="stream-commit-viewer" :priority="2">
|
||||
<commit-object-viewer-scope
|
||||
:stream-id="streamId"
|
||||
@@ -34,7 +33,7 @@
|
||||
</div>
|
||||
<v-list nav dense class="mt-0 pt-0">
|
||||
<v-list-item
|
||||
v-if="isCommitResource(firstResource)"
|
||||
v-if="!isMultiple && isCommitResource(firstResource)"
|
||||
link
|
||||
:to="`/streams/${streamId}/branches/${firstResource.data.commit?.branchName}`"
|
||||
class=""
|
||||
@@ -101,6 +100,7 @@
|
||||
<preview-image
|
||||
v-if="
|
||||
!loadedModel &&
|
||||
!isMultiple &&
|
||||
(isCommitResource(firstResource) || isObjectResource(firstResource))
|
||||
"
|
||||
:style="`
|
||||
@@ -181,10 +181,10 @@
|
||||
<comment-add-overlay v-if="!isEmbed" key="b" />
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
Note: portaling out the mobile view of comment threads because of
|
||||
stacking chaos caused by transforms, etc. in positioning from the default
|
||||
view.
|
||||
view.
|
||||
-->
|
||||
<portal-target name="mobile-comment-thread"></portal-target>
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
/>
|
||||
</v-dialog>
|
||||
<v-dialog
|
||||
v-if="firstResource && isCommitResource(firstResource)"
|
||||
v-if="!isMultiple && firstResource && isCommitResource(firstResource)"
|
||||
v-model="showCommitEditDialog"
|
||||
width="500"
|
||||
:fullscreen="$vuetify.breakpoint.smAndDown"
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<portal v-if="canRenderToolbarPortal" to="toolbar">
|
||||
<prioritized-portal
|
||||
to="toolbar"
|
||||
identity="stream-commit-multiple-resources"
|
||||
:priority="1"
|
||||
>
|
||||
<div class="d-flex align-center">
|
||||
<div class="text-truncate flex-shrink-0 flex-lg-shrink-1">
|
||||
<router-link
|
||||
@@ -20,26 +24,16 @@
|
||||
Multiple Resources
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<v-btn icon><v-icon small>mdi-information</v-icon></v-btn>
|
||||
</div> -->
|
||||
</div>
|
||||
</portal>
|
||||
</prioritized-portal>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
STANDARD_PORTAL_KEYS,
|
||||
buildPortalStateMixin
|
||||
} from '@/main/utils/portalStateManager'
|
||||
import PrioritizedPortal from '@/main/components/common/utility/PrioritizedPortal.vue'
|
||||
|
||||
export default {
|
||||
mixins: [
|
||||
buildPortalStateMixin(
|
||||
[STANDARD_PORTAL_KEYS.Toolbar],
|
||||
'stream-commit-multiple-resources',
|
||||
1
|
||||
)
|
||||
],
|
||||
components: {
|
||||
PrioritizedPortal
|
||||
},
|
||||
props: {
|
||||
stream: {
|
||||
type: Object,
|
||||
|
||||
@@ -723,9 +723,9 @@ export default class SpeckleRenderer {
|
||||
|
||||
this.viewer.cameraHandler.controls.minDistance = distance / 100
|
||||
this.viewer.cameraHandler.controls.maxDistance = distance * 100
|
||||
// this.viewer.cameraHandler.camera.near = distance / 100
|
||||
// this.viewer.cameraHandler.camera.far = distance * 100
|
||||
// this.viewer.cameraHandler.camera.updateProjectionMatrix()
|
||||
this.viewer.cameraHandler.camera.near = Math.max(distance / 100, 0.1)
|
||||
this.viewer.cameraHandler.camera.far = distance * 100
|
||||
this.viewer.cameraHandler.camera.updateProjectionMatrix()
|
||||
|
||||
if (this.viewer.cameraHandler.activeCam.name === 'ortho') {
|
||||
this.viewer.cameraHandler.orthoCamera.far = distance * 100
|
||||
|
||||
@@ -61,6 +61,15 @@ export class SpeckleDynamicSAOPass extends SAOPass {
|
||||
|
||||
this.batcher = batcher
|
||||
|
||||
/** On Chromium, on MacOS the 16 bit depth render buffer appears broken.
|
||||
* We're not really using a stencil buffer at all, we're just forcing
|
||||
* three.js to use a 24 bit depth render buffer
|
||||
*/
|
||||
this.depthRenderTarget.depthBuffer = true
|
||||
this.depthRenderTarget.stencilBuffer = true
|
||||
this.normalRenderTarget.depthBuffer = true
|
||||
this.normalRenderTarget.stencilBuffer = true
|
||||
|
||||
this.depthMaterial = new SpeckleDepthMaterial(
|
||||
{
|
||||
depthPacking: RGBADepthPacking
|
||||
|
||||
@@ -179,7 +179,8 @@ Creates a Cilium Network Policy egress definition for connecting to S3 compatibl
|
||||
{{- if .Values.s3.networkPolicy.inCluster.enabled -}}
|
||||
{{ include "speckle.networkpolicy.egress.internal.cilium" (dict "endpointSelector" .Values.s3.networkPolicy.inCluster.cilium.endpointSelector "serviceSelector" .Values.s3.networkPolicy.inCluster.cilium.serviceSelector "port" $port) }}
|
||||
{{- else if .Values.s3.networkPolicy.externalToCluster.enabled -}}
|
||||
{{- $host := ( include "speckle.networkPolicy.domainFromUrl" .Values.s3.endpoint ) -}}
|
||||
{{- $s3Values := ( include "server.s3Values" . | fromJson ) -}}
|
||||
{{- $host := ( include "speckle.networkPolicy.domainFromUrl" $s3Values.endpoint ) -}}
|
||||
{{ include "speckle.networkpolicy.egress.external.cilium" (dict "ip" $host "port" $port) }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
@@ -251,7 +252,8 @@ Params:
|
||||
Creates a DNS match pattern for discovering blob storage IP
|
||||
*/}}
|
||||
{{- define "speckle.networkpolicy.dns.blob_storage.cilium" -}}
|
||||
{{- $domain := ( include "speckle.networkPolicy.domainFromUrl" .Values.s3.endpoint ) -}}
|
||||
{{- $s3Values := ( include "server.s3Values" . | fromJson ) -}}
|
||||
{{- $domain := ( include "speckle.networkPolicy.domainFromUrl" $s3Values.endpoint ) -}}
|
||||
{{- if ne (include "speckle.isIPv4" $domain ) "true" -}}
|
||||
{{ include "speckle.networkpolicy.matchNameOrPattern" $domain }}
|
||||
{{- end }}
|
||||
@@ -516,3 +518,16 @@ Params:
|
||||
{{- $secretDecoded := (b64dec $secret) -}}
|
||||
{{- printf "%s" $secretDecoded }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Retrieve the s3 parameters from ConfigMap if enabled, or default to retrieving them from the provided values
|
||||
*/}}
|
||||
{{- define "server.s3Values" -}}
|
||||
{{- if .Values.s3.configMap.enabled }}
|
||||
{{- $configMap := (lookup "v1" "ConfigMap" .Values.namespace .Values.s3.configMap.name ) -}}
|
||||
{{- printf "%s" ( $configMap.data | toJson ) }}
|
||||
{{- else }}
|
||||
{{- $result := dict "endpoint" .Values.s3.endpoint "bucket" .Values.s3.bucket "access_key" .Values.s3.access_key }}
|
||||
{{- $result | toJson }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -129,13 +129,14 @@ spec:
|
||||
{{- end }}
|
||||
|
||||
# *** S3 Object Storage ***
|
||||
{{- if .Values.s3.endpoint }}
|
||||
{{- if (or .Values.s3.configMap.enabled .Values.s3.endpoint) }}
|
||||
{{- $s3values := ((include "server.s3Values" .) | fromJson ) }}
|
||||
- name: S3_ENDPOINT
|
||||
value: {{ .Values.s3.endpoint }}
|
||||
value: {{ $s3values.endpoint }}
|
||||
- name: S3_ACCESS_KEY
|
||||
value: {{ .Values.s3.access_key }}
|
||||
value: {{ $s3values.access_key }}
|
||||
- name: S3_BUCKET
|
||||
value: {{ .Values.s3.bucket }}
|
||||
value: {{ $s3values.bucket }}
|
||||
- name: S3_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
@@ -121,12 +121,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "Required. A secret containing the full connection string to the Postgres database (e.g. in format of `protocol://username:password@host:port/database`) stored within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "Required. The key within the Kubernetes Secret holding the connection string.",
|
||||
"default": "postgres_url"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -195,19 +195,34 @@
|
||||
"s3": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"configMap": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"description": "If enabled, the s3.endpoint, s3.bucket, and s3.access_key values will be determined from a configMap and the values provided in this helm release ignored.",
|
||||
"default": false
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the ConfigMap in which values for the keys (`endpoint`, `bucket`, and `access_key`) are provided. Expected to be in the namespace defined by the `namespace` parameter of this Helm Chart.",
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"endpoint": {
|
||||
"type": "string",
|
||||
"description": "The URL at which the s3 compatible storage is hosted",
|
||||
"description": "The URL at which the s3 compatible storage is hosted. If `s3.configMap.enabled` is true, this value is ignored.",
|
||||
"default": ""
|
||||
},
|
||||
"bucket": {
|
||||
"type": "string",
|
||||
"description": "The s3 compatible bucket in which Speckle data will be stored",
|
||||
"description": "The s3 compatible bucket in which Speckle data will be stored. If `s3.configMap.enabled` is true, this value is ignored.",
|
||||
"default": ""
|
||||
},
|
||||
"access_key": {
|
||||
"type": "string",
|
||||
"description": "The key of the access key used to authenticate with the s3 compatible storage",
|
||||
"description": "The key of the access key used to authenticate with the s3 compatible storage. If `s3.configMap.enabled` is true, this value is ignored.",
|
||||
"default": ""
|
||||
},
|
||||
"secret_key": {
|
||||
@@ -216,12 +231,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "Required. A Kubernetes secret containing the s3 secret_key. This is expected to be the name of an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "Required. The key within the Kubernetes Secret, the value of which is the s3 secret.",
|
||||
"default": "s3_secret_key"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -306,12 +321,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "Required. A secret containing the full connection string to the Redis store (e.g. in format of `protocol://username:password@host:port/database`) stored within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "Required. The key within the Kubernetes Secret holding the Redis connection string.",
|
||||
"default": "redis_url"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -391,12 +406,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Kubernetes Secret containing the Session secret. This is a unique value (can be generated randomly). This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "The key within the Kubernetes Secret holding the Session secret as its value.",
|
||||
"default": "session_secret"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -432,12 +447,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Kubernetes Secret containing the Google client secret. This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "The key within the Kubernetes Secret holding the Google client secret as its value.",
|
||||
"default": "google_client_secret"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -462,12 +477,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Kubernetes Secret containing the GitHub client secret. This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "The key within the Kubernetes Secret holding the GitHub client secret as its value.",
|
||||
"default": "github_client_secret"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -507,12 +522,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Kubernetes Secret containing the Azure AD client secret. This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "The key within the Kubernetes Secret holding the Azure AD client secret as its value.",
|
||||
"default": "azure_ad_client_secret"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -562,12 +577,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Kubernetes Secret containing the email password. This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "The key within the Kubernetes Secret holding the email password as its value.",
|
||||
"default": "email_password"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -690,12 +705,12 @@
|
||||
"secretName": {
|
||||
"type": "string",
|
||||
"description": "The name of the Kubernetes Secret containing the Apollo monitoring key. This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
|
||||
"default": "server-vars"
|
||||
"default": ""
|
||||
},
|
||||
"secretKey": {
|
||||
"type": "string",
|
||||
"description": "The key within the Kubernetes Secret holding the Apollo monitoring key as its value.",
|
||||
"default": "apollo_key"
|
||||
"default": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,16 +184,24 @@ db:
|
||||
## @descriptionEnd
|
||||
##
|
||||
s3:
|
||||
## @param s3.endpoint The URL at which the s3 compatible storage is hosted
|
||||
configMap:
|
||||
## @param s3.configMap.enabled If enabled, the s3.endpoint, s3.bucket, and s3.access_key values will be determined from a configMap and the values provided in this helm release ignored.
|
||||
## This allows these values to be generated by external tooling, e.g. Terraform or CloudFormation, and then inserted into the Kubernetes cluster by these tools.
|
||||
##
|
||||
enabled: false
|
||||
## @param s3.configMap.name The name of the ConfigMap in which values for the keys (`endpoint`, `bucket`, and `access_key`) are provided. Expected to be in the namespace defined by the `namespace` parameter of this Helm Chart.
|
||||
##
|
||||
name: ''
|
||||
## @param s3.endpoint The URL at which the s3 compatible storage is hosted. If `s3.configMap.enabled` is true, this value is ignored.
|
||||
## The url should be prefixed by the protocol (e.g. `https://`)
|
||||
## The url may need to include the port if it is not the default (e.g. `443` for `https` protocol)
|
||||
##
|
||||
endpoint: ''
|
||||
## @param s3.bucket The s3 compatible bucket in which Speckle data will be stored
|
||||
## @param s3.bucket The s3 compatible bucket in which Speckle data will be stored. If `s3.configMap.enabled` is true, this value is ignored.
|
||||
## The access key should be granted write permissions to this bucket
|
||||
##
|
||||
bucket: ''
|
||||
## @param s3.access_key The key of the access key used to authenticate with the s3 compatible storage
|
||||
## @param s3.access_key The key of the access key used to authenticate with the s3 compatible storage. If `s3.configMap.enabled` is true, this value is ignored.
|
||||
##
|
||||
access_key: ''
|
||||
secret_key:
|
||||
|
||||
@@ -45,18 +45,19 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@apollo/client@npm:^3.6.6, @apollo/client@npm:^3.6.9":
|
||||
version: 3.6.9
|
||||
resolution: "@apollo/client@npm:3.6.9"
|
||||
"@apollo/client@npm:^3.6.6, @apollo/client@npm:^3.7.0":
|
||||
version: 3.7.0
|
||||
resolution: "@apollo/client@npm:3.7.0"
|
||||
dependencies:
|
||||
"@graphql-typed-document-node/core": ^3.1.1
|
||||
"@wry/context": ^0.6.0
|
||||
"@wry/context": ^0.7.0
|
||||
"@wry/equality": ^0.5.0
|
||||
"@wry/trie": ^0.3.0
|
||||
graphql-tag: ^2.12.6
|
||||
hoist-non-react-statics: ^3.3.2
|
||||
optimism: ^0.16.1
|
||||
prop-types: ^15.7.2
|
||||
response-iterator: ^0.2.6
|
||||
symbol-observable: ^4.0.0
|
||||
ts-invariant: ^0.10.3
|
||||
tslib: ^2.3.0
|
||||
@@ -65,15 +66,18 @@ __metadata:
|
||||
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0
|
||||
graphql-ws: ^5.5.5
|
||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||
subscriptions-transport-ws: ^0.9.0 || ^0.11.0
|
||||
peerDependenciesMeta:
|
||||
graphql-ws:
|
||||
optional: true
|
||||
react:
|
||||
optional: true
|
||||
react-dom:
|
||||
optional: true
|
||||
subscriptions-transport-ws:
|
||||
optional: true
|
||||
checksum: a3c037ef3465cb5d736d8495c9c2dcb9741e39d9c102f147b479af1923c5913f710981a311d1098b9969ebe87769b749c22274decb5977ad0619032e7ac2cf26
|
||||
checksum: e6e2fb6c4f05509a0ec1c632fc8eeae7bd4831dbafd2db243bad1412b3c024476a3efb838e31568888cf6b07bd8833467343edac2309e58d60c7bf50f67d449c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -5394,7 +5398,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@speckle/frontend@workspace:packages/frontend"
|
||||
dependencies:
|
||||
"@apollo/client": ^3.6.9
|
||||
"@apollo/client": ^3.7.0
|
||||
"@graphql-codegen/cli": 2.6.2
|
||||
"@graphql-codegen/introspection": 2.1.1
|
||||
"@graphql-codegen/typed-document-node": ^2.3.1
|
||||
@@ -8406,6 +8410,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@wry/context@npm:^0.7.0":
|
||||
version: 0.7.0
|
||||
resolution: "@wry/context@npm:0.7.0"
|
||||
dependencies:
|
||||
tslib: ^2.3.0
|
||||
checksum: f4ff78023a0b949122037aae766232b7d2284dc415204d22d9ea6d7969ff8f5f29b18128bc9a40e68dc054c8a12b1bf5868a357fdb50c398c447290c3a5b0496
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@wry/equality@npm:^0.1.2":
|
||||
version: 0.1.11
|
||||
resolution: "@wry/equality@npm:0.1.11"
|
||||
@@ -25271,6 +25284,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"response-iterator@npm:^0.2.6":
|
||||
version: 0.2.6
|
||||
resolution: "response-iterator@npm:0.2.6"
|
||||
checksum: b0db3c0665a0d698d65512951de9623c086b9c84ce015a76076d4bd0bf733779601d0b41f0931d16ae38132fba29e1ce291c1f8e6550fc32daaa2dc3ab4f338d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"response-time@npm:^2.3.2":
|
||||
version: 2.3.2
|
||||
resolution: "response-time@npm:2.3.2"
|
||||
|
||||
Reference in New Issue
Block a user