@rpg-engine/long-bow 0.8.124 → 0.8.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +6 -22
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +6 -22
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Friends/FriendList.tsx +42 -79
package/dist/long-bow.esm.js
CHANGED
|
@@ -30920,7 +30920,7 @@ var FriendList = function FriendList(_ref) {
|
|
|
30920
30920
|
var _useState = useState(''),
|
|
30921
30921
|
characterName = _useState[0],
|
|
30922
30922
|
setCharacterName = _useState[1];
|
|
30923
|
-
var _useState2 = useState('friends'),
|
|
30923
|
+
var _useState2 = useState(friends.length > 0 ? 'friends' : 'search'),
|
|
30924
30924
|
activeTab = _useState2[0],
|
|
30925
30925
|
setActiveTab = _useState2[1];
|
|
30926
30926
|
useEffect(function () {
|
|
@@ -30944,7 +30944,7 @@ var FriendList = function FriendList(_ref) {
|
|
|
30944
30944
|
onSearch(characterName);
|
|
30945
30945
|
}
|
|
30946
30946
|
};
|
|
30947
|
-
var friendsTabContent =
|
|
30947
|
+
var friendsTabContent = React.createElement(ScrollableArea, null, React.createElement(Table, null, React.createElement("thead", null, React.createElement(TableRow, null, React.createElement(TableHeader, null, "Online"), React.createElement(TableHeader, null, "Name"), React.createElement(TableHeader, null, "Actions"))), React.createElement("tbody", null, friends.map(function (friend) {
|
|
30948
30948
|
return React.createElement(TableRow, {
|
|
30949
30949
|
key: friend._id
|
|
30950
30950
|
}, React.createElement(TableCell, null, React.createElement(IsOnlineBadge, {
|
|
@@ -30960,11 +30960,7 @@ var FriendList = function FriendList(_ref) {
|
|
|
30960
30960
|
return onRemoveFriend(friend);
|
|
30961
30961
|
}
|
|
30962
30962
|
}, "Remove"))));
|
|
30963
|
-
}))))
|
|
30964
|
-
onClick: function onClick() {
|
|
30965
|
-
return setActiveTab('search');
|
|
30966
|
-
}
|
|
30967
|
-
}, "Add your first friend"));
|
|
30963
|
+
}))));
|
|
30968
30964
|
var searchTabContent = React.createElement(ListContainer$1, null, React.createElement(SearchForm, {
|
|
30969
30965
|
onSubmit: handleSubmit
|
|
30970
30966
|
}, React.createElement(SearchInput, {
|
|
@@ -30988,11 +30984,11 @@ var FriendList = function FriendList(_ref) {
|
|
|
30988
30984
|
onAccept: onAcceptRequest,
|
|
30989
30985
|
onReject: onRejectRequest
|
|
30990
30986
|
}));
|
|
30991
|
-
var tabs = [{
|
|
30987
|
+
var tabs = [].concat(friends.length > 0 ? [{
|
|
30992
30988
|
id: 'friends',
|
|
30993
30989
|
title: "Friends (" + friends.length + ")",
|
|
30994
30990
|
content: friendsTabContent
|
|
30995
|
-
}, {
|
|
30991
|
+
}] : [], [{
|
|
30996
30992
|
id: 'search',
|
|
30997
30993
|
title: 'Search',
|
|
30998
30994
|
content: searchTabContent
|
|
@@ -31000,7 +30996,7 @@ var FriendList = function FriendList(_ref) {
|
|
|
31000
30996
|
id: 'requests',
|
|
31001
30997
|
title: "Requests (" + friendRequests.length + ")",
|
|
31002
30998
|
content: requestsTabContent
|
|
31003
|
-
}];
|
|
30999
|
+
}]);
|
|
31004
31000
|
return React.createElement(ListWrapper, null, React.createElement(InternalTabs, {
|
|
31005
31001
|
tabs: tabs,
|
|
31006
31002
|
activeTab: activeTab,
|
|
@@ -31089,18 +31085,6 @@ var EmptyMessage = /*#__PURE__*/styled.p.withConfig({
|
|
|
31089
31085
|
displayName: "FriendList__EmptyMessage",
|
|
31090
31086
|
componentId: "sc-3jf9vt-9"
|
|
31091
31087
|
})(["text-align:center;color:#888;padding:1rem;font-size:", ";"], uiFonts.size.small);
|
|
31092
|
-
var EmptyStateContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31093
|
-
displayName: "FriendList__EmptyStateContainer",
|
|
31094
|
-
componentId: "sc-3jf9vt-10"
|
|
31095
|
-
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;gap:1rem;"]);
|
|
31096
|
-
var EmptyStateText = /*#__PURE__*/styled.p.withConfig({
|
|
31097
|
-
displayName: "FriendList__EmptyStateText",
|
|
31098
|
-
componentId: "sc-3jf9vt-11"
|
|
31099
|
-
})(["text-align:center;color:#888;font-size:", ";margin:0;"], uiFonts.size.small);
|
|
31100
|
-
var AddFriendCTA = /*#__PURE__*/styled.button.withConfig({
|
|
31101
|
-
displayName: "FriendList__AddFriendCTA",
|
|
31102
|
-
componentId: "sc-3jf9vt-12"
|
|
31103
|
-
})(["background-color:", ";color:#000;border:none;padding:0.5rem 1rem;font-size:", ";cursor:pointer;border-radius:4px;transition:opacity 0.2s;&:hover{opacity:0.8;}"], uiColors.lightGreen, uiFonts.size.small);
|
|
31104
31088
|
|
|
31105
31089
|
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
31106
31090
|
|