Procházet zdrojové kódy

element-web camelCase renaming (settingDefault -> setting_defaults)

pull/2820/head
Slavi Pantaleev před 2 roky
rodič
revize
38c9aa9369
5 změnil soubory, kde provedl 7 přidání a 6 odebrání
  1. +1
    -1
      docs/configuring-playbook-client-element.md
  2. +2
    -2
      roles/custom/matrix-client-element/defaults/main.yml
  3. +1
    -1
      roles/custom/matrix-client-element/tasks/prepare_themes.yml
  4. +1
    -0
      roles/custom/matrix-client-element/tasks/validate_config.yml
  5. +2
    -2
      roles/custom/matrix-client-element/templates/config.json.j2

+ 1
- 1
docs/configuring-playbook-client-element.md Zobrazit soubor

@@ -32,7 +32,7 @@ Alternatively, **if there is no pre-defined variable** for an Element setting yo

## Themes

To change the look of Element, you can define your own themes manually by using the `matrix_client_element_settingDefaults_custom_themes` setting.
To change the look of Element, you can define your own themes manually by using the `matrix_client_element_setting_defaults_custom_themes` setting.

Or better yet, you can automatically pull it all themes provided by the [aaronraimist/element-themes](https://github.com/aaronraimist/element-themes) project by simply flipping a flag (`matrix_client_element_themes_enabled: true`).



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

@@ -207,14 +207,14 @@ matrix_client_element_themes_repository_version: master
# Controls the default theme
matrix_client_element_default_theme: 'light'

# Controls the `settingsDefault.custom_themes` setting of the Element configuration.
# Controls the `setting_defaults.custom_themes` setting of the Element configuration.
# You can use this setting to define custom themes.
#
# Also, look at `matrix_client_element_themes_enabled` for a way to pull in a bunch of custom themes automatically.
# If you define your own themes here and set `matrix_client_element_themes_enabled: true`, your themes will be preserved as well.
#
# Note that for a custom theme to work well, all Element instances that you use must have the same theme installed.
matrix_client_element_settingDefaults_custom_themes: [] # noqa var-naming
matrix_client_element_setting_defaults_custom_themes: [] # noqa var-naming

# Default Element configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it.


+ 1
- 1
roles/custom/matrix-client-element/tasks/prepare_themes.yml Zobrazit soubor

@@ -30,7 +30,7 @@

- name: Load Element theme
ansible.builtin.set_fact:
matrix_client_element_settingDefaults_custom_themes: "{{ matrix_client_element_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}" # noqa var-naming
matrix_client_element_setting_defaults_custom_themes: "{{ matrix_client_element_setting_defaults_custom_themes + [item['content'] | b64decode | from_json] }}" # noqa var-naming
with_items: "{{ matrix_client_element_theme_file_contents.results }}"

#


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

@@ -37,6 +37,7 @@
- {'old': 'matrix_client_element_showLabsSettings', 'new': 'matrix_client_element_show_lab_settings'}
- {'old': 'matrix_client_element_permalinkPrefix', 'new': 'matrix_client_element_permalink_prefix'}
- {'old': 'matrix_client_element_roomdir_servers', 'new': 'matrix_client_element_room_directory_servers'}
- {'old': 'matrix_client_element_settingDefaults_custom_themes', 'new': 'matrix_client_element_setting_defaults_custom_themes'}

- when: matrix_client_element_container_labels_traefik_enabled | bool
block:


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

@@ -8,8 +8,8 @@
"base_url": {{ matrix_client_element_default_is_url | string | to_json }}
}
},
"settingDefaults": {
"custom_themes": {{ matrix_client_element_settingDefaults_custom_themes | to_json }}
"setting_defaults": {
"custom_themes": {{ matrix_client_element_setting_defaults_custom_themes | to_json }}
},
"default_theme": {{ matrix_client_element_default_theme | string | to_json }},
"default_country_code": {{ matrix_client_element_default_country_code | string | to_json }},


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