mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-29 17:06:58 +00:00
Fix typo and format
This commit is contained in:
parent
e9d713e65b
commit
0887998461
@ -160,7 +160,7 @@ const getSaveExistingDocumentButtonState = (editorState: ViewModels.DocumentExpl
|
||||
})(),
|
||||
});
|
||||
|
||||
const getDiscardExisitingDocumentChangesButtonState = (editorState: ViewModels.DocumentExplorerState) => ({
|
||||
const getDiscardExistingDocumentChangesButtonState = (editorState: ViewModels.DocumentExplorerState) => ({
|
||||
enabled: (() => {
|
||||
switch (editorState) {
|
||||
case ViewModels.DocumentExplorerState.exisitingDocumentDirtyInvalid:
|
||||
@ -183,7 +183,7 @@ const getDiscardExisitingDocumentChangesButtonState = (editorState: ViewModels.D
|
||||
})(),
|
||||
});
|
||||
|
||||
const getDeleteExisitingDocumentButtonState = (
|
||||
const getDeleteExistingDocumentButtonState = (
|
||||
editorState: ViewModels.DocumentExplorerState,
|
||||
selectedRows: Set<TableRowId>,
|
||||
) => ({
|
||||
@ -220,8 +220,8 @@ type ButtonsDependencies = {
|
||||
onSaveNewDocumentClick: UiKeyboardEvent;
|
||||
onRevertNewDocumentClick: UiKeyboardEvent;
|
||||
onSaveExistingDocumentClick: UiKeyboardEvent;
|
||||
onRevertExisitingDocumentClick: UiKeyboardEvent;
|
||||
onDeleteExisitingDocumentsClick: UiKeyboardEvent;
|
||||
onRevertExistingDocumentClick: UiKeyboardEvent;
|
||||
onDeleteExistingDocumentsClick: UiKeyboardEvent;
|
||||
};
|
||||
|
||||
const getTabsButtons = ({
|
||||
@ -233,8 +233,8 @@ const getTabsButtons = ({
|
||||
onSaveNewDocumentClick,
|
||||
onRevertNewDocumentClick,
|
||||
onSaveExistingDocumentClick,
|
||||
onRevertExisitingDocumentClick,
|
||||
onDeleteExisitingDocumentsClick,
|
||||
onRevertExistingDocumentClick,
|
||||
onDeleteExistingDocumentsClick,
|
||||
}: ButtonsDependencies): CommandButtonComponentProps[] => {
|
||||
if (configContext.platform === Platform.Fabric && userContext.fabricContext?.isReadOnly) {
|
||||
// All the following buttons require write access
|
||||
@ -307,34 +307,34 @@ const getTabsButtons = ({
|
||||
});
|
||||
}
|
||||
|
||||
if (getDiscardExisitingDocumentChangesButtonState(editorState).visible) {
|
||||
if (getDiscardExistingDocumentChangesButtonState(editorState).visible) {
|
||||
const label = "Discard";
|
||||
buttons.push({
|
||||
iconSrc: DiscardIcon,
|
||||
iconAlt: label,
|
||||
keyboardAction: KeyboardAction.CANCEL_OR_DISCARD,
|
||||
onCommandClick: onRevertExisitingDocumentClick,
|
||||
onCommandClick: onRevertExistingDocumentClick,
|
||||
commandButtonLabel: label,
|
||||
ariaLabel: label,
|
||||
hasPopup: false,
|
||||
disabled:
|
||||
!getDiscardExisitingDocumentChangesButtonState(editorState).enabled ||
|
||||
!getDiscardExistingDocumentChangesButtonState(editorState).enabled ||
|
||||
useSelectedNode.getState().isQueryCopilotCollectionSelected(),
|
||||
});
|
||||
}
|
||||
|
||||
if (getDeleteExisitingDocumentButtonState(editorState, selectedRows).visible) {
|
||||
if (getDeleteExistingDocumentButtonState(editorState, selectedRows).visible) {
|
||||
const label = "Delete";
|
||||
buttons.push({
|
||||
iconSrc: DeleteDocumentIcon,
|
||||
iconAlt: label,
|
||||
keyboardAction: KeyboardAction.DELETE_ITEM,
|
||||
onCommandClick: onDeleteExisitingDocumentsClick,
|
||||
onCommandClick: onDeleteExistingDocumentsClick,
|
||||
commandButtonLabel: label,
|
||||
ariaLabel: label,
|
||||
hasPopup: false,
|
||||
disabled:
|
||||
!getDeleteExisitingDocumentButtonState(editorState, selectedRows).enabled ||
|
||||
!getDeleteExistingDocumentButtonState(editorState, selectedRows).enabled ||
|
||||
useSelectedNode.getState().isQueryCopilotCollectionSelected(),
|
||||
});
|
||||
}
|
||||
@ -523,8 +523,8 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
onSaveNewDocumentClick,
|
||||
onRevertNewDocumentClick,
|
||||
onSaveExistingDocumentClick,
|
||||
onRevertExisitingDocumentClick,
|
||||
onDeleteExisitingDocumentsClick,
|
||||
onRevertExistingDocumentClick,
|
||||
onDeleteExistingDocumentsClick,
|
||||
});
|
||||
}, []);
|
||||
|
||||
@ -722,7 +722,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
.finally(() => setIsExecuting(false));
|
||||
}, [onExecutionErrorChange, tabTitle, selectedDocumentContent, _collection, partitionKey, documentIds, clickedRow]);
|
||||
|
||||
const onRevertExisitingDocumentClick = useCallback((): void => {
|
||||
const onRevertExistingDocumentClick = useCallback((): void => {
|
||||
setSelectedDocumentContentBaseline(initialDocumentContent);
|
||||
// this.initialDocumentContent.valueHasMutated();
|
||||
setSelectedDocumentContent(selectedDocumentContentBaseline);
|
||||
@ -810,7 +810,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
[onExecutionErrorChange, _deleteDocuments, documentIds],
|
||||
);
|
||||
|
||||
const onDeleteExisitingDocumentsClick = useCallback(async (): Promise<void> => {
|
||||
const onDeleteExistingDocumentsClick = useCallback(async (): Promise<void> => {
|
||||
// const selectedDocumentId = this.selectedDocumentId();
|
||||
|
||||
// TODO: Rework this for localization
|
||||
@ -848,8 +848,8 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
onSaveNewDocumentClick,
|
||||
onRevertNewDocumentClick,
|
||||
onSaveExistingDocumentClick,
|
||||
onRevertExisitingDocumentClick,
|
||||
onDeleteExisitingDocumentsClick,
|
||||
onRevertExistingDocumentClick: onRevertExistingDocumentClick,
|
||||
onDeleteExistingDocumentsClick: onDeleteExistingDocumentsClick,
|
||||
}),
|
||||
[
|
||||
_collection,
|
||||
@ -860,8 +860,8 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
onSaveNewDocumentClick,
|
||||
onRevertNewDocumentClick,
|
||||
onSaveExistingDocumentClick,
|
||||
onRevertExisitingDocumentClick,
|
||||
onDeleteExisitingDocumentsClick,
|
||||
onRevertExistingDocumentClick,
|
||||
onDeleteExistingDocumentsClick,
|
||||
],
|
||||
);
|
||||
|
||||
@ -1825,4 +1825,4 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
</div>
|
||||
</FluentProvider>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ const appThemePortalBrandRamp: BrandVariants = {
|
||||
160: "#CDD8EF",
|
||||
};
|
||||
|
||||
export function getPlatformTheme (platform: Platform) : Theme {
|
||||
export function getPlatformTheme(platform: Platform): Theme {
|
||||
if (platform === Platform.Fabric) {
|
||||
return createLightTheme(appThemeFabricTealBrandRamp);
|
||||
} else {
|
||||
|
@ -209,22 +209,22 @@ export const appThemeFabric: Theme = createTheme({
|
||||
});
|
||||
|
||||
export const appThemeFabricTealBrandRamp: BrandVariants = {
|
||||
10: '#001919',
|
||||
20: '#012826',
|
||||
30: '#01322E',
|
||||
40: '#033f38',
|
||||
50: '#054d43',
|
||||
60: '#0a5c50',
|
||||
70: '#0c695a',
|
||||
80: '#117865',
|
||||
90: '#1f937e',
|
||||
100: '#2aaC94',
|
||||
110: '#3abb9f',
|
||||
120: '#52c7aa',
|
||||
130: '#78d3b9',
|
||||
140: '#9ee0cb',
|
||||
150: '#c0ecdd',
|
||||
160: '#e3f7ef',
|
||||
10: "#001919",
|
||||
20: "#012826",
|
||||
30: "#01322E",
|
||||
40: "#033f38",
|
||||
50: "#054d43",
|
||||
60: "#0a5c50",
|
||||
70: "#0c695a",
|
||||
80: "#117865",
|
||||
90: "#1f937e",
|
||||
100: "#2aaC94",
|
||||
110: "#3abb9f",
|
||||
120: "#52c7aa",
|
||||
130: "#78d3b9",
|
||||
140: "#9ee0cb",
|
||||
150: "#c0ecdd",
|
||||
160: "#e3f7ef",
|
||||
};
|
||||
|
||||
export const appThemeFabricV9 = createLightTheme(appThemeFabricTealBrandRamp);
|
Loading…
Reference in New Issue
Block a user