Release the Share Link feature (#5228)
* WIP: Release the Share Link feature Fixes #5227 * Clean up
This commit is contained in:
@ -19,7 +19,6 @@ import { commandBarActor } from 'machines/commandBarMachine'
|
|||||||
import { useSelector } from '@xstate/react'
|
import { useSelector } from '@xstate/react'
|
||||||
import { copyFileShareLink } from 'lib/links'
|
import { copyFileShareLink } from 'lib/links'
|
||||||
import { useSettingsAuthContext } from 'hooks/useSettingsAuthContext'
|
import { useSettingsAuthContext } from 'hooks/useSettingsAuthContext'
|
||||||
import { IS_NIGHTLY_OR_DEBUG } from 'routes/Settings'
|
|
||||||
import { useToken } from 'machines/appMachine'
|
import { useToken } from 'machines/appMachine'
|
||||||
|
|
||||||
const ProjectSidebarMenu = ({
|
const ProjectSidebarMenu = ({
|
||||||
@ -194,7 +193,7 @@ function ProjectMenuPopover({
|
|||||||
id: 'share-link',
|
id: 'share-link',
|
||||||
Element: 'button',
|
Element: 'button',
|
||||||
children: 'Share current part (via Zoo link)',
|
children: 'Share current part (via Zoo link)',
|
||||||
disabled: !(IS_NIGHTLY_OR_DEBUG && findCommand(shareCommandInfo)),
|
disabled: !findCommand(shareCommandInfo),
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await copyFileShareLink({
|
await copyFileShareLink({
|
||||||
token: token ?? '',
|
token: token ?? '',
|
||||||
|
@ -6,7 +6,6 @@ import { FILE_EXT } from './constants'
|
|||||||
import { UnitLength_type } from '@kittycad/lib/dist/types/src/models'
|
import { UnitLength_type } from '@kittycad/lib/dist/types/src/models'
|
||||||
import { reportRejection } from './trap'
|
import { reportRejection } from './trap'
|
||||||
import { IndexLoaderData } from './types'
|
import { IndexLoaderData } from './types'
|
||||||
import { IS_NIGHTLY_OR_DEBUG } from 'routes/Settings'
|
|
||||||
import { copyFileShareLink } from './links'
|
import { copyFileShareLink } from './links'
|
||||||
|
|
||||||
interface OnSubmitProps {
|
interface OnSubmitProps {
|
||||||
@ -137,7 +136,6 @@ export function kclCommands(commandProps: KclCommandConfig): Command[] {
|
|||||||
{
|
{
|
||||||
name: 'share-file-link',
|
name: 'share-file-link',
|
||||||
displayName: 'Share current part (via Zoo link)',
|
displayName: 'Share current part (via Zoo link)',
|
||||||
hide: IS_NIGHTLY_OR_DEBUG ? undefined : 'desktop',
|
|
||||||
description: 'Create a link that contains a copy of the current file.',
|
description: 'Create a link that contains a copy of the current file.',
|
||||||
groupId: 'code',
|
groupId: 'code',
|
||||||
needsReview: false,
|
needsReview: false,
|
||||||
|
Reference in New Issue
Block a user