-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from milewski/master
Improvements
- Loading branch information
Showing
14 changed files
with
17,204 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
/.idea | ||
/vendor | ||
/node_modules | ||
package-lock.json | ||
composer.phar | ||
composer.lock | ||
phpunit.xml | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/*! | ||
* Determine if an object is a Buffer | ||
* | ||
* @author Feross Aboukhadijeh <https://feross.org> | ||
* @license MIT | ||
*/ | ||
|
||
/** | ||
* @license | ||
* Lodash <https://lodash.com/> | ||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/> | ||
* Released under MIT license <https://lodash.com/license> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
"/js/tool.js": "/js/tool.js", | ||
"/css/tool.css": "/css/tool.css" | ||
} | ||
"/js/tool.js": "/js/tool.js" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"dev": "npm run development", | ||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"watch-poll": "npm run watch -- --watch-poll", | ||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", | ||
"prod": "npm run production", | ||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" | ||
"development": "mix", | ||
"watch": "mix watch", | ||
"watch-poll": "mix watch -- --watch-options-poll=1000", | ||
"hot": "mix watch --hot", | ||
"production": "mix --production" | ||
}, | ||
"devDependencies": { | ||
"cross-env": "^5.0.0", | ||
"laravel-mix": "^1.0", | ||
"laravel-nova": "^1.0.8", | ||
"sass-loader": "^7.1.0" | ||
}, | ||
"dependencies": { | ||
"vue": "^2.5.0" | ||
"cross-env": "^7.0.3", | ||
"laravel-mix": "^6.0.41", | ||
"laravel-nova": "^1.12.3", | ||
"resolve-url-loader": "^5.0.0", | ||
"vue": "^2.6.14", | ||
"vue-loader": "^15.9.8", | ||
"sass": "^1.42.1", | ||
"sass-loader": "^12.1.0", | ||
"vue-template-compiler": "^2.6.14" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,74 @@ | ||
<template> | ||
<panel-item :field="field"> | ||
<p | ||
slot="value" | ||
class="text-90 flex" | ||
> | ||
<span | ||
class="w-full flex flex-wrap -mx-2" | ||
v-if="field.withGroups" | ||
> | ||
<div | ||
v-for="(permissions, group) in field.options" | ||
:key="group" | ||
class="mb-4 permission-group mx-2" | ||
> | ||
<h3 class="my-2">{{ __(group) }}</h3> | ||
<div | ||
v-for="(permission, option) in permissions" | ||
:key="option" | ||
class="flex-auto" | ||
:title="permission.description" | ||
> | ||
<span | ||
class="inline-block rounded-full w-2 h-2 mr-1" | ||
:class="optionClass(permission.option)" | ||
/> | ||
<span>{{ permission.label }}</span> | ||
</div> | ||
</div> | ||
</span> | ||
<span | ||
class="w-full flex flex-wrap -mx-2" | ||
v-else | ||
> | ||
<div | ||
v-for="(permission, option) in field.options" | ||
:key="option" | ||
class="flex-auto mx-2" | ||
:title="permission.description" | ||
> | ||
<span | ||
class="inline-block rounded-full w-2 h-2 mr-1" | ||
:class="optionClass(option)" | ||
/> | ||
<span>{{ permission.label }}</span> | ||
|
||
<panel-item class="nova-permissions" :field="field"> | ||
|
||
<div slot="value" class="text-90 flex"> | ||
|
||
<div class="w-full flex flex-wrap -mx-2" v-if="field.withGroups"> | ||
|
||
<div v-for="(permissions, group) in field.options" :key="group" class="mb-4 permission-group mx-2"> | ||
|
||
<h3 class="mb-3">{{ __(group) }}</h3> | ||
|
||
<div v-for="(permission, option) in permissions" | ||
:key="option" | ||
class="flex-auto" | ||
:title="permission.description"> | ||
|
||
<span class="inline-block rounded-full w-2 h-2 mr-1" :class="optionClass(permission.option)"/> | ||
<span>{{ permission.label }}</span> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
<div class="w-full flex flex-wrap -mx-2" v-else> | ||
|
||
<div v-for="(permission, option) in field.options" | ||
:key="option" | ||
class="flex-auto mx-2" | ||
:title="permission.description"> | ||
|
||
<div class="inline-block rounded-full w-2 h-2 mr-1" :class="optionClass(option)"/> | ||
|
||
<div>{{ permission.label }}</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</span> | ||
</p> | ||
</panel-item> | ||
|
||
</panel-item> | ||
|
||
</template> | ||
|
||
<script> | ||
export default { | ||
props: ["resource", "resourceName", "resourceId", "field"], | ||
methods: { | ||
optionClass(option) { | ||
return { | ||
"bg-success": this.field.value | ||
? this.field.value.includes(option) | ||
: false, | ||
"bg-danger": this.field.value | ||
? !this.field.value.includes(option) | ||
: true | ||
}; | ||
export default { | ||
props: [ 'resource', 'resourceName', 'resourceId', 'field' ], | ||
methods: { | ||
optionClass(option) { | ||
return { | ||
'bg-success': this.field.value | ||
? this.field.value.includes(option) | ||
: false, | ||
'bg-danger': this.field.value | ||
? !this.field.value.includes(option) | ||
: true, | ||
} | ||
}, | ||
}, | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss"> | ||
.nova-permissions .permission-group { | ||
flex: 1 1 300px; | ||
} | ||
</style> |
Oops, something went wrong.