Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix sonar errors #2966

Merged
merged 3 commits into from
Aug 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/css/app-ltr.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/app-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/langs/en.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/vendor.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"/js/manifest.js": "/js/manifest.js?id=01c8731923a46c30aaed",
"/js/vendor.js": "/js/vendor.js?id=1feb099437fdaa899ff2",
"/js/app.js": "/js/app.js?id=485ca09dd7ad0b720e28",
"/css/app-ltr.css": "/css/app-ltr.css?id=2f2e6d6ecec7b4427d4a",
"/css/app-rtl.css": "/css/app-rtl.css?id=57de47acc713e3eb5cf8",
"/js/vendor.js": "/js/vendor.js?id=3d518277f420a6034fec",
"/js/app.js": "/js/app.js?id=955069ea746e90a25310",
"/css/app-ltr.css": "/css/app-ltr.css?id=65bed70084cc067ba47f",
"/css/app-rtl.css": "/css/app-rtl.css?id=3cb4d83dad74941264e7",
"/css/stripe.css": "/css/stripe.css?id=746c8aaac01c56d3cee1",
"/js/stripe.js": "/js/stripe.js?id=95472edcb28fd5bd5d9c",
"/js/u2f-api.js": "/js/u2f-api.js?id=1948d3efdfd801bed14a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
{{ $t('app.with') }}
</span>
<div v-for="attendees in activity.attendees" :key="attendees.id" class="dib pointer ml2" @click="redirect(attendees)">
<img v-tooltip.bottom="attendees.complete_name" :src="attendees.information.avatar.avatar_url" class="br3 journal-avatar-small" />
<img v-tooltip.bottom="attendees.complete_name" :src="attendees.information.avatar.avatar_url" class="br3 journal-avatar-small" :alt="attendees.complete_name" />
</div>
</div>
</div>
Expand Down
10 changes: 7 additions & 3 deletions resources/assets/js/components/passport/AuthorizedClients.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
<table class="table table-borderless m-b-none">
<thead>
<tr>
<th>{{ $t('settings.api_authorized_clients_name') }}</th>
<th>{{ $t('settings.api_authorized_clients_scopes') }}</th>
<th></th>
<th scope="col">
{{ $t('settings.api_authorized_clients_name') }}
</th>
<th scope="col">
{{ $t('settings.api_authorized_clients_scopes') }}
</th>
<th scope="col"></th>
</tr>
</thead>

Expand Down
16 changes: 11 additions & 5 deletions resources/assets/js/components/passport/Clients.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@
<table v-else class="table table-borderless m-b-none">
<thead>
<tr>
<th>{{ $t('settings.api_oauth_clientid') }}</th>
<th>{{ $t('settings.api_oauth_name') }}</th>
<th>{{ $t('settings.api_oauth_secret') }}</th>
<th></th>
<th></th>
<th scope="col">
{{ $t('settings.api_oauth_clientid') }}
</th>
<th scope="col">
{{ $t('settings.api_oauth_name') }}
</th>
<th scope="col">
{{ $t('settings.api_oauth_secret') }}
</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
<table v-else class="table table-borderless m-b-none">
<thead>
<tr>
<th>{{ $t('settings.api_token_name') }}</th>
<th></th>
<th scope="col">
{{ $t('settings.api_token_name') }}
</th>
<th scope="col"></th>
</tr>
</thead>

Expand Down
4 changes: 2 additions & 2 deletions resources/assets/js/components/people/Addresses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="dtc">
<i class="f6 light-silver fa fa-globe pr2"></i>

<a v-if="!editMode" :href="contactAddress.googleMapAddress" target="_blank">
<a v-if="!editMode" :href="contactAddress.googleMapAddress" target="_blank" rel="noopener noreferrer">
{{ contactAddress.address }}
</a>
<span v-else>
Expand All @@ -45,7 +45,7 @@
</span>

