Skip to content
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

imprv: Security settings screen redesign #9137

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
fe638af
words cahnge
kazutoweseek Sep 18, 2024
cd7c084
code dlete
kazutoweseek Sep 18, 2024
d3cb7b1
button add
kazutoweseek Sep 18, 2024
c8cf39f
delete code
kazutoweseek Sep 19, 2024
ebf19b9
Setting value change
kazutoweseek Sep 19, 2024
4dc9e0f
displayed or hidden delete
kazutoweseek Sep 19, 2024
a111d8a
button class name fix
kazutoweseek Sep 25, 2024
2539514
float start delete
kazutoweseek Oct 7, 2024
7554980
! add
kazutoweseek Oct 7, 2024
1cd37f6
group fix
kazutoweseek Oct 7, 2024
b09b1c3
aria expanded false change
kazutoweseek Oct 7, 2024
41d2417
clean code
kazutoweseek Oct 9, 2024
80738ec
table tag delete
kazutoweseek Oct 9, 2024
e3308cf
margin adjustment
kazutoweseek Oct 9, 2024
5d7b7d2
change from div tag to strong tag
kazutoweseek Oct 9, 2024
51846cc
display add
kazutoweseek Oct 9, 2024
27f0456
layout change
kazutoweseek Oct 16, 2024
9ca6bbe
columns add
kazutoweseek Oct 16, 2024
d0a234d
align-items change
kazutoweseek Oct 16, 2024
b110455
specify delete
kazutoweseek Oct 16, 2024
f12384b
mt add
kazutoweseek Oct 16, 2024
3a52bc7
set point delte
kazutoweseek Oct 16, 2024
830e47d
mb mt change
kazutoweseek Oct 16, 2024
4454263
Merge branch 'master' into imprv/153742-153037-security-setting-new-d…
kazutoweseek Oct 16, 2024
4d77d26
translation change
kazutoweseek Oct 16, 2024
e6097e9
div tag move
kazutoweseek Oct 16, 2024
7de782a
col 4 add
kazutoweseek Oct 16, 2024
a7379c7
mr auto add
kazutoweseek Oct 17, 2024
a8b9f65
end chnage start
kazutoweseek Oct 17, 2024
cfba07b
my change
kazutoweseek Oct 17, 2024
559bfb9
commonality crete
kazutoweseek Oct 17, 2024
329ff06
name change
kazutoweseek Oct 23, 2024
815a6cf
component fix
kazutoweseek Oct 23, 2024
e6c59e8
clean code
kazutoweseek Oct 23, 2024
97d8026
component change
kazutoweseek Oct 23, 2024
0a1d065
span tag add
kazutoweseek Oct 23, 2024
2f3e64a
span tag delete
kazutoweseek Oct 30, 2024
cee387b
onclic add
kazutoweseek Oct 30, 2024
23ffa59
Merge branch 'master' into imprv/153742-153037-security-setting-new-d…
kazutoweseek Oct 30, 2024
9457238
toggle display delete
kazutoweseek Oct 30, 2024
cd3a35d
span tag add
kazutoweseek Oct 30, 2024
4ba7c10
this add
kazutoweseek Oct 30, 2024
3deee53
Duplication delete
kazutoweseek Oct 30, 2024
abed3e6
settingType add
kazutoweseek Nov 6, 2024
71d538f
get display text add
kazutoweseek Nov 6, 2024
5300f52
clean code
kazutoweseek Nov 6, 2024
d5f5c7e
owener group add
kazutoweseek Nov 6, 2024
c139953
handle click add
kazutoweseek Nov 13, 2024
839cd92
small fix
kazutoweseek Nov 13, 2024
433fee7
uppercase letter change
kazutoweseek Dec 4, 2024
fd16e22
Merge branch 'master' into imprv/153742-153037-security-setting-new-d…
kazutoweseek Jan 15, 2025
4b4b83d
fix
kazutoweseek Jan 15, 2025
32f75ff
Merge branch 'master' into imprv/153742-153037-security-setting-new-d…
kazutoweseek Jan 22, 2025
d8fcbc7
set text add
kazutoweseek Jan 22, 2025
2063190
Merge branch 'master' into imprv/153742-153037-security-setting-new-d…
kazutoweseek Jan 22, 2025
3b8663d
fix
kazutoweseek Jan 29, 2025
e9709dd
isdisplya add
kazutoweseek Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/app/public/static/locales/en_US/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
"scope_of_page_disclosure": "Scope of page disclosure",
"set_point": "Set point",
"Guest Users Access": "Guest users access",
"always_hidden": "Always hidden",
"always_not_displayed": "Always not displayed",
"always_displayed": "Always displayed",
"displayed_or_hidden": "Hidden / Displayed",
"Fixed by env var": "This is fixed by the env var <code>{{key}}={{value}}</code>.",
"register_limitation": "Register limitation",
"register_limitation_desc": "Restriction of new users' registration",
Expand Down
3 changes: 1 addition & 2 deletions apps/app/public/static/locales/fr_FR/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
"scope_of_page_disclosure": "Confidentialité de la page",
"set_point": "Valeur",
"Guest Users Access": "Accès invité",
"always_hidden": "Toujours caché",
"always_not_displayed": "Toujours non affiché",
"always_displayed": "Toujours affiché",
"displayed_or_hidden": "Caché / Affiché",
"Fixed by env var": "Configuré par la variable d'environnement <code>{{key}}={{value}}</code>.",
"register_limitation": "Paramètres d'inscription",
"register_limitation_desc": "Restreindre l'inscription de nouveaux utilisateurs",
Expand Down
5 changes: 2 additions & 3 deletions apps/app/public/static/locales/ja_JP/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
"scope_of_page_disclosure": "ページの公開範囲",
"set_point": "設定値",
"Guest Users Access":"ゲストユーザーのアクセス",
"always_hidden": "非表示 (固定)",
"always_displayed": "表示 (固定)",
"displayed_or_hidden": "非表示 / 表示",
"always_not_displayed": "表示しない",
"always_displayed": "表示する",
"Fixed by env var": "環境変数 <code>{{forcewikimode}}={{wikimode}}</code> により固定されています。",
"register_limitation": "登録の制限",
"register_limitation_desc": "新しいユーザーを登録する方法を制限します。",
Expand Down
3 changes: 1 addition & 2 deletions apps/app/public/static/locales/zh_CN/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
"security_settings": "安全设置",
"scope_of_page_disclosure": "页面公开范围",
"set_point": "设定值",
"always_not_displayed": "不显示",
"always_displayed": "始终显示",
"always_hidden": "总是隐藏",
"displayed_or_hidden": "隐藏 / 显示",
"Guest Users Access": "来宾用户访问",
"Fixed by env var": "这是由env var<code>%s=%s</code>修复的。",
"register_limitation": "注册限制",
Expand Down
93 changes: 69 additions & 24 deletions apps/app/src/client/components/Admin/Security/SecuritySetting.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-unused-expressions */
miya marked this conversation as resolved.
Show resolved Hide resolved
/* eslint-disable react/no-danger */
import React from 'react';

