Procházet zdrojové kódy

element-web camelCase renaming (showLabsSettings -> show_labs_settings)

pull/2820/head
Slavi Pantaleev před 2 roky
rodič
revize
809316b16e
3 změnil soubory, kde provedl 11 přidání a 2 odebrání
  1. +1
    -1
      roles/custom/matrix-client-element/defaults/main.yml
  2. +9
    -0
      roles/custom/matrix-client-element/tasks/validate_config.yml
  3. +1
    -1
      roles/custom/matrix-client-element/templates/config.json.j2

+ 1
- 1
roles/custom/matrix-client-element/defaults/main.yml Zobrazit soubor

@@ -151,7 +151,7 @@ matrix_client_element_integrations_widgets_urls: ["https://scalar.vector.im/api"
matrix_client_element_integrations_jitsi_widget_url: "https://scalar.vector.im/api/widgets/jitsi.html" matrix_client_element_integrations_jitsi_widget_url: "https://scalar.vector.im/api/widgets/jitsi.html"
matrix_client_element_permalinkPrefix: "https://matrix.to" # noqa var-naming matrix_client_element_permalinkPrefix: "https://matrix.to" # noqa var-naming
matrix_client_element_bug_report_endpoint_url: "https://element.io/bugreports/submit" matrix_client_element_bug_report_endpoint_url: "https://element.io/bugreports/submit"
matrix_client_element_showLabsSettings: true # noqa var-naming
matrix_client_element_show_lab_settings: true # noqa var-naming
# Element public room directory server(s) # Element public room directory server(s)
matrix_client_element_roomdir_servers: ['matrix.org'] matrix_client_element_roomdir_servers: ['matrix.org']
matrix_client_element_welcome_user_id: ~ matrix_client_element_welcome_user_id: ~


+ 9
- 0
roles/custom/matrix-client-element/tasks/validate_config.yml Zobrazit soubor

@@ -27,6 +27,15 @@
with_items: with_items:
- {'old': 'matrix_riot_web_.*', 'new': 'matrix_client_element_.*'} - {'old': 'matrix_riot_web_.*', 'new': 'matrix_client_element_.*'}


- name: (Deprecation) Catch and report renamed element-web settings
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
when: "item.old in vars"
with_items:
- {'old': 'matrix_client_element_showLabsSettings', 'new': 'matrix_client_element_show_lab_settings'}

- when: matrix_client_element_container_labels_traefik_enabled | bool - when: matrix_client_element_container_labels_traefik_enabled | bool
block: block:
- name: Fail if required matrix-client-element Traefik settings not defined - name: Fail if required matrix-client-element Traefik settings not defined


+ 1
- 1
roles/custom/matrix-client-element/templates/config.json.j2 Zobrazit soubor

@@ -22,7 +22,7 @@
"integrations_widgets_urls": {{ matrix_client_element_integrations_widgets_urls | to_json }}, "integrations_widgets_urls": {{ matrix_client_element_integrations_widgets_urls | to_json }},
"integrations_jitsi_widget_url": {{ matrix_client_element_integrations_jitsi_widget_url | string | to_json }}, "integrations_jitsi_widget_url": {{ matrix_client_element_integrations_jitsi_widget_url | string | to_json }},
"bug_report_endpoint_url": {{ matrix_client_element_bug_report_endpoint_url | to_json }}, "bug_report_endpoint_url": {{ matrix_client_element_bug_report_endpoint_url | to_json }},
"showLabsSettings": {{ matrix_client_element_showLabsSettings | to_json }},
"show_labs_settings": {{ matrix_client_element_show_lab_settings | to_json }},
"roomDirectory": { "roomDirectory": {
"servers": {{ matrix_client_element_roomdir_servers | to_json }} "servers": {{ matrix_client_element_roomdir_servers | to_json }}
}, },


Načítá se…
Zrušit
Uložit