Skip to content

Commit e745021

Browse files
author
Ubuntu
committed
Fix Composer Json that I changed for Dev Work
2 parents 367db55 + 1c72a46 commit e745021

23 files changed

+88
-61
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "writingink/wink/wink",
2+
"name": "writingink/wink",
33
"description": "Wink Publishing Framework.",
44
"keywords": ["framework", "laravel", "blog"],
55
"license": "MIT",

public/app.js

+5-1
Large diffs are not rendered by default.

public/dark.css

+4
Large diffs are not rendered by default.

public/light.css

+4
Large diffs are not rendered by default.

public/mix-manifest.json

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
2+
<<<<<<< HEAD
23
"/app.js": "/app.js?id=fdfd3afa70eeeac74e81",
34
"/light.css": "/light.css?id=bcb03dbf596bfa351064",
45
"/dark.css": "/dark.css?id=c655f9129824b8d032db",
6+
=======
7+
"/app.js": "/app.js?id=a1763873e1bd0b22663f",
8+
"/light.css": "/light.css?id=00726a847dc6b2cb132a",
9+
"/dark.css": "/dark.css?id=aa5f40a240d2b1df06e2",
10+
>>>>>>> upstream/master
511
"/favicon.png": "/favicon.png?id=b0b34b4095fcdbb8942d"
612
}

readme.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ Wink runs on any Laravel application, it uses a separate database connection and
1010

1111
To install Wink, require it via Composer:
1212

13-
```
13+
```sh
1414
composer require writingink/wink
1515
```
1616

1717
Once Composer is done, run the following command:
1818

19-
```
19+
```sh
2020
php artisan wink:install
2121
```
2222

2323
Check `config/wink.php` and **configure the database connection** wink is going to be using. Then instead of running `php artisan migrate`, run:
2424

25-
```
25+
```sh
2626
php artisan wink:migrate
2727
```
2828

@@ -40,13 +40,13 @@ Head to `yourproject.test/wink` and use the provided email and password to log i
4040

4141
Add this command in your deployment script so that wink runs new migrations if any:
4242

43-
```
43+
```sh
4444
php artisan wink:migrate
4545
```
4646

4747
You may also want to run this command to re-publish the assets:
4848

