feat(frontend): share buttons directly on commit cards + batch commit actions UX improvements (#1122)
* feat(frontend): help message for disabled checkboxes on commit cards * refactor: share-stream-dialog cleanup * refactor: further share-stream-dialog prep for more usages * feat(server): sharing directly from commit grid cards * feat(server): sharing directly from commit list cards * refactor: removing unnecessary dev tests
This commit is contained in:
committed by
GitHub
parent
3f3f399ce6
commit
55c736118b
@@ -31,6 +31,7 @@
|
||||
"cm": "cz"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/core": "^1.2.222",
|
||||
"@types/eslint": "^8.4.1",
|
||||
"commitizen": "^4.2.4",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
|
||||
@@ -5,6 +5,7 @@ schema:
|
||||
documents:
|
||||
- 'src/graphql/**/*.gql'
|
||||
- 'src/**/*.{ts,tsx,js,jsx,vue}'
|
||||
- '!src/graphql/generated/**/*'
|
||||
generates:
|
||||
src/graphql/generated/graphql.ts:
|
||||
plugins:
|
||||
@@ -13,7 +14,11 @@ generates:
|
||||
- 'typescript-document-nodes'
|
||||
- 'typed-document-node'
|
||||
config:
|
||||
scalars:
|
||||
JSONObject: Record<string, unknown>
|
||||
DateTime: string
|
||||
dedupeFragments: true
|
||||
config:
|
||||
scalars:
|
||||
JSONObject: Record<string, unknown>
|
||||
DateTime: string
|
||||
require:
|
||||
- ts-node/register
|
||||
- tsconfig-paths/register
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
"@graphql-codegen/typescript-operations": "2.4.2",
|
||||
"@mdi/font": "^5.8.55",
|
||||
"@rushstack/eslint-patch": "^1.1.3",
|
||||
"@swc/core": "^1.2.222",
|
||||
"@types/apollo-upload-client": "^17.0.1",
|
||||
"@types/dompurify": "^2.3.3",
|
||||
"@types/lodash": "^4.14.180",
|
||||
@@ -86,13 +87,15 @@
|
||||
"eslint-plugin-vue": "^9.2.0",
|
||||
"prettier": "^2.5.1",
|
||||
"sass": "~1.32.6",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "^4.0.0",
|
||||
"type-fest": "^2.13.1",
|
||||
"typescript": "~4.5.5",
|
||||
"unplugin-vue-components": "^0.22.4",
|
||||
"vite": "^3.1.0",
|
||||
"vite-bundle-visualizer": "^0.4.1",
|
||||
"vite-plugin-simple-gql": "^0.5.0",
|
||||
"vue-tsc": "^1.0.3"
|
||||
"vue-tsc": "^1.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0"
|
||||
|
||||
@@ -19,8 +19,6 @@ export type Scalars = {
|
||||
EmailAddress: any;
|
||||
/** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
|
||||
JSONObject: Record<string, unknown>;
|
||||
/** The `Upload` scalar type represents a file upload. */
|
||||
Upload: any;
|
||||
};
|
||||
|
||||
export type Activity = {
|
||||
@@ -188,11 +186,6 @@ export type BranchUpdateInput = {
|
||||
streamId: Scalars['String'];
|
||||
};
|
||||
|
||||
export enum CacheControlScope {
|
||||
Private = 'PRIVATE',
|
||||
Public = 'PUBLIC'
|
||||
}
|
||||
|
||||
export type Comment = {
|
||||
__typename?: 'Comment';
|
||||
archived: Scalars['Boolean'];
|
||||
@@ -200,11 +193,13 @@ export type Comment = {
|
||||
createdAt?: Maybe<Scalars['DateTime']>;
|
||||
data?: Maybe<Scalars['JSONObject']>;
|
||||
id: Scalars['String'];
|
||||
/** Plain-text version of the comment text, ideal for previews */
|
||||
rawText: Scalars['String'];
|
||||
reactions?: Maybe<Array<Maybe<Scalars['String']>>>;
|
||||
/** Gets the replies to this comment. */
|
||||
replies?: Maybe<CommentCollection>;
|
||||
/** Resources that this comment targets. Can be a mixture of either one stream, or multiple commits and objects. */
|
||||
resources: Array<Maybe<ResourceIdentifier>>;
|
||||
resources: Array<ResourceIdentifier>;
|
||||
screenshot?: Maybe<Scalars['String']>;
|
||||
text: SmartTextEditorValue;
|
||||
/** The time this comment was last updated. Corresponds also to the latest reply to this comment, if any. */
|
||||
@@ -409,6 +404,8 @@ export type FileUpload = {
|
||||
*/
|
||||
export type LimitedUser = {
|
||||
__typename?: 'LimitedUser';
|
||||
/** All the recent activity from this user in chronological order */
|
||||
activity?: Maybe<ActivityCollection>;
|
||||
avatar?: Maybe<Scalars['String']>;
|
||||
bio?: Maybe<Scalars['String']>;
|
||||
/** Get public stream commits authored by the user */
|
||||
@@ -419,12 +416,27 @@ export type LimitedUser = {
|
||||
role?: Maybe<Scalars['String']>;
|
||||
/** Returns all discoverable streams that the user is a collaborator on */
|
||||
streams: StreamCollection;
|
||||
/** The user's timeline in chronological order */
|
||||
timeline?: Maybe<ActivityCollection>;
|
||||
/** Total amount of favorites attached to streams owned by the user */
|
||||
totalOwnedStreamsFavorites: Scalars['Int'];
|
||||
verified?: Maybe<Scalars['Boolean']>;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Limited user type, for showing public info about a user
|
||||
* to another user
|
||||
*/
|
||||
export type LimitedUserActivityArgs = {
|
||||
actionType?: InputMaybe<Scalars['String']>;
|
||||
after?: InputMaybe<Scalars['DateTime']>;
|
||||
before?: InputMaybe<Scalars['DateTime']>;
|
||||
cursor?: InputMaybe<Scalars['DateTime']>;
|
||||
limit?: Scalars['Int'];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Limited user type, for showing public info about a user
|
||||
* to another user
|
||||
@@ -444,6 +456,18 @@ export type LimitedUserStreamsArgs = {
|
||||
limit?: Scalars['Int'];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Limited user type, for showing public info about a user
|
||||
* to another user
|
||||
*/
|
||||
export type LimitedUserTimelineArgs = {
|
||||
after?: InputMaybe<Scalars['DateTime']>;
|
||||
before?: InputMaybe<Scalars['DateTime']>;
|
||||
cursor?: InputMaybe<Scalars['DateTime']>;
|
||||
limit?: Scalars['Int'];
|
||||
};
|
||||
|
||||
export type Mutation = {
|
||||
__typename?: 'Mutation';
|
||||
/** The void stares back. */
|
||||
@@ -501,7 +525,6 @@ export type Mutation = {
|
||||
streamCreate?: Maybe<Scalars['String']>;
|
||||
/** Deletes an existing stream. */
|
||||
streamDelete: Scalars['Boolean'];
|
||||
/** Favorite/unfavorite the given stream */
|
||||
streamFavorite?: Maybe<Stream>;
|
||||
streamInviteBatchCreate: Scalars['Boolean'];
|
||||
/** Cancel a pending stream invite. Can only be invoked by a stream owner. */
|
||||
@@ -1222,7 +1245,6 @@ export type Stream = {
|
||||
description?: Maybe<Scalars['String']>;
|
||||
/** Date when you favorited this stream. `null` if stream isn't viewed from a specific user's perspective or if it isn't favorited. */
|
||||
favoritedDate?: Maybe<Scalars['DateTime']>;
|
||||
/** How many times this stream has been favorited */
|
||||
favoritesCount: Scalars['Int'];
|
||||
/** Returns a specific file upload that belongs to this stream. */
|
||||
fileUpload?: Maybe<FileUpload>;
|
||||
@@ -1539,6 +1561,7 @@ export type User = {
|
||||
* authenticated user, then this will only return discoverable streams.
|
||||
*/
|
||||
streams: StreamCollection;
|
||||
/** The user's timeline in chronological order */
|
||||
timeline?: Maybe<ActivityCollection>;
|
||||
/** Total amount of favorites attached to streams owned by the user */
|
||||
totalOwnedStreamsFavorites: Scalars['Int'];
|
||||
@@ -1724,7 +1747,7 @@ export type BranchCreatedSubscriptionVariables = Exact<{
|
||||
|
||||
export type BranchCreatedSubscription = { __typename?: 'Subscription', branchCreated?: Record<string, unknown> | null };
|
||||
|
||||
export type CommentFullInfoFragment = { __typename?: 'Comment', id: string, archived: boolean, authorId: string, data?: Record<string, unknown> | null, screenshot?: string | null, createdAt?: string | null, updatedAt?: string | null, viewedAt?: string | null, text: { __typename?: 'SmartTextEditorValue', doc?: Record<string, unknown> | null, attachments?: Array<{ __typename?: 'BlobMetadata', id: string, fileName: string, streamId: string, fileType: string, fileSize?: number | null }> | null }, replies?: { __typename?: 'CommentCollection', totalCount: number } | null, resources: Array<{ __typename?: 'ResourceIdentifier', resourceId: string, resourceType: ResourceType } | null> };
|
||||
export type CommentFullInfoFragment = { __typename?: 'Comment', id: string, archived: boolean, authorId: string, data?: Record<string, unknown> | null, screenshot?: string | null, createdAt?: string | null, updatedAt?: string | null, viewedAt?: string | null, text: { __typename?: 'SmartTextEditorValue', doc?: Record<string, unknown> | null, attachments?: Array<{ __typename?: 'BlobMetadata', id: string, fileName: string, streamId: string, fileType: string, fileSize?: number | null }> | null }, replies?: { __typename?: 'CommentCollection', totalCount: number } | null, resources: Array<{ __typename?: 'ResourceIdentifier', resourceId: string, resourceType: ResourceType }> };
|
||||
|
||||
export type StreamCommitQueryQueryVariables = Exact<{
|
||||
streamId: Scalars['String'];
|
||||
@@ -1882,14 +1905,14 @@ export type StreamsQueryVariables = Exact<{
|
||||
|
||||
export type StreamsQuery = { __typename?: 'Query', streams?: { __typename?: 'StreamCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, company?: string | null, avatar?: string | null, role: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null, message?: string | null, authorId?: string | null, branchName?: string | null, authorName?: string | null, authorAvatar?: string | null, referencedObject: string }> | null } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null }> | null } | null };
|
||||
|
||||
export type CommonStreamFieldsFragment = { __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, company?: string | null, avatar?: string | null, role: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null };
|
||||
export type CommonStreamFieldsFragment = { __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null };
|
||||
|
||||
export type StreamQueryVariables = Exact<{
|
||||
id: Scalars['String'];
|
||||
}>;
|
||||
|
||||
|
||||
export type StreamQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, company?: string | null, avatar?: string | null, role: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null } | null };
|
||||
export type StreamQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null } | null };
|
||||
|
||||
export type StreamWithCollaboratorsQueryVariables = Exact<{
|
||||
id: Scalars['String'];
|
||||
@@ -1963,6 +1986,13 @@ export type DeleteStreamMutationVariables = Exact<{
|
||||
|
||||
export type DeleteStreamMutation = { __typename?: 'Mutation', streamDelete: boolean };
|
||||
|
||||
export type ShareableStreamQueryVariables = Exact<{
|
||||
id: Scalars['String'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ShareableStreamQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, isPublic: boolean, role?: string | null, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null }> } | null };
|
||||
|
||||
export type CommonUserFieldsFragment = { __typename?: 'User', id: string, email?: string | null, name?: string | null, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null, profiles?: Record<string, unknown> | null, role?: string | null, streams: { __typename?: 'StreamCollection', totalCount: number }, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null }> | null } | null };
|
||||
|
||||
export type UserFavoriteStreamsQueryVariables = Exact<{
|
||||
@@ -1970,7 +2000,7 @@ export type UserFavoriteStreamsQueryVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type UserFavoriteStreamsQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, name?: string | null, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null, profiles?: Record<string, unknown> | null, role?: string | null, favoriteStreams: { __typename?: 'StreamCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, company?: string | null, avatar?: string | null, role: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null }> | null }, streams: { __typename?: 'StreamCollection', totalCount: number }, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null }> | null } | null } | null };
|
||||
export type UserFavoriteStreamsQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, name?: string | null, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null, profiles?: Record<string, unknown> | null, role?: string | null, favoriteStreams: { __typename?: 'StreamCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null }> | null }, streams: { __typename?: 'StreamCollection', totalCount: number }, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null }> | null } | null } | null };
|
||||
|
||||
export type MainUserDataQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
@@ -2149,15 +2179,6 @@ export const StreamPendingAccessRequests = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const StreamCollaboratorFields = gql`
|
||||
fragment StreamCollaboratorFields on StreamCollaborator {
|
||||
id
|
||||
name
|
||||
role
|
||||
company
|
||||
avatar
|
||||
}
|
||||
`;
|
||||
export const UsersOwnInviteFields = gql`
|
||||
fragment UsersOwnInviteFields on PendingStreamCollaborator {
|
||||
id
|
||||
@@ -2204,6 +2225,15 @@ export const ServerInfoScopesFields = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const StreamCollaboratorFields = gql`
|
||||
fragment StreamCollaboratorFields on StreamCollaborator {
|
||||
id
|
||||
name
|
||||
role
|
||||
company
|
||||
avatar
|
||||
}
|
||||
`;
|
||||
export const CommonStreamFields = gql`
|
||||
fragment CommonStreamFields on Stream {
|
||||
id
|
||||
@@ -2215,11 +2245,7 @@ export const CommonStreamFields = gql`
|
||||
updatedAt
|
||||
commentCount
|
||||
collaborators {
|
||||
id
|
||||
name
|
||||
company
|
||||
avatar
|
||||
role
|
||||
...StreamCollaboratorFields
|
||||
}
|
||||
commits(limit: 1) {
|
||||
totalCount
|
||||
@@ -2520,7 +2546,8 @@ export const Stream = gql`
|
||||
...CommonStreamFields
|
||||
}
|
||||
}
|
||||
${CommonStreamFields}`;
|
||||
${CommonStreamFields}
|
||||
${StreamCollaboratorFields}`;
|
||||
export const StreamWithCollaborators = gql`
|
||||
query StreamWithCollaborators($id: String!) {
|
||||
stream(id: $id) {
|
||||
@@ -2646,6 +2673,18 @@ export const DeleteStream = gql`
|
||||
streamDelete(id: $id)
|
||||
}
|
||||
`;
|
||||
export const ShareableStream = gql`
|
||||
query ShareableStream($id: String!) {
|
||||
stream(id: $id) {
|
||||
id
|
||||
isPublic
|
||||
role
|
||||
collaborators {
|
||||
...StreamCollaboratorFields
|
||||
}
|
||||
}
|
||||
}
|
||||
${StreamCollaboratorFields}`;
|
||||
export const UserFavoriteStreams = gql`
|
||||
query UserFavoriteStreams($cursor: String) {
|
||||
activeUser {
|
||||
@@ -2660,7 +2699,8 @@ export const UserFavoriteStreams = gql`
|
||||
}
|
||||
}
|
||||
${CommonUserFields}
|
||||
${CommonStreamFields}`;
|
||||
${CommonStreamFields}
|
||||
${StreamCollaboratorFields}`;
|
||||
export const MainUserData = gql`
|
||||
query MainUserData {
|
||||
activeUser {
|
||||
@@ -2852,13 +2892,13 @@ export const BasicStreamAccessRequestFieldsFragmentDoc = {"kind":"Document","def
|
||||
export const LimitedUserFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]} as unknown as DocumentNode<LimitedUserFieldsFragment, unknown>;
|
||||
export const FullStreamAccessRequestFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}},{"kind":"Field","name":{"kind":"Name","value":"requester"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]} as unknown as DocumentNode<FullStreamAccessRequestFieldsFragment, unknown>;
|
||||
export const StreamPendingAccessRequestsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamPendingAccessRequests"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Stream"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pendingAccessRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullStreamAccessRequestFields"}}]}}]}}]} as unknown as DocumentNode<StreamPendingAccessRequestsFragment, unknown>;
|
||||
export const StreamCollaboratorFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]} as unknown as DocumentNode<StreamCollaboratorFieldsFragment, unknown>;
|
||||
export const UsersOwnInviteFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UsersOwnInviteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingStreamCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"streamName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]} as unknown as DocumentNode<UsersOwnInviteFieldsFragment, unknown>;
|
||||
export const ServerInfoBlobSizeFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoBlobSizeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blobSizeLimitBytes"}}]}}]} as unknown as DocumentNode<ServerInfoBlobSizeFieldsFragment, unknown>;
|
||||
export const MainServerInfoFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MainServerInfoFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"adminContact"}},{"kind":"Field","name":{"kind":"Name","value":"canonicalUrl"}},{"kind":"Field","name":{"kind":"Name","value":"termsOfService"}},{"kind":"Field","name":{"kind":"Name","value":"inviteOnly"}},{"kind":"Field","name":{"kind":"Name","value":"version"}}]}}]} as unknown as DocumentNode<MainServerInfoFieldsFragment, unknown>;
|
||||
export const ServerInfoRolesFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoRolesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"resourceTarget"}}]}}]}}]} as unknown as DocumentNode<ServerInfoRolesFieldsFragment, unknown>;
|
||||
export const ServerInfoScopesFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoScopesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scopes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]}}]} as unknown as DocumentNode<ServerInfoScopesFieldsFragment, unknown>;
|
||||
export const CommonStreamFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonStreamFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Stream"}},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"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":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"favoritedDate"}},{"kind":"Field","name":{"kind":"Name","value":"favoritesCount"}}]}}]} as unknown as DocumentNode<CommonStreamFieldsFragment, unknown>;
|
||||
export const StreamCollaboratorFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]} as unknown as DocumentNode<StreamCollaboratorFieldsFragment, unknown>;
|
||||
export const CommonStreamFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonStreamFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Stream"}},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}},{"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":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"favoritedDate"}},{"kind":"Field","name":{"kind":"Name","value":"favoritesCount"}}]}}]} as unknown as DocumentNode<CommonStreamFieldsFragment, unknown>;
|
||||
export const CommonUserFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonUserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}},{"kind":"Field","name":{"kind":"Name","value":"profiles"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"streams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"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":"createdAt"}}]}}]}}]}}]} as unknown as DocumentNode<CommonUserFieldsFragment, unknown>;
|
||||
export const GetStreamAccessRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetStreamAccessRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamAccessRequest"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}}]}}]}},...BasicStreamAccessRequestFieldsFragmentDoc.definitions]} as unknown as DocumentNode<GetStreamAccessRequestQuery, GetStreamAccessRequestQueryVariables>;
|
||||
export const CreateStreamAccessRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateStreamAccessRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamAccessRequestCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}}]}}]}},...BasicStreamAccessRequestFieldsFragmentDoc.definitions]} as unknown as DocumentNode<CreateStreamAccessRequestMutation, CreateStreamAccessRequestMutationVariables>;
|
||||
@@ -2884,7 +2924,7 @@ export const FullServerInfoDocument = {"kind":"Document","definitions":[{"kind":
|
||||
export const ServerInfoBlobSizeLimitDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ServerInfoBlobSizeLimit"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServerInfoBlobSizeFields"}}]}}]}},...ServerInfoBlobSizeFieldsFragmentDoc.definitions]} as unknown as DocumentNode<ServerInfoBlobSizeLimitQuery, ServerInfoBlobSizeLimitQueryVariables>;
|
||||
export const StreamCommitsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamCommits"},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"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":"authorId"}},{"kind":"Field","name":{"kind":"Name","value":"authorName"}},{"kind":"Field","name":{"kind":"Name","value":"authorAvatar"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}},{"kind":"Field","name":{"kind":"Name","value":"branchName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceApplication"}}]}}]}}]}}]}}]} as unknown as DocumentNode<StreamCommitsQuery, StreamCommitsQueryVariables>;
|
||||
export const StreamsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Streams"},"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":"streams"},"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":"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"authorId"}},{"kind":"Field","name":{"kind":"Name","value":"branchName"}},{"kind":"Field","name":{"kind":"Name","value":"authorName"}},{"kind":"Field","name":{"kind":"Name","value":"authorAvatar"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"favoritedDate"}},{"kind":"Field","name":{"kind":"Name","value":"favoritesCount"}}]}}]}}]}}]} as unknown as DocumentNode<StreamsQuery, StreamsQueryVariables>;
|
||||
export const StreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Stream"},"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":"FragmentSpread","name":{"kind":"Name","value":"CommonStreamFields"}}]}}]}},...CommonStreamFieldsFragmentDoc.definitions]} as unknown as DocumentNode<StreamQuery, StreamQueryVariables>;
|
||||
export const StreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Stream"},"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":"FragmentSpread","name":{"kind":"Name","value":"CommonStreamFields"}}]}}]}},...CommonStreamFieldsFragmentDoc.definitions,...StreamCollaboratorFieldsFragmentDoc.definitions]} as unknown as DocumentNode<StreamQuery, StreamQueryVariables>;
|
||||
export const StreamWithCollaboratorsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamWithCollaborators"},"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":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingCollaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingAccessRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullStreamAccessRequestFields"}}]}}]}}]}},...StreamCollaboratorFieldsFragmentDoc.definitions,...LimitedUserFieldsFragmentDoc.definitions,...FullStreamAccessRequestFieldsFragmentDoc.definitions,...BasicStreamAccessRequestFieldsFragmentDoc.definitions]} as unknown as DocumentNode<StreamWithCollaboratorsQuery, StreamWithCollaboratorsQueryVariables>;
|
||||
export const StreamWithActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamWithActivity"},"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":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"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":"ActivityMainFields"}}]}}]}}]}}]}},...ActivityMainFieldsFragmentDoc.definitions]} as unknown as DocumentNode<StreamWithActivityQuery, StreamWithActivityQueryVariables>;
|
||||
export const LeaveStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"LeaveStream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamLeave"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}]}]}}]} as unknown as DocumentNode<LeaveStreamMutation, LeaveStreamMutationVariables>;
|
||||
@@ -2895,7 +2935,8 @@ export const StreamSettingsDocument = {"kind":"Document","definitions":[{"kind":
|
||||
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":"activeUser"},"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>;
|
||||
export const ShareableStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ShareableStream"},"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":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}}]}}]}},...StreamCollaboratorFieldsFragmentDoc.definitions]} as unknown as DocumentNode<ShareableStreamQuery, ShareableStreamQueryVariables>;
|
||||
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":"activeUser"},"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,...StreamCollaboratorFieldsFragmentDoc.definitions]} as unknown as DocumentNode<UserFavoriteStreamsQuery, UserFavoriteStreamsQueryVariables>;
|
||||
export const MainUserDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MainUserData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommonUserFields"}}]}}]}},...CommonUserFieldsFragmentDoc.definitions]} as unknown as DocumentNode<MainUserDataQuery, MainUserDataQueryVariables>;
|
||||
export const ProfileSelfDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProfileSelf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommonUserFields"}},{"kind":"Field","name":{"kind":"Name","value":"totalOwnedStreamsFavorites"}},{"kind":"Field","name":{"kind":"Name","value":"notificationPreferences"}}]}}]}},...CommonUserFieldsFragmentDoc.definitions]} as unknown as DocumentNode<ProfileSelfQuery, ProfileSelfQueryVariables>;
|
||||
export const UserSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"archived"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userSearch"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"kind":"Argument","name":{"kind":"Name","value":"archived"},"value":{"kind":"Variable","name":{"kind":"Name","value":"archived"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]}},...LimitedUserFieldsFragmentDoc.definitions]} as unknown as DocumentNode<UserSearchQuery, UserSearchQueryVariables>;
|
||||
|
||||
@@ -20,11 +20,7 @@ export const commonStreamFieldsFragment = gql`
|
||||
updatedAt
|
||||
commentCount
|
||||
collaborators {
|
||||
id
|
||||
name
|
||||
company
|
||||
avatar
|
||||
role
|
||||
...StreamCollaboratorFields
|
||||
}
|
||||
commits(limit: 1) {
|
||||
totalCount
|
||||
@@ -35,6 +31,8 @@ export const commonStreamFieldsFragment = gql`
|
||||
favoritedDate
|
||||
favoritesCount
|
||||
}
|
||||
|
||||
${streamCollaboratorFieldsFragment}
|
||||
`
|
||||
|
||||
/**
|
||||
@@ -201,3 +199,18 @@ export const deleteStreamMutation = gql`
|
||||
streamDelete(id: $id)
|
||||
}
|
||||
`
|
||||
|
||||
export const shareableStreamQuery = gql`
|
||||
query ShareableStream($id: String!) {
|
||||
stream(id: $id) {
|
||||
id
|
||||
isPublic
|
||||
role
|
||||
collaborators {
|
||||
...StreamCollaboratorFields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
${streamCollaboratorFieldsFragment}
|
||||
`
|
||||
|
||||
@@ -14,19 +14,25 @@
|
||||
</router-link>
|
||||
<v-toolbar class="transparent elevation-0" dense>
|
||||
<v-toolbar-title class="d-flex" style="overflow: visible; width: 100%">
|
||||
<v-checkbox
|
||||
v-if="allowSelect"
|
||||
v-model="selectedState"
|
||||
dense
|
||||
hide-details
|
||||
@change="onSelect"
|
||||
/>
|
||||
<div
|
||||
v-tooltip="selectDisabled ? selectDisabledMessage : undefined"
|
||||
class="checkbox-hover-wrapper"
|
||||
>
|
||||
<v-checkbox
|
||||
v-if="selectable"
|
||||
v-model="selectedState"
|
||||
:disabled="selectDisabled"
|
||||
dense
|
||||
hide-details
|
||||
@change="onSelect"
|
||||
/>
|
||||
</div>
|
||||
<div style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap">
|
||||
<router-link
|
||||
class="text-decoration-none"
|
||||
:to="`/streams/${streamId}/commits/${commit.id}`"
|
||||
>
|
||||
<v-icon v-if="!allowSelect" small>mdi-source-commit</v-icon>
|
||||
<v-icon v-if="!selectable" small>mdi-source-commit</v-icon>
|
||||
{{ commit.message }}
|
||||
</router-link>
|
||||
</div>
|
||||
@@ -64,28 +70,41 @@
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<div style="position: absolute; top: 10px; right: 20px">
|
||||
<commit-received-receipts :stream-id="streamId" :commit-id="commit.id" shadow />
|
||||
</div>
|
||||
<div style="position: absolute; top: 10px; left: 12px">
|
||||
<v-chip
|
||||
v-if="commit.commentCount !== 0"
|
||||
v-tooltip="
|
||||
`${commit.commentCount} comment${commit.commentCount === 1 ? '' : 's'}`
|
||||
"
|
||||
small
|
||||
class="caption primary"
|
||||
dark
|
||||
>
|
||||
<v-icon x-small class="mr-1">mdi-comment-outline</v-icon>
|
||||
{{ commit.commentCount }}
|
||||
</v-chip>
|
||||
<source-app-avatar :application-name="commit.sourceApplication" />
|
||||
<div class="card-top justify-space-between align-start">
|
||||
<div class="card-top__left flex-column align-start">
|
||||
<div>
|
||||
<source-app-avatar
|
||||
:application-name="commit.sourceApplication"
|
||||
style="margin: 0 !important"
|
||||
/>
|
||||
</div>
|
||||
<v-chip
|
||||
v-if="commit.commentCount !== 0"
|
||||
v-tooltip="
|
||||
`${commit.commentCount} comment${commit.commentCount === 1 ? '' : 's'}`
|
||||
"
|
||||
small
|
||||
class="caption primary"
|
||||
dark
|
||||
>
|
||||
<v-icon x-small class="mr-1">mdi-comment-outline</v-icon>
|
||||
{{ commit.commentCount }}
|
||||
</v-chip>
|
||||
<commit-received-receipts
|
||||
:stream-id="streamId"
|
||||
:commit-id="commit.id"
|
||||
shadow
|
||||
/>
|
||||
</div>
|
||||
<div class="card-top__right flex-column align-start">
|
||||
<commit-share-btn v-if="shareable" @share="onShareClicked" />
|
||||
</div>
|
||||
</div>
|
||||
</v-card>
|
||||
</v-hover>
|
||||
</template>
|
||||
<script>
|
||||
import CommitShareBtn from '@/main/components/stream/commit/CommitShareBtn.vue'
|
||||
import { useSelectableCommit } from '@/main/lib/stream/composables/commitMultiActions'
|
||||
|
||||
export default {
|
||||
@@ -93,26 +112,54 @@ export default {
|
||||
PreviewImage: () => import('@/main/components/common/PreviewImage'),
|
||||
CommitReceivedReceipts: () =>
|
||||
import('@/main/components/common/CommitReceivedReceipts'),
|
||||
SourceAppAvatar: () => import('@/main/components/common/SourceAppAvatar')
|
||||
SourceAppAvatar: () => import('@/main/components/common/SourceAppAvatar'),
|
||||
CommitShareBtn
|
||||
},
|
||||
props: {
|
||||
commit: { type: Object, default: () => null },
|
||||
previewHeight: { type: Number, default: () => 180 },
|
||||
showStreamAndBranch: { type: Boolean, default: true },
|
||||
highlight: { type: Boolean, default: false },
|
||||
allowSelect: {
|
||||
/**
|
||||
* Whether to show a checkbox that would allow selecting this card
|
||||
*/
|
||||
selectable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/**
|
||||
* Whether selection of this card is disabled
|
||||
*/
|
||||
selectDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/**
|
||||
* Message to show in a tooltip for a disabled card
|
||||
*/
|
||||
selectDisabledMessage: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
/**
|
||||
* Whether the card is currently selected
|
||||
*/
|
||||
selected: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/**
|
||||
* Whether to show a share button
|
||||
*/
|
||||
shareable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const { highlighted, selectedState, onSelect } = useSelectableCommit(props, ctx)
|
||||
const onShareClicked = () => ctx.emit('share', props.commit)
|
||||
|
||||
return { highlighted, selectedState, onSelect }
|
||||
return { highlighted, selectedState, onSelect, onShareClicked }
|
||||
},
|
||||
computed: {
|
||||
streamId() {
|
||||
@@ -129,3 +176,24 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.card-top {
|
||||
$base: &;
|
||||
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 12px;
|
||||
left: 12px;
|
||||
|
||||
display: flex;
|
||||
|
||||
#{$base}__left,
|
||||
#{$base}__right {
|
||||
display: flex;
|
||||
|
||||
& > * {
|
||||
margin-bottom: 4px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@click="showAllActivityDialog = true"
|
||||
>
|
||||
<div
|
||||
style="cursor: pointer; min-height: 33px; line-height: 33px"
|
||||
style="cursor: pointer"
|
||||
:class="`${$vuetify.theme.dark ? 'black' : 'grey lighten-3'} ${
|
||||
shadow ? 'elevation-3' : ''
|
||||
} rounded-xl px-2`"
|
||||
|
||||
@@ -4,14 +4,20 @@
|
||||
:class="`${background} d-flex px-2 py-3 mb-2 align-center rounded-lg`"
|
||||
:style="`${highlighted ? 'outline: 0.2rem solid #047EFB;' : ''}`"
|
||||
>
|
||||
<v-checkbox
|
||||
v-if="allowSelect"
|
||||
v-model="selectedState"
|
||||
dense
|
||||
hide-details
|
||||
class="mt-0 ml-2 pa-0"
|
||||
@change="onSelect"
|
||||
/>
|
||||
<div
|
||||
v-tooltip="selectDisabled ? selectDisabledMessage : undefined"
|
||||
class="checkbox-hover-wrapper"
|
||||
>
|
||||
<v-checkbox
|
||||
v-if="selectable"
|
||||
v-model="selectedState"
|
||||
:disabled="selectDisabled"
|
||||
dense
|
||||
hide-details
|
||||
class="mt-0 ml-2 pa-0"
|
||||
@change="onSelect"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex-shrink-0">
|
||||
<user-avatar :id="commit.authorId" :size="30" />
|
||||
</div>
|
||||
@@ -57,6 +63,7 @@
|
||||
v-if="showSourceApp"
|
||||
:application-name="commit.sourceApplication"
|
||||
/>
|
||||
<commit-share-btn v-if="shareable" @share="onShareClicked" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,9 +72,11 @@
|
||||
import { gql } from '@apollo/client/core'
|
||||
import { limitedCommitActivityFieldsFragment } from '@/graphql/fragments/activity'
|
||||
import { useSelectableCommit } from '@/main/lib/stream/composables/commitMultiActions'
|
||||
import CommitShareBtn from '@/main/components/stream/commit/CommitShareBtn.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CommitShareBtn,
|
||||
UserAvatar: () => import('@/main/components/common/UserAvatar'),
|
||||
SourceAppAvatar: () => import('@/main/components/common/SourceAppAvatar'),
|
||||
CommitReceivedReceipts: () =>
|
||||
@@ -106,23 +115,47 @@ export default {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
highlight: {
|
||||
/**
|
||||
* Whether to show a checkbox that would allow selecting this card
|
||||
*/
|
||||
selectable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
allowSelect: {
|
||||
/**
|
||||
* Whether selection of this card is disabled
|
||||
*/
|
||||
selectDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/**
|
||||
* Message to show in a tooltip for a disabled card
|
||||
*/
|
||||
selectDisabledMessage: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
/**
|
||||
* Whether the card is currently selected
|
||||
*/
|
||||
selected: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/**
|
||||
* Whether to show the share button
|
||||
*/
|
||||
shareable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const { highlighted, selectedState, onSelect } = useSelectableCommit(props, ctx)
|
||||
const onShareClicked = () => ctx.emit('share', props.commit)
|
||||
|
||||
return { highlighted, selectedState, onSelect }
|
||||
return { highlighted, selectedState, onSelect, onShareClicked }
|
||||
},
|
||||
apollo: {
|
||||
activity: {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<v-btn class="primary" icon small @click="onShareClicked">
|
||||
<v-icon small>mdi-share-variant</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
const emit = defineEmits(['share'])
|
||||
const onShareClicked = () => emit('share')
|
||||
</script>
|
||||
@@ -1,264 +1,278 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-sheet color="primary">
|
||||
<v-toolbar color="primary" dark flat>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-share-variant</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>Engage Multiplayer Mode!</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="$emit('close')"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text class="mt-0 mb-0 px-2">
|
||||
<v-text-field
|
||||
ref="streamUrl"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Stream url copied to clipboard. Use it in a connector, or just share it with colleagues!"
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-folder"
|
||||
:value="streamUrl"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-if="$route.params.branchName"
|
||||
ref="branchUrl"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Branch url copied to clipboard. Most connectors can receive the latest commit from a branch by using this url."
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-source-branch"
|
||||
:value="streamUrl + '/branches/' + $route.params.branchName"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-if="
|
||||
$route.params.resourceId &&
|
||||
$resourceType($route.params.resourceId) === 'commit'
|
||||
"
|
||||
ref="commitUrl"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Commit url copied to clipboard. Most connectors can receive a specific commit by using this url."
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-source-commit"
|
||||
:value="streamUrl + '/commits/' + $route.params.resourceId"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-if="$route.params.resourceId && $route.params.resourceId.length !== 10"
|
||||
ref="commitUrl"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Object url copied to clipboard. Most connectors can receive a specific object by using this url."
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-cube-outline"
|
||||
:value="streamUrl + '/objects/' + $route.params.resourceId"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
</v-card-text>
|
||||
</v-sheet>
|
||||
<v-sheet v-if="$route.params.resourceId || true">
|
||||
<v-toolbar dark flat>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-camera</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>Embed {{ embedType }}</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<span v-if="!stream.isPublic" class="caption">
|
||||
Viewer embedding only works if link sharing is on.
|
||||
</span>
|
||||
</v-toolbar>
|
||||
<div v-if="stream.isPublic">
|
||||
<v-card-text>
|
||||
<div class="caption mx-1 pb-2">
|
||||
Copy the code below to embed an iframe of
|
||||
<b>{{ embedDescription }}</b>
|
||||
in your webpage or document.
|
||||
</div>
|
||||
<div class="d-flex align-center mt-4">
|
||||
<v-text-field
|
||||
dense
|
||||
:value="getIframeUrl()"
|
||||
hint="Copied to clipboard!"
|
||||
filled
|
||||
rounded
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
</div>
|
||||
<v-expansion-panels>
|
||||
<v-expansion-panel>
|
||||
<v-expansion-panel-header>Embed Options</v-expansion-panel-header>
|
||||
<v-expansion-panel-content>
|
||||
<v-checkbox
|
||||
v-model="transparentBg"
|
||||
class="ml-2 caption"
|
||||
label="Transparent background"
|
||||
dense
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="hideControls"
|
||||
class="ml-2 caption"
|
||||
label="Hide viewer controls"
|
||||
dense
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="hideSidebar"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Hide viewer sidebar (filters, views, etc.)"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="hideSelectionInfo"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Hide object selection info"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="preventScroll"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Prevent scrolling (zooming)"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="autoload"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Load model automatically"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="slideshow"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Comment slideshow mode"
|
||||
></v-checkbox>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panels>
|
||||
<v-dialog v-model="realShow" max-width="600" :fullscreen="$vuetify.breakpoint.xsOnly">
|
||||
<v-card>
|
||||
<v-sheet color="primary">
|
||||
<v-toolbar color="primary" dark flat>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-share-variant</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>Engage Multiplayer Mode!</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon @click="closeDialog"><v-icon>mdi-close</v-icon></v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text class="mt-0 mb-0 px-2">
|
||||
<v-text-field
|
||||
ref="streamUrl"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Stream url copied to clipboard. Use it in a connector, or just share it with colleagues!"
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-folder"
|
||||
:value="streamUrl"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-if="branchName"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Branch url copied to clipboard. Most connectors can receive the latest commit from a branch by using this url."
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-source-branch"
|
||||
:value="streamUrl + '/branches/' + branchName"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-if="resourceId && $resourceType(resourceId) === 'commit'"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Commit url copied to clipboard. Most connectors can receive a specific commit by using this url."
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-source-commit"
|
||||
:value="streamUrl + '/commits/' + resourceId"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-if="resourceId && $resourceType(resourceId) === 'object'"
|
||||
dark
|
||||
filled
|
||||
rounded
|
||||
hint="Object url copied to clipboard. Most connectors can receive a specific object by using this url."
|
||||
style="color: blue"
|
||||
prepend-inner-icon="mdi-cube-outline"
|
||||
:value="streamUrl + '/objects/' + resourceId"
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
</v-card-text>
|
||||
</div>
|
||||
</v-sheet>
|
||||
<v-sheet
|
||||
v-if="stream"
|
||||
:class="`${!$vuetify.theme.dark ? 'grey lighten-4' : 'grey darken-4'}`"
|
||||
>
|
||||
<v-toolbar v-if="stream.role === 'stream:owner'" class="transparent" rounded flat>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>{{ stream.isPublic ? 'mdi-lock-open' : 'mdi-lock' }}</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>
|
||||
{{ stream.isPublic ? 'Link Sharing On' : 'Link Sharing Off' }}
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-switch
|
||||
:input-value="stream.isPublic"
|
||||
inset
|
||||
class="mt-4"
|
||||
:loading="swapPermsLoading"
|
||||
:disabled="swapPermsLoading"
|
||||
@click="changeVisibility"
|
||||
/>
|
||||
</v-toolbar>
|
||||
<v-card-text v-if="stream.isPublic" class="pt-2">
|
||||
Link sharing is on. This means that anyone with the link can view this stream.
|
||||
Only collaborators will be able to send or edit data.
|
||||
</v-card-text>
|
||||
<v-card-text v-if="!stream.isPublic" class="pt-2 pb-2">
|
||||
Link sharing is off. This means that only collaborators can view or edit this
|
||||
stream.
|
||||
</v-card-text>
|
||||
</v-sheet>
|
||||
<v-sheet v-if="stream">
|
||||
<v-toolbar
|
||||
v-tooltip="
|
||||
`${
|
||||
stream.role !== 'stream:owner'
|
||||
? 'You do not have the right access level (' +
|
||||
stream.role +
|
||||
') to add collaborators.'
|
||||
: ''
|
||||
}`
|
||||
"
|
||||
flat
|
||||
</v-sheet>
|
||||
<v-sheet v-if="resourceId || true">
|
||||
<v-toolbar dark flat>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-camera</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>Embed {{ embedType }}</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<span v-if="!stream?.isPublic" class="caption">
|
||||
Viewer embedding only works if link sharing is on.
|
||||
</span>
|
||||
</v-toolbar>
|
||||
<div v-if="stream?.isPublic">
|
||||
<v-card-text>
|
||||
<div class="caption mx-1 pb-2">
|
||||
Copy the code below to embed an iframe of
|
||||
<b>{{ embedDescription }}</b>
|
||||
in your webpage or document.
|
||||
</div>
|
||||
<div class="d-flex align-center mt-4">
|
||||
<v-text-field
|
||||
dense
|
||||
:value="iFrameUrl"
|
||||
hint="Copied to clipboard!"
|
||||
filled
|
||||
rounded
|
||||
@focus="copyToClipboard"
|
||||
></v-text-field>
|
||||
</div>
|
||||
<v-expansion-panels>
|
||||
<v-expansion-panel>
|
||||
<v-expansion-panel-header>Embed Options</v-expansion-panel-header>
|
||||
<v-expansion-panel-content>
|
||||
<v-checkbox
|
||||
v-model="transparent"
|
||||
class="ml-2 caption"
|
||||
label="Transparent background"
|
||||
dense
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="hideControls"
|
||||
class="ml-2 caption"
|
||||
label="Hide viewer controls"
|
||||
dense
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="hideSidebar"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Hide viewer sidebar (filters, views, etc.)"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="hideSelectionInfo"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Hide object selection info"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="noScroll"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Prevent scrolling (zooming)"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="autoload"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Load model automatically"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="commentSlideshow"
|
||||
dense
|
||||
class="ml-2 caption"
|
||||
label="Comment slideshow mode"
|
||||
></v-checkbox>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-expansion-panels>
|
||||
</v-card-text>
|
||||
</div>
|
||||
</v-sheet>
|
||||
<v-sheet
|
||||
v-if="stream"
|
||||
:class="`${!$vuetify.theme.dark ? 'grey lighten-4' : 'grey darken-4'}`"
|
||||
>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-account-group</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>
|
||||
Collaborators
|
||||
<user-avatar
|
||||
v-for="collab in stream.collaborators.slice(
|
||||
0,
|
||||
stream.collaborators.length > 5 ? 4 : 5
|
||||
)"
|
||||
:id="collab.id"
|
||||
:key="collab.id"
|
||||
:size="20"
|
||||
:avatar="collab.avatar"
|
||||
:name="collab.name"
|
||||
></user-avatar>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
text
|
||||
<v-toolbar
|
||||
v-if="stream.role === 'stream:owner'"
|
||||
class="transparent"
|
||||
rounded
|
||||
:disabled="stream.role !== 'stream:owner'"
|
||||
@click="goToStreamCollabs()"
|
||||
flat
|
||||
>
|
||||
Manage
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
</v-sheet>
|
||||
<v-sheet
|
||||
v-if="stream"
|
||||
:xxxclass="`${!$vuetify.theme.dark ? 'grey lighten-4' : 'grey darken-4'}`"
|
||||
>
|
||||
<v-toolbar
|
||||
v-if="!stream.isPublic"
|
||||
v-tooltip="
|
||||
`${
|
||||
stream.role !== 'stream:owner'
|
||||
? 'You do not have the right access level (' +
|
||||
stream.role +
|
||||
') to invite people to this stream.'
|
||||
: ''
|
||||
}`
|
||||
"
|
||||
flat
|
||||
class="transparent"
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>{{ stream.isPublic ? 'mdi-lock-open' : 'mdi-lock' }}</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>
|
||||
{{ stream.isPublic ? 'Link Sharing On' : 'Link Sharing Off' }}
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-switch
|
||||
:input-value="stream.isPublic"
|
||||
inset
|
||||
class="mt-4"
|
||||
:loading="swapPermsLoading"
|
||||
:disabled="swapPermsLoading"
|
||||
@click="changeVisibility"
|
||||
/>
|
||||
</v-toolbar>
|
||||
<v-card-text v-if="stream.isPublic" class="pt-2">
|
||||
Link sharing is on. This means that anyone with the link can view this stream.
|
||||
Only collaborators will be able to send or edit data.
|
||||
</v-card-text>
|
||||
<v-card-text v-if="!stream.isPublic" class="pt-2 pb-2">
|
||||
Link sharing is off. This means that only collaborators can view or edit this
|
||||
stream.
|
||||
</v-card-text>
|
||||
</v-sheet>
|
||||
<v-sheet v-if="stream?.collaborators?.length">
|
||||
<v-toolbar
|
||||
v-tooltip="
|
||||
`${
|
||||
stream.role !== 'stream:owner'
|
||||
? 'You do not have the right access level (' +
|
||||
stream.role +
|
||||
') to add collaborators.'
|
||||
: ''
|
||||
}`
|
||||
"
|
||||
flat
|
||||
>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-account-group</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>
|
||||
Collaborators
|
||||
<user-avatar
|
||||
v-for="collab in stream.collaborators.slice(
|
||||
0,
|
||||
stream.collaborators.length > 5 ? 4 : 5
|
||||
)"
|
||||
:id="collab.id"
|
||||
:key="collab.id"
|
||||
:size="20"
|
||||
:avatar="collab.avatar"
|
||||
:name="collab.name"
|
||||
></user-avatar>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
text
|
||||
rounded
|
||||
:disabled="stream.role !== 'stream:owner'"
|
||||
@click="goToStreamCollabs()"
|
||||
>
|
||||
Manage
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
</v-sheet>
|
||||
<v-sheet
|
||||
v-if="stream"
|
||||
:xxxclass="`${!$vuetify.theme.dark ? 'grey lighten-4' : 'grey darken-4'}`"
|
||||
>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-email</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>Missing someone?</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
text
|
||||
rounded
|
||||
:disabled="stream.role !== 'stream:owner'"
|
||||
@click="showStreamInviteDialog()"
|
||||
<v-toolbar
|
||||
v-if="!stream.isPublic"
|
||||
v-tooltip="
|
||||
`${
|
||||
stream.role !== 'stream:owner'
|
||||
? 'You do not have the right access level (' +
|
||||
stream.role +
|
||||
') to invite people to this stream.'
|
||||
: ''
|
||||
}`
|
||||
"
|
||||
flat
|
||||
class="transparent"
|
||||
>
|
||||
Send Invite
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<invite-dialog
|
||||
:stream-id="$route.params.streamId"
|
||||
:visible.sync="inviteDialogVisible"
|
||||
/>
|
||||
</v-sheet>
|
||||
</v-card>
|
||||
<v-app-bar-nav-icon style="pointer-events: none">
|
||||
<v-icon>mdi-email</v-icon>
|
||||
</v-app-bar-nav-icon>
|
||||
<v-toolbar-title>Missing someone?</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
text
|
||||
rounded
|
||||
:disabled="stream.role !== 'stream:owner'"
|
||||
@click="showStreamInviteDialog()"
|
||||
>
|
||||
Send Invite
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<invite-dialog :stream-id="streamId" :visible.sync="inviteDialogVisible" />
|
||||
</v-sheet>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { gql } from '@apollo/client/core'
|
||||
import { commonStreamFieldsFragment } from '@/graphql/streams'
|
||||
<script lang="ts">
|
||||
import InviteDialog from '@/main/dialogs/InviteDialog.vue'
|
||||
import UserAvatar from '@/main/components/common/UserAvatar.vue'
|
||||
import { useEmbedViewerUrlManager } from '@/main/lib/viewer/commit-object-viewer/composables/embed'
|
||||
import { computed, PropType } from 'vue'
|
||||
import { useRoute } from '@/main/lib/core/composables/router'
|
||||
import { getResourceType } from '@/main/lib/viewer/core/helpers/resourceHelper'
|
||||
import { EmbedParams } from '@/main/lib/viewer/commit-object-viewer/services/embed'
|
||||
import { ensureError } from '@/main/lib/common/general/helpers/errorHelper'
|
||||
import {
|
||||
ShareableStreamDocument,
|
||||
UpdateStreamSettingsDocument
|
||||
} from '@/graphql/generated/graphql'
|
||||
import { convertThrowIntoFetchResult } from '@/main/lib/common/apollo/helpers/apolloOperationHelper'
|
||||
import { Optional } from '@speckle/shared'
|
||||
import { useQuery } from '@vue/apollo-composable'
|
||||
|
||||
/**
|
||||
* what about embedType? can that be cleaned up? and all other url params?
|
||||
* can we add embed button back to embed viewer then?
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: 'ShareStreamDialog',
|
||||
@@ -267,36 +281,101 @@ export default {
|
||||
InviteDialog
|
||||
},
|
||||
props: {
|
||||
stream: {
|
||||
type: Object,
|
||||
default: () => null
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
streamId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
branchName: {
|
||||
type: String as PropType<Optional<string>>,
|
||||
default: () => undefined
|
||||
},
|
||||
resourceId: {
|
||||
type: String as PropType<Optional<string>>,
|
||||
default: () => undefined
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const realShow = computed({
|
||||
get: () => props.show,
|
||||
set: (newVal) => {
|
||||
emit('update:show', !!newVal)
|
||||
if (!newVal) {
|
||||
resetUrlOptions()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const resourceType = computed(() =>
|
||||
props.resourceId ? getResourceType(props.resourceId) : ''
|
||||
)
|
||||
const objectId = computed(() =>
|
||||
resourceType.value === 'object' ? props.resourceId : undefined
|
||||
)
|
||||
const commitId = computed(() =>
|
||||
resourceType.value === 'commit' ? props.resourceId : undefined
|
||||
)
|
||||
|
||||
const { result: streamResult } = useQuery(ShareableStreamDocument, () => ({
|
||||
id: props.streamId
|
||||
}))
|
||||
const stream = computed(() => streamResult.value?.stream)
|
||||
|
||||
const embedParams = computed(
|
||||
(): EmbedParams => ({
|
||||
streamId: props.streamId,
|
||||
branchName: props.branchName,
|
||||
objectId: objectId.value,
|
||||
commitId: commitId.value,
|
||||
overlay: (route.query.overlay as string) || undefined,
|
||||
c: (route.query.c as string) || undefined,
|
||||
filter: (route.query.filter as string) || undefined
|
||||
})
|
||||
)
|
||||
|
||||
const {
|
||||
options,
|
||||
url,
|
||||
iFrameUrl,
|
||||
resetOptions: resetUrlOptions
|
||||
} = useEmbedViewerUrlManager({
|
||||
embedParams
|
||||
})
|
||||
|
||||
return {
|
||||
realShow,
|
||||
stream,
|
||||
resourceType,
|
||||
objectId,
|
||||
commitId,
|
||||
...options,
|
||||
url,
|
||||
iFrameUrl,
|
||||
resetUrlOptions
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
swapPermsLoading: false,
|
||||
transparentBg: false,
|
||||
hideControls: false,
|
||||
hideSidebar: false,
|
||||
hideSelectionInfo: false,
|
||||
preventScroll: false,
|
||||
autoload: false,
|
||||
slideshow: false,
|
||||
inviteDialogVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
streamUrl() {
|
||||
return `${window.location.origin}/streams/${this.$route.params.streamId}`
|
||||
return `${window.location.origin}/streams/${this.streamId}`
|
||||
},
|
||||
embedType() {
|
||||
if (this.$route.params.branchName) return 'Branch'
|
||||
if (this.$route.params.resourceId) return 'Model'
|
||||
if (this.branchName) return 'Branch'
|
||||
if (this.resourceId) return 'Model'
|
||||
return 'Stream'
|
||||
},
|
||||
embedDescription() {
|
||||
if (this.$route.params.branchName) return 'the latest commit in this branch'
|
||||
if (this.$route.params.resourceId) return 'model'
|
||||
if (this.branchName) return 'the latest commit in this branch'
|
||||
if (this.resourceId) return 'model'
|
||||
return 'the latest commit in this stream'
|
||||
}
|
||||
},
|
||||
@@ -307,101 +386,61 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
copyToClipboard(e) {
|
||||
// this.$clipboard(e.target.value)
|
||||
// console.log(e.target.value)
|
||||
e.target.select()
|
||||
closeDialog() {
|
||||
this.resetUrlOptions()
|
||||
this.realShow = false
|
||||
},
|
||||
copyToClipboard(e: MouseEvent) {
|
||||
const target = e.target as HTMLInputElement
|
||||
target.select()
|
||||
document.execCommand('copy')
|
||||
},
|
||||
goToStreamCollabs() {
|
||||
this.$router.push(`/streams/${this.$route.params.streamId}/collaborators`)
|
||||
this.$emit('close')
|
||||
this.$router.push(`/streams/${this.streamId}/collaborators`)
|
||||
this.closeDialog()
|
||||
},
|
||||
showStreamInviteDialog() {
|
||||
this.inviteDialogVisible = true
|
||||
},
|
||||
getIframeUrl() {
|
||||
let base = `${window.location.origin}/embed?stream=${this.$route.params.streamId}`
|
||||
|
||||
if (this.$route.params.branchName) {
|
||||
base += `&branch=${this.$route.params.branchName}`
|
||||
return this.wrapUrlInIframe(base)
|
||||
}
|
||||
|
||||
const resourceId = this.$route.params.resourceId
|
||||
if (!resourceId) return this.wrapUrlInIframe(base)
|
||||
|
||||
base += `&${this.$resourceType(resourceId)}=${this.$route.params.resourceId}`
|
||||
|
||||
if (this.$route.query.overlay) {
|
||||
base += `&overlay=${this.$route.query.overlay}`
|
||||
}
|
||||
if (this.$route.query.c) {
|
||||
base += `&c=${encodeURIComponent(this.$route.query.c)}`
|
||||
}
|
||||
if (this.$route.query.filter) {
|
||||
base += `&filter=${encodeURIComponent(this.$route.query.filter)}`
|
||||
}
|
||||
|
||||
return this.wrapUrlInIframe(base)
|
||||
},
|
||||
wrapUrlInIframe(url) {
|
||||
if (this.transparentBg) {
|
||||
url += `&transparent=true`
|
||||
}
|
||||
|
||||
if (this.hideControls) url += `&hidecontrols=true`
|
||||
if (this.hideSidebar) url += `&hidesidebar=true`
|
||||
if (this.hideSelectionInfo) url += `&hideselectioninfo=true`
|
||||
if (this.autoload) url += `&autoload=true`
|
||||
if (this.preventScroll) url += `&noscroll=true`
|
||||
if (this.slideshow) url += `&commentslideshow=true`
|
||||
|
||||
return `<iframe src="${url}" width="600" height="400" frameborder="0"></iframe>`
|
||||
},
|
||||
async changeVisibility() {
|
||||
if (!this.stream) return
|
||||
|
||||
const stream = this.stream
|
||||
this.swapPermsLoading = true
|
||||
|
||||
const newIsPublic = !this.stream.isPublic
|
||||
const newIsPublic = !stream.isPublic
|
||||
try {
|
||||
await this.$apollo.mutate({
|
||||
mutation: gql`
|
||||
mutation editDescription($input: StreamUpdateInput!) {
|
||||
streamUpdate(stream: $input)
|
||||
}
|
||||
`,
|
||||
variables: {
|
||||
input: {
|
||||
id: this.$route.params.streamId,
|
||||
isPublic: newIsPublic
|
||||
}
|
||||
},
|
||||
optimisticResponse: {
|
||||
__typename: 'Mutation',
|
||||
streamUpdate: newIsPublic
|
||||
},
|
||||
update: (cache, { data: { streamUpdate: isSuccessFul } }) => {
|
||||
// Update stream public value in cache
|
||||
const normalizedId = `Stream:${this.stream.id}`
|
||||
const cachedStream = cache.readFragment({
|
||||
id: normalizedId,
|
||||
fragment: commonStreamFieldsFragment
|
||||
})
|
||||
await this.$apollo
|
||||
.mutate({
|
||||
mutation: UpdateStreamSettingsDocument,
|
||||
variables: {
|
||||
input: {
|
||||
id: this.streamId,
|
||||
isPublic: newIsPublic
|
||||
}
|
||||
},
|
||||
optimisticResponse: {
|
||||
__typename: 'Mutation',
|
||||
streamUpdate: newIsPublic
|
||||
},
|
||||
update: (cache, { data }) => {
|
||||
const isSuccess = !!data?.streamUpdate
|
||||
if (!isSuccess) return
|
||||
|
||||
cache.writeFragment({
|
||||
id: normalizedId,
|
||||
fragment: commonStreamFieldsFragment,
|
||||
data: {
|
||||
...cachedStream,
|
||||
isPublic: isSuccessFul ? newIsPublic : !newIsPublic
|
||||
},
|
||||
overwrite: true
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
this.$eventHub.$emit('notification', {
|
||||
text: e.message ? e.message : 'Something went wrong.'
|
||||
// Update stream public value in cache
|
||||
cache.modify({
|
||||
id: cache.identify(stream),
|
||||
fields: {
|
||||
isPublic: () => newIsPublic
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(convertThrowIntoFetchResult)
|
||||
} catch (e: unknown) {
|
||||
this.$triggerNotification({
|
||||
text: ensureError(e, 'Something went wrong').message,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
this.swapPermsLoading = false
|
||||
|
||||
@@ -48,15 +48,21 @@ export function useCommitMultiActions() {
|
||||
* Use inside a component that represents a commit that can be selected (e.g. for batch actions)
|
||||
*/
|
||||
export function useSelectableCommit(
|
||||
props: SetupProps<{ allowSelect: boolean; selected: boolean; highlight: boolean }>,
|
||||
props: SetupProps<{
|
||||
selectable: boolean
|
||||
selectDisabled: boolean
|
||||
selected: boolean
|
||||
}>,
|
||||
ctx: SetupContext
|
||||
) {
|
||||
const highlighted = computed(() => props.highlight || props.selected)
|
||||
const canBeSelected = computed(() => props.selectable && !props.selectDisabled)
|
||||
|
||||
const selectedState = computed({
|
||||
get: () => props.selected,
|
||||
set: (newVal) => ctx.emit('update:selected', !!newVal)
|
||||
get: () => (canBeSelected.value ? props.selected : false),
|
||||
set: (newVal) => ctx.emit('update:selected', canBeSelected.value ? !!newVal : false)
|
||||
})
|
||||
const onSelect = () => ctx.emit('select', { value: props.selected })
|
||||
const highlighted = computed(() => selectedState.value)
|
||||
const onSelect = () => ctx.emit('select', { value: selectedState.value })
|
||||
|
||||
return {
|
||||
highlighted,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { ApolloCache } from '@apollo/client/cache'
|
||||
|
||||
export const disabledCheckboxMessage =
|
||||
"To select this commit you must be its or its stream's owner"
|
||||
|
||||
export enum BatchActionType {
|
||||
Move = 'move',
|
||||
Delete = 'delete'
|
||||
|
||||
@@ -1,15 +1,28 @@
|
||||
import { useRoute } from '@/main/lib/core/composables/router'
|
||||
import { computed } from 'vue'
|
||||
import {
|
||||
buildEmbedUrl,
|
||||
EmbedParams,
|
||||
wrapUrlInIFrame
|
||||
} from '@/main/lib/viewer/commit-object-viewer/services/embed'
|
||||
import { computed, ref, ComputedRef, unref } from 'vue'
|
||||
|
||||
/**
|
||||
* Get embed viewer query params
|
||||
*/
|
||||
export function useEmbedViewerQuery() {
|
||||
const route = useRoute()
|
||||
|
||||
/**
|
||||
* Main url params
|
||||
*/
|
||||
const streamId = computed(() => (route.query.stream as string) || null)
|
||||
const branchName = computed(() => (route.query.branch as string) || null)
|
||||
const commitId = computed(() => (route.query.commit as string) || null)
|
||||
const objectId = computed(() => (route.query.object as string) || null)
|
||||
|
||||
/**
|
||||
* Embed options
|
||||
*/
|
||||
const transparent = computed(() => route.query.transparent === 'true')
|
||||
const autoload = computed(() => route.query.autoload === 'true')
|
||||
const hideControls = computed(() => route.query.hidecontrols === 'true')
|
||||
@@ -34,3 +47,68 @@ export function useEmbedViewerQuery() {
|
||||
commentSlideShow
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure a viewer embed URL
|
||||
*/
|
||||
export function useEmbedViewerUrlManager(params: {
|
||||
embedParams: ComputedRef<EmbedParams>
|
||||
}) {
|
||||
const { embedParams } = params
|
||||
|
||||
const transparent = ref(false)
|
||||
const autoload = ref(false)
|
||||
const hideControls = ref(false)
|
||||
const noScroll = ref(false)
|
||||
const hideSidebar = ref(false)
|
||||
const hideSelectionInfo = ref(false)
|
||||
const hideLogo = ref(false)
|
||||
const commentSlideshow = ref(false)
|
||||
const options = {
|
||||
transparent,
|
||||
autoload,
|
||||
hideControls,
|
||||
noScroll,
|
||||
hideSidebar,
|
||||
hideSelectionInfo,
|
||||
hideLogo,
|
||||
commentSlideshow
|
||||
}
|
||||
|
||||
const url = computed(() =>
|
||||
buildEmbedUrl(unref(embedParams), {
|
||||
transparent: transparent.value,
|
||||
autoload: autoload.value,
|
||||
hideControls: hideControls.value,
|
||||
noScroll: noScroll.value,
|
||||
hideSidebar: hideSidebar.value,
|
||||
hideSelectionInfo: hideSelectionInfo.value,
|
||||
hideLogo: hideLogo.value,
|
||||
commentSlideshow: commentSlideshow.value
|
||||
})
|
||||
)
|
||||
|
||||
const iFrameUrl = computed(() => wrapUrlInIFrame(url.value))
|
||||
|
||||
const resetOptions = () => {
|
||||
for (const optionRef of Object.values(options)) {
|
||||
optionRef.value = false
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
options: {
|
||||
transparent,
|
||||
autoload,
|
||||
hideControls,
|
||||
noScroll,
|
||||
hideSidebar,
|
||||
hideSelectionInfo,
|
||||
hideLogo,
|
||||
commentSlideshow
|
||||
},
|
||||
url,
|
||||
iFrameUrl,
|
||||
resetOptions
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
export type ViewerOptions = {
|
||||
/**
|
||||
* Extra objects to overlay on top of the base model
|
||||
*/
|
||||
overlay: string
|
||||
/**
|
||||
* Camera position
|
||||
*/
|
||||
c: string
|
||||
/**
|
||||
* Serialized viewer filters
|
||||
*/
|
||||
filter: string
|
||||
}
|
||||
|
||||
export type EmbedParams = Partial<ViewerOptions> & {
|
||||
/**
|
||||
* The stream being embedded (required)
|
||||
*/
|
||||
streamId: string
|
||||
|
||||
/**
|
||||
* Stream branch to embed
|
||||
*/
|
||||
branchName?: string
|
||||
|
||||
/**
|
||||
* Stream object to embed
|
||||
*/
|
||||
objectId?: string
|
||||
|
||||
/**
|
||||
* Stream commit to embed
|
||||
*/
|
||||
commitId?: string
|
||||
}
|
||||
|
||||
export type EmbedOptions = {
|
||||
/**
|
||||
* Whether the BG of the embed should be transparent
|
||||
*/
|
||||
transparent: boolean
|
||||
|
||||
/**
|
||||
* Whether to eager-load the embed
|
||||
*/
|
||||
autoload: boolean
|
||||
|
||||
/**
|
||||
* Whether to hide viewer controls
|
||||
*/
|
||||
hideControls: boolean
|
||||
|
||||
/**
|
||||
* Whether to prevent scrolling (zooming)
|
||||
*/
|
||||
noScroll: boolean
|
||||
|
||||
/**
|
||||
* Whether to hide sidebar (filters, views, etc.)
|
||||
*/
|
||||
hideSidebar: boolean
|
||||
|
||||
/**
|
||||
* Whether to hide object selection info
|
||||
*/
|
||||
hideSelectionInfo: boolean
|
||||
|
||||
/**
|
||||
* Whether to hide the Speckle logo
|
||||
*/
|
||||
hideLogo: boolean
|
||||
|
||||
/**
|
||||
* Enable comment slideshow mode, where the browser auto-expands the 1st comment and subsequent
|
||||
* comments can be easily reached by clicking arrow buttons
|
||||
*/
|
||||
commentSlideshow: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an embed URL
|
||||
*/
|
||||
export function buildEmbedUrl(
|
||||
params: EmbedParams,
|
||||
options?: Partial<EmbedOptions>
|
||||
): string {
|
||||
const { streamId, branchName, objectId, commitId, overlay, c, filter } = params
|
||||
const {
|
||||
transparent,
|
||||
autoload,
|
||||
hideControls,
|
||||
noScroll,
|
||||
hideSidebar,
|
||||
hideSelectionInfo,
|
||||
hideLogo,
|
||||
commentSlideshow
|
||||
} = options || {}
|
||||
|
||||
const baseUrl = new URL('/embed', window.location.origin)
|
||||
|
||||
const queryParams = new URLSearchParams()
|
||||
queryParams.set('stream', streamId)
|
||||
|
||||
// Add main identifier params
|
||||
if (objectId) {
|
||||
queryParams.set('object', objectId)
|
||||
} else if (commitId) {
|
||||
queryParams.set('commit', commitId)
|
||||
} else if (branchName) {
|
||||
queryParams.set('branch', branchName)
|
||||
}
|
||||
|
||||
// Add viewer options
|
||||
if (overlay) {
|
||||
queryParams.set('overlay', overlay)
|
||||
}
|
||||
if (c) {
|
||||
queryParams.set('c', c)
|
||||
}
|
||||
if (filter) {
|
||||
queryParams.set('filter', filter)
|
||||
}
|
||||
|
||||
// Add embed options
|
||||
if (transparent) {
|
||||
queryParams.set('transparent', 'true')
|
||||
}
|
||||
if (autoload) {
|
||||
queryParams.set('autoload', 'true')
|
||||
}
|
||||
if (hideControls) {
|
||||
queryParams.set('hidecontrols', 'true')
|
||||
}
|
||||
if (noScroll) {
|
||||
queryParams.set('noscroll', 'true')
|
||||
}
|
||||
if (hideSidebar) {
|
||||
queryParams.set('hidesidebar', 'true')
|
||||
}
|
||||
if (hideSelectionInfo) {
|
||||
queryParams.set('hideselectioninfo', 'true')
|
||||
}
|
||||
if (hideLogo) {
|
||||
queryParams.set('ilovespeckleanyway', 'true')
|
||||
}
|
||||
if (commentSlideshow) {
|
||||
queryParams.set('commentslideshow', 'true')
|
||||
}
|
||||
|
||||
baseUrl.search = queryParams.toString()
|
||||
return baseUrl.toString()
|
||||
}
|
||||
|
||||
export function wrapUrlInIFrame(url: string) {
|
||||
return `<iframe src="${url}" width="600" height="400" frameborder="0"></iframe>`
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export type ResourceType = 'commit' | 'object'
|
||||
|
||||
export function getResourceType(resourceId: string): ResourceType {
|
||||
return resourceId.length === 10 ? 'commit' : 'object'
|
||||
}
|
||||
@@ -26,8 +26,12 @@
|
||||
<commit-preview-card
|
||||
:commit="commit"
|
||||
:preview-height="180"
|
||||
:allow-select="isCommitOrStreamOwner(commit)"
|
||||
:shareable="true"
|
||||
:selectable="true"
|
||||
:select-disabled-message="disabledCheckboxMessage"
|
||||
:select-disabled="!isCommitOrStreamOwner(commit)"
|
||||
:selected.sync="selectedCommitsState[commit.id]"
|
||||
@share="shareDialogCommit = $event"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="6" md="6" lg="4" xl="3">
|
||||
@@ -68,12 +72,18 @@
|
||||
</v-list>
|
||||
</template>
|
||||
</no-data-placeholder>
|
||||
<share-stream-dialog
|
||||
v-if="shareDialogStreamId"
|
||||
:show.sync="showShareDialog"
|
||||
:stream-id="shareDialogStreamId"
|
||||
:resource-id="shareDialogCommitId"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { gql } from '@apollo/client/core'
|
||||
import { useApolloClient, useQuery } from '@vue/apollo-composable'
|
||||
import { computed, defineComponent } from 'vue'
|
||||
import { computed, defineComponent, ref } from 'vue'
|
||||
import PrioritizedPortal from '@/main/components/common/utility/PrioritizedPortal.vue'
|
||||
import CommitMultiSelectToolbar from '@/main/components/stream/commit/CommitMultiSelectToolbar.vue'
|
||||
import {
|
||||
@@ -82,7 +92,10 @@ import {
|
||||
} from '@/main/lib/stream/composables/commitMultiActions'
|
||||
import { Roles } from '@/helpers/mainConstants'
|
||||
import { getCacheId } from '@/main/lib/common/apollo/helpers/apolloOperationHelper'
|
||||
import { deleteCommitsFromCachedCommitsQuery } from '@/main/lib/stream/services/commitMultiActions'
|
||||
import {
|
||||
deleteCommitsFromCachedCommitsQuery,
|
||||
disabledCheckboxMessage
|
||||
} from '@/main/lib/stream/services/commitMultiActions'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'TheCommits',
|
||||
@@ -90,6 +103,7 @@ export default defineComponent({
|
||||
InfiniteLoading: () => import('vue-infinite-loading'),
|
||||
CommitPreviewCard: () => import('@/main/components/common/CommitPreviewCard'),
|
||||
NoDataPlaceholder: () => import('@/main/components/common/NoDataPlaceholder'),
|
||||
ShareStreamDialog: () => import('@/main/dialogs/ShareStreamDialog.vue'),
|
||||
PrioritizedPortal,
|
||||
CommitMultiSelectToolbar
|
||||
},
|
||||
@@ -161,6 +175,18 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
const shareDialogCommit = ref(null)
|
||||
const showShareDialog = computed({
|
||||
get: () => !!shareDialogCommit.value,
|
||||
set: (newVal) => {
|
||||
if (!newVal) {
|
||||
shareDialogCommit.value = null
|
||||
}
|
||||
}
|
||||
})
|
||||
const shareDialogCommitId = computed(() => shareDialogCommit.value?.id)
|
||||
const shareDialogStreamId = computed(() => shareDialogCommit.value?.stream.id)
|
||||
|
||||
return {
|
||||
user,
|
||||
commitItems,
|
||||
@@ -171,7 +197,12 @@ export default defineComponent({
|
||||
clearSelectedCommits,
|
||||
selectedCommitsState,
|
||||
onBatchCommitActionFinish,
|
||||
isCommitOrStreamOwner
|
||||
isCommitOrStreamOwner,
|
||||
disabledCheckboxMessage,
|
||||
shareDialogCommitId,
|
||||
shareDialogStreamId,
|
||||
shareDialogCommit,
|
||||
showShareDialog
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -43,8 +43,12 @@
|
||||
<commit-preview-card
|
||||
:commit="commit"
|
||||
:show-stream-and-branch="false"
|
||||
:allow-select="isStreamOwner || isCommitOwner(commit)"
|
||||
:selectable="true"
|
||||
:shareable="true"
|
||||
:select-disabled-message="disabledCheckboxMessage"
|
||||
:select-disabled="!isStreamOwner && !isCommitOwner(commit)"
|
||||
:selected.sync="selectedCommitsState[commit.id]"
|
||||
@share="shareDialogCommitId = $event.id"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -56,10 +60,14 @@
|
||||
:key="item.id + 'list'"
|
||||
:commit="item"
|
||||
:stream-id="streamId"
|
||||
:allow-select="isStreamOwner || isCommitOwner(item)"
|
||||
:shareable="true"
|
||||
:selectable="true"
|
||||
:select-disabled-message="disabledCheckboxMessage"
|
||||
:select-disabled="!isStreamOwner && !isCommitOwner(item)"
|
||||
:selected.sync="selectedCommitsState[item.id]"
|
||||
show-received-receipts
|
||||
class="mb-1 rounded"
|
||||
@share="shareDialogCommitId = $event.id"
|
||||
></list-item-commit>
|
||||
</v-list>
|
||||
</v-col>
|
||||
@@ -105,6 +113,11 @@
|
||||
>
|
||||
<h2>{{ error || `Branch "${$route.params.branchName}" does not exist.` }}</h2>
|
||||
</error-placeholder>
|
||||
<share-stream-dialog
|
||||
:show.sync="showShareDialog"
|
||||
:stream-id="streamId"
|
||||
:resource-id="shareDialogCommitId"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -112,13 +125,14 @@ import { gql } from '@apollo/client/core'
|
||||
import branchQuery from '@/graphql/branch.gql'
|
||||
import { STANDARD_PORTAL_KEYS, usePortalState } from '@/main/utils/portalStateManager'
|
||||
import { useApolloClient, useQuery } from '@vue/apollo-composable'
|
||||
import { computed } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useRoute } from '@/main/lib/core/composables/router'
|
||||
import { AppLocalStorage } from '@/utils/localStorage'
|
||||
import { useCommitMultiActions } from '@/main/lib/stream/composables/commitMultiActions'
|
||||
import {
|
||||
BatchActionType,
|
||||
deleteCommitsFromCachedCommitsQuery
|
||||
deleteCommitsFromCachedCommitsQuery,
|
||||
disabledCheckboxMessage
|
||||
} from '@/main/lib/stream/services/commitMultiActions'
|
||||
import CommitMultiSelectToolbar from '@/main/components/stream/commit/CommitMultiSelectToolbar.vue'
|
||||
import { Roles } from '@/helpers/mainConstants'
|
||||
@@ -136,7 +150,8 @@ export default {
|
||||
BranchEditDialog: () => import('@/main/dialogs/BranchEditDialog'),
|
||||
BranchToolbar: () => import('@/main/toolbars/BranchToolbar'),
|
||||
CommitPreviewCard: () => import('@/main/components/common/CommitPreviewCard'),
|
||||
CommitMultiSelectToolbar
|
||||
CommitMultiSelectToolbar,
|
||||
ShareStreamDialog: () => import('@/main/dialogs/ShareStreamDialog.vue')
|
||||
},
|
||||
setup() {
|
||||
const eventHub = useEventHub()
|
||||
@@ -200,6 +215,16 @@ export default {
|
||||
eventHub.$emit(StreamEvents.RefetchBranches)
|
||||
}
|
||||
|
||||
const shareDialogCommitId = ref(null)
|
||||
const showShareDialog = computed({
|
||||
get: () => !!shareDialogCommitId.value,
|
||||
set: (newVal) => {
|
||||
if (!newVal) {
|
||||
shareDialogCommitId.value = null
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
stream,
|
||||
streamFetchMore,
|
||||
@@ -214,7 +239,10 @@ export default {
|
||||
canRenderToolbarPortal,
|
||||
isStreamOwner,
|
||||
isCommitOwner,
|
||||
onBatchCommitActionFinish
|
||||
onBatchCommitActionFinish,
|
||||
disabledCheckboxMessage,
|
||||
shareDialogCommitId,
|
||||
showShareDialog
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</span>
|
||||
<v-btn
|
||||
v-if="stream"
|
||||
v-tooltip="'Share this stream'"
|
||||
v-tooltip="'Share this stream/commit'"
|
||||
xxxelevation="0"
|
||||
rounded
|
||||
class="mr-2 ml-2 px-0 primary"
|
||||
@@ -55,13 +55,12 @@
|
||||
<v-icon small>mdi-share-variant</v-icon>
|
||||
</v-btn>
|
||||
</portal>
|
||||
<v-dialog
|
||||
v-model="shareStream"
|
||||
max-width="600"
|
||||
:fullscreen="$vuetify.breakpoint.xsOnly"
|
||||
>
|
||||
<share-stream-dialog :stream="stream" @close="shareStream = false" />
|
||||
</v-dialog>
|
||||
<share-stream-dialog
|
||||
:show.sync="shareStream"
|
||||
:stream-id="stream.id"
|
||||
:branch-name="$route.params.branchName"
|
||||
:resource-id="$route.params.resourceId"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { AppLocalStorage } from '@/utils/localStorage'
|
||||
import { LocalStorageKeys } from '@/helpers/mainConstants'
|
||||
import { getInviteTokenFromURL } from '@/main/lib/auth/services/authService'
|
||||
import { triggerToastNotification } from '@/main/lib/core/composables/notifications'
|
||||
import { getResourceType } from '@/main/lib/viewer/core/helpers/resourceHelper'
|
||||
|
||||
Vue.prototype.$userId = function () {
|
||||
return AppLocalStorage.get(LocalStorageKeys.Uuid)
|
||||
@@ -27,7 +28,7 @@ Vue.prototype.$isMobile = function () {
|
||||
}
|
||||
|
||||
Vue.prototype.$resourceType = function (resourceId: string) {
|
||||
return resourceId.length === 10 ? 'commit' : 'object'
|
||||
return getResourceType(resourceId)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,6 +36,11 @@ declare module 'vue/types/vue' {
|
||||
* @deprecated Use `isLoggedInQuery`/`isLoggedInMixin`/`useIsLoggedIn` instead
|
||||
*/
|
||||
$loggedIn: () => boolean
|
||||
|
||||
/**
|
||||
* Resolve a resourceId's type
|
||||
*/
|
||||
$resourceType: typeof import('@/main/lib/viewer/core/helpers/resourceHelper').getResourceType
|
||||
}
|
||||
|
||||
export interface VueConfiguration {
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
"vueCompilerOptions": {
|
||||
"target": 2.7
|
||||
},
|
||||
"ts-node": {
|
||||
"swc": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.js",
|
||||
|
||||
@@ -4843,6 +4843,7 @@ __metadata:
|
||||
"@rushstack/eslint-patch": ^1.1.3
|
||||
"@speckle/shared": "workspace:^"
|
||||
"@speckle/viewer": "workspace:^"
|
||||
"@swc/core": ^1.2.222
|
||||
"@tiptap/core": ^2.0.0-beta.176
|
||||
"@tiptap/extension-bold": ^2.0.0-beta.26
|
||||
"@tiptap/extension-document": ^2.0.0-beta.15
|
||||
@@ -4889,6 +4890,8 @@ __metadata:
|
||||
regenerator-runtime: ^0.13.9
|
||||
sass: ~1.32.6
|
||||
subscriptions-transport-ws: ^0.11.0
|
||||
ts-node: ^10.9.1
|
||||
tsconfig-paths: ^4.0.0
|
||||
tween: ^0.9.0
|
||||
type-fest: ^2.13.1
|
||||
typescript: ~4.5.5
|
||||
@@ -4905,7 +4908,7 @@ __metadata:
|
||||
vue-mixpanel: 1.0.7
|
||||
vue-router: ^3.4.9
|
||||
vue-timeago: ^5.1.2
|
||||
vue-tsc: ^1.0.3
|
||||
vue-tsc: ^1.0.8
|
||||
vue2-perfect-scrollbar: ^1.5.2
|
||||
vuedraggable: ^2.24.3
|
||||
vuetify: ^2.3.21
|
||||
@@ -6563,58 +6566,58 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/language-core@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "@volar/language-core@npm:1.0.3"
|
||||
"@volar/language-core@npm:1.0.8":
|
||||
version: 1.0.8
|
||||
resolution: "@volar/language-core@npm:1.0.8"
|
||||
dependencies:
|
||||
"@volar/source-map": 1.0.3
|
||||
"@vue/reactivity": ^3.2.38
|
||||
"@volar/source-map": 1.0.8
|
||||
"@vue/reactivity": ^3.2.40
|
||||
muggle-string: ^0.1.0
|
||||
checksum: 37e75fca3c4f04dd4674bc6e33eada174ee9d9cbd470f8f907381263bcd7647e6366868a440e73720a05ee720553064f85c0e4c58acf34ac6a689ed66a67eed5
|
||||
checksum: d30a3bc51bf1d44cd9e3ea727f2e0fe45e8107754991c13b99da1706d6e688bee570e9ec1137b7e123733fcc70bdbabc071d14634736f32599cfb51ec2fbc298
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/source-map@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "@volar/source-map@npm:1.0.3"
|
||||
"@volar/source-map@npm:1.0.8":
|
||||
version: 1.0.8
|
||||
resolution: "@volar/source-map@npm:1.0.8"
|
||||
dependencies:
|
||||
muggle-string: ^0.1.0
|
||||
checksum: e7bc09bc31099651e501e48916dd2af4fe009f36786cb08b679777f6b7d0e2ac77c38246d9368ed6fdb45b3d00ab89e83ea827ea8d35028692d0a252cb981ae6
|
||||
checksum: cbcff8a011b2f213dbe5bd249b9c4029ab80a0a726583290e1b4ed4e66bbb70fc471fce3383d8e882d7f17263336c4ac77b869b71a77479b3ebc5e7b7794b861
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/typescript@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "@volar/typescript@npm:1.0.3"
|
||||
"@volar/typescript@npm:1.0.8":
|
||||
version: 1.0.8
|
||||
resolution: "@volar/typescript@npm:1.0.8"
|
||||
dependencies:
|
||||
"@volar/language-core": 1.0.3
|
||||
checksum: e001b680c75c62751477b2aac8a70beea6ea1609c8ecd0ec0509af42898dfb5f424bc44c4d7dde6fb389e3567a247664fde01d458d5cd66d46938725fd0ef2b6
|
||||
"@volar/language-core": 1.0.8
|
||||
checksum: 8a815d35877dbcfc130bb76c62c799950c76e5b49363ac55ba34b09f5588c04ff1d704c400b827eaabb9344630b1fa7b7c6a2dd79c63fe34aba3a3dc20d7f70d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/vue-language-core@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "@volar/vue-language-core@npm:1.0.3"
|
||||
"@volar/vue-language-core@npm:1.0.8":
|
||||
version: 1.0.8
|
||||
resolution: "@volar/vue-language-core@npm:1.0.8"
|
||||
dependencies:
|
||||
"@volar/language-core": 1.0.3
|
||||
"@volar/source-map": 1.0.3
|
||||
"@vue/compiler-dom": ^3.2.38
|
||||
"@vue/compiler-sfc": ^3.2.38
|
||||
"@vue/reactivity": ^3.2.38
|
||||
"@vue/shared": ^3.2.38
|
||||
"@volar/language-core": 1.0.8
|
||||
"@volar/source-map": 1.0.8
|
||||
"@vue/compiler-dom": ^3.2.40
|
||||
"@vue/compiler-sfc": ^3.2.40
|
||||
"@vue/reactivity": ^3.2.40
|
||||
"@vue/shared": ^3.2.40
|
||||
minimatch: ^5.1.0
|
||||
vue-template-compiler: ^2.7.10
|
||||
checksum: 954bc2fba46227a60cf7c716fa7a6a73622d7860087fb2e951b13992c46271e7ba5ac94d5eea6837cbb4b884fefa2d4c271469087c08aa31d9d14d2c9f69c43e
|
||||
checksum: 4dac8c85573c23ebde7cefcafbdd0f522fe38c27ed608b9b5ea3104127a00516e4cdcf42d68d661829f5f7c9f4ea7f369bd447f23f57027fe5367ce502ad96ad
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/vue-typescript@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "@volar/vue-typescript@npm:1.0.3"
|
||||
"@volar/vue-typescript@npm:1.0.8":
|
||||
version: 1.0.8
|
||||
resolution: "@volar/vue-typescript@npm:1.0.8"
|
||||
dependencies:
|
||||
"@volar/typescript": 1.0.3
|
||||
"@volar/vue-language-core": 1.0.3
|
||||
checksum: 9e89f6400548ed0cfbd94ddf465388082ce071f94c7572fa75a6ea31cd1edb6e139bdf9d4f626293c31a7997f9a2cd5e78ecc00f86bd679e577fcb4f936595d2
|
||||
"@volar/typescript": 1.0.8
|
||||
"@volar/vue-language-core": 1.0.8
|
||||
checksum: 4e694d4e0cb2d3cd1517780fa32f4aab9a6a7f1bf34ee1ebf3d9bcfc9fc015cf1ccf66ee3ddd7dc34c84ac3271da850cfb35df192ed525c2eed13cc938cbacdb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6649,25 +6652,25 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-core@npm:3.2.40":
|
||||
version: 3.2.40
|
||||
resolution: "@vue/compiler-core@npm:3.2.40"
|
||||
"@vue/compiler-core@npm:3.2.41":
|
||||
version: 3.2.41
|
||||
resolution: "@vue/compiler-core@npm:3.2.41"
|
||||
dependencies:
|
||||
"@babel/parser": ^7.16.4
|
||||
"@vue/shared": 3.2.40
|
||||
"@vue/shared": 3.2.41
|
||||
estree-walker: ^2.0.2
|
||||
source-map: ^0.6.1
|
||||
checksum: 2683bf13ef93701af1ca4850e887c8d4d67e5583b9c426fc2b08b5512df090bc464955f031cca9f52c11cc6ad49f1ab682011fdf3ba0b6c63b5ae8bea4e68c69
|
||||
checksum: ff794351be08dff85dcfa9eccf6d5f232464df7a397dedfd738907bfa43448f528c221f8cc7554ce1dc1606cac8047ab421ee06ea191a927b07a48e15ffc9fec
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-dom@npm:3.2.40, @vue/compiler-dom@npm:^3.2.38":
|
||||
version: 3.2.40
|
||||
resolution: "@vue/compiler-dom@npm:3.2.40"
|
||||
"@vue/compiler-dom@npm:3.2.41, @vue/compiler-dom@npm:^3.2.40":
|
||||
version: 3.2.41
|
||||
resolution: "@vue/compiler-dom@npm:3.2.41"
|
||||
dependencies:
|
||||
"@vue/compiler-core": 3.2.40
|
||||
"@vue/shared": 3.2.40
|
||||
checksum: d928a16ebdda9d91a579546d108c9399f8c9a5c9c976196cfefa32f10c0ecb3111233c3291ba05898def85fcfccdc71e3446b977a7cdbc0d47d5d47b0dac75a3
|
||||
"@vue/compiler-core": 3.2.41
|
||||
"@vue/shared": 3.2.41
|
||||
checksum: 463f73d935930046678b769aa5439bdc8cfd7d2b7c07cae54a0201c842e6327f2416119442e08a401edaf6dc3dd1dfe5d7a4ce7faa31559bf36ba064e5530fe5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6682,31 +6685,31 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-sfc@npm:^3.2.38":
|
||||
version: 3.2.40
|
||||
resolution: "@vue/compiler-sfc@npm:3.2.40"
|
||||
"@vue/compiler-sfc@npm:^3.2.40":
|
||||
version: 3.2.41
|
||||
resolution: "@vue/compiler-sfc@npm:3.2.41"
|
||||
dependencies:
|
||||
"@babel/parser": ^7.16.4
|
||||
"@vue/compiler-core": 3.2.40
|
||||
"@vue/compiler-dom": 3.2.40
|
||||
"@vue/compiler-ssr": 3.2.40
|
||||
"@vue/reactivity-transform": 3.2.40
|
||||
"@vue/shared": 3.2.40
|
||||
"@vue/compiler-core": 3.2.41
|
||||
"@vue/compiler-dom": 3.2.41
|
||||
"@vue/compiler-ssr": 3.2.41
|
||||
"@vue/reactivity-transform": 3.2.41
|
||||
"@vue/shared": 3.2.41
|
||||
estree-walker: ^2.0.2
|
||||
magic-string: ^0.25.7
|
||||
postcss: ^8.1.10
|
||||
source-map: ^0.6.1
|
||||
checksum: 96cbfd078ad9c5718afced84a1a46dfed87f61bb30ff50ebb929331470d11e672d6a090ad5766ff1e60a5287b7596be31f925af44b6b1bdf69b6f14e938ae7e2
|
||||
checksum: 0f13d9fa32602a8306df8a59d763c1bc4016cabf8399bcbc89e86c96eb1fd359bded6cd92595b54282fd9b2c5fd8888a39072d90ccc89e5f2a643198aeb94c60
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-ssr@npm:3.2.40":
|
||||
version: 3.2.40
|
||||
resolution: "@vue/compiler-ssr@npm:3.2.40"
|
||||
"@vue/compiler-ssr@npm:3.2.41":
|
||||
version: 3.2.41
|
||||
resolution: "@vue/compiler-ssr@npm:3.2.41"
|
||||
dependencies:
|
||||
"@vue/compiler-dom": 3.2.40
|
||||
"@vue/shared": 3.2.40
|
||||
checksum: 026461fcee54cf9968b1e12c32dada6dcde0a322919aa5a2c2e6e13cff7b6b2bdbc06860796895a8deef03ed1f8000e4320878576c498a1f218a62aa3e1c0bf6
|
||||
"@vue/compiler-dom": 3.2.41
|
||||
"@vue/shared": 3.2.41
|
||||
checksum: 119913dee2ecbda3a2201148fb534e76dd47a07cc14686c800808aa40ef8a4e49f8094954f02f7b1fcf58568ccfbfb1e61b3650cebd092ef00773a6649ab8db8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6728,32 +6731,32 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/reactivity-transform@npm:3.2.40":
|
||||
version: 3.2.40
|
||||
resolution: "@vue/reactivity-transform@npm:3.2.40"
|
||||
"@vue/reactivity-transform@npm:3.2.41":
|
||||
version: 3.2.41
|
||||
resolution: "@vue/reactivity-transform@npm:3.2.41"
|
||||
dependencies:
|
||||
"@babel/parser": ^7.16.4
|
||||
"@vue/compiler-core": 3.2.40
|
||||
"@vue/shared": 3.2.40
|
||||
"@vue/compiler-core": 3.2.41
|
||||
"@vue/shared": 3.2.41
|
||||
estree-walker: ^2.0.2
|
||||
magic-string: ^0.25.7
|
||||
checksum: b86fc29b52f2460801a3c820370104b734b33cc3a66dbe0ad389a00a62b7a1069121b1ef5dfa50ca3530cbfa98c158743eee0e25af54ca45806f9497757db8c0
|
||||
checksum: f4a1d3ea62bff4cdfa40ba8b29ca746f28c57cdee7bf013b30082630cd2246568bd9bbfb4afa29acfa06c653264c90c7fb9073aaac063068a981a0c2e49f7d15
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/reactivity@npm:^3.2.38":
|
||||
version: 3.2.40
|
||||
resolution: "@vue/reactivity@npm:3.2.40"
|
||||
"@vue/reactivity@npm:^3.2.40":
|
||||
version: 3.2.41
|
||||
resolution: "@vue/reactivity@npm:3.2.41"
|
||||
dependencies:
|
||||
"@vue/shared": 3.2.40
|
||||
checksum: 927d22b424b63a14234810a3b8e4e9127b7238a7cb2fbd749180279048a109348a29fc724fd9d636a6e09b5f4c902f71c789f081d3ab9b4473faedc6a03d7865
|
||||
"@vue/shared": 3.2.41
|
||||
checksum: 3cac74db336849898472010e44491360f04cda7b7ce654c8d9c1a0dff73705a15975442d2b050af44199245ace711d117ab39c19e7e97a9699a0b36d978355af
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/shared@npm:3.2.40, @vue/shared@npm:^3.2.38":
|
||||
version: 3.2.40
|
||||
resolution: "@vue/shared@npm:3.2.40"
|
||||
checksum: d91a1e12ffb106a444dcb42c0a54d39f6688f98151dc3b77e8da1e7d3cfd09e1761268d11e7f920f233b43162e727d06f3af4408ef59c53ac2dce9c1d2881511
|
||||
"@vue/shared@npm:3.2.41, @vue/shared@npm:^3.2.40":
|
||||
version: 3.2.41
|
||||
resolution: "@vue/shared@npm:3.2.41"
|
||||
checksum: 48f13e3eef2e77c06714f1594f971f6d3ba7df67420774d0d4732b540fc31c463ac1f363e1c753af033046b7b517a1a5b3b3d268978951e355ce6be3a4010db4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -19355,6 +19358,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "root@workspace:."
|
||||
dependencies:
|
||||
"@swc/core": ^1.2.222
|
||||
"@types/eslint": ^8.4.1
|
||||
commitizen: ^4.2.4
|
||||
cz-conventional-changelog: ^3.3.0
|
||||
@@ -21970,17 +21974,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"vue-tsc@npm:^1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "vue-tsc@npm:1.0.3"
|
||||
"vue-tsc@npm:^1.0.8":
|
||||
version: 1.0.8
|
||||
resolution: "vue-tsc@npm:1.0.8"
|
||||
dependencies:
|
||||
"@volar/vue-language-core": 1.0.3
|
||||
"@volar/vue-typescript": 1.0.3
|
||||
"@volar/vue-language-core": 1.0.8
|
||||
"@volar/vue-typescript": 1.0.8
|
||||
peerDependencies:
|
||||
typescript: "*"
|
||||
bin:
|
||||
vue-tsc: bin/vue-tsc.js
|
||||
checksum: 34e16a8f4c7d74110f7613805f4e55b3e7766db86898058d0dafdebf1ab1d8f2e0ae0acf21ef96cdf3e01555f13c7ed2e801b3a3c33507bf5c3b750053f7589f
|
||||
checksum: 0af760a9d25a4c0f24da9e6249acf28079ee5aa954544c08d69349aa5d2665dd721b33e919657a09cec9972aec34baa5b35797793b1019d0123b00a6d590f77e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user