access+userpic-fix

This commit is contained in:
Untone 2024-03-05 16:07:14 +03:00
parent f8bf3d86a0
commit 4ed15f405e
4 changed files with 16 additions and 7 deletions

View File

@ -378,6 +378,7 @@
"There are unsaved changes in your profile settings. Are you sure you want to leave the page without saving?": "There are unsaved changes in your profile settings. Are you sure you want to leave the page without saving?", "There are unsaved changes in your profile settings. Are you sure you want to leave the page without saving?": "There are unsaved changes in your profile settings. Are you sure you want to leave the page without saving?",
"There are unsaved changes in your publishing settings. Are you sure you want to leave the page without saving?": "There are unsaved changes in your publishing settings. Are you sure you want to leave the page without saving?", "There are unsaved changes in your publishing settings. Are you sure you want to leave the page without saving?": "There are unsaved changes in your publishing settings. Are you sure you want to leave the page without saving?",
"This comment has not yet been rated": "This comment has not yet been rated", "This comment has not yet been rated": "This comment has not yet been rated",
"This content is not published yet": "This content is not published yet",
"This email is": "This email is", "This email is": "This email is",
"This email is not verified": "This email is not verified", "This email is not verified": "This email is not verified",
"This email is verified": "This email is verified", "This email is verified": "This email is verified",

View File

@ -148,6 +148,7 @@
"Enter the code or click the link from email to confirm": "Введите код из письма или пройдите по ссылке в письме для подтверждения регистрации", "Enter the code or click the link from email to confirm": "Введите код из письма или пройдите по ссылке в письме для подтверждения регистрации",
"Enter your new password": "Введите новый пароль", "Enter your new password": "Введите новый пароль",
"Enter": "Войти", "Enter": "Войти",
"This content is not published yet": "Содержимое ещё не опубликовано",
"Error": "Ошибка", "Error": "Ошибка",
"Please give us your email address": "Пожалуйста, укажите свою почту, чтобы получить ссылку для сброса пароля", "Please give us your email address": "Пожалуйста, укажите свою почту, чтобы получить ссылку для сброса пароля",
"Experience": "Личный опыт", "Experience": "Личный опыт",

View File

@ -51,10 +51,15 @@ const DialogAvatar = (props: Props) => {
<Show when={Boolean(props.url)} fallback={<div class={styles.letter}>{nameFirstLetter()}</div>}> <Show when={Boolean(props.url)} fallback={<div class={styles.letter}>{nameFirstLetter()}</div>}>
<div <div
class={styles.imageHolder} class={styles.imageHolder}
style={{ 'background-image': `url( style={{
${props.url.includes('discours.io') ? getImageUrl(props.url, { width: 40, height: 40 }) : props.url } 'background-image': `url(
)` ${
}} props.url.includes('discours.io')
? getImageUrl(props.url, { width: 40, height: 40 })
: props.url
}
)`,
}}
/> />
</Show> </Show>
</div> </div>

View File

@ -9,13 +9,15 @@ import { Shout } from '../graphql/schema/core.gen'
import { useRouter } from '../stores/router' import { useRouter } from '../stores/router'
import { router } from '../stores/router' import { router } from '../stores/router'
import { redirectPage } from '@nanostores/router'
import { useSnackbar } from '../context/snackbar'
import { LayoutType } from './types' import { LayoutType } from './types'
import { redirectPage } from "@nanostores/router";
const EditView = lazy(() => import('../components/Views/EditView/EditView')) const EditView = lazy(() => import('../components/Views/EditView/EditView'))
export const EditPage = () => { export const EditPage = () => {
const { page } = useRouter() const { page } = useRouter()
const snackbar = useSnackbar()
const { t } = useLocalize() const { t } = useLocalize()
const shoutId = createMemo(() => Number((page().params as Record<'shoutId', string>).shoutId)) const shoutId = createMemo(() => Number((page().params as Record<'shoutId', string>).shoutId))
@ -27,8 +29,8 @@ export const EditPage = () => {
console.log(loadedShout) console.log(loadedShout)
if (loadedShout) { if (loadedShout) {
setShout(loadedShout) setShout(loadedShout)
} } else {
else { await snackbar?.showSnackbar({ type: 'error', body: t('This content is not published yet') })
redirectPage(router, 'drafts') redirectPage(router, 'drafts')
} }
}) })