Skip to content
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
wants to merge 18 commits into
base: notifications-tg
Choose a base branch
from

Conversation

Zamelane
Copy link
Collaborator

@Zamelane Zamelane commented Dec 1, 2024

Реализовать:

  • изменение аватарок
  • просмотр студентов, получивших оценку на таске, с отображением их оценки и авы
  • просмотр профиля пользователя при нажатии на аву
  • просмотр информации об учебном заведении
  • список устройств и их управление в подписчиках уведомлений (типа какие аккаунты телеграмм подписаны + отменить подписку для них)

@Zamelane Zamelane added api web hard Повышенный уровень сложности self-feature Фича, которой нет в оригинальном дневнике labels Dec 1, 2024
@Zamelane Zamelane self-assigned this Dec 1, 2024
@scffs scffs self-assigned this Dec 2, 2024
import { Icon16DoneCircle, Icon56MarketOutline } from '@vkontakte/icons'
import { useState } from 'react'

const urls = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

создай мб файлик/папку config и давай туда вынесем

]

const UserEditModal = ({ id }: { id: string }) => {
const [selectAva, setSelectAva] = useState(urls[0])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ну, это надо хранить в бд, мы оба понимаем

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

или хотя бы в кеше*)

<Flex margin='auto' gap='2xl' justify='center'>
{urls.map((url, index) => (
<Avatar
key={index}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key={url} ?

size={110}
src={url}
onClick={() => selectCurrAva(url)}
className={selectAva === url ? 'select-avatar' : ''}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
className={selectAva === url ? 'select-avatar' : ''}
className={selectAva === url ? 'select-avatar' : undefined}


<Group header={<Header mode='secondary'>Мои аватарки</Header>}>
<Flex margin='auto' gap='2xl' justify='center'>
{urls.map((url, index) => (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{urls.map((url, index) => (
{urls.map((url) => (

closeModal: () => void
}

const avaTypes = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай вынесем в файлик какой-нибудь config или около того

pictured: ['Не важно', 'Парень', 'Девушка']
}

const filtersModal: FC<Props> = ({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const filtersModal: FC<Props> = ({
const FiltersModal: FC<Props> = ({

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • файл переименовать

setSelectedPictured(value)
}

const platform = usePlatform()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а если запущено в браузере?

} from '@vkontakte/vkui'
import { useState } from 'react'

const urls = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если эти ссылки дублируются, то можно их куда-то в apps/web/shared унести

import FiltersModal from './components/filtersModal.tsx'
import MarketHeader from './components/marketHeader.tsx'

const urls = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если эти ссылки дублируются, то можно их куда-то в apps/web/shared унести


// REMOVE IT
// ?
export type AvatarModelType = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

уже есть такой тип в shared


// REMOVE IT
// ?
export type AvatarTagModelType = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вынести в shared, если ещё не там (если есть необходимость использовать на фронте)

type IAvatarsFromDB = IAvatarModelType & {
avatarTags: (IAvatarTagModelType & {
tag: ITagModelType
})[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array<> ?

@@ -23,11 +25,15 @@ const localFetcher = async (
}
} catch {}

if (!result) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а это вроде не надо нам

"date-fns": "^3.6.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"bun": "^1.1.34"
"react-virtualized": "^9.22.5"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это кто

offset: number
}

const url = `${API_URL}/uploads/avatars/`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вынести в config

} from '@vkontakte/vkui'
import { type FC, useState } from 'react'

const urls = ['https://mangabuff.ru/img/avatars/x150/806.gif']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вынести

}

export const HeaderPanel: FC<Props> = ({ isLoading, isError }) => {
const [selectAva] = useState(urls[0])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

точно ли тебе нужен state без второй функции?

before={<Icon28Notifications />}
onClick={async () =>
window.open(
`${TG_BOT_URL}?text=/subscribe ${await getSecureToken()}`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ссылку в конфиг вынести, + обсуждали, что лучше через ?start=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api hard Повышенный уровень сложности self-feature Фича, которой нет в оригинальном дневнике web
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants