finish install

This commit is contained in:
joyqi 2021-08-18 16:09:22 +08:00
parent 423c99f3bd
commit 467471c9c3
10 changed files with 242 additions and 799 deletions

View File

@ -9,13 +9,15 @@ details summary { cursor: pointer; }
.keep .fresh-word { display: none; }
form > .message { display: none; }
form > .message { display: none; padding: 20px; border-radius: 5px; }
.message textarea { width: 100%; height: 200px; resize: none; margin: 10px 0; }
.message.fade { display: block; animation: fadein .5s linear; }
.message *:last-child { margin-bottom: 0; }
.message p { margin-top: 8px; }
.message p { margin-top: 10px; }
.message p button { margin-left: 5px; }

View File

@ -26,8 +26,18 @@ details {
}
.message {
form > & {
display: none;
padding: 20px;
border-radius: 5px;
}
textarea {
width: 100%;
height: 200px;
resize: none;
margin: 10px 0;
}
&.fade {
@ -40,7 +50,7 @@ details {
}
p {
margin-top: 8px;
margin-top: 10px;
button {
margin-left: 5px;

File diff suppressed because it is too large Load Diff

View File

@ -748,9 +748,9 @@ class Typecho_Request
* 获取客户端
*
* @access public
* @return string
* @return string|null
*/
public function getReferer(): string
public function getReferer(): ?string
{
if (null === $this->_referer) {
$this->setReferer();

View File

@ -117,7 +117,7 @@ class Widget_Contents_Attachment_Edit extends Widget_Contents_Post_Edit implemen
Typecho_Widget_Helper_Form::POST_METHOD);
/** 文件名称 */
$name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, $this->title, _t('标题 *'));
$name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, $this->title, _t('标题') . ' *');
$form->addInput($name);
/** 文件缩略名 */

View File

@ -128,7 +128,7 @@ class Widget_Metas_Category_Edit extends Widget_Abstract_Metas implements Widget
Typecho_Widget_Helper_Form::POST_METHOD);
/** 分类名称 */
$name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('分类名称 *'));
$name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('分类名称') . ' *');
$form->addInput($name);
/** 分类缩略名 */

View File

@ -130,7 +130,7 @@ class Widget_Metas_Tag_Edit extends Widget_Abstract_Metas implements Widget_Inte
/** 标签名称 */
$name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL,
_t('标签名称 *'), _t('这是标签在站点中显示的名称.可以使用中文,如 "地球".'));
_t('标签名称') . ' *', _t('这是标签在站点中显示的名称.可以使用中文,如 "地球".'));
$form->addInput($name);
/** 标签缩略名 */

View File

@ -95,9 +95,10 @@ class Widget_Security extends Typecho_Widget
* 生成带token的路径
*
* @param $path
* @param string|null $url
* @return string
*/
public function getTokenUrl($path)
public function getTokenUrl($path, ?string $url = null)
{
$parts = parse_url($path);
$params = array();
@ -106,7 +107,7 @@ class Widget_Security extends Typecho_Widget
parse_str($parts['query'], $params);
}
$params['_'] = $this->getToken($this->request->getRequestUrl());
$params['_'] = $this->getToken($url ?: $this->request->getRequestUrl());
$parts['query'] = http_build_query($params);
return Typecho_Common::buildUrl($parts);

View File

@ -95,12 +95,12 @@ class Widget_Users_Edit extends Widget_Abstract_Users implements Widget_Interfac
Typecho_Widget_Helper_Form::POST_METHOD);
/** 用户名称 */
$name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('用户名 *'), _t('此用户名将作为用户登录时所用的名称.')
$name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('用户名') . ' *', _t('此用户名将作为用户登录时所用的名称.')
. '<br />' . _t('请不要与系统中现有的用户名重复.'));
$form->addInput($name);
/** 电子邮箱地址 */
$mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('电子邮箱地址 *'), _t('电子邮箱地址将作为此用户的主要联系方式.')
$mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('邮件地址') . ' *', _t('电子邮箱地址将作为此用户的主要联系方式.')
. '<br />' . _t('请不要与系统中现有的电子邮箱地址重复.'));
$form->addInput($mail);
@ -180,8 +180,8 @@ class Widget_Users_Edit extends Widget_Abstract_Users implements Widget_Interfac
$name->addRule('required', _t('必须填写用户名称'));
$name->addRule('xssCheck', _t('请不要在用户名中使用特殊字符'));
$name->addRule(array($this, 'nameExists'), _t('用户名已经存在'));
$password->label(_t('用户密码 *'));
$confirm->label(_t('用户密码确认 *'));
$password->label(_t('用户密码') . ' *');
$confirm->label(_t('用户密码确认') . ' *');
$password->addRule('required', _t('必须填写密码'));
}

View File

@ -55,7 +55,7 @@ class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface
$form->addInput($url);
/** 电子邮箱地址 */
$mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('电子邮箱地址 *'), _t('电子邮箱地址将作为此用户的主要联系方式.')
$mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('邮件地址') . ' *', _t('电子邮箱地址将作为此用户的主要联系方式.')
. '<br />' . _t('请不要与系统中现有的电子邮箱地址重复.'));
$form->addInput($mail);