Tag¶
Cards List¶
-
class
TagList
(props)¶ Tag card list component
-
TagList.
getTags
()¶ Get tags info from API
-
TagList.
handleDeleteTag
(tag_id, event)¶ Make delete tag request of API
- Arguments
tag_id (*) – Tag ID
event (*) – Event Data
-
-
TagGrid
(props)¶ Tag card grid component
- Arguments
props (*) – Properties
- Returns
Grid component
-
TagCard
(props)¶ Tag card component
- Arguments
props (*) – Properties
- Returns
Card component
-
getTagLink
(tagName)¶ Map tag name to URL
- Arguments
tagName (*) – Subject tag name
- Returns
Tag URL
New Tag Card¶
View/Edit Tag¶
-
class
TagView
(props)¶ Tag View card
-
TagView.
componentDidMount
()¶ Get tag info from API on load
-
TagView.
getTag
(error_toast=true)¶ Get tag info from API
- Arguments
error_toast (*) – Whether to show toast on network error
-
TagView.
handleAdd
()¶ Validate input, make tag part add request of API
- Returns
Nothing
-
TagView.
handleChangeAddType
(type)¶ Handle adding type drop down change
- Arguments
type (*) –
-
TagView.
handleCheckChange
(event)¶ Handle checkbox state changes, make network updates
- Arguments
event (*) – Event data
-
TagView.
handleInputChange
(event)¶ Handle input box state changes
- Arguments
event (*) – Event data
-
TagView.
handleRemoveObj
(music_obj, addType, event)¶ Handle remove watched part
- Arguments
music_obj (*) – Subject object to remove
addType (*) – Object type (tracks/albums/artists)
event (*) – Event data
-
TagView.
handleRun
(event)¶ Validate input and make tag refresh update of API
- Arguments
event (*) –
-
TagView.
makeNetworkUpdate
(changes)¶ Put tag info changes to API
- Arguments
changes (*) – Dictionary of changes to submit
-