Skip to content

Commit

Permalink
Merge branch 'release/5.3.2'
Browse files Browse the repository at this point in the history
* release/5.3.2:
  updates the readme
  Changed most of the german translations
  compiled assets
  updated the description
  Remove fallback from config usage
  Also use config on `UserMeta` model
  Change config to `canvas.user` and set the default
  wip
  Allow the User model to be customized
  compiled assets
  compiled assets
  upgrades dependencies
  ui/ux improvements
  Apply fixes from StyleCI (#661)
  formatting
  wip on ui updates
  Load translations from Laravel
  Add ability to publish translations
  • Loading branch information
austintoddj committed Mar 19, 2020
2 parents fb74187 + acb7bf8 commit 9e834c6
Show file tree
Hide file tree
Showing 28 changed files with 513 additions and 473 deletions.
13 changes: 13 additions & 0 deletions config/canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@

'path' => env('CANVAS_PATH_NAME', 'canvas'),

/*
|--------------------------------------------------------------------------
| User Model
|--------------------------------------------------------------------------
|
| Next, you may define a specific user model that your application will
| use for authentication. This will define the relationships between
| a user and their posts, tags, and topics that they author.
|
*/

'user' => Illuminate\Foundation\Auth\User::class,

/*
|--------------------------------------------------------------------------
| Route Middleware
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"bootstrap": "^4.4.0",
"chart.js": "^2.9.3",
"cross-env": "^7.0",
"filepond": "^4.9.5",
"filepond": "^4.13.0",
"filepond-plugin-file-validate-size": "^2.2.0",
"filepond-plugin-file-validate-type": "^1.2.4",
"filepond-plugin-image-exif-orientation": "^1.0.6",
Expand All @@ -33,7 +33,7 @@
"popper.js": "^1.16",
"quill": "1.3.7",
"resolve-url-loader": "^3.1.0",
"sass": "^1.24",
"sass": "^1.26",
"sass-loader": "^8.0.0",
"unsplash-js": "^6.0.0",
"url-parse": "^1.4.7",
Expand Down
4 changes: 2 additions & 2 deletions public/css/app-dark.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/css/app.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/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/*!
* FilePond 4.12.0
* FilePond 4.13.0
* Licensed under MIT, https://opensource.org/licenses/MIT/
* Please visit https://pqina.nl/filepond/ for details.
*/
Expand Down
6 changes: 3 additions & 3 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=0c6d49c5429f5cb2e559",
"/css/app.css": "/css/app.css?id=e923fb735a605187e1a8",
"/css/app-dark.css": "/css/app-dark.css?id=85202ef19e716e81b7cc",
"/js/app.js": "/js/app.js?id=a1181bb11d92257655e6",
"/css/app.css": "/css/app.css?id=48eae9fc081d95312ccd",
"/css/app-dark.css": "/css/app-dark.css?id=96ccf9a9c90446210f79",
"/favicon.ico": "/favicon.ico?id=f7a1a9d5196af323a9eb"
}
27 changes: 26 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ php artisan storage:link

After publishing Canvas's assets, a primary configuration file will be located at `config/canvas.php`. This file allows you to customize various aspects of how your application uses the package.

Canvas exposes a simple UI at `/canvas` by default. This can be changed by updating the `path` option:
Canvas exposes its UI at `/canvas` by default. This can be changed by updating the `path` option:

```php
/*
Expand All @@ -63,7 +63,28 @@ Canvas exposes a simple UI at `/canvas` by default. This can be changed by updat
*/

'path' => env('CANVAS_PATH_NAME', 'canvas'),
```

If your application has a custom User model, define the fully-qualified path in the `user` option here:

```php
/*
|--------------------------------------------------------------------------
| User Model
|--------------------------------------------------------------------------
|
| Next, you may define a specific user model that your application will
| use for authentication. This will define the relationships between
| a user and their posts, tags, and topics that they author.
|
*/

'user' => Illuminate\Foundation\Auth\User::class,
```

Sometimes, you may want to limit user access to Canvas via a custom middleware. You can attach any additional middleware here:

```php
/*
|--------------------------------------------------------------------------
| Route Middleware
Expand All @@ -79,7 +100,11 @@ Canvas exposes a simple UI at `/canvas` by default. This can be changed by updat
'web',
'auth',
],
```

Canvas uses the storage disk for media uploads. You may configure the different filesystem options here:

