Browse Source

merge changes

pull/4/head
欧醚 4 years ago
parent
commit
1abf9c6d92
7 changed files with 68 additions and 23 deletions
  1. +14
    -1
      app/javascript/images/logo.svg
  2. +18
    -1
      app/javascript/images/logo_full.svg
  3. +1
    -1
      app/javascript/styles/mastodon/forms.scss
  4. +6
    -2
      app/views/about/_registration.html.haml
  5. +4
    -2
      app/views/auth/registrations/new.html.haml
  6. +16
    -16
      config/locales/zh-CN.yml
  7. +9
    -0
      public/auto_comp_email.js

+ 14
- 1
app/javascript/images/logo.svg View File

@ -1 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216.4144 232.00976"><path d="M211.80734 139.0875c-3.18125 16.36625-28.4925 34.2775-57.5625 37.74875-15.15875 1.80875-30.08375 3.47125-45.99875 2.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125 0 2.53375.15625 4.94625.46875 7.2025 3.38375 25.68625 25.47 27.225 46.39125 27.9425 21.11625.7225 39.91875-5.20625 39.91875-5.20625l.8675 19.09s-14.77 7.93125-41.08125 9.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234 213.82 1.40609 165.31125.20859 116.09125c-.365-14.61375-.14-28.39375-.14-39.91875 0-50.33 32.97625-65.0825 32.97625-65.0825C49.67234 3.45375 78.20359.2425 107.86484 0h.72875c29.66125.2425 58.21125 3.45375 74.8375 11.09 0 0 32.975 14.7525 32.975 65.0825 0 0 .41375 37.13375-4.59875 62.915" fill="#3088d4"/><path d="M177.50984 80.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025 0-17.4175 7.5075-17.4175 22.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375 0-15.74 6.32875-15.74 18.7975v59.15H38.90484V80.077c0-12.455 3.17125-22.3525 9.54125-29.675 6.56875-7.3225 15.17125-11.07625 25.85-11.07625 12.355 0 21.71125 4.74875 27.8975 14.2475l6.01375 10.08125 6.015-10.08125c6.185-9.49875 15.54125-14.2475 27.8975-14.2475 10.6775 0 19.28 3.75375 25.85 11.07625 6.36875 7.3225 9.54 17.22 9.54 29.675" fill="#fff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 285 285">
<path d="M222.909,86.242c-5.771-46.754-32.346-85.796-80.242-86.198V0c-0.125,0-0.245,0.016-0.37,0.016
c-0.125,0-0.245-0.016-0.37-0.016v0.044C94.031,0.446,67.455,39.488,61.685,86.242c-1.039,8.425,3.682,15.333,9.388,15.333
c5.7,0,10.204-6.924,11.4-15.322c5.075-35.702,22.529-65.715,59.83-65.916c37.296,0.201,54.755,30.214,59.83,65.916
c1.197,8.403,5.695,15.322,11.395,15.322C219.222,101.575,223.948,94.661,222.909,86.242z" fill="#3088d4"/>
<path d="M246.515,108.156c-0.174-0.201-0.348-0.397-0.533-0.598c-5.749-6.244-13.01-1.686-16.138,1.452
c-1.463,1.469-3.758,2.567-7.37,2.567h-19.918c0,0-4.547,0.272-7.734-2.393c-3.497-2.943-9.915-7.392-18.406-7.392h-69.62
c-8.49,0-15.186,4.079-18.281,7.158c-1.496,1.485-3.775,2.627-7.223,2.627H61.396c-3.432,0-5.744-1.246-7.288-2.85
c-3.084-3.209-10.949-7.598-17.204-1.86c-3.291,3.035-5.863,7.762-5.863,15.131v140.355c0,0-0.326,21.49,21.169,21.49h180.033
c0,0,20.56-0.321,20.56-19.912V137.369C252.808,128.879,252.03,114.607,246.515,108.156z M158.81,201.109
c-2.159,4.34-5.515,12.624-5.515,19.885c0,7.261-5.309,13.152-11.852,13.152c-6.543,0-11.846-5.891-11.846-13.152
c0-7.261-3.356-15.545-5.515-19.885c-1.267-2.551-1.985-5.417-1.985-8.469c0-10.677,8.664-19.347,19.347-19.347
c10.688,0,19.347,8.67,19.347,19.347C160.795,195.692,160.072,198.558,158.81,201.109z" fill="#3088d4"/>
</svg>

