Skip to content
Commits on Source (25)
module.exports = {
extends: [
"eslint:recommended",
"plugin:vue/strongly-recommended",
// "plugin:prettier/recommended",
"plugin:@intlify/vue-i18n/recommended",
],
rules: {
"no-unused-vars": "warn",
"vue/no-unused-vars": "off",
"vue/multi-word-component-names": "off",
"@intlify/vue-i18n/key-format-style": [
"error",
"snake_case",
{
splitByDots: false,
},
],
// "@intlify/vue-i18n/no-unused-keys": ["warn", {}],
"@intlify/vue-i18n/no-raw-text": [
"error",
{
ignoreNodes: ["v-icon"],
ignorePattern: "^[-–—·#:()\\[\\]&\\.\\s]+$",
},
],
// Fixes for prettier (avoid eslint-config-prettier)
// The following rules can be used in some cases. See the README for more
// information. (These are marked with `0` instead of `"off"` so that a
// script can distinguish them.)
curly: 0,
"lines-around-comment": 0,
"max-len": 0,
"no-confusing-arrow": 0,
"no-mixed-operators": 0,
"no-tabs": 0,
"no-unexpected-multiline": 0,
quotes: 0,
"@typescript-eslint/quotes": 0,
"babel/quotes": 0,
"vue/html-self-closing": 0,
"vue/max-len": 0,
// The rest are rules that you never need to enable when using Prettier.
"array-bracket-newline": "off",
"array-bracket-spacing": "off",
"array-element-newline": "off",
"arrow-parens": "off",
"arrow-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"comma-style": "off",
"computed-property-spacing": "off",
"dot-location": "off",
"eol-last": "off",
"func-call-spacing": "off",
"function-call-argument-newline": "off",
"function-paren-newline": "off",
"generator-star": "off",
"generator-star-spacing": "off",
"implicit-arrow-linebreak": "off",
indent: "off",
"jsx-quotes": "off",
"key-spacing": "off",
"keyword-spacing": "off",
"linebreak-style": "off",
"multiline-ternary": "off",
"newline-per-chained-call": "off",
"new-parens": "off",
"no-arrow-condition": "off",
"no-comma-dangle": "off",
"no-extra-parens": "off",
"no-extra-semi": "off",
"no-floating-decimal": "off",
"no-mixed-spaces-and-tabs": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"no-reserved-keys": "off",
"no-space-before-semi": "off",
"no-trailing-spaces": "off",
"no-whitespace-before-property": "off",
"no-wrap-func": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"one-var-declaration-per-line": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"quote-props": "off",
"rest-spread-spacing": "off",
semi: "off",
"semi-spacing": "off",
"semi-style": "off",
"space-after-function-name": "off",
"space-after-keywords": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-before-function-parentheses": "off",
"space-before-keywords": "off",
"space-in-brackets": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-return-throw-case": "off",
"space-unary-ops": "off",
"space-unary-word-ops": "off",
"switch-colon-spacing": "off",
"template-curly-spacing": "off",
"template-tag-spacing": "off",
"unicode-bom": "off",
"wrap-iife": "off",
"wrap-regex": "off",
"yield-star-spacing": "off",
"@babel/object-curly-spacing": "off",
"@babel/semi": "off",
"@typescript-eslint/brace-style": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/comma-spacing": "off",
"@typescript-eslint/func-call-spacing": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/keyword-spacing": "off",
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/object-curly-spacing": "off",
"@typescript-eslint/semi": "off",
"@typescript-eslint/space-before-blocks": "off",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/space-infix-ops": "off",
"@typescript-eslint/type-annotation-spacing": "off",
"babel/object-curly-spacing": "off",
"babel/semi": "off",
"flowtype/boolean-style": "off",
"flowtype/delimiter-dangle": "off",
"flowtype/generic-spacing": "off",
"flowtype/object-type-curly-spacing": "off",
"flowtype/object-type-delimiter": "off",
"flowtype/quotes": "off",
"flowtype/semi": "off",
"flowtype/space-after-type-colon": "off",
"flowtype/space-before-generic-bracket": "off",
"flowtype/space-before-type-colon": "off",
"flowtype/union-intersection-spacing": "off",
"react/jsx-child-element-spacing": "off",
"react/jsx-closing-bracket-location": "off",
"react/jsx-closing-tag-location": "off",
"react/jsx-curly-newline": "off",
"react/jsx-curly-spacing": "off",
"react/jsx-equals-spacing": "off",
"react/jsx-first-prop-new-line": "off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/jsx-max-props-per-line": "off",
"react/jsx-newline": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-multi-spaces": "off",
"react/jsx-tag-spacing": "off",
"react/jsx-wrap-multilines": "off",
"standard/array-bracket-even-spacing": "off",
"standard/computed-property-even-spacing": "off",
"standard/object-curly-even-spacing": "off",
"unicorn/empty-brace-spaces": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/number-literal-case": "off",
"vue/array-bracket-newline": "off",
"vue/array-bracket-spacing": "off",
"vue/arrow-spacing": "off",
"vue/block-spacing": "off",
"vue/block-tag-newline": "off",
"vue/brace-style": "off",
"vue/comma-dangle": "off",
"vue/comma-spacing": "off",
"vue/comma-style": "off",
"vue/dot-location": "off",
"vue/func-call-spacing": "off",
"vue/html-closing-bracket-newline": "off",
"vue/html-closing-bracket-spacing": "off",
"vue/html-end-tags": "off",
"vue/html-indent": "off",
"vue/html-quotes": "off",
"vue/key-spacing": "off",
"vue/keyword-spacing": "off",
"vue/max-attributes-per-line": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/multiline-ternary": "off",
"vue/mustache-interpolation-spacing": "off",
"vue/no-extra-parens": "off",
"vue/no-multi-spaces": "off",
"vue/no-spaces-around-equal-signs-in-attribute": "off",
"vue/object-curly-newline": "off",
"vue/object-curly-spacing": "off",
"vue/object-property-newline": "off",
"vue/operator-linebreak": "off",
"vue/quote-props": "off",
"vue/script-indent": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/space-in-parens": "off",
"vue/space-infix-ops": "off",
"vue/space-unary-ops": "off",
"vue/template-curly-spacing": "off",
},
settings: {
"vue-i18n": {
localeDir: "./aleksis/core/frontend/messages/*.{json}",
messageSyntaxVersion: "^8.0.0",
},
},
env: {
es2021: true,
},
parserOptions: {
ecmaVersion: "latest",
},
};
include:
- project: "AlekSIS/official/AlekSIS"
file: /ci/general.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/prepare/lock.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/test/lint.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/test/security.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/build/dist.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/build/docs.yml
- project: "AlekSIS/official/AlekSIS"
file: "/ci/deploy/trigger_dist.yml"
- project: "AlekSIS/official/AlekSIS"
file: "/ci/docker/image.yml"
- project: "AlekSIS/official/AlekSIS"
file: /ci/publish/pypi.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/general.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/prepare/lock.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/test/lint.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/test/security.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/build/dist.yml
- project: "AlekSIS/official/AlekSIS"
file: /ci/build/docs.yml
- project: "AlekSIS/official/AlekSIS"
file: "/ci/deploy/trigger_dist.yml"
- project: "AlekSIS/official/AlekSIS"
file: "/ci/docker/image.yml"
- project: "AlekSIS/official/AlekSIS"
file: /ci/publish/pypi.yml
# Byte-compiled / optimized / DLL files
*$py.class
*.py[cod]
__pycache__/
# Distribution / packaging
*.egg
*.egg-info/
.Python
.eggs/
.installed.cfg
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
# Installer logs
pip-delete-this-directory.txt
pip-log.txt
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# pyenv
.python-version
# Environments
.env
.venv
ENV/
env/
venv/
# Editors
*~
DEADJOE
\#*#
# IntelliJ
.idea
.idea/
# Database
db.sqlite3
# Sphinx
docs/_build/
# TeX
*.aux
# Generated files
/node_modules/
/static/
/whoosh_index/
poetry.lock
.coverage
.mypy_cache/
.tox/
htmlcov/
maintenance_mode_state.txt
media/
package-lock.json
yarn.lock
# VSCode
.vscode/
.history/
*.code-workspace
/cache
# Add HTML files to avoid problems with unsupported Django templates
*.html
# Do not check/reformat generated files
aleksis/core/util/licenses.json
.vite/
......@@ -6,6 +6,31 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
`2.0`_ - 2023-05-14
-------------------
Fixed
~~~~~
* The Matrix groups and rooms threw a 404 error.
* The Matrix parent menu point was displayed even though the user had no permission to see it.
`2.0b0`_ - 2023-02-23
---------------------
This version requires AlekSIS-Core 3.0. It is incompatible with any previous
version.
Removed
~~~~~~~
* Legacy menu integration for AlekSIS-Core pre-3.0
Added
~~~~~
* Support for SPA in AlekSIS-Core 3.0
`1.0`_ - 2022-06-25
-------------------
......@@ -18,3 +43,5 @@ Added
.. _Semantic Versioning: https://semver.org/spec/v2.0.0.html
.. _1.0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Matrix/-/tags/1.0
.. _2.0b0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Matrix/-/tags/2.0b0
.. _2.0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Matrix/-/tags/2.0
export default {
meta: {
inMenu: true,
titleKey: "matrix.menu_title",
icon: "mdi-forum-outline",
permission: "matrix.view_matrixrooms_rule",
},
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
children: [
{
path: "rooms/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "matrix.groupsAndRooms",
meta: {
inMenu: true,
titleKey: "matrix.rooms.menu_title",
icon: "mdi-account-group-outline",
permission: "matrix.view_matrixrooms_rule",
},
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
],
};
{
"matrix": {
"menu_title": "Matrix",
"rooms": {
"menu_title": "Gruppen und Räume"
}
}
}
{
"matrix": {
"menu_title": "Matrix",
"rooms": {
"menu_title": "Groups and Rooms"
}
}
}
{
"matrix": {
"menu_title": "Matrix",
"rooms": {
"menu_title": "Группы и комнаты"
}
}
}
{
"matrix": {
"menu_title": "Matrix",
"rooms": {
"menu_title": "Групи та кімнати"
}
}
}
......@@ -3,175 +3,189 @@
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-25 11:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"PO-Revision-Date: 2022-07-03 06:13+0000\n"
"Last-Translator: Serhii Horichenko <m@sgg.im>\n"
"Language-Team: Russian <https://translate.edugit.org/projects/aleksis/"
"aleksis-app-matrix/ru/>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
"X-Generator: Weblate 4.12.1\n"
#: aleksis/apps/matrix/forms.py:12
msgid "Provision in Matrix"
msgstr ""
msgstr "Обеспечение в Matrix"
#: aleksis/apps/matrix/menus.py:6 aleksis/apps/matrix/preferences.py:8
msgid "Matrix"
msgstr ""
msgstr "Matrix"
#: aleksis/apps/matrix/menus.py:18
msgid "Groups and Rooms"
msgstr ""
msgstr "Группы и комнаты"
#: aleksis/apps/matrix/model_extensions.py:43
msgid "Can view matrix room of a group"
msgstr ""
msgstr "Может просматривать Matrix-комнату группы"
#: aleksis/apps/matrix/models.py:19
msgid "Matrix ID"
msgstr ""
msgstr "Matrix ID"
#: aleksis/apps/matrix/models.py:23
msgid "Person"
msgstr ""
msgstr "Физлицо"
#: aleksis/apps/matrix/models.py:52
msgid "Matrix profile"
msgstr ""
msgstr "Профиль Matrix"
#: aleksis/apps/matrix/models.py:53
msgid "Matrix profiles"
msgstr ""
msgstr "Профили Matrix"
#: aleksis/apps/matrix/models.py:59
msgid "Room ID"
msgstr ""
msgstr "Идентификатор комнаты"
#: aleksis/apps/matrix/models.py:60
msgid "Alias"
msgstr ""
msgstr "Псевдо"
#: aleksis/apps/matrix/models.py:64
msgid "Group"
msgstr ""
msgstr "Группа"
#: aleksis/apps/matrix/models.py:266
msgid "Matrix room"
msgstr ""
msgstr "Matrix-комната"
#: aleksis/apps/matrix/models.py:267
msgid "Matrix rooms"
msgstr ""
msgstr "Matrix-комнаты"
#: aleksis/apps/matrix/models.py:273
msgid "Child rooms/spaces"
msgstr ""
msgstr "Детские комнаты/помещения"
#: aleksis/apps/matrix/models.py:355
msgid "Matrix space"
msgstr ""
msgstr "Matrix-пространство"
#: aleksis/apps/matrix/models.py:356
msgid "Matrix spaces"
msgstr ""
msgstr "Matrix-пространства"
#: aleksis/apps/matrix/preferences.py:15
msgid "URL of Matrix homeserver"
msgstr ""
msgstr "URL домашнего сервера Matrix"
#: aleksis/apps/matrix/preferences.py:18
msgid "URL of the Matrix homeserver on which groups and spaces should be created (e. g. https://matrix.org)"
msgstr ""
"URL домашнего сервера Matrix, на котором будут создаваться группы и "
"помещения (напр. https://matrix.org)"
#: aleksis/apps/matrix/preferences.py:27
msgid "Name of Matrix homeserver used for auto-generating Matrix IDs"
msgstr ""
"Название домашнего сервера Matrix для автоматической генерации "
"Matrix-идентификаторов"
#: aleksis/apps/matrix/preferences.py:28
msgid "Leave empty to not create Matrix IDs automatically"
msgstr ""
"Оставьте незаполненным, чтобы Matrix-идентификаторы не создавались "
"автоматически"
#: aleksis/apps/matrix/preferences.py:36
msgid "Access token to access homeserver"
msgstr ""
msgstr "Токен доступа для подключения к домашнему серверу"
#: aleksis/apps/matrix/preferences.py:39
msgid "This has to be the access token of a suitable bot user. It is used for all actions."
msgstr ""
"Необходимо иметь токен доступа соответствующего пользователя-бота. Касается "
"всех действий."
#: aleksis/apps/matrix/preferences.py:47
msgid "Disambiguate room aliases"
msgstr ""
msgstr "Избегайте неоднозначных псевдонимов комнат"
#: aleksis/apps/matrix/preferences.py:49
msgid "Suffix room aliases with ascending numbers to avoid name clashes"
msgstr ""
"Псевдонимы комнат с возрастающими числами на конце для исключения совпадений"
#: aleksis/apps/matrix/preferences.py:56
msgid "Use Matrix spaces"
msgstr ""
msgstr "Используйте Matrix-пространства"
#: aleksis/apps/matrix/preferences.py:58
msgid "This activates the creation and management of Matrix spaces."
msgstr ""
"Это действие приводит к активации создания и управления пространствами "
"Matrix."
#: aleksis/apps/matrix/preferences.py:65
msgid "Reduce existing power levels"
msgstr ""
msgstr "Уменьшить существующие уровни мощности"
#: aleksis/apps/matrix/preferences.py:67
msgid "Reduce power levels of existing members to the level suggested by AlekSIS."
msgstr ""
"Уменьшить уровни мощности существующих участников до рекомендованных AlekSIS."
#: aleksis/apps/matrix/preferences.py:74
msgid "Power level for owners"
msgstr ""
msgstr "Уровень мощности для владельцев"
#: aleksis/apps/matrix/preferences.py:77
msgid "This power level will be set for all owners of a group."
msgstr ""
msgstr "Этот уровень мощности будет установлен для всех владельцев группы."
#: aleksis/apps/matrix/preferences.py:84
msgid "Power level for members"
msgstr ""
msgstr "Уровень мощности для участников"
#: aleksis/apps/matrix/preferences.py:87
msgid "This power level will be set for all members of a group."
msgstr ""
msgstr "Этот уровень мощности будет установлен для всех участников группы."
#: aleksis/apps/matrix/templates/matrix/room/list.html:8
#: aleksis/apps/matrix/templates/matrix/room/list.html:9
msgid "Groups and Matrix Rooms"
msgstr ""
msgstr "Группы и Matrix-комнаты"
#: aleksis/apps/matrix/templates/matrix/room/list.html:14
msgid "Create group"
msgstr ""
msgstr "Создать группу"
#: aleksis/apps/matrix/templates/matrix/room/list.html:21
msgid "Filter groups"
msgstr ""
msgstr "Фильтровать группы"
#: aleksis/apps/matrix/templates/matrix/room/list.html:25
msgid "Filter"
msgstr ""
msgstr "Фильтры"
#: aleksis/apps/matrix/templates/matrix/room/list.html:28
msgid "Clear"
msgstr ""
msgstr "Очистить"
#: aleksis/apps/matrix/templates/matrix/room/list.html:43
msgid "Selected groups"
msgstr ""
msgstr "Выбранные группы"
#: aleksis/apps/matrix/templates/matrix/room/list.html:53
msgid "Execute"
msgstr ""
msgstr "Выполнить"
......@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-25 11:24+0200\n"
"PO-Revision-Date: 2022-06-25 13:20+0000\n"
"Last-Translator: Dominik George <dominik.george@teckids.org>\n"
"PO-Revision-Date: 2022-07-03 06:13+0000\n"
"Last-Translator: Serhii Horichenko <m@sgg.im>\n"
"Language-Team: Ukrainian <https://translate.edugit.org/projects/aleksis/"
"aleksis-app-matrix/uk/>\n"
"Language: uk\n"
......@@ -23,185 +23,167 @@ msgstr ""
"X-Generator: Weblate 4.12.1\n"
#: aleksis/apps/matrix/forms.py:12
#, fuzzy
msgid "Provision in Matrix"
msgstr "Забезпечення в Matrix"
msgstr "Пропозиція в Matrix"
#: aleksis/apps/matrix/menus.py:6 aleksis/apps/matrix/preferences.py:8
msgid "Matrix"
msgstr "Matrix"
#: aleksis/apps/matrix/menus.py:18
#, fuzzy
msgid "Groups and Rooms"
msgstr "Групи та кімнати"
#: aleksis/apps/matrix/model_extensions.py:43
#, fuzzy
msgid "Can view matrix room of a group"
msgstr "Може переглядати кімнати групи Matrix"
msgstr "Може переглядати Matrix-кімнату групи"
#: aleksis/apps/matrix/models.py:19
#, fuzzy
msgid "Matrix ID"
msgstr "Ідентифікатор Matrix"
msgstr "Matrix ID"
#: aleksis/apps/matrix/models.py:23
msgid "Person"
msgstr "Особа"
#: aleksis/apps/matrix/models.py:52
#, fuzzy
msgid "Matrix profile"
msgstr "Matrix профіль"
msgstr "Профіль Matrix"
#: aleksis/apps/matrix/models.py:53
#, fuzzy
msgid "Matrix profiles"
msgstr "Matrix профілі"
msgstr "Профілі Matrix"
#: aleksis/apps/matrix/models.py:59
#, fuzzy
msgid "Room ID"
msgstr "Ідентифікатор кімнати"
#: aleksis/apps/matrix/models.py:60
#, fuzzy
msgid "Alias"
msgstr "прізвисько"
msgstr "Псевдо"
#: aleksis/apps/matrix/models.py:64
msgid "Group"
msgstr "Група"
#: aleksis/apps/matrix/models.py:266
#, fuzzy
msgid "Matrix room"
msgstr "Matrix кімната"
msgstr "Matrix-кімната"
#: aleksis/apps/matrix/models.py:267
#, fuzzy
msgid "Matrix rooms"
msgstr "Matrix кімнати"
msgstr "Matrix-кімнати"
#: aleksis/apps/matrix/models.py:273
#, fuzzy
msgid "Child rooms/spaces"
msgstr "Дитячі кімнати/приміщення"
#: aleksis/apps/matrix/models.py:355
#, fuzzy
msgid "Matrix space"
msgstr "Matrix простір"
msgstr "Matrix-простір"
#: aleksis/apps/matrix/models.py:356
#, fuzzy
msgid "Matrix spaces"
msgstr "Matrix просторів"
msgstr "Matrix-простори"
#: aleksis/apps/matrix/preferences.py:15
#, fuzzy
msgid "URL of Matrix homeserver"
msgstr "URL домашнього сервера Matrix"
#: aleksis/apps/matrix/preferences.py:18
msgid "URL of the Matrix homeserver on which groups and spaces should be created (e. g. https://matrix.org)"
msgstr ""
"URL домашнього сервера Matrix, на якому будуть створюватися групи та "
"простори (напр. https://matrix.org)"
#: aleksis/apps/matrix/preferences.py:27
msgid "Name of Matrix homeserver used for auto-generating Matrix IDs"
msgstr ""
"Назва домашнього сервера Matrix для автоматичної генерації "
"Matrix-ідентифікаторів"
#: aleksis/apps/matrix/preferences.py:28
msgid "Leave empty to not create Matrix IDs automatically"
msgstr ""
"Залишіть порожнім, щоби Matrix-ідентифікатори не створювалися автоматично"
#: aleksis/apps/matrix/preferences.py:36
#, fuzzy
msgid "Access token to access homeserver"
msgstr "Маркер доступу для доступу до домашнього сервера"
msgstr "Токен доступу для з'єднання з домашнім сервером"
#: aleksis/apps/matrix/preferences.py:39
msgid "This has to be the access token of a suitable bot user. It is used for all actions."
msgstr ""
"Потрібно мати токен доступу відповідного користувача-бота. Це стосується "
"усіх дій."
#: aleksis/apps/matrix/preferences.py:47
#, fuzzy
msgid "Disambiguate room aliases"
msgstr "Уникайте неоднозначних псевдонімів кімнат"
#: aleksis/apps/matrix/preferences.py:49
msgid "Suffix room aliases with ascending numbers to avoid name clashes"
msgstr ""
"Псевдоними кімнат із зростаючими числами наприкінці для уникнення співпадінь"
#: aleksis/apps/matrix/preferences.py:56
#, fuzzy
msgid "Use Matrix spaces"
msgstr "Використовуйте Matrix пробіли"
msgstr "Використовуйте Matrix-простори"
#: aleksis/apps/matrix/preferences.py:58
msgid "This activates the creation and management of Matrix spaces."
msgstr ""
msgstr "Це активує створення просторів Matrix та керівництво ними."
#: aleksis/apps/matrix/preferences.py:65
#, fuzzy
msgid "Reduce existing power levels"
msgstr "Зменшити існуючі рівні потужності"
#: aleksis/apps/matrix/preferences.py:67
msgid "Reduce power levels of existing members to the level suggested by AlekSIS."
msgstr ""
"Зменшити рівень потужності існуючих учасників до рекомендованого AlekSIS."
#: aleksis/apps/matrix/preferences.py:74
#, fuzzy
msgid "Power level for owners"
msgstr "Рівень потужності для власників"
#: aleksis/apps/matrix/preferences.py:77
msgid "This power level will be set for all owners of a group."
msgstr ""
msgstr "Цей рівень потужності буде встановлений для всіх власників групи."
#: aleksis/apps/matrix/preferences.py:84
#, fuzzy
msgid "Power level for members"
msgstr "Рівень влади для членів"
msgstr "Рівень потужності для учасників"
#: aleksis/apps/matrix/preferences.py:87
msgid "This power level will be set for all members of a group."
msgstr ""
msgstr "Цей рівень потужності буде встановлений для всіх учасників групи."
#: aleksis/apps/matrix/templates/matrix/room/list.html:8
#: aleksis/apps/matrix/templates/matrix/room/list.html:9
#, fuzzy
msgid "Groups and Matrix Rooms"
msgstr "Групові та Matrix кімнати"
msgstr "Групи та Matrix-кімнати"
#: aleksis/apps/matrix/templates/matrix/room/list.html:14
#, fuzzy
msgid "Create group"
msgstr "Створити групу"
#: aleksis/apps/matrix/templates/matrix/room/list.html:21
#, fuzzy
msgid "Filter groups"
msgstr "Фільтрувати групи"
#: aleksis/apps/matrix/templates/matrix/room/list.html:25
#, fuzzy
msgid "Filter"
msgstr "виціджувати"
msgstr "Фільтри"
#: aleksis/apps/matrix/templates/matrix/room/list.html:28
#, fuzzy
msgid "Clear"
msgstr "порожній"
msgstr "Очистити"
#: aleksis/apps/matrix/templates/matrix/room/list.html:43
#, fuzzy
msgid "Selected groups"
msgstr "Вибрані групи"
#: aleksis/apps/matrix/templates/matrix/room/list.html:53
#, fuzzy
msgid "Execute"
msgstr "Виконати"
from django.utils.translation import gettext_lazy as _
MENUS = {
"NAV_MENU_CORE": [
{
"name": _("Matrix"),
"url": "#",
"svg_icon": "simple-icons:matrix",
"root": True,
"validators": [
(
"aleksis.core.util.predicates.permission_validator",
"matrix.show_menu_rule",
),
],
"submenu": [
{
"name": _("Groups and Rooms"),
"url": "matrix_rooms",
"svg_icon": "mdi:account-group-outline",
"validators": [
(
"aleksis.core.util.predicates.permission_validator",
"matrix.view_matrixrooms_rule",
),
],
},
],
}
]
}
......@@ -109,7 +109,6 @@ class MatrixRoom(ExtensiblePolymorphicModel):
not get_site_preferences()["matrix__disambiguate_room_aliases"]
or e.args[0].get("errcode") != "M_ROOM_IN_USE"
):
raise
match = re.match(r"^(.*)-(\d+)$", alias)
......
......@@ -8,10 +8,10 @@ listeners:
tls: false
type: http
x_forwarded: true
bind_addresses: [ '::1', '127.0.0.1' ]
bind_addresses: ["::1", "127.0.0.1"]
resources:
- names: [ client, federation ]
- names: [client, federation]
compress: false
database:
......
......@@ -25,7 +25,6 @@ SERVER_URL = "http://127.0.0.1:8008"
def test_connection(synapse):
assert synapse["listeners"][0]["port"] == 8008
assert requests.get(SERVER_URL).status_code == requests.codes.ok
......@@ -33,7 +32,6 @@ def test_connection(synapse):
@pytest.fixture
def matrix_bot_user(synapse):
body = {"username": "aleksis-bot", "password": "test", "auth": {"type": "m.login.dummy"}}
get_site_preferences()["matrix__homeserver"] = SERVER_URL
......@@ -72,7 +70,6 @@ def test_create_room_for_group(matrix_bot_user):
#
def test_create_room_for_group_short_name(matrix_bot_user):
g = Group.objects.create(name="Test Room", short_name="test")
assert not MatrixRoom.objects.all().exists()
room = MatrixRoom.from_group(g)
......@@ -254,7 +251,6 @@ def test_power_levels(matrix_bot_user):
def test_sync_room_members_without_user(matrix_bot_user):
get_site_preferences()["matrix__homeserver_ids"] = "matrix.aleksis.example.org"
g = Group.objects.create(name="Test Room")
......@@ -278,7 +274,6 @@ def test_sync_room_members_without_user(matrix_bot_user):
def test_sync_room_members_without_homeserver(matrix_bot_user):
get_site_preferences()["matrix__homeserver_ids"] = ""
g = Group.objects.create(name="Test Room")
......@@ -463,7 +458,6 @@ def test_too_much_invites(matrix_bot_user):
persons = []
for i in range(100):
u = User.objects.create_user(f"test{i}", f"test{i}@example.org", f"test{i}")
p = Person.objects.create(first_name=f"Test {i}", last_name="Person", user=u)
persons.append(p)
......
from django.utils.decorators import method_decorator
from django_filters.views import FilterView
from django_tables2 import SingleTableMixin
from guardian.shortcuts import get_objects_for_user
......@@ -6,9 +8,11 @@ from rules.contrib.views import PermissionRequiredMixin
from aleksis.apps.matrix.filters import GroupMatrixRoomFilter
from aleksis.apps.matrix.forms import GroupMatrixRoomActionForm
from aleksis.apps.matrix.tables import GroupsMatrixRoomsTable
from aleksis.core.decorators import pwa_cache
from aleksis.core.models import Group
@method_decorator(pwa_cache, name="dispatch")
class MatrixRoomListView(PermissionRequiredMixin, SingleTableMixin, FilterView):
"""Overview about groups and their Matrix rooms."""
......
......@@ -25,13 +25,13 @@ django.setup()
# -- Project information -----------------------------------------------------
project = "AlekSIS-App-Matrix"
copyright = "2018-2022 The AlekSIS team"
copyright = "2018-2023 The AlekSIS team"
author = "The AlekSIS Team"
# The short X.Y version
version = "1.0"
version = "2.0"
# The full version, including alpha/beta/rc tags
release = "1.0"
release = "2.0"
# -- General configuration ---------------------------------------------------
......
......@@ -122,76 +122,76 @@
site: 1
name: "8c"
short_name: "8c"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
- model: core.group
pk: 102
fields:
site: 1
name: "5c"
short_name: "5c"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
- model: core.group
pk: 103
fields:
site: 1
name: "6c"
short_name: "6c"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
- model: core.group
pk: 104
fields:
site: 1
name: "5a"
short_name: "5a"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
- model: core.group
pk: 105
fields:
site: 1
name: "7a"
short_name: "7a"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
- model: core.group
pk: 106
fields:
site: 1
name: "6a"
short_name: "6a"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
- model: core.group
pk: 107
fields:
site: 1
name: "9d"
short_name: "9d"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
- model: core.group
pk: 1
fields:
site: 1
name: "8c:Mu"
short_name: "8c:Mu"
members: [ 6, 7, 8 ]
owners: [ 2 ]
parent_groups: [ 101 ]
members: [6, 7, 8]
owners: [2]
parent_groups: [101]
- model: core.group
pk: 2
fields:
site: 1
name: "5c:Mu"
short_name: "5c:Mu"
members: [ 6, 7, 8 ]
owners: [ 2 ]
parent_groups: [ 102 ]
members: [6, 7, 8]
owners: [2]
parent_groups: [102]
- model: core.group
pk: 3
fields:
site: 1
name: "6c:Mu"
short_name: "6c:Mu"
members: [ 6, 7, 8 ]
owners: [ 3 ]
parent_groups: [ 103 ]
members: [6, 7, 8]
owners: [3]
parent_groups: [103]
- model: core.group
pk: 4
fields:
......@@ -199,56 +199,56 @@
name: "5a:De"
short_name: "5a:De"
members: [ 6, 7, 8 ]
owners: [ 4 ]
parent_groups: [ 104 ]
members: [6, 7, 8]
owners: [4]
parent_groups: [104]
- model: core.group
pk: 5
fields:
site: 1
name: "7a:Mu"
short_name: "7a:Mu"
members: [ 6, 7, 8 ]
owners: [ 4 ]
parent_groups: [ 105 ]
members: [6, 7, 8]
owners: [4]
parent_groups: [105]
- model: core.group
pk: 6
fields:
site: 1
name: "6a:Mu"
short_name: "6a:Mu"
members: [ 6, 7, 8 ]
owners: [ 5 ]
parent_groups: [ 106 ]
members: [6, 7, 8]
owners: [5]
parent_groups: [106]
- model: core.group
pk: 7
fields:
site: 1
name: "9d:Mu"
short_name: "9d:Mu"
members: [ 6, 7, 8 ]
owners: [ 5 ]
parent_groups: [ 107 ]
members: [6, 7, 8]
owners: [5]
parent_groups: [107]
- model: core.group
pk: 8
fields:
site: 1
name: "6a:De"
short_name: "6a:De"
members: [ 6, 7, 8 ]
owners: [ 5 ]
parent_groups: [ 106 ]
members: [6, 7, 8]
owners: [5]
parent_groups: [106]
- model: core.group
pk: 9
fields:
site: 1
name: "Teachers"
short_name: "Teachers"
members: [ 2, 3, 4, 5 ]
members: [2, 3, 4, 5]
- model: core.group
pk: 10
fields:
site: 1
name: "Students"
short_name: "Students"
members: [ 6, 7, 8 ]
members: [6, 7, 8]
[tool.poetry]
name = "AlekSIS-App-Matrix"
version = "1.0"
version = "2.0"
packages = [
{ include = "aleksis" }
]
......@@ -17,7 +17,7 @@ license = "EUPL-1.2-or-later"
homepage = "https://aleksis.org"
repository = "https://edugit.org/AlekSIS/official/AlekSIS-App-Matrix"
classifiers = [
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django :: 3.0",
"Intended Audience :: Education",
......@@ -32,10 +32,10 @@ secondary = true
[tool.poetry.dependencies]
python = "^3.9"
aleksis-core = "^2.7"
aleksis-core = "^3.0"
[tool.poetry.dev-dependencies]
aleksis-builddeps = "*"
aleksis-builddeps = ">=2023.1.dev0"
matrix-synapse = "^1.49.2"
pytest-xprocess = "^0.19.0"
pytest-mock = "^3.7.0"
......
[tox]
skipsdist = True
skip_missing_interpreters = true
envlist = py37,py38,py39
envlist = py39,py310,py311
[testenv]
whitelist_externals = poetry
sudo
skip_install = true
envdir = {toxworkdir}/globalenv
commands_pre =
poetry install
poetry run aleksis-admin yarn install
poetry run aleksis-admin vite build
poetry run aleksis-admin collectstatic --no-input
commands =
poetry run pytest --cov=. {posargs} aleksis/
......@@ -27,6 +26,8 @@ commands =
poetry run black --check --diff aleksis/
poetry run isort -c --diff --stdout aleksis/
poetry run flake8 {posargs} aleksis/
poetry run sh -c "aleksis-admin yarn run prettier --check --ignore-path={toxinidir}/.prettierignore {toxinidir}"
poetry run sh -c "aleksis-admin yarn run eslint {toxinidir}/aleksis/**/*/frontend/**/*.{js,vue} --config={toxinidir}/.eslintrc.js --resolve-plugins-relative-to=."
[testenv:security]
commands =
......@@ -46,6 +47,7 @@ commands = poetry run make -C docs/ html {posargs}
commands =
poetry run isort aleksis/
poetry run black aleksis/
poetry run sh -c "aleksis-admin yarn run prettier --write --ignore-path={toxinidir}/.prettierignore {toxinidir}"
[testenv:makemessages]
commands =
......