<span v-if="!contactAddress.address">
<a v-if="contactAddress.latitude" :href="contactAddress.googleMapAddressLatitude" target="_blank">
<a v-if="contactAddress.latitude" :href="contactAddress.googleMapAddressLatitude" target="_blank" rel="noopener noreferrer">
({{ contactAddress.latitude }}, {{ contactAddress.longitude }})
</a>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
@contentChange="updateContent($event)"
/>
<p class="f6">
{{ $t('app.markdown_description') }} <a href="https://guides.github.com/features/mastering-markdown/" target="_blank">
{{ $t('app.markdown_description') }} <a href="https://guides.github.com/features/mastering-markdown/" target="_blank" rel="noopener noreferrer">
{{ $t('app.markdown_link') }}
</a>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<img v-if="check"
:class="className"
:src="item.information.avatar.url"
:alt="item.complete_name"
@error="check=false"
/>
<div v-else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<img v-if="check"
class="avatar"
:src="item.information.avatar.url"
:alt="item.complete_name"
@error="check=false"
/>
<div v-else
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/en/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
'import_upload_rules_desc' => 'We do however have some rules:',
'import_upload_rule_format' => 'We support <code>.vcard</code> and <code>.vcf</code> files.',
'import_upload_rule_vcard' => 'We support the vCard 3.0 format, which is the default format for Contacts.app (macOS) and Google Contacts.',
'import_upload_rule_instructions' => 'Export instructions for <a href="http://osxdaily.com/2015/07/14/export-contacts-mac-os-x/" target="_blank">Contacts.app (macOS)</a> and <a href="http://www.akruto.com/backup-phone-contacts-calendar/how-to-export-google-contacts-to-csv-or-vcard/" target="_blank">Google Contacts</a>.',
'import_upload_rule_instructions' => 'Export instructions for <a href=":url1" target="_blank" rel="noopener noreferrer">Contacts.app (macOS)</a> and <a href=":url2" target="_blank" rel="noopener noreferrer">Google Contacts</a>.',
'import_upload_rule_multiple' => 'For now, if your contacts have multiple email addresses or phone numbers, only the first entry will be picked up.',
'import_upload_rule_limit' => 'Files are limited to 10MB.',
'import_upload_rule_time' => 'It might take up to 1 minute to upload the contacts and process them. Be patient.',
Expand Down
2 changes: 1 addition & 1 deletion resources/views/activities/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:title="'{{ trans('people.activities_who_was_involved') }}'"
:user-contact-id="{{ $contact->id }}"
:placeholder="'{{ trans('people.people_search') }}'"
:contacts="{{ json_encode(\App\Http\Resources\Contact\ContactShort::collection($contact && $method == 'POST' ? collect([$contact]) : $activity->contacts)) }}"
:contacts="{{ \Safe\json_encode(\App\Http\Resources\Contact\ContactShort::collection($contact && $method == 'POST' ? collect([$contact]) : $activity->contacts)) }}"
></contact-multi-search>
</div>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/auth/validatewebauthn.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<h3>{{ trans('auth.mfa_auth_webauthn') }}</h3>
<webauthn-connector
:method="'login'"
:public-key="{{ json_encode($publicKey) }}"
:public-key="{{ \Safe\json_encode($publicKey) }}"
>
</webauthn-connector>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/errors/layout.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="{{ \App::getLocale() }}" dir="{{ htmldir() }}">
<head>
<base href="{{ url('/') }}/" />
<title>@yield('title')</title>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/journal/add.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div class="form-group">
<label for="field-entry">{{ trans('journal.journal_add_post') }}</label>
<textarea class="form-control" id="field-entry" name="entry" rows="15" required></textarea>
<p class="f6">{{ trans('app.markdown_description')}} <a href="https://guides.github.com/features/mastering-markdown/" target="_blank">{{ trans('app.markdown_link') }}</a></p>
<p class="f6">{{ trans('app.markdown_description')}} <a href="https://guides.github.com/features/mastering-markdown/" target="_blank" rel="noopener noreferrer">{{ trans('app.markdown_link') }}</a></p>
</div>

<div class="form-group actions">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/people/modal/log_call.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<textarea class="form-control mb3" name="content" id="content" maxlength="2500" autofocus>
</textarea>

<p class="f6">{{ trans('app.markdown_description')}} <a href="https://guides.github.com/features/mastering-markdown/" target="_blank">{{ trans('app.markdown_link') }}</a></p>
<p class="f6">{{ trans('app.markdown_description')}} <a href="https://guides.github.com/features/mastering-markdown/" target="_blank" rel="noopener noreferrer">{{ trans('app.markdown_link') }}</a></p>

<p class="date-it-happened">
{{ trans('people.modal_call_date') }} <a href="#" class="change-date-happened">{{ trans('people.modal_call_change') }}</a>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/people/relationship/new.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
:title="'{{ trans('people.relationship_form_associate_dropdown') }}'"
:name="'existing_contact_id'"
:placeholder="'{{ trans('people.relationship_form_associate_dropdown_placeholder') }}'"
:default-options="{{ json_encode($existingContacts) }}"
:default-options="{{ \Safe\json_encode($existingContacts) }}"
:user-contact-id="'{{ $contact->id }}'">
</contact-select>
@endif
Expand Down
5 changes: 4 additions & 1 deletion resources/views/settings/imports/upload.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
<ul>
<li>{!! trans('settings.import_upload_rule_format') !!}</li>
<li>{{ trans('settings.import_upload_rule_vcard') }}</li>
<li>{!! trans('settings.import_upload_rule_instructions') !!}</li>
<li>{!! trans('settings.import_upload_rule_instructions', [
'url1' => 'http://osxdaily.com/2015/07/14/export-contacts-mac-os-x/',
'url2' => 'http://www.akruto.com/backup-phone-contacts-calendar/how-to-export-google-contacts-to-csv-or-vcard/'
]) !!}</li>
<li>{{ trans('settings.import_upload_rule_multiple') }}</li>
<li>{{ trans('settings.import_upload_rule_limit') }}</li>
<li>{{ trans('settings.import_upload_rule_time') }}</li>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/settings/security/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@
@if (config('webauthn.enable')===true)
<webauthn-connector
:method="'register-modal'"
:keys="{{ json_encode($webauthnKeys) }}"
:timezone="{{ json_encode(auth()->user()->timezone) }}"
:keys="{{ \Safe\json_encode($webauthnKeys) }}"
:timezone="{{ \Safe\json_encode(auth()->user()->timezone) }}"
>
@if (config('u2f.enable')===true)
<u2f-connector
:method="'register-modal'"
:currentkeys="{{ json_encode($currentkeys) }}"
:timezone="{{ json_encode(auth()->user()->timezone) }}"
:enable-register="{{ json_encode(false) }}"
:currentkeys="{{ \Safe\json_encode($currentkeys) }}"
:timezone="{{ \Safe\json_encode(auth()->user()->timezone) }}"
:enable-register="{{ \Safe\json_encode(false) }}"
>
</u2f-connector>
@endif
Expand Down