Skip to content

Commit b20ebd2

Browse files
committed
wip : fine tune uikit integration, add vue uikit alert component
1 parent e100cf3 commit b20ebd2

File tree

20 files changed

+291
-147
lines changed

20 files changed

+291
-147
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ Manage your `Laravel Schedule` from a pretty dashboard. Schedule your `Laravel C
1717

1818
#### Installation
1919

20-
`Totem` requires Laravel v5.5.Use composer to install totem to your Laravel project
20+
`Totem` requires Laravel v5.4 and above. Use composer to install totem to your Laravel project
2121

2222
composer require studio/laravel-totem
2323

24-
Laravel Totem supports auto package discovery for Laravel v5.5.
24+
> Laravel Totem supports auto package discovery for Laravel v5.5, therefore service provider registration is not required in Laravel v5.5
2525
26-
Once `Laravel Totem` is installed , publish `Totem` assets to your public folder using the following command
26+
Add `TotemServiceProvider` to the `providers` array of your Laravel v5.4 application's config/app.php
27+
28+
Studio\Totem\Providers\TotemServiceProvider::class,
29+
30+
Once `Laravel Totem` is installed & registered, you can publish `Totem` assets to your public folder using the following command
2731

2832
php artisan totem:assets
2933

@@ -59,6 +63,14 @@ protected $hidden = true;
5963
#### Current limitations
6064

6165
Currently tasks can only be scheduled with a cron expression. Stay tuned for more Laravel Schedule like fluent configurations.
66+
67+
### Screenshots
68+
69+
##### Task List
70+
<img src="https://github.com/codestudiollc/laravel-totem/blob/master/public/img/screenshots/tasks.png?raw=true" alt="Task List"/>
71+
72+
##### Task Details
73+
<img src="https://github.com/codestudiollc/laravel-totem/blob/master/public/img/screenshots/task-details.png?raw=true" alt="Task List"/>
6274

6375
## Changelog
6476

public/css/app.css

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/css/app.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
273 KB
Loading

public/img/screenshots/tasks.png

221 KB
Loading

public/js/app.js

Lines changed: 83 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/assets/js/app.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ import Vue from 'vue'
33
import moment from 'moment'
44
import Vuikit from 'vuikit'
55
import StatusButton from './tasks/components/StatusButton.vue'
6+
import VkAlert from './components/UiKitAlert.vue'
67

78
import IconCog from 'vuikit/icons/cog'
9+
import IconClose from 'vuikit/icons/close'
810
import IconClock from 'vuikit/icons/clock'
911
import IconSearch from 'vuikit/icons/search'
12+
import IconSpinner from 'vuikit/icons/components/spinner'
1013

1114

1215
Promise.delay = function (time) {
@@ -40,14 +43,15 @@ Vue.mixin({
4043
}
4144
}
4245
})
43-
console.log(Vuikit)
4446

4547
Vuikit.Icon.register(IconCog)
48+
Vuikit.Icon.register(IconClose)
4649
Vuikit.Icon.register(IconClock)
4750
Vuikit.Icon.register(IconSearch)
51+
Vuikit.Icon.register(IconSpinner)
4852

4953
Vue.component('status-button', StatusButton)
50-
54+
Vue.component('vk-alert',VkAlert)
5155
Vue.use(Vuikit)
5256
new Vue({
5357
el: '#root'
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<template>
2+
<div :class="classes" v-if="show">
3+
<a class="uk-alert-close uk-close uk-icon" @click="show = false">
4+
<vk-icon icon="close"></vk-icon>
5+
</a>
6+
<slot></slot>
7+
</div>
8+
</template>
9+
10+
<script>
11+
export default {
12+
name: 'VkAlert',
13+
props: {
14+
type: {
15+
type: String,
16+
default: 'primary'
17+
},
18+
important: {
19+
type: Boolean,
20+
default: false
21+
},
22+
timeout: { default: 5000 }
23+
},
24+
data() {
25+
return { show: true };
26+
},
27+
computed: {
28+
classes: function () {
29+
return 'uk-alert uk-alert-' + this.type
30+
}
31+
},
32+
mounted() {
33+
if (! this.important) {
34+
setTimeout(
35+
() => this.show = false,
36+
this.timeout
37+
)
38+
}
39+
}
40+
}
41+
</script>

resources/assets/js/tasks/components/StatusButton.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<template>
22
<transition mode="out-in">
3-
<button v-if="task.activated" type="button" class="uk-button uk-button-small" :class="{ 'uk-button-primary': !hovering && !working, 'uk-button-danger': hovering && !working, 'uk-button-secondary': working}" key="enabled" @mouseenter="hovering = true" @mouseleave="hovering = false" @click="deactivate" :disabled="working">
4-
{{ activeStatusText }}
3+
<button v-if="task.activated" type="button" class="uk-button uk-button-small" :class="{ 'uk-button-primary': !hovering && !working, 'uk-button-danger': hovering && !working, 'uk-spinner uk-icon uk-button-secondary': working}" key="enabled" @mouseenter="hovering = true" @mouseleave="hovering = false" @click="deactivate" :disabled="working">
4+
<span v-if="!working">{{ activeStatusText }}</span>
5+
<vk-icon v-if="working" icon="spinner"></vk-icon>
56
</button>
6-
<button v-if="existsAndIsInActive" type="button" class="uk-button uk-button-small" :class="{'uk-button-danger': !hovering && !working, 'uk-button-primary': hovering && !working, 'uk-button-secondary': working}" key="disabled" @mouseenter="hovering = true" @mouseleave="hovering = false" @click="activate" :disabled="working">
7-
{{ inActiveStatusText }}
7+
<button v-if="existsAndIsInActive" type="button" class="uk-button uk-button-small" :class="{'uk-button-danger': !hovering && !working, 'uk-button-primary': hovering && !working, 'uk-spinner uk-icon uk-button-secondary': working}" key="disabled" @mouseenter="hovering = true" @mouseleave="hovering = false" @click="activate" :disabled="working">
8+
<span v-if="!working">{{ inActiveStatusText }}</span>
9+
<vk-icon v-if="working" icon="spinner"></vk-icon>
810
</button>
911
</transition>
1012
</template>

resources/assets/less/uikit-themes/totem/base.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Variables
88
// ========================================================================
99

10-
@base-body-font-weight: 400;
10+
@base-body-font-weight: 600;
1111

1212
@base-small-font-size: 90%;
1313

0 commit comments

Comments
 (0)