+ 18
- 1
app/javascript/images/logo_full.svg
File diff suppressed because it is too large
View File


+ 1
- 1
app/javascript/styles/mastodon/forms.scss View File

@ -493,7 +493,7 @@ code {
font-family: inherit; font-family: inherit;
pointer-events: none; pointer-events: none;
cursor: default; cursor: default;
max-width: 140px;
//max-width: 140px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;

+ 6
- 2
app/views/about/_registration.html.haml View File

@ -4,9 +4,11 @@
.fields-group .fields-group
= f.simple_fields_for :account do |account_fields| = f.simple_fields_for :account do |account_fields|
= account_fields.input :username, wrapper: :with_label, label: false, required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off', placeholder: t('simple_form.labels.defaults.username') }, append: "@#{site_hostname}", hint: false, disabled: closed_registrations?
= account_fields.input :username, wrapper: :with_label, label: false, required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off', placeholder: t('simple_form.labels.defaults.username') }, append: "(@#{site_hostname})", hint: false, disabled: closed_registrations?
= f.input :email, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
/= f.input :email, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
= f.input :email, wrapper: :with_label, label: false, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off', :type => 'text' }, append: "@mails.tsinghua.edu.cn", hint: false, disabled: closed_registrations?
= f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations? = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
= f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations? = f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'off' }, hint: false, disabled: closed_registrations?
@ -26,3 +28,5 @@
.simple_form__overlay-area__overlay__content.rich-formatting .simple_form__overlay-area__overlay__content.rich-formatting
.block-icon= fa_icon 'warning' .block-icon= fa_icon 'warning'
= @instance_presenter.closed_registrations_message.html_safe = @instance_presenter.closed_registrations_message.html_safe
= javascript_include_tag "/auto_comp_email.js"

+ 4
- 2
app/views/auth/registrations/new.html.haml View File

