Merge pull request #1762 from pixelfed/staging

Staging
This commit is contained in:
daniel 2019-10-04 23:16:58 -06:00 committed by GitHub
commit aa6ebabcd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 11 deletions

View File

@ -33,20 +33,16 @@ class LikeController extends Controller
$like = Like::whereProfileId($profile->id)->whereStatusId($status->id)->firstOrFail(); $like = Like::whereProfileId($profile->id)->whereStatusId($status->id)->firstOrFail();
$like->forceDelete(); $like->forceDelete();
$count--; $count--;
if($count >= 0) {
$status->likes_count = $count; $status->likes_count = $count;
$status->save(); $status->save();
}
} else { } else {
$like = new Like(); $like = new Like();
$like->profile_id = $profile->id; $like->profile_id = $profile->id;
$like->status_id = $status->id; $like->status_id = $status->id;
$like->save(); $like->save();
$count++; $count++;
if($count >= 0) {
$status->likes_count = $count; $status->likes_count = $count;
$status->save(); $status->save();
}
LikePipeline::dispatch($like); LikePipeline::dispatch($like);
} }

View File

@ -24,7 +24,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
'in_reply_to_id' => $status->in_reply_to_id, 'in_reply_to_id' => $status->in_reply_to_id,
'in_reply_to_account_id' => $status->in_reply_to_profile_id, 'in_reply_to_account_id' => $status->in_reply_to_profile_id,
'reblog' => null, 'reblog' => null,
'content' => $status->rendered ?? $status->caption, 'content' => $status->rendered ?? $status->caption ?? '',
'created_at' => $status->created_at->toJSON(), 'created_at' => $status->created_at->toJSON(),
'emojis' => [], 'emojis' => [],
'replies_count' => 0, 'replies_count' => 0,

View File

@ -0,0 +1,16 @@
<?php
return [
'about' => 'Over ons',
'help' => 'Ondersteuning',
'language' => 'Taal',
'fediverse' => 'Fediverse',
'opensource' => 'Open Source',
'terms' => 'Voorwaarden',
'privacy' => 'Privacy',
'l10nWip' => 'We werken nog steeds aan ondersteuning voor lokalisatie',
'currentLocale' => 'Huidige landinstelling',
'selectLocale' => 'Selecteer een van de ondersteunde talen',
'contact' => 'Contact',
'contact-us' => 'Neem contact op',
'places' => 'Places',
];

View File

@ -0,0 +1,35 @@
<?php
return [
'exception_message' => '例外訊息: :message',
'exception_trace' => '例外追蹤: :trace',
'exception_message_title' => '例外訊息',
'exception_trace_title' => '例外追蹤',
'backup_failed_subject' => '備份 :application_name 失敗',
'backup_failed_body' => '重要:備份 :application_name 時遇到錯誤',
'backup_successful_subject' => '成功備份 :application_name',
'backup_successful_subject_title' => '成功的新備份!',
'backup_successful_body' => '好消息, :application_name 的新備份成功地在名為 :disk_name 的磁碟上建立完成了。',
'cleanup_failed_subject' => '清理 :application_name 的備份失敗。',
'cleanup_failed_body' => '清理 :application_name 的備份時遇到錯誤。',
'cleanup_successful_subject' => '清理 :application_name 的備份成功',
'cleanup_successful_subject_title' => '清除備份成功!',
'cleanup_successful_body' => '清除在名為 :disk_name 的磁碟上的 :application_name 備份成功了。',
'healthy_backup_found_subject' => ':application_name 在磁碟 :disk_name 上的備份是健康的',
'healthy_backup_found_subject_title' => ':application_name 的備份是健康的',
'healthy_backup_found_body' => ':application_name 的備份看起來是健康的。幹得好!',
'unhealthy_backup_found_subject' => '重要::application_name 的備份有問題',
'unhealthy_backup_found_subject_title' => '重要::application_name 的備份有問題。 :problem',
'unhealthy_backup_found_body' => ':application_name 在磁碟 :disk_name 上的備份是有問題的的。',
'unhealthy_backup_found_not_reachable' => '備份目的地不可用。 :error',
'unhealthy_backup_found_empty' => '完全沒有此應用程式的備份。',
'unhealthy_backup_found_old' => '在 :date 製作的最新備份太舊了。',
'unhealthy_backup_found_unknown' => '抱歉,無法確定確切的原因。',
'unhealthy_backup_found_full' => '備份使用太多儲存空間了。目前的使用量為 :disk_usage ,這已經高於允許使用的限制 :disk_limit 了。',
];

View File

@ -44,13 +44,13 @@
<div class="text-center mb-5"> <div class="text-center mb-5">
<img src="/img/pixelfed-icon-grey.svg"> <img src="/img/pixelfed-icon-grey.svg">
</div> </div>
<div class="card card-default"> <div class="card card-default shadow-none border">
<div class="card-header text-center font-weight-bold bg-white"> <div class="card-header text-center font-weight-bold bg-white">
Authorization Request Authorization Request
</div> </div>
<div class="card-body"> <div class="card-body">
<!-- Introduction --> <!-- Introduction -->
<p><strong>{{ $client->name }}</strong> is requesting permission to access your account.</p> <p><strong>{{ $client->name }}</strong> is requesting permission to access your <strong>{{request()->user()->username}}</strong> account.</p>
<!-- Scope List --> <!-- Scope List -->
@if (count($scopes) > 0) @if (count($scopes) > 0)
@ -85,6 +85,11 @@
<button class="btn btn-outline-danger font-weight-bold">Cancel</button> <button class="btn btn-outline-danger font-weight-bold">Cancel</button>
</form> </form>
</div> </div>
<hr>
<p class="mb-0 text-center small text-muted">Click <a href="{{ route('logout') }}" class="font-weight-bold" onclick="event.preventDefault();document.getElementById('logout_auth').submit();">here</a> to log out of this account.</p>
<form id="logout_auth" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
</div> </div>
</div> </div>
</div> </div>