diff --git a/public/icons/arrow-left.svg b/public/icons/arrow-left.svg
new file mode 100644
index 00000000..ff4bf063
--- /dev/null
+++ b/public/icons/arrow-left.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json
index e23bb13c..7e980854 100644
--- a/public/locales/en/translation.json
+++ b/public/locales/en/translation.json
@@ -2,6 +2,7 @@
"...subscribing": "...subscribing",
"About myself": "About myself",
"About the project": "About the project",
+ "Add a few topics so that the reader knows what your content is about and can find it on pages of topics that interest them. Topics can be swapped, the first topic becomes the title": "Add a few topics so that the reader knows what your content is about and can find it on pages of topics that interest them. Topics can be swapped, the first topic becomes the title",
"Add another image": "Add another image",
"Add audio": "Add audio",
"Add comment": "Comment",
@@ -29,6 +30,7 @@
"Authors": "Authors",
"Autotypograph": "Autotypograph",
"Back": "Back",
+ "Back to editor": "Back to editor",
"Back to main page": "Back to main page",
"Become an author": "Become an author",
"Bold": "Bold",
@@ -48,12 +50,15 @@
"By updates": "By updates",
"By views": "By views",
"Cancel": "Cancel",
+ "Cancel changes": "Cancel changes",
"Characters": "Знаков",
"Chat Title": "Chat Title",
"Choose a post type": "Choose a post type",
"Choose a title image for the article. You can immediately see how the publication card will look like.": "Choose a title image for the article. You can immediately see how the publication card will look like.",
"Choose who you want to write to": "Choose who you want to write to",
"Collaborate": "Help Edit",
+ "Come up with a subtitle for your story": "Come up with a subtitle for your story",
+ "Come up with a title for your story": "Come up with a title for your story",
"Comments": "Comments",
"Communities": "Communities",
"Confirm": "Confirm",
@@ -75,6 +80,7 @@
"Date of Birth": "Date of Birth",
"Decline": "Decline",
"Delete": "Delete",
+ "Delete cover": "Delete cover",
"Description": "Description...",
"Discours": "Discours",
"Discours is an intellectual environment, a web space and tools that allows authors to collaborate with readers and come together to co-create publications and media projects": "Discours is an intellectual environment, a web space and tools that allows authors to collaborate with readers and come together to co-create publications and media projects",
@@ -251,6 +257,7 @@
"Short opening": "Short opening",
"Show": "Show",
"Show lyrics": "Текст песни",
+ "Slug": "Slug",
"Social networks": "Social networks",
"Something went wrong, check email and password": "Something went wrong. Check your email and password",
"Something went wrong, please try again": "Something went wrong, please try again",
@@ -315,6 +322,7 @@
"Work with us": "Cooperate with Discourse",
"Write": "Write",
"Write a comment...": "Write a comment...",
+ "Write a short introduction": "Write a short introduction",
"Write about the topic": "Write about the topic",
"Write an article": "Write an article",
"Write comment": "Write comment",
diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json
index ee2fa019..4226ea97 100644
--- a/public/locales/ru/translation.json
+++ b/public/locales/ru/translation.json
@@ -4,6 +4,7 @@
"About myself": "О себе",
"About the project": "О проекте",
"Accomplices": "Соучастники",
+ "Add a few topics so that the reader knows what your content is about and can find it on pages of topics that interest them. Topics can be swapped, the first topic becomes the title": "Добавьте несколько тем, чтобы читатель знал, о чем ваш материал, и мог найти его на страницах интересных ему тем. Темы можно менять местами, первая тема становится заглавной",
"Add another image": "Добавить другое изображение",
"Add audio": "Добавить аудио",
"Add comment": "Комментировать",
@@ -33,6 +34,7 @@
"Authors": "Авторы",
"Autotypograph": "Автотипограф",
"Back": "Назад",
+ "Back to editor": "Вернуться в редактор",
"Back to main page": "Вернуться на главную",
"Become an author": "Стать автором",
"Bold": "Жирный",
@@ -52,12 +54,15 @@
"By updates": "По обновлениям",
"By views": "По просмотрам",
"Cancel": "Отмена",
+ "Cancel changes": "Отменить изменения",
"Characters": "Знаков",
"Chat Title": "Тема дискурса",
"Choose a post type": "Выберите тип публикации",
"Choose a title image for the article. You can immediately see how the publication card will look like.": "Выберите заглавное изображение для статьи. Тут же сразу можно увидеть как будет выглядеть карточка публикации.",
"Choose who you want to write to": "Выберите кому хотите написать",
"Collaborate": "Помочь редактировать",
+ "Come up with a subtitle for your story": "Придумайте подзаголовок вашей истории",
+ "Come up with a title for your story": "Придумайте заголовок вашей истории",
"Comments": "Комментарии",
"Communities": "Сообщества",
"Confirm": "Подтвердить",
@@ -79,6 +84,7 @@
"Date of Birth": "Дата рождения",
"Decline": "Отмена",
"Delete": "Удалить",
+ "Delete cover": "Удалить обложку",
"Description": "Описание...",
"Discours": "Дискурс",
"Discours is an intellectual environment, a web space and tools that allows authors to collaborate with readers and come together to co-create publications and media projects": "Дискурс — это интеллектуальная среда, веб-пространство и инструменты, которые позволяют авторам сотрудничать с читателями и объединяться для совместного создания публикаций и медиапроектов",
@@ -267,6 +273,7 @@
"Short opening": "Небольшое вступление, чтобы заинтересовать читателя",
"Show": "Показать",
"Show lyrics": "Текст песни",
+ "Slug": "Постоянная ссылка",
"Social networks": "Социальные сети",
"Something went wrong, check email and password": "Что-то пошло не так. Проверьте адрес электронной почты и пароль",
"Something went wrong, please try again": "Что-то пошло не так, попробуйте еще раз",
@@ -333,6 +340,7 @@
"Work with us": "Сотрудничать с Дискурсом",
"Write": "Написать",
"Write a comment...": "Написать комментарий...",
+ "Write a short introduction": "Напишите краткое вступление",
"Write about the topic": "Написать в тему",
"Write an article": "Написать статью",
"Write comment": "Написать комментарий",
diff --git a/src/components/Views/Edit.module.scss b/src/components/Views/Edit.module.scss
index ee938d1b..573ce000 100644
--- a/src/components/Views/Edit.module.scss
+++ b/src/components/Views/Edit.module.scss
@@ -2,72 +2,6 @@
position: static;
}
-.articlePreview {
- border: 2px solid #e8e8e8;
- padding: 1rem 1.2rem;
- display: flex;
- flex-direction: column;
- min-height: 300px;
- align-items: flex-start;
- box-sizing: border-box;
-
- .actions {
- display: flex;
- gap: 16px;
- }
-
- .shoutCardCoverContainer {
- position: relative;
- width: 100%;
-
- .shoutCardCover {
- height: 0;
- overflow: hidden;
- position: relative;
- margin: 1.6rem 0;
- padding-bottom: 56.2%;
-
- img {
- height: 100%;
- object-fit: cover;
- position: absolute;
- transform-origin: 50% 50%;
- transition: transform 1s ease-in-out;
- width: 100%;
- }
-
- &:hover img {
- transform: scale(1.1);
- }
- }
- }
-
- .shoutCardTitle {
- @include font-size(2.2rem);
-
- font-weight: 700;
- line-height: 1.25;
- margin: auto 0 0.8rem;
- }
-
- .shoutCardSubtitle {
- @include font-size(1.7rem);
-
- color: #696969;
- font-weight: 400;
- line-height: 1.3;
- margin-bottom: 0.8rem;
- transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
- }
-
- .shoutAuthor {
- @include font-size(1.2rem);
-
- margin-right: 1.6rem;
- color: rgb(0 0 0 / 70%);
- }
-}
-
.formHolder {
padding: 0 4rem;
}
@@ -117,17 +51,6 @@
}
}
-// Grow input
-
-.editSettings,
-.edit {
- display: none;
-
- &.visible {
- display: block;
- }
-}
-
.asidePanel {
background: #1f1f1f;
color: rgb(255 255 255 / 35%);
@@ -272,7 +195,3 @@
background-repeat: no-repeat;
}
}
-
-.topicSelectContainer {
- height: 64px;
-}
diff --git a/src/components/Views/Edit.tsx b/src/components/Views/Edit.tsx
index daaaf92d..0b85d1b4 100644
--- a/src/components/Views/Edit.tsx
+++ b/src/components/Views/Edit.tsx
@@ -24,10 +24,17 @@ import { LayoutType, MediaItem } from '../../pages/types'
import { clone } from '../../utils/clone'
import deepEqual from 'fast-deep-equal'
import { AutoSaveNotice } from '../Editor/AutoSaveNotice'
+import { PublishSettings } from './PublishSettings'
type Props = {
shout: Shout
}
+
+export const EMPTY_TOPIC: Topic = {
+ id: -1,
+ slug: ''
+}
+
const AUTO_SAVE_INTERVAL = 5000
const handleScrollTopButtonClick = (e) => {
e.preventDefault()
@@ -37,17 +44,9 @@ const handleScrollTopButtonClick = (e) => {
})
}
-const EMPTY_TOPIC: Topic = {
- id: -1,
- slug: ''
-}
-
export const EditView = (props: Props) => {
const { t } = useLocalize()
- const { user } = useSession()
const [isScrolled, setIsScrolled] = createSignal(false)
- const [topics, setTopics] = createSignal(null)
- const [coverImage, setCoverImage] = createSignal(null)
const { page } = useRouter()
@@ -84,11 +83,6 @@ export const EditView = (props: Props) => {
return JSON.parse(form.media || '[]')
})
- onMount(async () => {
- const allTopics = await apiClient.getAllTopics()
- setTopics(allTopics)
- })
-
onMount(() => {
const handleScroll = () => {
setIsScrolled(window.scrollY > 0)
@@ -108,37 +102,6 @@ export const EditView = (props: Props) => {
}
}
- const handleSlugInputChange = (e) => {
- const slug = e.currentTarget.value
- setForm('slug', slug)
- }
-
- const handleUploadModalContentCloseSetCover = (imgUrl: string) => {
- hideModal()
- setCoverImage(imageProxy(imgUrl))
- setForm('coverImageUrl', imgUrl)
- }
- const handleDeleteCoverImage = () => {
- setForm('coverImageUrl', '')
- setCoverImage(null)
- }
-
- const handleTopicSelectChange = (newSelectedTopics) => {
- if (newSelectedTopics.length === 0) {
- setForm('mainTopic', EMPTY_TOPIC)
- } else if (
- form.selectedTopics.length === 0 ||
- newSelectedTopics.every((topic) => topic.id !== form.mainTopic.id)
- ) {
- setForm('mainTopic', newSelectedTopics[0])
- }
-
- if (newSelectedTopics.length > 0) {
- setFormErrors('selectedTopics', '')
- }
- setForm('selectedTopics', newSelectedTopics)
- }
-
const handleAddMedia = (data) => {
const newMedia = [...mediaItems(), ...data]
setForm('media', JSON.stringify(newMedia))
@@ -259,247 +222,137 @@ export const EditView = (props: Props) => {
*/}
- {/* Добавьте несколько тем, чтобы читатель знал, о чем ваш материал, и мог найти*/}
- {/* его на страницах интересных ему тем. Темы можно менять местами, первая тема*/}
- {/* становится заглавной*/}
- {/*
+ {t(
+ 'Add a few topics so that the reader knows what your content is about and can find it on pages of topics that interest them. Topics can be swapped, the first topic becomes the title'
+ )}
+