Commit Graph

958 Commits

Author SHA1 Message Date
Azri Kahar
49a687788b Prevent passing empty string as json field default (#12904) 2022-04-20 21:42:30 +00:00
Rijk van Zanten
518d14607d Tweak default sizing of roles, enable resize (#12822)
* Tweak default sizing of roles, enable resize

Implements #12816

* Use v-text-overflow for role name

* Use text overflow for description as well
2022-04-18 10:13:54 -04:00
Azri Kahar
0dfbc65bad Add copy button to role ID in role permissions page's sidebar detail (#12706)
* refactor to useClipboard composable

* add copy button to role permissions page
2022-04-13 17:56:29 -04:00
Rijk van Zanten
6a8ecebda0 Fix icon alignment in db-only tables (#12744) 2022-04-13 15:24:21 -04:00
Azri Kahar
74c718c684 Sticky permissions overview header (#12704)
* Sticky permissions overview header

* refactor to script setup

* add header bar height as css variable
2022-04-13 10:33:15 -04:00
Rijk van Zanten
f89aa95140 Re-style file detail preview + replace interaction (#12689)
* Return BigIntegers as Strings in GraphQL

Fixes #12051

* Redesign fallback image style

* Re-add replace button in new position
2022-04-11 18:24:12 -04:00
Rijk van Zanten
7bbad9a444 Add support for translatable bookmark names (#12687)
* Add support for translatable bookmark names

* Remove unused imports

* Remove even more unused imports
2022-04-11 20:28:49 +00:00
Jay Cammarano
70f36ac3d3 When no header icon is chosen use the panel types's icon for the default header icon rather than hardcoding "insert_chart" (#12541)
* panelTypeInfo.icon default for header

* migration: +nullable, -defaultTo('insert_chart')

* Rename migration file, use helper to fix oracle etc

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-05 15:29:11 +00:00
Christian Rendl
0206a3d2cc Added default locale before login (#8196)
* Added default locale before login

* Use project_language as default language for new users

* Revert "Use project_language as default language for new users"

* Allow user's language field to be nullable; Use project_language whenever language is unset;

* Apply suggestions from code review

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>

* Make "Project Default" option in system-language interface configurable

* Set language only if user language is not null

* Introduced translation for project_language field; Use translation in system-language interface

* Set app language only from app.vue;
Included watcher to restore project_language if user's language is (re)set to null

* Removed .alter() in knex migration since it's not needed for changing default and breaks checks

* Reverted previous change in migration; .alter() is needed for changing column defaults

* Reverted migration to use .defaultTo(null) to set default value

* Update position of project language field in settings

* Fix cockroachdb test error in knex migration

* Fix cockroachdb test error in knex migration

* Apply migration fix also on oracle databases

* Apply changes from code review

* Rename migration to fix migration key error

* Move setLanguage calls to server.ts and hydrate.ts

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
Co-authored-by: jaycammarano <jay.cammarano@gmail.com>
Co-authored-by: Christian Rendl <cr@mutor.at>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-04-01 14:30:56 -04:00
Rijk van Zanten
90f5b0a471 Add functions support to the app + add count function (#12488)
* Rename date functions to fn, add json_array_length for pg

* Add json count to mssql

* Add json array count support to other vendors

* Add UI for selecting API functions

* Make it not break

* Render functions in filter preview better

* Include functions in field altering

* Add schema access to database helper

* Allow filtering against o2m/m2m/m2a count

* Add data function execution helpers in utils

* Fix type issue

* Inject function results in validate step

* Render field keys with function names translated

* Allow selecting nested/functions in field validation step

* Make sure number comparisons are treated as numbers

* Add check if instanceof date when casting to a Number

* Prevent selecting foreign keys for junction sort (#12463)

* [SDK] Add further request options to `items` functions (#12503)

* add possibility to set further options to the request

* fix options type

* add typings to interface

* add test if headers are passed thourght

* create reusable options param

* set higher priority to options param

* Small stylistic cleanup

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Jürg Hunziker <juerg.hunziker@gmail.com>
2022-03-31 16:56:26 -04:00
Azri Kahar
e77395c11e Prevent selecting foreign keys for junction sort (#12463) 2022-03-31 10:25:35 -04:00
Nicola Krumschmidt
5856d991d4 Fix field validations showing filter interface with all fields (#12467) 2022-03-29 17:51:56 -04:00
Azri Kahar
8f0fa7bf84 fix translations not using language table name (#12461) 2022-03-29 09:39:49 -04:00
Azri Kahar
31cfb8266f Bookmark improvements (#12031)
* add icon & color to bookmarks

* update current bookmark title on edit

* clean up edit bookmark dialog on cancel

* remove unused bookmark-edit component

* interaction improvements

* sort based on scope and alphabetically

* prevent hover when locked & use tooltip

* Reduce size of right hand icon in bookmark

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-28 11:23:00 -04:00
José Varela
a58f09114d App / Presets: Use layout-wrapper to list presets (#10978)
* Use layout-wrapper to list presets
Right now, it's not possible to pass a custom column to layout-wrapper. So the `Scope` is not available anymore, because it's a computed value and we do not support computed values as of the time being.

* update batch selection & button styles

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-28 09:45:40 -04:00
Rijk van Zanten
81697280c0 Allow configuring filters on preset detail page (#12402) 2022-03-28 09:12:59 -04:00
Rijk van Zanten
175fb849c4 Add field-level validation (#12363)
* Add field validation column

* Add frontend config for validation

* Make it work

* Add regex to filter configuration

* Fix const/let

* Add custom validation message support

* Add custom validation message tooltip inline

* Fix custom names in validation errors up top

* Fix type error

* Nog eentje om het af te leren

* resolve unused import warnings
2022-03-25 18:03:36 -04:00
CommanderRoot
d81adcd674 refactor: replace deprecated String.prototype.substr() (#12344)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-25 13:36:18 -04:00
Azri Kahar
1c7a07d3b7 Fix translation drawer delete button hover style (#12353) 2022-03-24 10:02:17 +00:00
Azri Kahar
51ec656a06 disable actions based on permissions (#12316) 2022-03-23 11:09:08 -04:00
Azri Kahar
c5a8a3710f Save last accessed collection in Content Module (#12310)
* Save last accessed colection in Content Module

* check visible collections to support nested ones
2022-03-23 10:57:18 -04:00
Lukas Schätzle
3043fafb64 Add shortcut from data model to collection content (#12324)
* Add shortcut to collection content from its data model

* Revert automatic formatting to keep in sync with main
2022-03-23 10:45:41 -04:00
Azri Kahar
37cbaa0be5 Add App Translation Strings in Settings (#12170)
* add migration for translation strings

* add to navigation

* WIP

* fix dialog overflow

* update translation keys

* Update logic

* add placeholder to system-language

* fix translation

* remove unused import

* reset dialog on create new

* ensure search input is visible when searching

* merge translation strings on set language

* merge translation strings on update

* hydrate

* make sure null translation do not get merged

* change dialog to drawer

* update placeholder text

* fix form value

* revert dialog style change

* rename drawer component

* Force safe key name

* Move interface to system interfaces

The saved values are Directus app proprietary, so to prevent confusion in what it's supposed to do, we'll move it to system.

* Move composable to root composables

* Use new languages input in interface/display options

* hide translation strings field in project settings

* set system true to system-input-translated-string

* use this in field detail notes

* use in list options

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-22 09:39:04 -04:00
ian
e2eb2801c5 Prefix existing field typecasting flags with "cast-" (#12141)
* Prefix typecasting field flags

* Fix payload test

* Update flags for system tables and for field creation in app

* Revert cast-hash and cast-uuid

* Rename migrations file to current date
2022-03-21 14:46:48 -04:00
ian
9ca17bfe25 Add fields to directus_user app recommended permission (#12277) 2022-03-21 13:57:49 +00:00
Ben Haynes
2474a0ddc0 Style updates (#12229)
* default badge color to red

* update notice styling to avoid color variants

* darker warning color

* update dark mode primary color

* update svg previews

* show slider values by default

* add subtle glow to field focus

* add additional color options

* no yellow in settings

* Give status display proper defaults

* Use setup script + translations

* Add low-contrast flag to preset

* update date-picker header style

* add placeholder to datetime interface

* Fix sizing of image preview

* Fix spacing / border situation

* select color

* Render small images at original size

* More file library love

* update datetime placeholder

* datetime font weights

* Fix style lint issue

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-03-18 15:52:04 +00:00
Rijk van Zanten
1c3e94d830 Add new export experience (#12201)
* Use script setup

* Start on export dialog

* Use new system field interface, replace limit with numeric input

* Set placeholder

* Add sort config

* Use folder picker, correct layoutQuery use

* Add local download button

* Allow writing exports to file

* Add notification after export

* Fix sort config, use new export endpoint

* Setup notification hints

* Add information notice

* Fix local limit, cancel button

* Add (basic) docs for export functionality

* Fix json export file format

* Implement xml batch stitching

* Resolve review points
2022-03-17 15:43:45 -04:00
Azri Kahar
3445114296 Remove outline prop from v-icons (#12092)
* remove unused outline prop from icons

* update docs
2022-03-11 09:48:42 -05:00
Azri Kahar
5101b3409f fix user info sidebar last access timestamp (#12047) 2022-03-09 14:34:21 -05:00
Azri Kahar
13bae1f0c2 Add Edit Role context menu in User Directory (#12048)
* add Edit Role context menu in User DIrectory

* reuse Role type

* ensure hiding delete button for last admin works
2022-03-09 12:53:43 -05:00
Azri Kahar
c51ca2e67b Fix "Save as Copy" for relational fields (#10418)
* fix "save as copy" for relational fields

* use router replace instead of push
2022-03-04 19:50:35 -05:00
Rijk van Zanten
6a3eb823c3 Update base theme of the App (#11952)
* Add migration to remove default value from project_color

* Upgrade the default theme

* Do a pass over the header buttons

* Do another pass over --warning uses

* Little things

* Tweak smoke

* Use updated map

* Use dark system elements in dark mode

* Remove outdated files, update toasts

* Use correct delete button style for role

* Use primary for created point

* Tweak spacing in revisions section

* Use primary for sidebar sections

* Various color tweaks and changes

* Update base color palette

* Update "css reset" code

* Remove splashscreens, add default favicon

* Add primary highlight to datamodel page

* dark mode color update

* fix sign out hover color

* Does this help?!

* This fixes some loading issues

Fixes https://github.com/directus/directus/issues/10707

* Calculate default pretty background?

* Fix public view with logo

* Fix responsiveness of login page

* adjust notification group width to be equal

* Do an absolute pointless task that doesn't do anything

It was suggested that it could fix the stylelint error in tests, but alas

* Remove stylelint

Doesn't seem to play nice with script setup and other changes

Co-authored-by: Ben Haynes <ben@rngr.org>
2022-03-04 18:53:39 -05:00
ian
7dc76428c3 Fix access to public role permissions (#11904) 2022-03-01 16:23:48 +00:00
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