sixlive / nova-text-copy-field Goto Github PK
View Code? Open in Web Editor NEWNova text field with click to copy support
License: MIT License
Nova text field with click to copy support
License: MIT License
What about hiding the icon until someone hovers over the text? Like Digitalocean does.
Let's say i have this url: https://my-long-url-example.com/1S79Z
but i only want to show 1S79Z in the table.
Missing docblocks for the following methods:
n/a
n/a
n/a
v1.3.0
I could see it being nice to add the copy fields in the index as well as the detail view. Might want to implement #1 first since the icons would be used in two components.
Add screenshots for resource index
Hover the icon
Hover text with localization to tell the user what clicking it does.
I have a key (UUID) that is generated during the creation process that is hashed and never shown again. I was hoping TextCopy would help me quickly add a copy icon, but it does not show on the create screen. Am I missing a setting or is this not currently possible?
Copy value to the clippboard
Uncaught TypeError: t.value.trim is not a function
nove-text-copy-field 1.5
Laravel Nova v3.8.4
Update the Packagist badge for stable releases.
https://img.shields.io/packagist/v/sixlive/nova-text-copy-field.svg?style=flat-square
SVG Usage is a little sloppy. Would like to clean it up as SVG components. http://calebporzio.com/using-inline-svgs-in-vue-compoments/
The field ignores the readonly attribute.
Example:
Text::make('License Member Sign Up Key','license_key')->readonly(),
This is small enough that it's really easy to manually test. I'm not sure if there is a way to add automated tests to Nova tooling. If there is, I'd like to set that up.
@mpociot to the rescue! http://marcelpociot.de/blog/travis-ci-for-laravel-nova-development
It would be useful to be able to override the text shown by the button. For instance I want to use a generated copyValue that has no corresponding row in the database in meaning only the button shows.
TextCopy::make('Social link')
->copyValue(function () {
return $this->url;
}),
Other times I might have a long item to copy like a URL and rather and truncate it, it would ne good to supply different word like copy link.
At the moment I work around it by supplying a second argument to the make
method which uses an accessor on the model that returns a string.
// resource
TextCopy::make('Social link', 'social_link_copy_label')
->copyValue(function () {
return $this->url;
}),
// model
public function getSocialLinkCopyLabelAttribute()
{
return 'Copy url';
}
TextCopy::make('link', function () {
return url('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=' . $this->id);
}
)->exceptOnForms()
it display in index too long , can nova-text-copy-field display short text and copy the real text?
TextCopy::make('UUID')
->exceptOnForms()
->copyButtonTitle('Copy URL')
->copyValue(function () {
if (! $this->uuid) {
return null;
}
return route('xyz', $this->uuid);
}),
Text::make('UUID')
->exceptOnForms(),
PHP 7.4.9
Laravel 7.26.1
Nova 3.8.4
TextCopyField 1.5.0
Currently, this package uses vue-clipboard2. I'm not too keen on registering global directives on the Nova Vue instance. Look into just using clipboard.js and binding it per element.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.