Code Monkey home page Code Monkey logo

directus-extension-field-actions's Introduction

๐Ÿฐ Directus extension: Text action display & interface

๐Ÿ’ก A directus interface + display adding copy to clipboard and link actions to your values.

The actions can be performed by a button next to the items or by clicking on the value.


โ†‘ Add copy-to-clipboard and link functions to your data


Modified

โœจ Supports

๐Ÿ“‹ Copy action

Each value can be copied by a custom button. If enabled it's also possible to copy a value by just clickung on it (click-action)

โžก๏ธ Links

When using the link-option it supports โžก๏ธ HTTP-, ๐Ÿ“ง mail-, and ๐Ÿ“ž phone- links. Each link can be opened by the custom button. If enabled it's also possible to open the link by just clicking on the value (click-action).

Note: The extensions currently won't parse invalid links into valid ones!

๐Ÿ–ฑ Click-Action

Displays and disabled interfaces (== readonly) support a custom click-action. This can be one of:

  • default action (does nothing custom)
  • Copy-action (copied the value)
  • Link-action (openes the link in a new tab)

โš™ Settings

Icon position

  • The icons can be placed before or after the content
  • The setting can be set for the interface and display, as well as the copy and link button indipendently
  • Example in the screenshots below

Custom prefix

  • You can set custom prefixes for copy-/ and link-actions.
  • Prefixes can be entered manually or use a defined variable (Project URL setting)
  • The setting can be set for the interface and display, as well as the copy and link button indipendently
  • Example in the screenshots below

Link target

  • Set the link-target to the same, or a new tab

Hide field value (display only)

  • Hides the field value for a button only mode
  • Mostly to be used in combinaiton with button labels

Button labels (display only)

  • Add custom labels to the copy-/ and link icons for the display
  • Mostly to be used in combinaiton with the "Hide field value" option for a button only mode

โš™๏ธ Installation (npm)

npm i directus-extension-field-actions

or

pnpm i directus-extension-field-actions

โš™๏ธ Installation (manually)

  1. Download the app.js, api.js and package.json from the latest release

  2. Create a folder named directus-extension-field-actions in your extension folder (e.g /extensions/directus-extension-field-actions) and a /dist folder inside.

  3. Move the package.json to the created extension folder and the app.js and api.js into the /dist folder.

  4. Restart directus

The result should look like this:

โ”œโ”€โ”€ extensions
โ”‚   โ”œโ”€โ”€ directus-extension-field-actions
โ”‚   โ”‚   โ”œโ”€โ”€ dist
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ app.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ api.js
โ”‚   โ”‚   โ”œโ”€โ”€ package.json

๐Ÿ–ผ Screenshots

โ†‘ Copy values from table views directly by clicking on them or an icon (configurable)


โ†‘ Copy field-values by clicking on it (only for readonly-fields and displays)


โ†‘ Add link- and copy-to-clipboard buttons to each field


โ†‘ Interfaces settings


โ†‘ Displays settings


directus-extension-field-actions's People

Contributors

anantakrishna avatar baguse avatar dominic-marcelino avatar thomasjvu avatar ywzhaiqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.