* Add: #883 管理者の設定したカスタムCSSをユーザー単位で無効にするオプション * ラベル変更
This commit is contained in:
parent
b30086dc6b
commit
943db145e4
12 changed files with 56 additions and 14 deletions
6
app/views/custom_css/show_system.css.erb
Normal file
6
app/views/custom_css/show_system.css.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<%- @user_roles.each do |role| %>
|
||||
.user-role-<%= role.id %> {
|
||||
--user-role-accent: <%= role.color %>;
|
||||
}
|
||||
|
||||
<%- end %>
|
|
@ -34,7 +34,10 @@
|
|||
= csrf_meta_tags unless skip_csrf_meta_tags?
|
||||
%meta{ name: 'style-nonce', content: request.content_security_policy_nonce }
|
||||
|
||||
= stylesheet_link_tag custom_css_path, skip_pipeline: true, host: root_url, media: 'all'
|
||||
- if server_css?
|
||||
= stylesheet_link_tag custom_css_path, skip_pipeline: true, host: root_url, media: 'all'
|
||||
- else
|
||||
= stylesheet_link_tag system_css_path, skip_pipeline: true, host: root_url, media: 'all'
|
||||
|
||||
- if user_custom_css?
|
||||
= stylesheet_link_tag user_custom_css_path({ version: user_custom_css_version }), skip_pipeline: true, host: root_url, media: 'all'
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
= render 'shared/error_messages', object: current_user
|
||||
|
||||
= f.simple_fields_for :settings, current_user.settings do |ff|
|
||||
.fields-group
|
||||
= ff.input :'web.use_server_css',
|
||||
hint: false,
|
||||
label: I18n.t('simple_form.labels.defaults.setting_use_server_css'),
|
||||
kmyblue: true,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.use_custom_css',
|
||||
hint: false,
|
||||
|
|
6
app/views/system_css/show.css.erb
Normal file
6
app/views/system_css/show.css.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<%- @user_roles.each do |role| %>
|
||||
.user-role-<%= role.id %> {
|
||||
--user-role-accent: <%= role.color %>;
|
||||
}
|
||||
|
||||
<%- end %>
|
Loading…
Add table
Add a link
Reference in a new issue