-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Добавить новый пользовательский функционал #443
Draft
Zamelane
wants to merge
18
commits into
notifications-tg
Choose a base branch
from
new-user-functional
base: notifications-tg
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,034
−153
Draft
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
997ab12
Набросать редактирование пользователя
Zamelane f41f142
WIP
Zamelane afefdc1
Изменения перед миграцией
Zamelane 5e360f2
Обновить @vkontakte/vkui до 7.0.0
Zamelane 6c42a97
Добавить принудительное редактирование схемы таблиц
Zamelane 4d70249
Добавить аккуратно редактирование схемы таблиц
Zamelane c0164dc
fix: a bit UI fixes
scffs 81cd390
fix: a bit UI fixes
scffs 907baa1
WIP
Kopchan aa4f2bd
Заготовка магазина и рабочие фильтры
Zamelane 2a0c89b
Заготовка магазина и рабочие фильтры
Zamelane b394b6c
Подготовка магазина
Zamelane 55687c6
lint
scffs 00ee886
deps
scffs 6eb427f
WIP
Zamelane 38ca018
WIP
Zamelane b76ddea
WIP
Zamelane dedaf0a
WIP
Zamelane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Набросать редактирование пользователя
commit 997ab128a6a668e5c1f047358b98addbfe8717f2
There are no files selected for viewing
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
58 changes: 58 additions & 0 deletions
58
apps/web/src/app/AppWrapper/App/ModalRoot/modals/UserEditModal/index.tsx
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,58 @@ | ||
import { | ||
Avatar, | ||
Flex, | ||
Group, | ||
Header, | ||
ModalPage, | ||
ModalPageHeader, | ||
Separator, | ||
SimpleCell, | ||
Spacing | ||
} from '@vkontakte/vkui' | ||
import { useUserEditModal } from '../../../../../../store/userEditModal' | ||
const urls = [ | ||
'https://mangabuff.ru/img/avatars/x150/806.gif', | ||
'https://mangabuff.ru/img/avatars/x150/1209.gif', | ||
'https://mangabuff.ru/img/avatars/x150/689.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/688.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/685.gif', | ||
'https://mangabuff.ru/img/avatars/x150/682.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/476.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/477.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/478.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/479.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/480.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/482.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/483.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/484.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/485.jpg', | ||
'https://mangabuff.ru/img/avatars/x150/652.jpg' | ||
] | ||
|
||
const UserEditModal = ({ id }: { id: string }) => { | ||
const { modalData } = useUserEditModal() | ||
return ( | ||
<ModalPage id={id} size={500} dynamicContentHeight> | ||
<ModalPageHeader>Сменить аву</ModalPageHeader> | ||
<Group> | ||
<Group header={<Header mode='secondary'>Текущая ава</Header>}> | ||
<SimpleCell before={<Avatar src={urls[0]} />}> | ||
{modalData.name} | ||
</SimpleCell> | ||
</Group> | ||
|
||
<Spacing size={24}> | ||
<Separator /> | ||
</Spacing> | ||
|
||
<Flex margin='auto' gap='2xl' justify='center'> | ||
{urls.map((url, index) => ( | ||
<Avatar key={index} size={110} src={url} /> | ||
))} | ||
</Flex> | ||
</Group> | ||
</ModalPage> | ||
) | ||
} | ||
|
||
export default UserEditModal |
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,23 @@ | ||
import { useSyncExternalStore } from 'react' | ||
|
||
import { createStore } from '../store' | ||
|
||
interface ModalProps { | ||
name: string | ||
} | ||
|
||
// TODO: add data | ||
const modalStore = createStore<ModalProps>({ | ||
initialState: { | ||
name: '' | ||
} | ||
}) | ||
|
||
export const useUserEditModal = () => { | ||
const modal = useSyncExternalStore(modalStore.subscribe, modalStore.getState) | ||
|
||
return { | ||
modalData: modal, | ||
setData: (data: ModalProps) => modalStore.setState(data) | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
создай мб файлик/папку config и давай туда вынесем