Skip to content

Commit

Permalink
Merge pull request #1 from Zextras/licensing-fix
Browse files Browse the repository at this point in the history
Licensing fix, CODEOWNERS, fix of chatbar naming
  • Loading branch information
zovomat authored Jan 11, 2022
2 parents bc3a0fd + e074e4d commit 43c51df
Show file tree
Hide file tree
Showing 6 changed files with 247 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Zextras/the-dexters
235 changes: 235 additions & 0 deletions COPYING

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const FOLDERS = {
export const SHELL_APP_ID = 'carbonio-shell-ui';
export const SETTINGS_APP_ID = 'settings';
export const SEARCH_APP_ID = 'search';
export const TEAM_APP_ID = 'carbonio-chats-ui';
export const CHATS_APP_ID = 'carbonio-chats-ui';
export const ACTION_TYPES = {
CONVERSATION: 'conversation',
CONVERSATION_lIST: 'conversation_list',
Expand Down
12 changes: 6 additions & 6 deletions src/shell/shell-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useAppStore } from '../store/app/store';
import AppContextProvider from '../boot/app/app-context-provider';
import { useUserAccount, useUserSettings } from '../store/account/hooks';
import { useAccountStore } from '../store/account/store';
import { TEAM_APP_ID } from '../constants';
import { CHATS_APP_ID } from '../constants';

const Background = styled.div`
background: ${({ theme }) => theme.palette.gray6.regular};
Expand Down Expand Up @@ -58,7 +58,7 @@ export function Shell() {
const [chatPanelMode, setChatPanelMode] = useState('closed'); // values: 'closed', 'overlap', 'open'
const [navOpen, setNavOpen] = useState(true);
const [mobileNavOpen, setMobileNavOpen] = useState(false);
const TeamViews = useAppStore((state) => state.apps[TEAM_APP_ID]?.views?.teambar);
const ChatsViews = useAppStore((state) => state.apps[CHATS_APP_ID]?.views?.chatbar);

useEffect(() => {
setNavOpen((n) => !(n && chatPanelMode === 'open'));
Expand All @@ -71,7 +71,7 @@ export function Shell() {
mobileNavIsOpen={mobileNavOpen}
onMobileMenuClick={() => setMobileNavOpen(!mobileNavOpen)}
>
{TeamViews && <TeamViews.icon mode={chatPanelMode} setMode={setChatPanelMode} />}
{ChatsViews && <ChatsViews.icon mode={chatPanelMode} setMode={setChatPanelMode} />}
</ShellHeader>
<Row crossAlignment="unset" style={{ position: 'relative', flexGrow: '1' }}>
<ShellNavigationBar
Expand All @@ -80,10 +80,10 @@ export function Shell() {
onCollapserClick={() => setNavOpen(!navOpen)}
/>
<AppViewContainer />
{TeamViews && (
<AppContextProvider pkg={TEAM_APP_ID}>
{ChatsViews && (
<AppContextProvider pkg={CHATS_APP_ID}>
<ShellMenuPanel mode={chatPanelMode} setMode={setChatPanelMode}>
<TeamViews.sidebar mode={chatPanelMode} setMode={setChatPanelMode} />
<ChatsViews.sidebar mode={chatPanelMode} setMode={setChatPanelMode} />
</ShellMenuPanel>
</AppContextProvider>
)}
Expand Down
2 changes: 1 addition & 1 deletion types/apps/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type RuntimeAppData = Partial<{
settings?: Component | FunctionComponent;
search?: Component | FunctionComponent;
sidebar?: Component | FunctionComponent;
teambar?: {
chatbar?: {
icon: Component | FunctionComponent;
sidebar: Component | FunctionComponent;
};
Expand Down

0 comments on commit 43c51df

Please sign in to comment.