```php
/*
|--------------------------------------------------------------------------
| Storage
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/PageHeader.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="shadow">
<div class="shadow page-header">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1 col-md-12">
<nav class="navbar justify-content-between flex-nowrap flex-row py-2 px-0">
<router-link to="/" class="navbar-brand">
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/editor/QuillEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<div ref="editor" class="mb-5"></div>

<nav class="navbar fixed-bottom navbar-expand-sm mt-5 d-xl-none p-0 navbar-mini">
<nav class="navbar fixed-bottom navbar-expand-sm mt-5 d-xl-none p-0 navbar-mini shadow">
<div class="btn-group d-flex justify-content-center">
<button
@click="showEmbedImageModal"
Expand Down
87 changes: 46 additions & 41 deletions resources/js/screens/posts/PostIndex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,62 +19,67 @@
</select>
</div>

<div class="mt-2">
<div v-for="(post, $index) in posts" :key="$index">
<router-link :to="{name: 'posts-edit', params: { id: post.id }}" class="text-decoration-none">
<div v-hover="{class: Canvas.darkMode ? `hover-bg-dark` : `hover-bg-light`}" class="d-flex border-top py-3 align-items-center">
<div class="mr-auto pl-2 py-1">
<p class="mb-1">
<div class="mt-2 card shadow border-0">
<div class="card-body p-0">
<div v-for="(post, index) in posts" :key="index">
<router-link :to="{name: 'posts-edit', params: { id: post.id }}" class="text-decoration-none">
<div
v-hover="{class: `row-hover`}"
class="d-flex p-3 align-items-center"
:class="{'border-top': index !== 0, 'rounded-top': index === 0, 'rounded-bottom': index === posts.length - 1}">
<div class="mr-auto pl-2 py-1">
<p class="mb-1">
<span class="font-weight-bold text-lg lead">
{{ trim(post.title, 55) }}
</span>
</p>
<p class="mb-1" v-if="post.summary">
{{ trim(post.summary, 125) }}
</p>
<p class="text-muted mb-0">
</p>
<p class="mb-1" v-if="post.summary">
{{ trim(post.summary, 125) }}
</p>
<p class="text-muted mb-0">
<span v-if="isPublished(post.published_at)">
{{ trans.app.published}} {{ moment(post.published_at).locale(Canvas.locale).fromNow() }}
</span>

<span v-if="isDraft(post.published_at) && !isScheduled(post.published_at)" class="text-danger">{{ trans.app.draft }}</span>
<span v-if="isDraft(post.published_at) && !isScheduled(post.published_at)" class="text-danger">{{ trans.app.draft }}</span>

<span v-if="isScheduled(post.published_at)" class="text-danger">{{ trans.app.scheduled }}</span>
<span v-if="isScheduled(post.published_at)" class="text-danger">{{ trans.app.scheduled }}</span>

― {{ trans.app.updated }} {{ moment(post.updated_at).locale(Canvas.locale).fromNow() }}
</p>
</div>
<div class="ml-auto d-none d-lg-block pl-3">
<div v-if="post.featured_image" id="featuredImage" class="mr-2 ml-3 shadow-inner" :style="{backgroundImage:'url(' + post.featured_image +')',}"></div>
<div v-else class="mx-3 align-middle">
<svg xmlns="http://www.w3.org/2000/svg" width="45" viewBox="0 0 24 24" class="icon-camera">
<path class="primary" d="M6.59 6l2.7-2.7A1 1 0 0 1 10 3h4a1 1 0 0 1 .7.3L17.42 6H20a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8c0-1.1.9-2 2-2h2.59zM19 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-7 8a5 5 0 1 0 0-10 5 5 0 0 0 0 10z"/>
<path class="primary" d="M12 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
</svg>
― {{ trans.app.updated }} {{ moment(post.updated_at).locale(Canvas.locale).fromNow() }}
</p>
</div>
<div class="ml-auto d-none d-lg-block pl-3">
<div v-if="post.featured_image" id="featuredImage" class="mr-2 ml-3 shadow-inner" :style="{backgroundImage:'url(' + post.featured_image +')',}"></div>
<div v-else class="mx-3 align-middle">
<svg xmlns="http://www.w3.org/2000/svg" width="45" viewBox="0 0 24 24" class="icon-camera">
<path class="primary" d="M6.59 6l2.7-2.7A1 1 0 0 1 10 3h4a1 1 0 0 1 .7.3L17.42 6H20a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8c0-1.1.9-2 2-2h2.59zM19 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-7 8a5 5 0 1 0 0-10 5 5 0 0 0 0 10z"/>
<path class="primary" d="M12 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
</svg>
</div>
</div>

<div class="d-lg-none d-block pl-3">
<svg xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 24 24" class="icon-cheveron-right-circle"><circle cx="12" cy="12" r="10" style="fill:none"/><path class="primary" d="M10.3 8.7a1 1 0 0 1 1.4-1.4l4 4a1 1 0 0 1 0 1.4l-4 4a1 1 0 0 1-1.4-1.4l3.29-3.3-3.3-3.3z"/></svg>
</div>
</div>
</router-link>
</div>

<div class="d-lg-none d-block pl-3">
<svg xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 24 24" class="icon-cheveron-right-circle"><circle cx="12" cy="12" r="10" style="fill:none"/><path class="primary" d="M10.3 8.7a1 1 0 0 1 1.4-1.4l4 4a1 1 0 0 1 0 1.4l-4 4a1 1 0 0 1-1.4-1.4l3.29-3.3-3.3-3.3z"/></svg>
<infinite-loading :identifier="infiniteId" @infinite="fetchData" spinner="spiral">
<span slot="no-more"></span>
<div slot="no-results" class="text-left">
<div class="my-5">
<p class="lead text-center text-muted mt-5">
<span v-if="postType === 'published'">{{ trans.app.you_have_no_published_posts }}</span>
<span v-else>{{ trans.app.you_have_no_draft_posts }}</span>
</p>
<p class="lead text-center text-muted mt-1">
{{ trans.app.write_on_the_go }}
</p>
</div>
</div>
</router-link>
</infinite-loading>
</div>

<infinite-loading :identifier="infiniteId" @infinite="fetchData" spinner="spiral">
<span slot="no-more"></span>
<div slot="no-results" class="text-left">
<div class="mt-5">
<p class="lead text-center text-muted mt-5 pt-5">
<span v-if="postType === 'published'">{{ trans.app.you_have_no_published_posts }}</span>
<span v-else>{{ trans.app.you_have_no_draft_posts }}</span>
</p>
<p class="lead text-center text-muted mt-1">
{{ trans.app.write_on_the_go }}
</p>
</div>
</div>
</infinite-loading>
</div>
</div>
</main>
Expand Down
84 changes: 43 additions & 41 deletions resources/js/screens/settings/SettingsShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,38 @@
<h1>{{ trans.app.your_profile }}</h1>
</div>

<div class="mt-2" v-if="isReady">
<div class="d-flex border-top py-3 align-items-center">
<div class="mr-auto py-1">
<p class="mb-1 font-weight-bold text-lg lead">
{{ trans.app.your_profile }}
</p>
<p class="mb-1 d-none d-lg-block">
{{ trans.app.choose_a_unique_username }}
</p>
</div>
<div class="ml-auto pl-3">
<div class="align-middle">
<button class="btn btn-sm btn-outline-success font-weight-bold" @click="showProfileModal">
{{ trans.app.edit_profile }}
</button>
<div class="mt-2 card shadow border-0" v-if="isReady">
<div class="card-body p-0">
<div class="d-flex p-3 align-items-center">
<div class="mr-auto py-1">
<p class="mb-1 font-weight-bold text-lg lead">
{{ trans.app.your_profile }}
</p>
<p class="mb-1 d-none d-lg-block">
{{ trans.app.choose_a_unique_username }}
</p>
</div>
<div class="ml-auto pl-3">
<div class="align-middle">
<button class="btn btn-sm btn-outline-success font-weight-bold" @click="showProfileModal">
{{ trans.app.edit_profile }}
</button>
</div>
</div>
</div>
</div>

<div class="d-flex border-top py-3 align-items-center">
<div class="mr-auto py-1">
<p class="mb-1 font-weight-bold text-lg lead">
{{ trans.app.weekly_digest }}
</p>
<p class="mb-1 d-none d-lg-block">
{{ trans.app.toggle_digest }}
</p>
</div>
<div class="ml-auto pl-3">
<div class="align-middle">
<div class="form-group my-auto">
<div class="d-flex border-top p-3 align-items-center">
<div class="mr-auto py-1">
<p class="mb-1 font-weight-bold text-lg lead">
{{ trans.app.weekly_digest }}
</p>
<p class="mb-1 d-none d-lg-block">
{{ trans.app.toggle_digest }}
</p>
</div>
<div class="ml-auto pl-3">
<div class="align-middle">
<div class="form-group my-auto">
<span class="switch switch-sm">
<input
type="checkbox"
Expand All @@ -61,23 +62,23 @@
{{ trans.app.weekly_digest }}
</label>
</span>
</div>
</div>
</div>
</div>
</div>

<div class="d-flex border-top py-3 align-items-center">
<div class="mr-auto py-1">
<p class="mb-1 font-weight-bold text-lg lead">
{{ trans.app.dark_mode }}
</p>
<p class="mb-1 d-none d-lg-block">
{{ trans.app.toggle_dark_mode }}
</p>
</div>
<div class="ml-auto pl-3">
<div class="align-middle">
<div class="form-group my-auto">
<div class="d-flex border-top p-3 align-items-center">
<div class="mr-auto py-1">
<p class="mb-1 font-weight-bold text-lg lead">
{{ trans.app.dark_mode }}
</p>
<p class="mb-1 d-none d-lg-block">
{{ trans.app.toggle_dark_mode }}
</p>
</div>
<div class="ml-auto pl-3">
<div class="align-middle">
<div class="form-group my-auto">
<span class="switch switch-sm">
<input
type="checkbox"
Expand All @@ -91,6 +92,7 @@
{{ trans.app.dark_mode }}
</label>
</span>
</div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 9e834c6

Please sign in to comment.