Expand Down Expand Up @@ -368,43 +369,87 @@ class SecuritySetting extends React.Component {
<tbody>
<tr>
<th scope="row">{ t('public') }</th>
<td><span className="material-symbols-outlined text-success me-1">check_circle</span>{ t('security_settings.always_displayed') }</td>
<td>{ t('security_settings.always_displayed') }</td>
</tr>
<tr>
<th scope="row">{ t('anyone_with_the_link') }</th>
<td><span className="material-symbols-outlined text-danger me-1">cancel</span>{ t('security_settings.always_hidden') }</td>
<td>{ t('security_settings.always_not_displayed') }</td>
</tr>
<tr>
<th scope="row">{ t('only_me') }</th>
<td>
<div className="form-check form-switch form-check-success">
<input
type="checkbox"
className="form-check-input"
id="isShowRestrictedByOwner"
checked={!adminGeneralSecurityContainer.state.isShowRestrictedByOwner}
onChange={() => { adminGeneralSecurityContainer.switchIsShowRestrictedByOwner() }}
/>
<label className="form-label form-check-label" htmlFor="isShowRestrictedByOwner">
{t('security_settings.displayed_or_hidden')}
</label>
<div className="col-md-8"></div>
<div className="dropdown">
<button
className={`btn btn-outline-secondary dropdown-toggle text-end col-12
col-md-auto ${adminGeneralSecurityContainer.switchIsShowRestrictedByOwner}`}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここにメソッドを渡しているのはなぜ? switchIsShowRestrictedByOwner というメソッド自体不要なら AdminGeneralSecurityContainer から削除してください。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switchIsShowRestrictedByOwner を使わないなら削除してください

type="button"
id="dropdownMenuButton"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<span>
{adminGeneralSecurityContainer.state.isShowRestrictedByOwner
? t('security_settings.always_displayed')
: t('security_settings.always_not_displayed')}
</span>
</button>
<div className="dropdown-menu" aria-labelledby="dropdownMenuButton">
<button
className="dropdown-item"
type="button"
onClick={() => { adminGeneralSecurityContainer.setState({ isShowRestrictedByOwner: true }) }}
>
{t('security_settings.always_displayed')}
</button>
<button
className="dropdown-item"
type="button"
onClick={() => { adminGeneralSecurityContainer.setState({ isShowRestrictedByOwner: false }) }}
>
{t('security_settings.always_not_displayed')}
</button>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row">{ t('only_inside_the_group') }</th>
<td>
<div className="form-check form-switch form-check-success">
<input
type="checkbox"
className="form-check-input"
id="isShowRestrictedByGroup"
checked={!adminGeneralSecurityContainer.state.isShowRestrictedByGroup}
onChange={() => { adminGeneralSecurityContainer.switchIsShowRestrictedByGroup() }}
/>
<label className="form-label form-check-label" htmlFor="isShowRestrictedByGroup">
{t('security_settings.displayed_or_hidden')}
</label>
<div className="col-md-8"></div>
<div className="dropdown">
<button
className={`btn btn-outline-secondary dropdown-toggle text-end col-12
col-md-auto ${adminGeneralSecurityContainer.switchIsShowRestrictedByGroup}`}
miya marked this conversation as resolved.
Show resolved Hide resolved
type="button"
id="dropdownMenuButton"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<span>
{adminGeneralSecurityContainer.state.isShowRestrictedByGroup
? t('security_settings.always_displayed')
: t('security_settings.always_not_displayed')}
</span>
</button>
<div className="dropdown-menu" aria-labelledby="dropdownMenuButton">
<button
className="dropdown-item"
type="button"
onClick={() => { adminGeneralSecurityContainer.setState({ isShowRestrictedByGroup: true }) }}
>
{t('security_settings.always_displayed')}
</button>
<button
className="dropdown-item"
type="button"
onClick={() => { adminGeneralSecurityContainer.setState({ isShowRestrictedByGroup: false }) }}
>
{t('security_settings.always_not_displayed')}
</button>
</div>
</div>
</td>
</tr>
Expand Down
Loading