Skip to content

Commit

Permalink
Merge branch 'release/6.0.14'
Browse files Browse the repository at this point in the history
* release/6.0.14: (62 commits)
  compiled assets
  wip
  auth path updates
  hide modules while building
  compile assets
  Apply fixes from StyleCI (#906)
  route test fixes
  Apply fixes from StyleCI (#905)
  adding tests
  use the fallback locale if none specified
  Apply fixes from StyleCI (#901)
  formatting
  Follow style guidelines
  Revert removal of isset check (#893)
  Remove unnecessary paranoid check (#893)
  Fix empty UI if the app uses an unsupported language
  wip
  wip
  wip
  Apply fixes from StyleCI (#889)
  ...
  • Loading branch information
austintoddj committed Dec 27, 2020
2 parents bda0d99 + 49d4c64 commit 353cbcc
Show file tree
Hide file tree
Showing 87 changed files with 2,811 additions and 3,220 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:

runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
php: [7.3, 7.4]
php: [7.3, 7.4, 8.0]
laravel: [^6.0, ^7.0, ^8.0]
include:
- laravel: ^6.0
Expand Down
10 changes: 5 additions & 5 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ tasks:
cd /workspace
# Create a fresh Laravel app
# Install a fresh Laravel app
composer create-project --prefer-dist laravel/laravel laravel
cd /workspace/laravel
# Create a new in-memory database
touch database/database.sqlite
# Update the .env database configuration
# Write the database configuration to the .env file
sed -i 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/g' .env
sed -i 's/DB_DATABASE=laravel/#DB_DATABASE=laravel/g' .env
Expand All @@ -58,7 +58,7 @@ tasks:
php artisan canvas:install
php artisan storage:link
# Remove existing assets if any exist from the Laravel app
# Remove any existing assets from the Laravel app
rm -rf public/vendor/canvas/*
# Create a symlink to the local package assets
Expand All @@ -74,10 +74,10 @@ tasks:
command: |
cd /workspace/laravel
# Define base app URL
# Write the local app URL to the .env file
export url=$(gp url 8000); sed -Ei "s|APP_URL=http://localhost|APP_URL=${url}|g" .env
# Define asset path
# Write the local asset URL to the .env file
export url=$(gp url 8000); sed -Ei "1i\ASSET_URL=${url}" .env
# Clear and cache the app configuration
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^7.3",
"php": "^7.3|^8.0",
"ext-json": "*",
"laravel/framework": "^6.0|^7.0|^8.0"
},
Expand Down
10 changes: 5 additions & 5 deletions config/canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
|--------------------------------------------------------------------------
|
| This is the subdomain where Canvas will be accessible from. If the
| setting is null, Canvas will reside under the same domain as the
| application. Otherwise, this will be used as the subdomain.
| domain is set to null, Canvas will reside under the defined base
| path below. Otherwise, this will be used as the subdomain.
|
*/

Expand All @@ -20,9 +20,9 @@
| Base Path
|--------------------------------------------------------------------------
|
| This is the URI path where Canvas will be accessible from. You are free
| to change this path to anything you like. Note that the URI will not
| affect the paths of its internal API that aren't exposed to users.
| This is the URI where Canvas will be accessible from. If the path
| is set to null, Canvas will reside under the same path name as
| the application. Otherwise, this is used as the base path.
|
*/

Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"watch": "yarn dev --watch"
},
"dependencies": {
"axios": "^0.20.0",
"axios": "^0.21.0",
"bootstrap": "^4.5.2",
"chart.js": "^2.9.3",
"cross-env": "^7.0.2",
"filepond": "^4.21.1",
"cross-env": "^7.0.3",
"filepond": "^4.25.1",
"filepond-plugin-file-validate-size": "^2.2.1",
"filepond-plugin-file-validate-type": "^1.2.5",
"filepond-plugin-image-exif-orientation": "^1.0.9",
Expand All @@ -29,29 +29,30 @@
"popper.js": "^1.16.1",
"quill": "1.3.7",
"resolve-url-loader": "^3.1.1",
"sass": "^1.27.0",
"sass-loader": "^10.0.3",
"sass": "^1.30.0",
"sass-loader": "^10.1.0",
"unsplash-js": "^6.0.0",
"url-parse": "^1.4.7",
"vue": "^2.6.11",
"vue-filepond": "^6.0.2",
"vue-fuse": "^2.2.1",
"vue-infinite-loading": "^2.4.5",
"vue-multiselect": "^2.1.6",
"vue-router": "^3.4.6",
"vue-router": "^3.4.9",
"vue-template-compiler": "^2.6.11",
"vue-textarea-autosize": "^1.1.1",
"vue-toasted": "^1.1.28",
"vuex": "^3.5.1"
"vuex": "^3.6.0"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.11.0",
"eslint": "^7.16.0",
"eslint-config-prettier": "^7.1.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-prettier": "^3.3.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.5.0",
"eslint-plugin-vue": "^7.0.1",
"prettier": "^2.0.5"
"eslint-plugin-vue": "^7.3.0",
"prettier": "^2.2.1",
"webpack-bundle-analyzer": "^4.3.0"
}
}
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnFailure="true"
verbose="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
Expand All @@ -31,5 +31,6 @@
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="base64:cnx7anOUDil+KtEGdGiHBnY764aA05eU80oECtOqfYs="/>
<env name="APP_URL" value="http://laravel.test"/>
</php>
</phpunit>
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions public/js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/*!
* FilePond 4.21.1
* FilePond 4.25.1
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down Expand Up @@ -128,7 +128,7 @@
*/

/*!
* vuex v3.5.1
* vuex v3.6.0
* (c) 2020 Evan You
* @license MIT
*/
Expand All @@ -141,6 +141,8 @@
* http://adamwdraper.github.com/Numeral-js/
*/

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/js/app.js": "/js/app.js?id=3cf87216eacbbce13e71",
"/js/app.js": "/js/app.js?id=23ce6e2563d6bcebebdc",
"/css/app.css": "/css/app.css?id=08bd22e9b4628a5ecd91",
"/js/app.js.map": "/js/app.js.map?id=aae5ba013f0f994cecf9",
"/js/app.js.map": "/js/app.js.map?id=e258a2e8d21da9fdbecf",
"/css/app.css.map": "/css/app.css.map?id=a26e3f2697987381b236"
}
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Canvas exposes its UI at `/canvas` by default. This can be changed by updating e
|--------------------------------------------------------------------------
|
| This is the subdomain where Canvas will be accessible from. If the
| setting is null, Canvas will reside under the same domain as the
| application. Otherwise, this will be used as the subdomain.
| domain is set to null, Canvas will reside under the defined base
| path below. Otherwise, this will be used as the subdomain.
|
*/

Expand All @@ -80,9 +80,9 @@ Canvas exposes its UI at `/canvas` by default. This can be changed by updating e
| Base Path
|--------------------------------------------------------------------------
|
| This is the URI path where Canvas will be accessible from. You are free
| to change this path to anything you like. Note that the URI will not
| affect the paths of its internal API that aren't exposed to users.
| This is the URI where Canvas will be accessible from. If the path
| is set to null, Canvas will reside under the same path name as
| the application. Otherwise, this is used as the base path.
|
*/

Expand Down
5 changes: 1 addition & 4 deletions resources/js/components/PageHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
import { mapGetters, mapState } from 'vuex';
import $ from 'jquery';
import SearchModal from './modals/SearchModal';
import axios from 'axios';
export default {
name: 'page-header',
Expand All @@ -108,9 +107,7 @@ export default {
methods: {
logout() {
axios.get(`${this.settings.path}/logout`).then(() => {
window.location.href = `${this.settings.path}/login`;
});
window.location.href = '/logout';
},
showSearchModal() {
Expand Down
13 changes: 8 additions & 5 deletions resources/js/components/modals/AvatarModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div ref="modal" class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body pb-0">
<div class="modal-body">
<file-pond
ref="pond"
v-if="isReadyToAcceptUploads"
Expand Down Expand Up @@ -122,7 +122,10 @@ export default {
},
getPlaceholderLabel() {
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="35" class="icon-cloud-upload mr-3"><path class="fill-dark-gray" d="M18 14.97c0-.76-.3-1.51-.88-2.1l-3-3a3 3 0 0 0-4.24 0l-3 3A3 3 0 0 0 6 15a4 4 0 0 1-.99-7.88 5.5 5.5 0 0 1 10.86-.82A4.49 4.49 0 0 1 22 10.5a4.5 4.5 0 0 1-4 4.47z"/><path class="fill-dark-gray" d="M11 14.41V21a1 1 0 0 0 2 0v-6.59l1.3 1.3a1 1 0 0 0 1.4-1.42l-3-3a1 1 0 0 0-1.4 0l-3 3a1 1 0 0 0 1.4 1.42l1.3-1.3z"/></svg> Drop files or click here to upload';
return (
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="35" class="icon-cloud-upload mr-3"><path class="fill-dark-gray" d="M18 14.97c0-.76-.3-1.51-.88-2.1l-3-3a3 3 0 0 0-4.24 0l-3 3A3 3 0 0 0 6 15a4 4 0 0 1-.99-7.88 5.5 5.5 0 0 1 10.86-.82A4.49 4.49 0 0 1 22 10.5a4.5 4.5 0 0 1-4 4.47z"/><path class="fill-dark-gray" d="M11 14.41V21a1 1 0 0 0 2 0v-6.59l1.3 1.3a1 1 0 0 0 1.4-1.42l-3-3a1 1 0 0 0-1.4 0l-3 3a1 1 0 0 0 1.4 1.42l1.3-1.3z"/></svg>' +
this.trans.drop_files_or_click_to_upload
);
},
},
Expand All @@ -134,16 +137,16 @@ export default {
methods: {
processedFromFilePond() {
this.isReadyToAcceptUploads = true;
this.user.avatar = document.getElementsByName('avatarPond')[0].value;
this.$emit('update-avatar', document.getElementsByName('avatarPond')[0].value);
},
removedFromFilePond() {
this.isReadyToAcceptUploads = true;
this.user.avatar = this.user.default_avatar;
this.$emit('update-avatar', this.user.default_avatar);
},
clearAndResetComponent() {
this.user.avatar = this.selectedImageUrl;
this.$emit('update-avatar', this.selectedImageUrl);
this.selectedImageUrl = null;
this.isReadyToAcceptUploads = true;
},
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/modals/SettingsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@
:options="topics"
:placeholder="trans.select_a_topic"
:tag-placeholder="trans.add_a_new_topic"
:multiple="false"
:multiple="true"
:taggable="true"
:max="1"
label="name"
track-by="slug"
style="cursor: pointer"
Expand Down
3 changes: 2 additions & 1 deletion resources/js/mixins/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default {
instance.defaults.headers.common['X-CSRF-TOKEN'] = document.head.querySelector(
'meta[name="csrf-token"]'
).content;

instance.defaults.baseURL = store.state.settings.path;

const requestHandler = (request) => {
Expand All @@ -21,7 +22,7 @@ export default {
switch (error.response.status) {
case 401:
case 405:
window.location.href = `${store.state.settings.path}/logout`;
window.location.href = '/logout';
break;
default:
break;
Expand Down
12 changes: 8 additions & 4 deletions resources/js/views/EditUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<div class="col-12">
<div class="form-group row">
<label for="name" class="font-weight-bold text-uppercase text-muted small">
Name
{{ trans.name }}
</label>
<input
v-model="user.name"
Expand All @@ -109,8 +109,8 @@
required
class="form-control border-0"
:class="invalidName.shouldShow ? 'is-invalid' : ''"
title="Name"
placeholder="Name"
:title="trans.name"
:placeholder="trans.name"
/>
<span v-if="invalidName.shouldShow" class="invalid-feedback" role="alert">
<strong>{{ invalidName.error }}</strong>
Expand Down Expand Up @@ -311,7 +311,7 @@
</main>

<section v-if="isReady">
<avatar-modal ref="avatarModal" :user="user" @update="saveUser" />
<avatar-modal ref="avatarModal" :user="user" @update-avatar="updateAvatar" @update="saveUser" />
<delete-modal
ref="deleteModal"
:header="trans.delete"
Expand Down Expand Up @@ -545,6 +545,10 @@ export default {
this.isReadyToAcceptUploads = true;
},
updateAvatar(url) {
this.user.avatar = url;
},
selectRole() {
this.request()
.post(`/api/users/${this.user.id}`, this.user)
Expand Down
Loading

0 comments on commit 353cbcc

Please sign in to comment.