Skip to content

Commit

Permalink
v8.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten committed Dec 16, 2019
1 parent 37ab9a2 commit 7c2e887
Show file tree
Hide file tree
Showing 266 changed files with 402 additions and 286 deletions.
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at info@directus.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,4 +1,4 @@
Copyright (c) 2017 RANGER Studio LLC
Copyright (c) 2019 RANGER Studio LLC

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
63 changes: 63 additions & 0 deletions migrations/upgrades/20191213160000_new_translations_structure.php
@@ -0,0 +1,63 @@
<?php

use Phinx\Migration\AbstractMigration;

class NewTranslationsStructure extends AbstractMigration
{
public function change() {
$fieldsTable = $this->table('directus_fields');

$translationFields = $this->fetchAll('SELECT * FROM directus_fields WHERE `interface` = "translation";');

if (empty($translationFields)) {
return;
}

foreach($translationFields as $field) {
$options = json_decode($field['options']);
$languagesCollection = $options->languagesCollection;
$languagesPrimaryKeyField = $options->languagesPrimaryKeyField;
$languagesNameField = $options->languagesNameField;
$translationLanguageField = $options->translationLanguageField;

$languages = null;

if ($this->hasTable($languagesCollection)) {
$languages = $this->fetchAll('SELECT * FROM `' . $languagesCollection . '`;');
}

$newOptions = [
'languageField' => $translationLanguageField
];

if (empty($languages)) {
$newOptions['languages'] = [
'en' => 'English',
'es' => 'Spanish',
'de' => 'German',
'fr' => 'French',
'pt' => 'Portuguese',
'zh' => 'Chinese',
'ru' => 'Russian'
];
} else {
$newLanguages = [];

foreach($languages as $language) {
$newLanguages[$language[$languagesPrimaryKeyField]] = $language[$languagesNameField];
}

$newOptions['languages'] = $newLanguages;
}

$this->execute(\Directus\phinx_update(
$this->getAdapter(),
'directus_fields',
['options' => json_encode($newOptions)],
['collection' => $field['collection'], 'field' => $field['field']]
));
}

$fieldsTable->save();
}
}

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion public/admin/css/chunk-11358888.4556a659.css

This file was deleted.

1 change: 1 addition & 0 deletions public/admin/css/chunk-21c5c0e2.3b13fd47.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/admin/css/chunk-8e696ca2.a1c98221.css
@@ -0,0 +1 @@
.empty{color:var(--empty-value)}
2 changes: 1 addition & 1 deletion public/admin/index.html
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=favicon.ico><link rel=manifest href=manifest.webmanifest><title>Directus</title><link rel=stylesheet href=style.css><link href=css/app.9e3e2b77.css rel=preload as=style><link href=js/app.c69603af.js rel=preload as=script><link href=js/chunk-vendors.18430d56.js rel=preload as=script><link href=css/app.9e3e2b77.css rel=stylesheet></head><body><noscript><strong>We're sorry but Directus doesn't work without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=script.js></script><script src=js/chunk-vendors.18430d56.js></script><script src=js/app.c69603af.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=favicon.ico><link rel=manifest href=manifest.webmanifest><title>Directus</title><link rel=stylesheet href=style.css><link href=css/app.2d024567.css rel=preload as=style><link href=js/app.9d362548.js rel=preload as=script><link href=js/chunk-vendors.18430d56.js rel=preload as=script><link href=css/app.2d024567.css rel=stylesheet></head><body><noscript><strong>We're sorry but Directus doesn't work without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=script.js></script><script src=js/chunk-vendors.18430d56.js></script><script src=js/app.9d362548.js></script></body></html>
2 changes: 2 additions & 0 deletions public/admin/js/app.9d362548.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/admin/js/app.9d362548.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions public/admin/js/app.c69603af.js

This file was deleted.

1 change: 0 additions & 1 deletion public/admin/js/app.c69603af.js.map

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 comments on commit 7c2e887

@winstondu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I get documentation on how to work with translations on this new api?
I noticed all the documentation about the lang parameter was deleted in https://github.com/directus/docs/commit/e6b0bd17a3fb1dd7f7af0d049ca637f862555d3f#diff-8c5e91a0b277a2024d06f03fb8dea779

@benhaynes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @winstondu — mind opening a ticket on the docs repo for that? I thought we had it in there, but maybe it's out of date.

@winstondu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.