-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add new config option allowVisibleSource #1599
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
Closed
roman-yatsenko
wants to merge
33
commits into
hackmdio:develop
from
roman-yatsenko:feat/allowVisibleSource
Closed
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
1bedea0
добавил allowSourceView в конфиг по умолчанию; сделал кнопки не актив…
JamesHow1ett 2f3c5e6
добавил переменную CMD_VISIBLE_SOURCE в среду
JamesHow1ett c5bbeca
did add locales support for mode btn titles
JamesHow1ett 11d555f
block use hotkeys to see source code without rights
JamesHow1ett 0463fd2
block use hotkeys to see source code without rights
JamesHow1ett 9b6c167
block use hotkeys to see source code without rights
JamesHow1ett f063bfc
block use hotkeys to see source code without rights
JamesHow1ett 6fa747e
implement feature to disable veiw source code without rights
JamesHow1ett fdd4e08
minor fix
JamesHow1ett e2b5239
добавил allowSourceView в конфиг по умолчанию; сделал кнопки не актив…
JamesHow1ett 1c63768
добавил переменную CMD_VISIBLE_SOURCE в среду
JamesHow1ett 7eec6ca
did add locales support for mode btn titles
JamesHow1ett 01daf2c
block use hotkeys to see source code without rights
JamesHow1ett 7ece907
block use hotkeys to see source code without rights
JamesHow1ett 0d531c9
block use hotkeys to see source code without rights
JamesHow1ett 1d2410f
block use hotkeys to see source code without rights
JamesHow1ett 919a5a4
implement feature to disable veiw source code without rights
JamesHow1ett 6bb4d3a
minor fix
JamesHow1ett 7b35425
disabled change mode view for logout users
JamesHow1ett dc40648
realese feature
JamesHow1ett 4471804
remove timeout for call fn; update condition for call replaceUrl fn; …
JamesHow1ett 296b29a
clean code
JamesHow1ett 2fe4d76
add function to check paramets for allowVisibleSource fn
JamesHow1ett 2f0b724
grouped switch cases
JamesHow1ett bcabc1f
clean code
JamesHow1ett 4e414db
clean code
JamesHow1ett b309457
clean code
JamesHow1ett 88fb734
clean code
JamesHow1ett b7bc124
Reset locales
roman-yatsenko 0af9e41
clean code for tests
JamesHow1ett 9380673
Merge branch 'develop' into feat/allowVisibleSource
roman-yatsenko f6aaf9c
fix code for test comlete
JamesHow1ett 4d94f77
refactoring: changing function names for more information
JamesHow1ett 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -29,6 +29,7 @@ module.exports = { | |
allowAnonymousEdits: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS_EDITS), | ||
allowAnonymousViews: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS_VIEWS), | ||
allowFreeURL: toBooleanConfig(process.env.CMD_ALLOW_FREEURL), | ||
allowVisibleSource: toBooleanConfig(process.env.CMD_VISIBLE_SOURCE), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. following coding convention, |
||
forbiddenNoteIDs: toArrayConfig(process.env.CMD_FORBIDDEN_NOTE_IDS), | ||
defaultPermission: process.env.CMD_DEFAULT_PERMISSION, | ||
dbURL: process.env.CMD_DB_URL, | ||
|
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,117 +1,122 @@ | ||
{ | ||
"Collaborative markdown notes": "Совместные markdown заметки", | ||
"Realtime collaborative markdown notes on all platforms.": "Совместные markdown заметки в режиме реального времени на всех платформах.", | ||
"Best way to write and share your knowledge in markdown.": "Лучший способ записывать свои знания и делиться ими в формате markdown.", | ||
"Intro": "Введение", | ||
"History": "История", | ||
"New guest note": "Новая гостевая заметка", | ||
"Collaborate with URL": "Сотрудничество по ссылке", | ||
"Support charts and MathJax": "Поддержка графиков и MathJax", | ||
"Support slide mode": "Поддержка режима слайдера", | ||
"Sign In": "Войти", | ||
"Below is the history from browser": "Ниже приводится история браузера", | ||
"Welcome!": "Добро пожаловать!", | ||
"New note": "Новая заметка", | ||
"or": "или", | ||
"Sign Out": "Выйти", | ||
"Explore all features": "Изучите все возможности", | ||
"Select tags...": "Выберите теги...", | ||
"Search keyword...": "Поиск...", | ||
"Sort by title": "Сортировка по заголовку", | ||
"Title": "Заголовок", | ||
"Sort by time": "Сортировка по времени", | ||
"Time": "Время", | ||
"Export history": "Экспорт истории", | ||
"Import history": "Импорт истории", | ||
"Clear history": "Очистить историю", | ||
"Refresh history": "Обновить историю", | ||
"No history": "Нет истории", | ||
"Import from browser": "Импорт из браузера", | ||
"Releases": "Релизы", | ||
"Are you sure?": "Вы уверены?", | ||
"Do you really want to delete this note?": "Вы точно хотите удалить эту заметку?", | ||
"All users will lose their connection.": "Все пользователи потеряют соединение.", | ||
"Cancel": "Отмена", | ||
"Yes, do it!": "Да, сделать это!", | ||
"Choose method": "Выберите метод", | ||
"Sign in via %s": "Войти с помощью %s", | ||
"New": "Новая", | ||
"Publish": "Опубликовать", | ||
"Extra": "Дополнительно", | ||
"Revision": "Изменения", | ||
"Slide Mode": "Режим слайдера", | ||
"Export": "Экспорт", | ||
"Import": "Импорт", | ||
"Clipboard": "Буфер обмена", | ||
"Download": "Скачать", | ||
"Raw HTML": "Raw HTML", | ||
"Edit": "Редактировать", | ||
"View": "Посмотреть", | ||
"Both": "И то и другое", | ||
"Help": "Помощь", | ||
"Upload Image": "Загрузить изображение", | ||
"Menu": "Меню", | ||
"This page need refresh": "Эту страницу необходимо обновить", | ||
"You have an incompatible client version.": "Вы используете несовместимую версию клиента.", | ||
"Refresh to update.": "Обновите страницу для обновления клиента.", | ||
"New version available!": "Доступна новая версия!", | ||
"See releases notes here": "Смотрите подробности обновлений здесь", | ||
"Refresh to enjoy new features.": "Обновите, чтобы наслаждаться новыми возможностями.", | ||
"Your user state has changed.": "Ваш аккаунт изменен.", | ||
"Refresh to load new user state.": "Обновите, чтобы загрузить изменения аккаунта.", | ||
"Refresh": "Обновить", | ||
"Contacts": "Контакты", | ||
"Report an issue": "Сообщить о проблеме", | ||
"Meet us on %s": "Познакомьтесь с нами в %s", | ||
"Send us email": "Отправить нам письмо", | ||
"Documents": "Документы", | ||
"Features": "Особенности", | ||
"YAML Metadata": "Метаданные YAML", | ||
"Slide Example": "Пример слайдера", | ||
"Cheatsheet": "Шпаргалка", | ||
"Example": "Пример", | ||
"Syntax": "Синтаксис", | ||
"Header": "Заголовок", | ||
"Unordered List": "Маркированный список", | ||
"Ordered List": "Нумерованный список", | ||
"Todo List": "Список дел", | ||
"Blockquote": "Цитата", | ||
"Bold font": "Жирный шрифт", | ||
"Italics font": "Курсив", | ||
"Strikethrough": "Зачеркнутый", | ||
"Inserted text": "Подчеркнутый текст", | ||
"Marked text": "Выделенный текст", | ||
"Link": "Ссылка", | ||
"Image": "Изображение", | ||
"Code": "Код", | ||
"Externals": "Внешнее", | ||
"This is a alert area.": "Это уведомление.", | ||
"Revert": "Отменить", | ||
"Import from clipboard": "Импорт из буфера обмена", | ||
"Paste your markdown or webpage here...": "Вставьте ваш markdown код или веб-страницу здесь...", | ||
"Clear": "Очистить", | ||
"This note is locked": "Эта заметка заблокирована", | ||
"Sorry, only owner can edit this note.": "К сожалению, только автор может редактировать эту заметку.", | ||
"OK": "OK", | ||
"Reach the limit": "Вы достигли лимита", | ||
"Sorry, you've reached the max length this note can be.": "К сожалению, вы достигли максимальной длины заметки.", | ||
"Please reduce the content or divide it to more notes, thank you!": "Пожалуйста, уменьшите размер содержимого или разделите его на несколько заметок, спасибо!", | ||
"Import from Gist": "Импорт из Gist", | ||
"Paste your gist url here...": "Вставьте ссылку на ваш gist здесь...", | ||
"Import from Snippet": "Импорт фрагмента кода", | ||
"Select From Available Projects": "Выберите из доступных проектов", | ||
"Select From Available Snippets": "Выберите из доступных фрагментов кода", | ||
"OR": "ИЛИ", | ||
"Export to Snippet": "Экспорт фрагмента кода", | ||
"Select Visibility Level": "Выберите уровень видимости", | ||
"Night Theme": "Тёмная тема", | ||
"Follow us on %s and %s.": "Подпишитесь на нас в %s и %s.", | ||
"Privacy": "Безопасность", | ||
"Terms of Use": "Условия использования", | ||
"Do you really want to delete your user account?": "Вы точно хотите удалить свою учётную запись?", | ||
"This will delete your account, all notes that are owned by you and remove all references to your account from other notes.": "Это действие удалит вашу учётную запись, все ваши заметки и удалит все ссылки на вашу учетную запись из других заметок.", | ||
"Delete user": "Удалить пользователя", | ||
"Export user data": "Экспортировать данные пользователя", | ||
"Help us translating on %s": "Помогите нам перевести %s", | ||
"Source Code": "Исходный код" | ||
"Collaborative markdown notes": "Совместные markdown заметки", | ||
"Realtime collaborative markdown notes on all platforms.": "Совместные markdown заметки в режиме реального времени на всех платформах.", | ||
"Best way to write and share your knowledge in markdown.": "Лучший способ записывать свои знания и делиться ими в формате markdown.", | ||
"Intro": "Введение", | ||
"History": "История", | ||
"New guest note": "Новая гостевая заметка", | ||
"Collaborate with URL": "Сотрудничество по ссылке", | ||
"Support charts and MathJax": "Поддержка графиков и MathJax", | ||
"Support slide mode": "Поддержка режима слайдера", | ||
"Sign In": "Войти", | ||
"Below is the history from browser": "Ниже приводится история браузера", | ||
"Welcome!": "Добро пожаловать!", | ||
"New note": "Новая заметка", | ||
"or": "или", | ||
"Sign Out": "Выйти", | ||
"Explore all features": "Изучите все возможности", | ||
"Select tags...": "Выберите теги...", | ||
"Search keyword...": "Поиск...", | ||
"Sort by title": "Сортировка по заголовку", | ||
"Title": "Заголовок", | ||
"Sort by time": "Сортировка по времени", | ||
"Time": "Время", | ||
"Export history": "Экспорт истории", | ||
"Import history": "Импорт истории", | ||
"Clear history": "Очистить историю", | ||
"Refresh history": "Обновить историю", | ||
"No history": "Нет истории", | ||
"Import from browser": "Импорт из браузера", | ||
"Releases": "Релизы", | ||
"Are you sure?": "Вы уверены?", | ||
"Do you really want to delete this note?": "Вы точно хотите удалить эту заметку?", | ||
"All users will lose their connection.": "Все пользователи потеряют соединение.", | ||
"Cancel": "Отмена", | ||
"Yes, do it!": "Да, сделать это!", | ||
"Choose method": "Выберите метод", | ||
"Sign in via %s": "Войти с помощью %s", | ||
"New": "Новая", | ||
"Publish": "Опубликовать", | ||
"Extra": "Дополнительно", | ||
"Revision": "Изменения", | ||
"Slide Mode": "Режим слайдера", | ||
"Export": "Экспорт", | ||
"Import": "Импорт", | ||
"Clipboard": "Буфер обмена", | ||
"Download": "Скачать", | ||
"Raw HTML": "Raw HTML", | ||
"Edit": "Редактировать", | ||
"View": "Посмотреть", | ||
"Both": "И то и другое", | ||
"Help": "Помощь", | ||
"Upload Image": "Загрузить изображение", | ||
"Menu": "Меню", | ||
"This page need refresh": "Эту страницу необходимо обновить", | ||
"You have an incompatible client version.": "Вы используете несовместимую версию клиента.", | ||
"Refresh to update.": "Обновите страницу для обновления клиента.", | ||
"New version available!": "Доступна новая версия!", | ||
"See releases notes here": "Смотрите подробности обновлений здесь", | ||
"Refresh to enjoy new features.": "Обновите, чтобы наслаждаться новыми возможностями.", | ||
"Your user state has changed.": "Ваш аккаунт изменен.", | ||
"Refresh to load new user state.": "Обновите, чтобы загрузить изменения аккаунта.", | ||
"Refresh": "Обновить", | ||
"Contacts": "Контакты", | ||
"Report an issue": "Сообщить о проблеме", | ||
"Meet us on %s": "Познакомьтесь с нами в %s", | ||
"Send us email": "Отправить нам письмо", | ||
"Documents": "Документы", | ||
"Features": "Особенности", | ||
"YAML Metadata": "Метаданные YAML", | ||
"Slide Example": "Пример слайдера", | ||
"Cheatsheet": "Шпаргалка", | ||
"Example": "Пример", | ||
"Syntax": "Синтаксис", | ||
"Header": "Заголовок", | ||
"Unordered List": "Маркированный список", | ||
"Ordered List": "Нумерованный список", | ||
"Todo List": "Список дел", | ||
"Blockquote": "Цитата", | ||
"Bold font": "Жирный шрифт", | ||
"Italics font": "Курсив", | ||
"Strikethrough": "Зачеркнутый", | ||
"Inserted text": "Подчеркнутый текст", | ||
"Marked text": "Выделенный текст", | ||
"Link": "Ссылка", | ||
"Image": "Изображение", | ||
"Code": "Код", | ||
"Externals": "Внешнее", | ||
"This is a alert area.": "Это уведомление.", | ||
"Revert": "Отменить", | ||
"Import from clipboard": "Импорт из буфера обмена", | ||
"Paste your markdown or webpage here...": "Вставьте ваш markdown код или веб-страницу здесь...", | ||
"Clear": "Очистить", | ||
"This note is locked": "Эта заметка заблокирована", | ||
"Sorry, only owner can edit this note.": "К сожалению, только автор может редактировать эту заметку.", | ||
"OK": "OK", | ||
"Reach the limit": "Вы достигли лимита", | ||
"Sorry, you've reached the max length this note can be.": "К сожалению, вы достигли максимальной длины заметки.", | ||
"Please reduce the content or divide it to more notes, thank you!": "Пожалуйста, уменьшите размер содержимого или разделите его на несколько заметок, спасибо!", | ||
"Import from Gist": "Импорт из Gist", | ||
"Paste your gist url here...": "Вставьте ссылку на ваш gist здесь...", | ||
"Import from Snippet": "Импорт фрагмента кода", | ||
"Select From Available Projects": "Выберите из доступных проектов", | ||
"Select From Available Snippets": "Выберите из доступных фрагментов кода", | ||
"OR": "ИЛИ", | ||
"Export to Snippet": "Экспорт фрагмента кода", | ||
"Select Visibility Level": "Выберите уровень видимости", | ||
"Night Theme": "Тёмная тема", | ||
"Follow us on %s and %s.": "Подпишитесь на нас в %s и %s.", | ||
"Privacy": "Безопасность", | ||
"Terms of Use": "Условия использования", | ||
"Do you really want to delete your user account?": "Вы точно хотите удалить свою учётную запись?", | ||
"This will delete your account, all notes that are owned by you and remove all references to your account from other notes.": "Это действие удалит вашу учётную запись, все ваши заметки и удалит все ссылки на вашу учетную запись из других заметок.", | ||
"Delete user": "Удалить пользователя", | ||
"Export user data": "Экспортировать данные пользователя", | ||
"Help us translating on %s": "Помогите нам перевести %s", | ||
"Source Code": "Исходный код", | ||
"Powered by %s": "Powered by %s", | ||
"Register": "Register", | ||
"Export with pandoc": "Export with pandoc", | ||
"Select output format": "Select output format", | ||
"You have no rights to edit this note": "У вас нет прав редактировать эту заметку" | ||
} |
This file contains hidden or 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
Oops, something went wrong.
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.
To prevent broken current behavior, set the default value to
false
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.
With the default value
true
user can see note source (edit and both modes are enabled for view to user without edit rights). The true value is an usual CodiMD behavior for now.P.S. But we've refactored as you wish :-)