| b69ab31 | | | 1 | /** |
| b69ab31 | | | 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| b69ab31 | | | 3 | * |
| b69ab31 | | | 4 | * This source code is licensed under the MIT license found in the |
| b69ab31 | | | 5 | * LICENSE file in the root directory of this source tree. |
| b69ab31 | | | 6 | */ |
| b69ab31 | | | 7 | |
| b69ab31 | | | 8 | import * as stylex from '@stylexjs/stylex'; |
| b69ab31 | | | 9 | import {Button} from 'isl-components/Button'; |
| b69ab31 | | | 10 | import {Tooltip} from 'isl-components/Tooltip'; |
| b69ab31 | | | 11 | import {t, T} from 'isl/src/i18n'; |
| b69ab31 | | | 12 | import serverApi from '../../isl/src/ClientToServerAPI'; |
| b69ab31 | | | 13 | |
| b69ab31 | | | 14 | const styles = stylex.create({ |
| b69ab31 | | | 15 | wideButton: { |
| b69ab31 | | | 16 | justifyContent: 'center', |
| b69ab31 | | | 17 | width: '200px', |
| b69ab31 | | | 18 | }, |
| b69ab31 | | | 19 | }); |
| b69ab31 | | | 20 | |
| b69ab31 | | | 21 | export default function AddMoreCwdsHint() { |
| b69ab31 | | | 22 | return ( |
| b69ab31 | | | 23 | <Tooltip |
| b69ab31 | | | 24 | title={t( |
| b69ab31 | | | 25 | 'ISL can switch between any repositories that are mounted VS Code workspace folders.\n\n' + |
| b69ab31 | | | 26 | 'Click to add another VS Code workspace folder.', |
| b69ab31 | | | 27 | )}> |
| b69ab31 | | | 28 | <Button |
| b69ab31 | | | 29 | xstyle={styles.wideButton} |
| b69ab31 | | | 30 | onClick={() => { |
| b69ab31 | | | 31 | serverApi.postMessage({ |
| b69ab31 | | | 32 | type: 'platform/executeVSCodeCommand', |
| b69ab31 | | | 33 | command: 'workbench.action.addRootFolder', |
| b69ab31 | | | 34 | args: [], |
| b69ab31 | | | 35 | }); |
| b69ab31 | | | 36 | }}> |
| b69ab31 | | | 37 | <T>Add Folder to Workspace</T> |
| b69ab31 | | | 38 | </Button> |
| b69ab31 | | | 39 | </Tooltip> |
| b69ab31 | | | 40 | ); |
| b69ab31 | | | 41 | } |