-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
杨国璇
authored and
杨国璇
committed
Nov 7, 2024
1 parent
963bf32
commit 6c7b07b
Showing
51 changed files
with
3,383 additions
and
1,525 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...onents/popover/add-list-popover/index.css → ...ver/kanban-add-category-popover/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React, { useCallback } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { SeahubSelect } from '../../components/common/select'; | ||
|
||
const Selector = ({ options, settingKey, value, defaultValue, onChange }) => { | ||
|
||
const handelOnChange = useCallback((option) => { | ||
const newValue = option.value; | ||
if (newValue === value) return; | ||
onChange(settingKey, newValue); | ||
}, [settingKey, value, onChange]); | ||
|
||
let selectedOption = options.find(option => option.value === value); | ||
if (!selectedOption && defaultValue) { | ||
options.find(option => option.value === defaultValue); | ||
} | ||
|
||
return ( | ||
<SeahubSelect | ||
classNamePrefix="sf-metadata-setting-selector" | ||
value={selectedOption} | ||
options={options} | ||
onChange={handelOnChange} | ||
menuPortalTarget="sf-metadata-view-setting-panel" | ||
/> | ||
); | ||
}; | ||
|
||
Selector.propTypes = { | ||
settingKey: PropTypes.string, | ||
value: PropTypes.string, | ||
options: PropTypes.array.isRequired, | ||
onChange: PropTypes.func, | ||
}; | ||
|
||
export default Selector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.sf-metadata-view-setting-panel .sf-metadata-setting-divide-line { | ||
width: 100%; | ||
height: 1px; | ||
margin-bottom: 14px; | ||
background-color: #eee; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
frontend/src/metadata/third-party/trello-smooth-dnd/constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export const containerInstance = 'smooth-dnd-container-instance'; | ||
export const containersInDraggable = 'smooth-dnd-containers-in-draggable'; | ||
|
||
export const defaultGroupName = '@@smooth-dnd-default-group@@'; | ||
export const wrapperClass = 'smooth-dnd-draggable-wrapper'; | ||
export const defaultGrabHandleClass = 'smooth-dnd-default-grap-handle'; | ||
export const animationClass = 'animated'; | ||
export const translationValue = '__smooth_dnd_draggable_translation_value'; | ||
export const visibilityValue = '__smooth_dnd_draggable_visibility_value'; | ||
export const ghostClass = 'smooth-dnd-ghost'; | ||
|
||
export const containerClass = 'smooth-dnd-container'; | ||
|
||
export const extraSizeForInsertion = 'smooth-dnd-extra-size-for-insertion'; | ||
export const stretcherElementClass = 'smooth-dnd-stretcher-element'; | ||
export const stretcherElementInstance = 'smooth-dnd-stretcher-instance'; | ||
|
||
export const isDraggableDetached = 'smoth-dnd-is-draggable-detached'; | ||
|
||
export const disbaleTouchActions = 'smooth-dnd-disable-touch-action'; | ||
export const noUserSelectClass = 'smooth-dnd-no-user-select'; |
Oops, something went wrong.