Skip to content

Commit

Permalink
Merge pull request #7 from TomNewChao/openeuler-v1.9.7
Browse files Browse the repository at this point in the history
add the notify of must login before edit the text
  • Loading branch information
TomNewChao authored May 28, 2024
2 parents 9716419 + e1c1a9a commit 95bb8f2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 45 deletions.
2 changes: 1 addition & 1 deletion script/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class BaseClient {

const properties = {
grant_types: ['authorization_code'],
id_token_signed_response_alg: 'RS256',
id_token_signed_response_alg: 'HS256',
authorization_signed_response_alg: 'RS256',
response_types: ['code'],
token_endpoint_auth_method: 'client_secret_basic',
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

"pad.loading": "Loading...",
"pad.noCookie": "Cookie could not be found. Please allow cookies in your browser! Your session and settings will not be saved between visits. This may be due to Etherpad being included in an iFrame in some Browsers. Please ensure Etherpad is on the same subdomain/domain as the parent iFrame",
"pad.permissionDenied": "You do not have permission to access this pad",
"pad.permissionDenied": "Please log in to Notepad before proceeding",

"pad.settings.padSettings": "Pad Settings",
"pad.settings.myView": "My View",
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh-hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"pad.colorpicker.cancel": "取消",
"pad.loading": "加载中...",
"pad.noCookie": "无法找到 Cookie。请在您的浏览器中允许cookie!您的会话和设置不会在两次访问之间保存。这可能是由于 Etherpad 包含在某些浏览器的 iFrame 中。请确保 Etherpad 与父 iFrame 位于同一子域/域中",
"pad.permissionDenied": "您没有访问这个记事本的权限",
"pad.permissionDenied": "请登录记事本后再操作",
"pad.settings.padSettings": "记事本设置",
"pad.settings.myView": "我的视窗",
"pad.settings.stickychat": "总是显示聊天屏幕",
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"pad.colorpicker.cancel": "取消",
"pad.loading": "載入中...",
"pad.noCookie": "無法找到 Cookie。請在您的瀏覽器中允許cookie!您的 session 和設定未在訪問期間保存下來。這可能是由於 Etherpad 包含在某些瀏覽器的 iFrame 中。請確保 Etherpad 與父層級 iFrame 位於同一子網域/網域中",
"pad.permissionDenied": "你沒有存取這個記事本的權限",
"pad.permissionDenied": "請登錄記事本後再操作",
"pad.settings.padSettings": "記事本設定",
"pad.settings.myView": "我的視窗",
"pad.settings.stickychat": "永遠在螢幕上顯示聊天",
Expand Down
30 changes: 10 additions & 20 deletions src/templates/pad.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,6 @@
<script type="text/javascript" src="../static/js/l10n.js?v=<%=settings.randomVersionString%>"></script>
</head>
<body>
<div style="height: 76px; background: #002FA7; display: flex; align-items: center; justify-content: space-between" class="notice-div">
<div style="display: flex; align-items: center">
<img src='../static/img/information.svg' class='notice-information-svg' style="height: 24px; width: 24px;">
<font style="color:#FFFFFF;
font-family: PingFangSC-Regular;
font-size: 14px;
letter-spacing: 0;
line-height: 22px;
font-weight: 400;
display: inline-block;
vertical-align: middle;
margin-left: 10px"
>注意:这是共享记事本,请勿留存敏感信息!/ Note: This is a shared notepad, please do not save sensitive information!</font>
</div>
<img src='../static/img/close.svg' class='notice-close-svg' style="height: 24px; width: 24px; display: flex; align-items: center; margin-right: 8px">
</div>

<% e.begin_block("body"); %>

Expand All @@ -88,7 +72,13 @@
</ul>
<ul class="menu_right" role="toolbar">
<% e.begin_block("editbarMenuRight"); %>
<% if (isReadOnly) { %> <div class="show-login" style="float: right; margin: 10px"><font style="color:#000000;font-family: helvetica,sans-serif;font-size: 16px;letter-spacing: 0;font-weight: 400;margin-left: 5px">请先登录再编辑!/ Please log in first before editing!</font></div> <% } %>
<%- toolbar.menu(settings.toolbar.right, isReadOnly, 'right', 'pad') %>
<% if (isReadOnly) { %>
<div class="btn-container" style="float: right; margin: 10px;"><a id="login-redirect-uri" class="btn btn-primary" data-l10n-id="ep_guest_login" aria-label="登录">登录</a></div>
<% } else { %>
<div class="btn-container" style="margin: 10px;"><a id="logout-redirect-uri" class="btn btn-primary" data-l10n-id="ep_guest_logout" aria-label="登出">登出</a></div>
<% } %>
<% e.end_block(); %>
</ul>
<span class="show-more-icon-btn"></span> <!-- use on small screen to display hidden toolbar buttons -->
Expand Down Expand Up @@ -516,10 +506,10 @@ <h1>Skin Builder</h1>
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
require('ep_etherpad-lite/static/js/skin_variants');

// click to hide the notice form
$('.notice-close-svg').on("click", ()=> {
$('.notice-div').hide();
})
// link the redirect to padName in logout and login
var redirectPathName = encodeURIComponent(location.pathname)
$("#login-redirect-uri").prop("href", "/ep_guest/login?redirect_uri="+redirectPathName)
$("#logout-redirect-uri").prop("href", "/ep_guest/logout?redirect_uri="+redirectPathName)

}());
// @license-end
Expand Down
21 changes: 0 additions & 21 deletions src/templates/timeslider.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,6 @@

<% e.begin_block("timesliderBody"); %>
<body id="padbody" class="timeslider limwidth">
<div style="height: 76px; background: #002FA7; display: flex; align-items: center; justify-content: space-between" class="notice-div">
<div style="display: flex; align-items: center">
<img src='../../static/img/information.svg' class='notice-information-svg' style="height: 24px; width: 24px;">
<font style="color:#FFFFFF;
font-family: PingFangSC-Regular;
font-size: 14px;
letter-spacing: 0;
line-height: 22px;
font-weight: 400;
display: inline-block;
vertical-align: middle;
margin-left: 10px"
>注意:这是共享记事本,请勿留存敏感信息!/ Note: This is a shared notepad, please do not save sensitive information!</font>
</div>
<img src='../../static/img/close.svg' class='notice-close-svg' style="height: 24px; width: 24px; display: flex; align-items: center; margin-right: 8px">
</div>

<!----------------------------->
<!--------- TOOLBAR ----------->
Expand Down Expand Up @@ -315,11 +299,6 @@ <h1 data-l10n-id="pad.settings.padSettings"></h1>
padeditbar.init()
});

// click to hide the notice form
$('.notice-close-svg').on("click", ()=> {
$('.notice-div').hide();
})

})();
// @license-end
</script>
Expand Down

0 comments on commit 95bb8f2

Please sign in to comment.