49-
```
49+
```sh
5050
php artisan vendor:publish --tag=wink-assets --force
5151
```
5252

@@ -97,7 +97,7 @@ Here's the plan for what's coming:
9797
- [x] Add text search inside listings.
9898
- [x] Filter posts by status, scheduling, tags, and authors
9999
- [x] Dark mode.
100-
- [ ] Enhance publishing date picker. (Make it use browser time & show text feedback)
100+
- [ ] Enhance publishing date picker.
101101
- [ ] Create an initial theme that people can use right away. @themsaid
102102
- [ ] Optimize image uploads and allow cropping.
103103
- [ ] Adding image galleries to posts and pages. @themsaid
@@ -106,7 +106,6 @@ Here's the plan for what's coming:
106106
And here are some ideas I'm still not sure about:
107107

108108
- [ ] Email Subscription & auto send emails on new content.
109-
- [ ] Built-in comments system.
110109
- [ ] Configure roles (Contributor / Admin)
111110
- [ ] Localization
112111
- [ ] Multi-lingual content

resources/js/components/Editor.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
},
6969
theme: 'bubble',
7070
scrollingContainer: 'html, body',
71-
placeholder: "Write to the world..."
71+
placeholder: "Starting writing now..."
7272
});
7373
},
7474

resources/js/screens/posts/edit.vue

+16-10
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
2929
errors: [],
3030
31-
formWatcher: null,
31+
postBodyWatcher: null,
3232
3333
form: {
3434
id: '',
@@ -66,12 +66,12 @@
6666
},
6767
6868
'form.published'(val) {
69-
if (this.formWatcher) {
70-
this.formWatcher();
69+
if (this.postBodyWatcher) {
70+
this.postBodyWatcher();
7171
}
7272
7373
if (!val) {
74-
this.watchChangesAndSave();
74+
this.watchBodyChangesAndSave();
7575
}
7676
},
7777
@@ -130,6 +130,7 @@
130130
fillForm(data) {
131131
this.form.id = data.id;
132132
this.form.publish_date = data.publish_date;
133+
this.form.slug = 'draft-' + this.form.id;
133134
134135
if (this.id != 'new') {
135136
this.form.title = data.title;
@@ -155,17 +156,17 @@
155156
}
156157
157158
if (!this.form.published) {
158-
this.watchChangesAndSave();
159+
this.watchBodyChangesAndSave();
159160
}
160161
},
161162
162163
163164
/**
164165
* Watch changes and save the post.
165166
*/
166-
watchChangesAndSave() {
167+
watchBodyChangesAndSave() {
167168
setTimeout(() => {
168-
this.formWatcher = this.$watch('form', _.debounce(() => this.save(), 1000), {deep: true});
169+
this.postBodyWatcher = this.$watch('form.body', _.debounce(() => this.save(), 1000), {deep: true});
169170
}, 1000);
170171
},
171172
@@ -182,7 +183,7 @@
182183
this.authors = response.data.data;
183184
184185
if (!this.form.author_id && this.authors) {
185-
this.form.author_id = _.first(this.authors).id;
186+
this.form.author_id = this.Wink.author.id;
186187
}
187188
});
188189
},
@@ -300,11 +301,14 @@
300301
* Save the post.
301302
*/
302303
save() {
304+
if (this.status) return;
305+
303306
this.errors = [];
304307
this.status = 'Saving...';
305308
306-
this.form.slug = this.form.slug || 'draft-' + this.form.id;
307-
this.form.title = this.form.title || 'Draft';
309+
if (this.form.title != 'Draft' && (!this.form.slug || this.form.slug.startsWith('draft-'))) {
310+
this.form.slug = this.slugify(this.form.title);
311+
}
308312
309313
this.http().post('/api/posts/' + this.id, this.form).then(response => {
310314
this.status = '';
@@ -313,6 +317,8 @@
313317
this.$router.push({name: 'post-edit', params: {id: this.form.id}})
314318
}
315319
}).catch(error => {
320+
this.status = '';
321+
316322
this.errors = error.response.data.errors;
317323
318324
this.settingsModalShown = true;

resources/sass/dark.scss

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
background: rgba(17, 59, 92, 0.83);
99
}
1010

11-
.ql-editor.ql-blank::before{
11+
.ql-container hr {
1212
color: config('colors.light');
1313
}
1414

1515
.ql-bubble .ql-editor pre.ql-syntax {
16-
overflow-x: auto;
17-
padding: 0.5em;
16+
background: #000d18;
17+
color: #fff;
18+
border: solid 2px rgba(0, 0, 0, 0.05);
1819
}
1920

2021
.ql-bubble .ql-editor code{

resources/sass/editor.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@
8181

8282
.ql-container hr {
8383
border: none;
84-
color: #111;
84+
color: config('colors.text-color');
8585
letter-spacing: 1em;
8686
text-align: center;
87+
@apply mb-20;
8788
}
8889

8990
.ql-container hr:before {
@@ -138,6 +139,7 @@
138139
}
139140

140141
.ql-editor.ql-blank::before {
142+
color: config('colors.light');
141143
left: 0;
142144
font-style: normal;
143145
}

src/Http/Controllers/ForgotPasswordController.php

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public function sendResetLinkEmail()
4848
/**
4949
* Show the new password to the user.
5050
*
51+
* @param string $token
5152
* @return \Illuminate\Http\Response
5253
*/
5354
public function showNewPassword($token)

src/Http/Controllers/ImageUploadsController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function upload()
1515
{
1616
$path = request()->image->store(config('wink.storage_path'), [
1717
'disk' => config('wink.storage_disk'),
18-
'visibility' => 'public'
18+
'visibility' => 'public',
1919
]
2020
);
2121

src/Http/Controllers/LoginController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function showLoginForm()
2424
/**
2525
* Log the user out of the application.
2626
*
27-
* @param \Illuminate\Http\Request $request
27+
* @param \Illuminate\Http\Request $request
2828
* @return \Illuminate\Http\Response
2929
*/
3030
public function logout(Request $request)

src/Http/Controllers/PagesController.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class PagesController
1212
/**
1313
* Return pages.
1414
*
15-
* @return \Illuminate\Http\JsonResponse
15+
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection|\Illuminate\Http\JsonResponse
1616
*/
1717
public function index()
1818
{
@@ -28,7 +28,7 @@ public function index()
2828
/**
2929
* Return a single page.
3030
*
31-
* @param string $id
31+
* @param string $id
3232
* @return \Illuminate\Http\JsonResponse
3333
*/
3434
public function show($id = null)
@@ -49,7 +49,7 @@ public function show($id = null)
4949
/**
5050
* Store a single page.
5151
*
52-
* @param string $id
52+
* @param string $id
5353
* @return \Illuminate\Http\JsonResponse
5454
*/
5555
public function store($id)
@@ -80,8 +80,8 @@ public function store($id)
8080
/**
8181
* Delete a single page.
8282
*
83-
* @param string $id
84-
* @return null
83+
* @param string $id
84+
* @return void
8585
*/
8686
public function delete($id)
8787
{

src/Http/Controllers/PostsController.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class PostsController
1313
/**
1414
* Return posts.
1515
*
16-
* @return \Illuminate\Http\JsonResponse
16+
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection|\Illuminate\Http\JsonResponse
1717
*/
1818
public function index()
1919
{
@@ -38,14 +38,14 @@ public function index()
3838
/**
3939
* Return a single post.
4040
*
41-
* @param string $id
41+
* @param string $id
4242
* @return \Illuminate\Http\JsonResponse
4343
*/
4444
public function show($id = null)
4545
{
4646
if ($id === 'new') {
4747
return response()->json([
48-
'entry' => WinkPost::make(['id' => Str::uuid(), 'publish_date' => now()->toDateTimeString()]),
48+
'entry' => WinkPost::make(['id' => Str::uuid(), 'publish_date' => now()->format('Y-m-d H:i:00')]),
4949
]);
5050
}
5151

@@ -59,7 +59,7 @@ public function show($id = null)
5959
/**
6060
* Store a single post.
6161
*
62-
* @param string $id
62+
* @param string $id
6363
* @return \Illuminate\Http\JsonResponse
6464
*/
6565
public function store($id)
@@ -102,7 +102,7 @@ public function store($id)
102102
/**
103103
* Tags incoming from the request.
104104
*
105-
* @param array $incomingTags
105+
* @param array $incomingTags
106106
* @return array
107107
*/
108108
private function collectTags($incomingTags)
@@ -127,8 +127,8 @@ private function collectTags($incomingTags)
127127
/**
128128
* Return a single post.
129129
*
130-
* @param string $id
131-
* @return null
130+
* @param string $id
131+
* @return void
132132
*/
133133
public function delete($id)
134134
{

src/Http/Controllers/TagsController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TagsController
1212
/**
1313
* Return posts.
1414
*
15-
* @return \Illuminate\Http\JsonResponse
15+
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection|\Illuminate\Http\JsonResponse
1616
*/
1717
public function index()
1818
{
@@ -83,7 +83,7 @@ public function store($id)
8383
* Return a single tag.
8484
*
8585
* @param string $id
86-
* @return null
86+
* @return void
8787
*/
8888
public function delete($id)
8989
{

src/Http/Controllers/TeamController.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TeamController
1313
/**
1414
* Return posts.
1515
*
16-
* @return \Illuminate\Http\JsonResponse
16+
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection|\Illuminate\Http\JsonResponse
1717
*/
1818
public function index()
1919
{
@@ -30,7 +30,7 @@ public function index()
3030
/**
3131
* Return a single post.
3232
*
33-
* @param string $id
33+
* @param string $id
3434
* @return \Illuminate\Http\JsonResponse
3535
*/
3636
public function show($id = null)
@@ -53,7 +53,7 @@ public function show($id = null)
5353
/**
5454
* Store a single category.
5555
*
56-
* @param string $id
56+
* @param string $id
5757
* @return \Illuminate\Http\JsonResponse
5858
*/
5959
public function store($id)
@@ -98,7 +98,7 @@ public function store($id)
9898
/**
9999
* Return a single author.
100100
*
101-
* @param string $id
101+
* @param string $id
102102
* @return \Illuminate\Http\JsonResponse|null
103103
*/
104104
public function delete($id)

src/Http/Resources/PagesResource.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class PagesResource extends JsonResource
99
/**
1010
* Transform the resource into an array.
1111
*
12-
* @param \Illuminate\Http\Request $request
12+
* @param \Illuminate\Http\Request $request
1313
* @return array
1414
*/
1515
public function toArray($request)

0 commit comments

Comments
 (0)