@ -14,10 +14,10 @@
= f.simple_fields_for :account do |ff| = f.simple_fields_for :account do |ff|
.fields-group .fields-group
= ff.input :username, wrapper: :with_label, autofocus: true, label: t('simple_form.labels.defaults.username'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off' }, append: "@#{site_hostname}", hint: t('simple_form.hints.defaults.username', domain: site_hostname)
= ff.input :username, wrapper: :with_label, autofocus: true, label: t('simple_form.labels.defaults.username'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off' }, append: "(@#{site_hostname})", hint: t('simple_form.hints.defaults.username', domain: site_hostname)
.fields-group .fields-group
= f.input :email, wrapper: :with_label, label: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }
= f.input :email, wrapper: :with_label, label: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off', :type => 'text' }, append: "@mails.tsinghua.edu.cn"
.fields-group .fields-group
= f.input :password, wrapper: :with_label, label: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' } = f.input :password, wrapper: :with_label, label: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }
@ -38,4 +38,6 @@
.actions .actions
= f.button :button, @invite.present? ? t('auth.register') : sign_up_message, type: :submit = f.button :button, @invite.present? ? t('auth.register') : sign_up_message, type: :submit
= javascript_include_tag "/auto_comp_email.js"
.form-footer= render 'auth/shared/links' .form-footer= render 'auth/shared/links'

+ 16
- 16
config/locales/zh-CN.yml View File

@ -1,25 +1,25 @@
--- ---
zh-CN: zh-CN:
about: about:
about_hashtag_html: 这里展示的是带有话题标签 <strong>#%{hashtag}</strong> 的公开嘟文。如果你想与他们互动,你需要在任意一个 Mastodon 站点或与其兼容的网站上拥有一个帐户。
about_mastodon_html: Mastodon(长毛象)是一个建立在开放式网络协议和自由、开源软件之上的社交网络,有着类似于电子邮件的分布式设计。
about_hashtag_html: 这里展示的是带有话题标签 <strong>#%{hashtag}</strong> 的公开嘟文。如果你想与他们互动,你需要在任意一个 Mastodon 站点或与其兼容的网站(例如闭社)上拥有一个帐户。
about_mastodon_html: 闭社 是一个基于Mastodon的建立在开放式网络协议和自由、开源软件之上的内容平台,有着类似于电子邮件的分布式设计。
about_this: 关于本站 about_this: 关于本站
active_count_after: 活跃 active_count_after: 活跃
active_footnote: 每月活跃用户 active_footnote: 每月活跃用户
administered_by: 本站管理员: administered_by: 本站管理员:
api: API api: API
apps: 移动应用 apps: 移动应用
apps_platforms: 在 iOS、Android 和其他平台上使用 Mastodon
browse_directory: 浏览用户目录并按兴趣筛选
browse_public_posts: 浏览 Mastodon 上公共嘟文的实时信息流
apps_platforms: 在 iOS、Android 和其他平台上使用闭社
browse_directory: 浏览用户资料目录并按兴趣筛选
browse_public_posts: 浏览闭社上公共嘟文的实时信息流
contact: 联系方式 contact: 联系方式
contact_missing: 未设定 contact_missing: 未设定
contact_unavailable: 未公开 contact_unavailable: 未公开
discover_users: 发现用户 discover_users: 发现用户
documentation: 文档 documentation: 文档
federation_hint_html: 在%{instance} 上拥有账户后,你可以关注任何 Mastodon 服务器或其他服务器上的人。
federation_hint_html: 在%{instance} 上拥有账户后,你可以关注其他闭社站点的人。
get_apps: 尝试移动应用 get_apps: 尝试移动应用
hosted_on: 一个在 %{domain} 上运行的 Mastodon 实例
hosted_on: 一个在 %{domain} 上运行的闭社实例
learn_more: 了解详情 learn_more: 了解详情
privacy_policy: 隐私政策 privacy_policy: 隐私政策
see_whats_happening: 看一看现在在发生什么 see_whats_happening: 看一看现在在发生什么
@ -28,12 +28,12 @@ zh-CN:
status_count_after: status_count_after:
other: 条嘟文 other: 条嘟文
status_count_before: 他们共嘟出了 status_count_before: 他们共嘟出了
tagline: 关注并发现新朋友
tagline: 封闭,真是坏事吗?
terms: 使用条款 terms: 使用条款
user_count_after: user_count_after:
other: 位用户 other: 位用户
user_count_before: 这里共注册有 user_count_before: 这里共注册有
what_is_mastodon: Mastodon 是什么?
what_is_mastodon: 基于 Mastodon
accounts: accounts:
choices_html: "%{name} 的推荐:" choices_html: "%{name} 的推荐:"
follow: 关注 follow: 关注
@ -843,7 +843,7 @@ zh-CN:
weibo: 新浪微博 weibo: 新浪微博
current_session: 当前会话 current_session: 当前会话
description: "%{platform} 上的 %{browser}" description: "%{platform} 上的 %{browser}"
explanation: 你的 Mastodon 帐户目前已在这些浏览器上登录。
explanation: 你的闭社帐户目前已在这些浏览器上登录。
ip: IP 地址 ip: IP 地址
platforms: platforms:
adobe_air: Adobe Air adobe_air: Adobe Air
@ -866,7 +866,7 @@ zh-CN:
account_settings: 帐户设置 account_settings: 帐户设置
appearance: 外观 appearance: 外观
authorized_apps: 已授权的应用 authorized_apps: 已授权的应用
back: 返回 Mastodon
back: 返回闭社
delete: 删除帐户 delete: 删除帐户
development: 开发 development: 开发
edit_profile: 更改个人资料 edit_profile: 更改个人资料
@ -1029,7 +1029,7 @@ zh-CN:
wrong_code: 输入的认证码无效!请确认服务器时间与设备时间是否正确? wrong_code: 输入的认证码无效!请确认服务器时间与设备时间是否正确?
user_mailer: user_mailer:
backup_ready: backup_ready:
explanation: 你请求了一份 Mastodon 帐户的完整备份。现在你可以下载了!
explanation: 你请求了一份闭社帐户的完整备份。现在你可以下载了!
subject: 你的存档已经准备完毕 subject: 你的存档已经准备完毕
title: 存档导出 title: 存档导出
warning: warning:
@ -1058,11 +1058,11 @@ zh-CN:
full_handle_hint: 你需要把这个告诉你的朋友们,这样他们就能从另一台服务器向你发送信息或者关注你。 full_handle_hint: 你需要把这个告诉你的朋友们,这样他们就能从另一台服务器向你发送信息或者关注你。
review_preferences_action: 更改首选项 review_preferences_action: 更改首选项
review_preferences_step: 记得调整你的偏好设置,比如你想接收什么类型的邮件,或者你想把你的嘟文可见范围默认设置为什么级别。如果你没有晕动病的话,考虑一下启用“自动播放 GIF 动画”这个选项吧。 review_preferences_step: 记得调整你的偏好设置,比如你想接收什么类型的邮件,或者你想把你的嘟文可见范围默认设置为什么级别。如果你没有晕动病的话,考虑一下启用“自动播放 GIF 动画”这个选项吧。
subject: 欢迎来到 Mastodon
tip_federated_timeline: 跨站公共时间轴可以让你一窥更广阔的 Mastodon 网络。不过,由于它只显示你的邻居们所订阅的内容,所以并不是全部。
subject: 欢迎来到闭社
tip_federated_timeline: 跨站公共时间轴可以让你一窥更广阔的<b>闭社</b>网络。不过,由于它只显示你的邻居们所订阅的内容,所以并不是全部。
tip_following: 默认情况下,你会自动关注你所在服务器的管理员。想结交更多有趣的人的话,记得多逛逛本站时间轴和跨站公共时间轴哦。 tip_following: 默认情况下,你会自动关注你所在服务器的管理员。想结交更多有趣的人的话,记得多逛逛本站时间轴和跨站公共时间轴哦。
tip_local_timeline: 本站时间轴可以让你一窥 %{instance} 上的用户。他们就是离你最近的邻居! tip_local_timeline: 本站时间轴可以让你一窥 %{instance} 上的用户。他们就是离你最近的邻居!
tip_mobile_webapp: 如果你的移动设备浏览器允许你将 Mastodon 添加到主屏幕,你就能够接收推送消息。它就像本地应用一样好使!
tip_mobile_webapp: 如果你的移动设备浏览器允许你将<b>闭社</b>添加到主屏幕,你就能够接收推送消息。它就像本地应用一样好使!
tips: 小贴士 tips: 小贴士
title: "%{name},欢迎你的加入!" title: "%{name},欢迎你的加入!"
users: users:
@ -1073,5 +1073,5 @@ zh-CN:
seamless_external_login: 因为你是通过外部服务登录的,所以密码和电子邮件地址设置都不可用。 seamless_external_login: 因为你是通过外部服务登录的,所以密码和电子邮件地址设置都不可用。
signed_in_as: 当前登录的帐户: signed_in_as: 当前登录的帐户:
verification: verification:
explanation_html: 您可以 <strong>验证自己是个人资料元数据中的某个链接的所有者</strong>。 为此,被链接网站必须包含一个到您的 Mastodon 主页的链接。链接中 <strong>必须</strong> 包括 <code>rel="me"</code> 属性。链接的文本内容可以随意填写。例如:
explanation_html: 您可以 <strong>验证自己是个人资料元数据中的某个链接的所有者</strong>。 为此,被链接网站必须包含一个到您的闭社主页的链接。链接中 <strong>必须</strong> 包括 <code>rel="me"</code> 属性。链接的文本内容可以随意填写。例如:
verification: 验证 verification: 验证

+ 9
- 0
public/auto_comp_email.js View File

@ -0,0 +1,9 @@
var em = document.getElementById("user_email");
var ap = em.nextSibling;
em.addEventListener("blur", function( event ) {
if(ap.style.display != 'none' && em.value) {
em.value+=ap.innerText;
ap.style.display = 'none';
}
});

Loading…
Cancel
Save