Merge pull request #514 from bjrambo/pr/ncenterlite-widget

로그인 위젯을 통해서 알림센터 위젯을 생성합니다.
This commit is contained in:
BJRambo 2016-05-30 10:37:35 +09:00
commit 0ff86b4027
16 changed files with 714 additions and 18 deletions

View file

@ -64,8 +64,10 @@ $lang->ncenterlite_io_about = 'You can activate or inactivate every function of
$lang->ncenterlite_on = 'Active';
$lang->ncenterlite_off = 'Inactive';
$lang->ncenterlite_display = 'Display Notifications';
$lang->ncenterlite_display_y = 'Yes';
$lang->ncenterlite_display_n = 'No';
$lang->ncenterlite_display_all = 'All display';
$lang->ncenterlite_display_pc = 'Only PC';
$lang->ncenterlite_display_mobile = 'Only Mobile';
$lang->ncenterlite_display_none = 'Not display.';
$lang->ncenterlite_display_about = 'You can hide notifications from Notification Center Lite if you are using a layout or widget that handles notifications for you.';
$lang->ncenterlite_mention_target = 'Mention target';
$lang->ncenterlite_mention_target_about = 'Mention target can be nicknames or IDs (@Nickname or @ID).';

View file

@ -74,8 +74,10 @@ $lang->ncenterlite_on = '동작';
$lang->ncenterlite_only_message = '쪽지만';
$lang->ncenterlite_off = '동작 안 함';
$lang->ncenterlite_display = '알림 표시 여부';
$lang->ncenterlite_display_y = '표시';
$lang->ncenterlite_display_n = '표시하지 않음';
$lang->ncenterlite_display_all = '모두 사용';
$lang->ncenterlite_display_pc = 'PC만 표시';
$lang->ncenterlite_display_mobile = '모바일만 표시';
$lang->ncenterlite_display_none = '표시하지 않음';
$lang->ncenterlite_display_about = '사용하는 레이아웃이나 위젯에 알림을 표시하는 기능이 있는 경우 중복을 막기 위해 알림센터의 알림을 숨길 수 있습니다.';
$lang->ncenterlite_mention_target = '멘션 타겟';
$lang->ncenterlite_mention_target_about = '멘션 알림을 @아이디 소유자에게 보낼지 @닉네임 소유자에게 보낼지 선택할 수 있습니다.';

View file

@ -705,7 +705,7 @@ class ncenterliteController extends ncenterlite
return new Object();
}
if($config->display_use == 'N')
if($config->display_use == 'mobile' && !Mobile::isFromMobilePhone() || $config->display_use == 'pc' && Mobile::isFromMobilePhone() || $config->display_use == 'none')
{
return new Object();
}

View file

@ -20,7 +20,7 @@ class ncenterliteModel extends ncenterlite
{
$config->use = array('message' => 1);
}
if(!$config->display_use) $config->display_use = 'Y';
if(!$config->display_use) $config->display_use = 'all';
if(!$config->mention_names) $config->mention_names = 'nick_name';
if(!$config->mention_suffixes)

View file

@ -21,14 +21,14 @@
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->ncenterlite_display}</label>
<label class="x_control-label" for="display_use">{$lang->ncenterlite_display}</label>
<div class="x_controls">
<label class="x_inline">
<input type="radio" id="display_use_y" name="display_use" value="Y" checked="checked"|cond="$config->display_use == 'Y'" /> {$lang->ncenterlite_display_y}
</label>
<label class="x_inline">
<input type="radio" id="display_use_n" name="display_use" value="N" checked="checked"|cond="$config->display_use == 'N'" /> {$lang->ncenterlite_display_n}
</label>
<select name="display_use" id="display_use">
<option value="all" selected="selected"|cond="$config->display_use == 'all'">{$lang->ncenterlite_display_all}</option>
<option value="none" selected="selected"|cond="$config->display_use == 'none'">{$lang->ncenterlite_display_none}</option>
<option value="pc" selected="selected"|cond="$config->display_use == 'pc'">{$lang->ncenterlite_display_pc}</option>
<option value="mobile" selected="selected"|cond="$config->display_use == 'mobile'">{$lang->ncenterlite_display_mobile}</option>
</select>
<p class="x_help-block">{$lang->ncenterlite_display_about}</p>
</div>
</div>