Commit Graph

1025 Commits

Author SHA1 Message Date
Azri Kahar
e6a0a40319 redirect to page not found for invalid collections (#11882) 2022-02-28 11:05:58 -05:00
Azri Kahar
2938821be0 fix map interface extension options (#11796) 2022-02-22 15:08:40 +00:00
Azri Kahar
079d02c6fa Hide delete action for last admin role (#11793) 2022-02-22 10:02:52 -05:00
Azri Kahar
9f0c272976 Hide save options when no create permission (#11762) 2022-02-21 11:12:01 -05:00
Azri Kahar
08436cc401 Show collection notes (#11702)
* add collection note & tweak styles

* fix overflowing collection note

* use em dash

* add min width to align notes

* add directus_shares note

* remove dynamic min width

* remove unused code
2022-02-18 16:02:49 +00:00
Azri Kahar
0cffb9c0a8 Fix context menu directive's deactivate event (#11681)
* fix context menu directive deactivate event

* add danger style for delete folder in FIle Library

* update readme
2022-02-17 09:19:07 -05:00
Oreille
7c35f3b7aa Change relation onDelete rule to NO ACTION when the field is set non-nullable (#11597) 2022-02-16 10:00:56 -05:00
Azri Kahar
3211302a9c Fix roles in users module navigation not updating (#11501) 2022-02-16 09:30:48 -05:00
Azri Kahar
43ba2fea4c fix field advanced display config not working (#11467) 2022-02-16 09:27:06 -05:00
ian
4a4b35b19a Add shares to app access minimum permissions (#11560) 2022-02-10 17:37:10 +08:00
Azri Kahar
f4275b41b3 Fix repeater's extension options not updating when configured (#11453)
* fix repeater extension options

* fix lint warning

* change emit to camelCase for consistency
2022-02-09 11:04:47 -05:00
Nitwel
aa9e6c0dd0 fix text when deleting data-model folder (#11433) 2022-02-08 10:22:16 +08:00
Jay Cammarano
f40a3e94a0 Add strings to accepted fields for Insights Panel "Metrics" (#10828)
* extension takes context object

* v-model with options object

* removed comments

* added typing

* fixed typing

* state is saved on field-configuration

* extension-options uses object for objectOptions

* removed unnecessary context

* more props instead of context object

* remove unused import

* move Panel type to shared

* passing edits.options => whole edit object

* alterOptions check => edits watch

* props on extension types have defaults

* returning the whole panel not just .options

* panels without functions load

* only displaying first, last, and count

* first last count working

* string values displayed!

* removed unused vars

* choices disabled not removed

* options.function resets to count

* fills in values when editing a panel

* field resets when collection changes

* doesn't wipe collection on edit

* panel cleared when panel type changes

* removed resolved comment

* package.json

* Advanced Field Detail working

* divider on type of function

* divider option removed unneeded values

* removed unneeded v-if

* Don't check against function type in panel options

* Tweaks to resolve my own commentary

* 🧹 Cleanup tweaks

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-02-03 16:55:15 -05:00
José Varela
b273f3e94f Allow batch edit for 1 or more items (#11318) 2022-01-28 09:09:50 -05:00
Azri Kahar
cb8b71f263 Remove unused variables for lint checks (#11319) 2022-01-28 12:52:29 +00:00
Azri Kahar
bd39b1b546 Fix fields order in Fields Permissions (#11265)
* fix fields ordering in Fields Permissions

* extract logic into reusable function

* refine comment
2022-01-25 15:23:25 +00:00
Azri Kahar
27840e83bc Refine option labels for Folders in Data Model (#11258) 2022-01-25 09:26:08 -05:00
Azri Kahar
6368f641e5 Add CSV/JSON Import capability via App (#11050)
* Allow import data to collections via App directly

* clear file input after import

* tweak translations

* reduce vertical gap

* fix clear file input logic

* Change export data button text

* update start import button disabled color

* undo unintended changes to translations quotes

* add docs for importing items sidebar

* update exporting items docs

* Combine import/export sidebar details

* Remove unused import detail

* Fix docs

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-01-20 16:57:29 -05:00
Nicola Krumschmidt
8665558c2f Fix a prop type check in the advanced schema drawer (#11171) 2022-01-19 13:55:31 -05:00
Nicola Krumschmidt
ad8e09c96f Only trigger edits guard if there are edits (#11170)
We should only show a warning if the user actually made changes to the item.

Fixes #11088
2022-01-19 18:50:34 +00:00
Azri Kahar
333d93b989 fix collection options menu clicks (#11084) 2022-01-17 14:39:53 -05:00
José Varela
dc393ed9ba Create composable use-edits-guard (#11018) 2022-01-13 16:49:01 +00:00
Azri Kahar
161c9c80ca Move danger styling to field-select-menu component (#11014) 2022-01-13 10:16:35 -05:00
José Varela
1c2848aadc has-edits as part of use-item (#11016) 2022-01-13 09:00:48 -05:00
Jay Cammarano
43141feb16 set minimum value for input length to 1 (#10993) 2022-01-12 10:13:56 -05:00
Rijk van Zanten
644479bad8 Add relations tab for file type fields (#10985)
Ref #10967
2022-01-11 17:02:05 -05:00
Azri Kahar
0a46e80d0c show items without archive value in all items view (#10970) 2022-01-11 12:21:38 -05:00
Azri Kahar
a75bdc2d02 add last_page to minimal permissions on app side (#10944) 2022-01-10 11:28:59 -05:00
José Varela
19d918d287 Fix delete preset reactivity (#10945) 2022-01-10 11:15:37 -05:00
Azri Kahar
ff6f91478d Fix user info sidebar watcher causing error (#10903) 2022-01-07 09:03:20 +00:00
Rijk van Zanten
8cdb6edfca Handle broken images more gracefully (#10879)
Fixes #10853
2022-01-05 16:38:41 -05:00
Nicola Krumschmidt
9ee6e97cd9 Move useLayout composable to shared and expose it through extensions-sdk (#10850)
* Move useLayout composable to shared

* Expose useLayout through extensions-sdk
2022-01-05 15:38:48 -05:00
Rijk van Zanten
dbf35a1736 Add ability to share items with people outside the platform (#10663)
* Add directus_shares

* Don't check for usage limit on refresh

* Add all endpoints to the shares controller

* Move route `/auth/shared` to `/shared/auth`

* Add password protection

* Add `share` action in permissions

* Add `shares/:pk/info`

* Start on shared-view

* Add basic styling for full shared view

* Fixed migrations

* Add inline style for shared view

* Allow title override

* Finish /info endpoint for shares

* Add basic UUID validation to share/info endpont

* Add UUID validation to other routes

* Add not found state

* Cleanup /extract/finish share login endpoint

* Cleanup auth

* Added `share_start` and `share_end`

* Add share sidebar details.

* Allow share permissions configuration

* Hide the `new_share` button for unauthorized users

* Fix uses_left displayed value

* Show expired / upcoming shares

* Improved expired/upcoming styling

* Fixed share login query

* Fix check-ip and get-permissions middlewares behaviour when role is null

* Simplify cache key

* Fix typescript linting issues

* Handle app auth flow for shared page

* Fixed /users/me response

* Show when user is authenticated

* Try showing item drawer in shared page

* Improved shared card styling

* Add shares permissions and change share card styling

* Pull in schema/permissions on share

* Create getPermissionForShare file

* Change getPermissionsForShare signature

* Render form + item on share after auth

* Finalize public front end

* Handle fake o2m field in applyQuery

* [WIP]

* New translations en-US.yaml (Bulgarian) (#10585)

* smaller label height (#10587)

* Update to the latest Material Icons (#10573)

The icons are based on https://fonts.google.com/icons

* New translations en-US.yaml (Arabic) (#10593)

* New translations en-US.yaml (Arabic) (#10594)

* New translations en-US.yaml (Portuguese, Brazilian) (#10604)

* New translations en-US.yaml (French) (#10605)

* New translations en-US.yaml (Italian) (#10613)

* fix M2A list not updating (#10617)

* Fix filters

* Add admin filter on m2o role selection

* Add admin filter on m2o role selection

* Add o2m permissions traversing

* Finish relational tree permissions generation

* Handle implicit a2o relation

* Update implicit relation regex

* Fix regex

* Fix implicitRelation unnesting for new regex

* Fix implicitRelation length check

* Rename m2a to a2o internally

* Add auto-gen permissions for a2o

* [WIP] Improve share UX

* Add ctx menu options

* Add share dialog

* Add email notifications

* Tweak endpoint

* Tweak file interface disabled state

* Add nicer invalid state to password input

* Dont return info for expired/upcoming shares

* Tweak disabled state for relational interfaces

* Fix share button for non admin roles

* Show/hide edit/delete based on permissions to shares

* Fix imports of mutationtype

* Resolve (my own) suggestions

* Fix migration for ms sql

* Resolve last suggestion

Co-authored-by: Oreilles <oreilles.github@nitoref.io>
Co-authored-by: Oreilles <33065839+oreilles@users.noreply.github.com>
Co-authored-by: Ben Haynes <ben@rngr.org>
Co-authored-by: Thien Nguyen <72242664+tatthien@users.noreply.github.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2021-12-23 18:51:59 -05:00
Azri Kahar
d947c4f962 fix public role sidebar not closable (#10651) 2021-12-23 18:22:30 -05:00
Azri Kahar
4d97597e8f Add Archive sidebar component (#10513)
* move archive to dedicated sidebar component

* fix unarchive dialog & notification

* update docs on viewing archived items

* remove commented code

* use radio btns, update options text & query string

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-16 22:30:00 +00:00
Nicola Krumschmidt
23951e5a02 Align display options type with interface options type (#10524)
* Align display options type with interface options type

* Fix linter warnings

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-15 20:25:46 +00:00
Azri Kahar
31bb890496 Unify & translate initial role/user detail in init & bootstrap command (#10493)
* Unify initial role/user detail in init & bootstrap

* translate role descriptions

* translate data from system collections
2021-12-14 09:33:44 -05:00
ian
81262800cb Fix selection of field.meta.special after removal (#10412)
* Set field.meta.special to null when empty

* Add check for previously persisted empty string
2021-12-09 09:19:35 -05:00
rijkvanzanten
00a2be9187 Improve 404 check on item detail page 2021-12-03 16:11:33 -05:00
Rijk van Zanten
21a053f19a Fix translations relationship setup not syncing o2m col to m2o (#10248)
Fixes #9934
2021-12-02 18:18:40 -05:00
José Varela
eb68f85e54 Support 'selectionMode' on tabular and cards (#8010)
* showSelect as 'none', 'one' or 'multiple' on table

* showSelect on cards

* showSelect and fix on calendar

* showSelect and fix on map

* fix layout selection prop type

* fix tabular row click on select mode

* remove unused import

* minor strict equality changes

* hide checkbox for activity table

* Update app/src/modules/notifications/routes/collection.vue

Co-authored-by: ian <licitdev@gmail.com>

* Make preset item reactive

* Add comment clarifying ref wrapper

* Fix type signature of layout props

Co-authored-by: Azri Kahar <azrikahar@outlook.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-02 16:02:13 -05:00
Azri Kahar
0dc0fd4360 Simplify presentation/aliases & accordion setup flow (#9742)
* move title input up for dividers

* WIP

* simplify key id

* add contrast to notices in field configuration

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-01 21:29:02 +00:00
Oreille
9c9e2eff5b Fix ability to change M2O field type and prevent incompatible interfaces in advanced mode (#10096)
* Fix ability to change M2O field type and prevent incompatible interfaces in advanced mode

* Removed unused imports

* Rename interface variable
2021-12-01 16:16:37 -05:00
Azri Kahar
c4f8214ad8 Autofocus first input in create item form (#9583)
* autofocus first input in create form

* add autofocus to translations interface

* avoid setting firstEditableField to hidden fields

* Base autofocus on prop

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-01 16:09:21 -05:00
Azri Kahar
a79345a371 Clear selections after batch edit (#9798)
* Clear selections after batch edit

* remove redundant selection clears

* only refresh after batch saving

* use clearer function name
2021-12-01 15:49:20 -05:00
Oreille
a52bd8c9d6 Remove on_delete rule from user-created and user-updated default schema (#10168) 2021-12-01 10:28:32 -05:00
Azri Kahar
fd7844c5c4 Fix data model folders edit dialog (#10040) 2021-11-25 10:53:05 -05:00
Azri Kahar
e1e82bcac6 fix roles aggregation query to fit all db vendors (#10050)
* fix roles aggregation query to fit all db vendors

* Small opinionated style tweak 🧹

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-25 15:48:53 +00:00
Azri Kahar
e88ed96e5c Add context menu directive (#9334)
* Add context menu directive

* require specifying a ref name

* fix empty context menu
@azrikahar

* listen contextmenu even if no menu attached
In some cases we have an area where would like to not open the browser context menu. For example, an area where the context menu does not have any options because of conditions like permissions

* only 'Show hidden...' if hidden collections exists

* fix arrow chunk overlapping items on v-menu

Co-authored-by: Jose Varela <joselcvarela@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-24 17:09:29 -05:00
Azri Kahar
86155d4683 Fix click event for unconfigured tables (#9056)
* fix click event for unconfigured tables

* fix lint errors

* replace click events with links in collection-item

* handle link and click on single block

* Revert "handle link and click on single block"

This reverts commit ef9db8c0ab.

* use button for click actions

* add dense to db-only

* fix hitbox

* add stop modifier to folder toggle

* Prevent route action on folder click

Co-authored-by: Jose Varela <joselcvarela@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-24 16:52:55 -05:00