Merge pull request #1 from appwrite/master

Merge Changes
This commit is contained in:
Christy Jacob 2019-09-27 19:19:41 +05:30 committed by GitHub
commit fbf358c529
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 221 additions and 492 deletions

View file

@ -41,8 +41,6 @@ Once the Docker installation completes, go to http://localhost to access the App
For advanced, production and custon installation check out our Docker [enviornemnt variables](/docs/EnviornementVariables.md) docs.
For complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs)
### Changing Port Number
In case your port 80 is already taken, change the port number in the command above. Make sure to set the correct endpoint in your selected SDK, including your new port number.
@ -67,6 +65,8 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
* [**Locale**](https://appwrite.io/docs/locale) - Track users location, and manage your app locale based data.
* [**Avatars**](https://appwrite.io/docs/avatars) - Manage your users avatars, countries flags, browser icons, credit card symbols and generate QR codes.
For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcments checkout our [blog](https://medium.com/appwrite-io).
### SDKs
Currently we are supporting a few SDK libraries and we are constantly working on adding new ones.
@ -80,12 +80,24 @@ Below is a list of currently supported platforms and languages. If you wish to h
* ✅ [Python](https://github.com/appwrite/sdk-for-python) - **Work in progress** (Maintained by the Appwrite Team)
* ✳️ Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)!
## Security
For security issues, please email [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub.
## Follow Us
Join our growing commuinty around the world! Follow us on both [Twitter](https://twitter.com/appwrite_io), [Facebook Page](https://www.facebook.com/appwrite.io), [Facebook Group](https://www.facebook.com/groups/appwrite.developers/) or join our live [Gitter community](https://gitter.im/appwrite/community) for more help, ideas and discussions.
## Contributing
All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.
We really ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the [contribution guide](CONTRIBUTING.md).
## Security
## Credits
For security issues, please email [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub.
Created by [Eldad Fux](https://twitter.com/eldadfux) with the amazing help of our **amazing contributors:**
* 🇺🇸Justin Dorfman ([Github](https://github.com/@jdorfman), [Twitter](https://twitter.com/jdorfman))
* 🇺🇳0xflotus ([Github](https://github.com/0xflotus))
* 🇳🇴Chaaarles ([Github](https://github.com/Chaaarles))

View file

@ -1,246 +1,10 @@
<?php
return [
'settings.inspire' => '"The art of being wise is the art of knowing what to overlook."',
'settings.inspire' => '"The art of being wise is the art of knowing what to overlook."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'en',
'settings.direction' => 'ltr',
// General
'general.description' => 'Appwrite cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you grow your business in a fast and secure way.',
'general.loading' => 'Loading...',
'general.next' => 'Next',
'general.back' => 'Back',
'general.optional' => 'optional',
'general.learn-more-about' => 'Learn more about your',
'general.confirm.alert' => 'Please confirm your account by clicking the verification link sent to your email',
'general.confirm.resend' => 'send again',
'general.confirm.resend.success' => 'Confirmation mail sent successfully',
'general.confirm.resend.failure' => 'Confirmation mail failed to send. Please try again later',
'general.roles.owner' => 'Owner',
'general.roles.developer' => 'Developer',
'general.roles.admin' => 'Admin',
'general.alerts.cookie' => 'We are using cookies to make this website easier to use.',
'general.alerts.learn' => 'Learn More',
'navigation.home' => 'Home',
'navigation.features' => 'Features',
'navigation.pricing' => 'Pricing',
'navigation.signup' => 'Sign Up',
'navigation.signin' => 'Sign In',
'navigation.console' => 'Console',
'footer.blog' => 'Blog',
'footer.about' => 'About',
'footer.security' => 'Security',
'footer.status' => 'Status',
'footer.support' => 'Support',
'footer.contact' => 'Contact',
'footer.twitter' => 'on Twitter',
'footer.facebook' => 'on Facebook',
'footer.instagram' => 'on Instagram',
'footer.linkedin' => 'on LinkedIn',
'footer.copyright' => 'Copyright',
'footer.terms' => 'Terms',
'footer.privacy' => 'Privacy',
'footer.cookies' => 'Cookies',
'home.press.title' => 'Press Kit',
'home.press.subtitle' => 'For media inquires and more information, email us at team@appwrite.io',
'home.press.title.logos' => 'Logos',
'home.press.title.colors' => 'Brand Colors',
'home.press.title.photos' => 'Product Photos',
'home.cookies.title' => 'Cookies',
'home.cookies.paragraph-1' => 'When someone visits '.APP_NAME.', we collect standard internet log information and details of visitor behaviour patterns. We do this to find out things such as the number of visitors to the various parts of the site. We collect this information in a way which does not personally identify anyone.',
'home.cookies.paragraph-2' => 'Most web browsers allow some control of most cookies through the browser settings. To find out more about cookies, including how to see what cookies have been set and how to manage and delete them, visit',
'home.cookies.set' => 'Cookies set by '.APP_NAME,
'home.cookies.cell.name' => 'Name',
'home.cookies.cell.description' => 'Description',
'home.cookies.cell.duration' => 'Duration',
'home.cookies.more' => 'Read More',
'home.cookies.months' => 'months',
'home.cookies.days' => 'days',
'home.cookies.hours' => 'hours',
'home.cookies.minutes' => 'minutes',
'home.cookies.description1' => 'Keeps your website session alive.',
'home.cookies.description2' => 'Google Analytics cookie, used to distinguish users.',
'home.cookies.description3' => 'Google Analytics cookie, used to distinguish users.',
'home.cookies.description4' => 'Google Analytics cookie, Used to throttle request rate.',
'home.cookies.description5' => 'Google Analytics cookie, Contains campaign related information for the user.',
'home.cookies.description6' => 'Google cookie, Contains information that changes the way the site behaves or looks, such as your preferred language or the region you are in.',
'home.cookies.description7' => 'System user interface preferred language.',
'home.contact.title' => 'Contact Us',
'home.contact.subtitle' => 'Wed love your input: questions, feature requests, bugs or compliments',
'home.contact.form.name' => 'Name',
'home.contact.form.email' => 'Email',
'home.contact.form.subject' => 'Subject',
'home.contact.form.message' => 'Message',
'home.contact.form.submit' => 'Submit',
'home.contact.form.social' => 'Social Networks',
'home.contact.form.company' => 'Company Name',
'home.contact.form.size' => 'Company Size',
'home.contact.thanks.title' => 'Thank You!',
'home.contact.thanks.subtitle' => 'Your message has been sent successfully. We appreciate your feedback, our team will try to get back to you as soon as possible!',
'home.contact.thanks.back' => 'Back to Homepage',
'home.support.title' => 'Support',
'home.support.healthy' => 'Service is healthy.',
'home.support.unhealthy' => 'We are experiencing some service disruption.',
'home.support.view' => 'View Status',
'home.support.uptime' => 'uptime in last 24h',
'home.support.updated' => 'Last updated at',
'home.support.powered' => 'Powered by',
// Auth - Signin
'home.auth.signin.title' => 'Sign In',
'home.auth.signin.regular.title' => 'Login using email and password',
'home.auth.signin.oauth.title' => 'Login using your favorite OAuth provider',
'home.auth.signin.oauth.facebook' => 'Sign in with Facebook',
'home.auth.signin.oauth.linkedin' => 'Sign in with LinkedIn',
'home.auth.signin.oauth.github' => 'Sign in with GitHub',
'home.auth.signin.labels.email' => 'Email',
'home.auth.signin.labels.password' => 'Password',
'home.auth.signin.labels.password.validation' => 'Six or more characters',
'home.auth.signin.labels.action1' => 'Sign In',
'home.auth.signin.labels.action2' => 'Forgot password?',
'home.auth.signin.labels.action3' => 'Sign up now',
'home.auth.signin.labels.or' => 'or don\'t have an account?',
'home.auth.signin.failure' => 'Login failed. Please check your credentials.',
// Auth - Signup
'home.auth.signup.title' => 'Sign Up',
'home.auth.signup.required' => 'All fields are required',
'home.auth.signup.labels.name' => 'Name',
'home.auth.signup.labels.email' => 'Email',
'home.auth.signup.labels.password' => 'Password',
'home.auth.signup.labels.password.validation' => 'Six or more characters',
'home.auth.signup.labels.agree' => 'By signing up, you agree to the',
'home.auth.signup.labels.and' => ' and ',
'home.auth.signup.labels.terms' => 'Terms and Conditions',
'home.auth.signup.labels.privacy' => 'Privacy Policy',
'home.auth.signup.labels.action' => 'Sign Up',
'home.auth.signup.failure' => 'Registration Failed. Please try again later',
// Auth - Recovery
'home.auth.recovery.title' => 'Password Recovery',
'home.auth.recovery.required' => 'All fields are required',
'home.auth.recovery.labels.email' => 'Email',
'home.auth.recovery.action' => 'Recover',
'home.auth.recovery.back' => 'Back to sign in',
'home.auth.recovery.success' => 'We have sent you a mail with a password reset link',
'home.auth.recovery.failure' => 'Password recovery failed',
// Auth - Reset
'home.auth.reset.title' => 'Password Reset',
'home.auth.reset.required' => 'All fields are required',
'home.auth.reset.labels.passwordA' => 'Password',
'home.auth.reset.labels.passwordB' => 'Password Again',
'home.auth.reset.labels.password.validation' => 'Six or more characters',
'home.auth.reset.action' => 'Apply',
'home.auth.reset.success' => 'Password Reset Completed',
'home.auth.reset.failure' => 'Password Reset Failed',
// Auth - Confirm
'home.auth.confirm.title' => 'Account Confirmation in Progress',
'home.auth.confirm.subtitle' => 'Please wait a few seconds while your account is verified.',
'home.auth.confirm.success' => 'Confirmation Completed Successfully',
'home.auth.confirm.failure' => 'Confirmation Failed',
// Auth - Join
'home.auth.join.title' => 'Invitation',
'home.auth.join.subtitle' => 'You have been invited to join %s team on '.APP_NAME,
'home.auth.join.success' => 'Joined Team Successfully',
'home.auth.join.failure' => 'Failed to join team. Please try again later',
'home.auth.join.agree' => 'By accepting the invitation, you agree to the %s and %s.',
'home.auth.join.terms' => 'Terms and Conditions',
'home.auth.join.privacy' => 'Privacy Policy',
'home.auth.join.accept' => 'Accept',
'home.auth.join.cancel' => 'Cancel',
'console.title' => 'Console',
// Console - Account
'console.account.title' => 'Account',
'console.account.section.overview.title' => 'Overview',
'console.account.section.overview.labels.name' => 'Name',
'console.account.section.overview.labels.email' => 'Email',
'console.account.section.overview.labels.password' => 'Password',
'console.account.section.overview.labels.password1' => 'Current Password',
'console.account.section.overview.labels.password2' => 'New Password',
'console.account.section.overview.labels.localization' => 'Localization',
'console.account.section.overview.labels.language' => 'Language',
'console.account.section.overview.labels.timezone' => 'Timezone',
'console.account.section.overview.actions.update-name' => 'Update Name',
'console.account.section.overview.actions.update-email' => 'Update Email',
'console.account.section.overview.actions.update-password' => 'Update Password',
'console.account.section.overview.actions.update-avatar' => 'Upload',
'console.account.section.overview.actions.update-avatar-via' => 'via',
'console.account.section.overview.actions.update' => 'Update',
'console.account.section.overview.actions.cancel' => 'Cancel',
'console.account.section.overview.actions.logout' => 'Logout',
'console.account.section.overview.danger.title' => 'Danger Zone',
'console.account.section.overview.danger.subtitle' => 'This is the area where you can delete your account.',
'console.account.section.overview.danger.disclaimer' => 'By deleting your account you will lose access to any of your teams and shared data.',
'console.account.section.overview.danger.note' => 'PLEASE NOTICE: Account deletion is irreversible.',
'console.account.section.overview.danger.action' => 'Delete Account',
'console.account.section.security.title' => 'Security',
'console.account.section.security.devices.title' => 'Devices and Sessions',
'console.account.section.security.devices.logout' => 'Logout',
'console.account.section.security.devices.logout.failure' => 'Logout from Session Failed',
'console.account.section.security.devices.logout-all' => 'Logout from all devices',
'console.account.section.security.devices.logout-all.failure' => 'Logout from All Sessions Failed',
'console.account.section.security.devices.current' => 'Current Session',
'console.account.section.security.devices.unknown' => 'Unknown Location',
'console.account.section.security.recent-activity.title' => 'Recent Activity',
'console.account.section.security.recent-activity.date' => 'Date',
'console.account.section.security.recent-activity.event' => 'Event',
'console.account.section.security.recent-activity.client' => 'Client',
'console.account.section.security.recent-activity.location' => 'Location',
'console.account.section.security.recent-activity.ip' => 'IP',
'console.notifications.title' => 'Notifications',
'console.settings.title' => 'Settings',
'console.settings.section.overview.title' => 'Overview',
'console.settings.section.keys.title' => 'API Keys',
'console.settings.section.webhooks.title' => 'Webhooks',
'console.settings.section.tasks.title' => 'Tasks',
'console.settings.section.members.title' => 'Members',
'console.settings.section.members.labels.leave' => 'Leave',
'console.settings.section.members.labels.resend' => 'Resend',
'console.settings.section.members.labels.pending' => 'Pending Approval',
'console.settings.section.members.labels.invite' => 'Invite Member',
'console.settings.section.members.labels.send' => 'Send Invite',
'console.settings.section.members.labels.cancel' => 'Cancel',
'console.settings.section.members.labels.name' => 'Name',
'console.settings.section.members.labels.email' => 'Email',
'console.settings.section.members.labels.role' => 'Role',
'console.settings.section.members.invite.success' => 'Invitation Sent Successfully',
'console.settings.section.members.invite.failure' => 'Failed to Send Invite',
'console.settings.section.members.leave.success' => 'Member Removed Successfully',
'console.settings.section.members.leave.failure' => 'Failed to Remove Member',
'console.home.title' => 'Console',
'console.database.title' => 'Database',
'console.storage.title' => 'Storage',
'console.users.title' => 'Users',
'console.users.section.users.title' => 'Users',
'console.users.section.teams.title' => 'Teams',
'console.users.section.providers.title' => 'Providers',
'console.users.section.templates.title' => 'Templates',
'console.webhooks.title' => 'Webhooks',
'console.keys.title' => 'API Keys',
'console.tasks.title' => 'Tasks',
// Service - Users
'auth.emails.team' => '%s Team',
'auth.emails.confirm.title' => 'Account Confirmation',

View file

@ -1,6 +1,7 @@
<?php
return [
'settings.inspire' => '"The art of being wise is the art of knowing what to overlook."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'he',
'settings.direction' => 'rtl',

View file

@ -244,7 +244,7 @@ $utopia->post('/v1/auth/register/confirm/resend')
->label('sdk.description', "This endpoint allows the user to request your app to resend him his email confirmation message. The redirect arguments acts the same way as in /auth/register endpoint.\n\nPlease notice that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface.")
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},userId:{param-userId}')
->param('confirmation', '', function () use ($clients) {return new Host($clients);}, 'Confirmation page to redirect user to your app after confirm token has been sent to user email.')
->param('confirmation', '', function () use ($clients) {return new Host($clients);}, 'Confirmation URL to redirect user to your app after confirm token has been sent to user email.')
->action(
function ($confirmation) use ($response, $request, $projectDB, $user, $register, $project) {
if ($user->getAttribute('confirm', false)) {
@ -458,9 +458,9 @@ $utopia->post('/v1/auth/recovery')
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},email:{param-email}')
->param('email', '', function () {return new Email();}, 'User account email address.')
->param('confirmation', '', function () use ($clients) {return new Host($clients);}, 'Reset page URL in your app to redirect user after reset token has been sent to user email.')
->param('reset', '', function () use ($clients) {return new Host($clients);}, 'Reset URL in your app to redirect the user after the reset token has been sent to the user email.')
->action(
function ($email, $confirmation) use ($request, $response, $projectDB, $register, $audit, $project) {
function ($email, $reset) use ($request, $response, $projectDB, $register, $audit, $project) {
$profile = $projectDB->getCollection([ // Get user by email address
'limit' => 1,
'first' => true,
@ -494,16 +494,16 @@ $utopia->post('/v1/auth/recovery')
throw new Exception('Failed to save user to DB', 500);
}
$confirmation = Template::parseURL($confirmation);
$confirmation['query'] = Template::mergeQuery(((isset($confirmation['query'])) ? $confirmation['query'] : ''), ['userId' => $profile->getUid(), 'token' => $secret]);
$confirmation = Template::unParseURL($confirmation);
$reset = Template::parseURL($reset);
$reset['query'] = Template::mergeQuery(((isset($reset['query'])) ? $reset['query'] : ''), ['userId' => $profile->getUid(), 'token' => $secret]);
$reset = Template::unParseURL($reset);
$body = new Template(__DIR__.'/../config/locale/templates/'.Locale::getText('auth.emails.recovery.body'));
$body
->setParam('{{direction}}', Locale::getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
->setParam('{{name}}', $profile->getAttribute('name'))
->setParam('{{redirect}}', $confirmation)
->setParam('{{redirect}}', $reset)
;
$mail = $register->get('smtp'); /* @var $mail \PHPMailer\PHPMailer\PHPMailer */

View file

@ -66,7 +66,7 @@ $utopia->get('/console')
;
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.title'))
->setParam('title', APP_NAME.' - Console')
->setParam('body', $page);
});
@ -83,7 +83,7 @@ $utopia->get('/console/account')
;
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.account.title'))
->setParam('title', 'Account - ' . APP_NAME)
->setParam('body', $page);
});
@ -95,7 +95,7 @@ $utopia->get('/console/notifications')
$page = new View(__DIR__.'/../views/v1/console/notifications/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.notifications.title'))
->setParam('title', APP_NAME.' - Notifications')
->setParam('body', $page);
});
@ -107,7 +107,7 @@ $utopia->get('/console/home')
$page = new View(__DIR__.'/../views/console/home/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.home.title'))
->setParam('title', APP_NAME.' - Console')
->setParam('body', $page);
});
@ -119,7 +119,7 @@ $utopia->get('/console/settings')
$page = new View(__DIR__.'/../views/console/settings/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.settings.title'))
->setParam('title', APP_NAME.' - Settings')
->setParam('body', $page);
});
@ -131,7 +131,7 @@ $utopia->get('/console/webhooks')
$page = new View(__DIR__.'/../views/console/webhooks/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.webhooks.title'))
->setParam('title', APP_NAME.' - Webhooks')
->setParam('body', $page);
});
@ -143,7 +143,7 @@ $utopia->get('/console/keys')
$page = new View(__DIR__.'/../views/console/keys/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.keys.title'))
->setParam('title', APP_NAME.' - API Keys')
->setParam('body', $page);
});
@ -155,7 +155,7 @@ $utopia->get('/console/tasks')
$page = new View(__DIR__.'/../views/console/tasks/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.tasks.title'))
->setParam('title', APP_NAME.' - Tasks')
->setParam('body', $page);
});
@ -167,7 +167,7 @@ $utopia->get('/console/database')
$page = new View(__DIR__.'/../views/console/database/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.database.title'))
->setParam('title', APP_NAME.' - Database')
->setParam('body', $page);
});
@ -190,7 +190,7 @@ $utopia->get('/console/database/collection')
;
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.database.title'))
->setParam('title', APP_NAME.' - Database')
->setParam('body', $page);
});
@ -202,7 +202,7 @@ $utopia->get('/console/storage')
$page = new View(__DIR__.'/../views/console/storage/index.phtml');
$layout
->setParam('title', APP_NAME.' - '.Locale::getText('console.storage.title'))
->setParam('title', APP_NAME.' - Storage')
->setParam('body', $page);
});

View file

@ -9,7 +9,7 @@ use Utopia\Locale\Locale;
$layout
->setParam('title', APP_NAME)
->setParam('description', Locale::getText('general.description'))
->setParam('description', '')
->setParam('class', 'home')
->setParam('header', [new View(__DIR__.'/../views/home/comps/header.phtml')])
;
@ -35,7 +35,7 @@ $utopia->get('/auth/signin')
$page = new View(__DIR__.'/../views/home/auth/signin.phtml');
$layout
->setParam('title', Locale::getText('home.auth.signin.title').' - '.APP_NAME)
->setParam('title', 'Sign In - '.APP_NAME)
->setParam('body', $page);
});
@ -47,7 +47,7 @@ $utopia->get('/auth/signup')
$page = new View(__DIR__.'/../views/home/auth/signup.phtml');
$layout
->setParam('title', Locale::getText('home.auth.signup.title').' - '.APP_NAME)
->setParam('title', 'Sign Up - '.APP_NAME)
->setParam('body', $page);
});
@ -59,7 +59,7 @@ $utopia->get('/auth/recovery')
$page = new View(__DIR__.'/../views/home/auth/recovery.phtml');
$layout
->setParam('title', Locale::getText('home.auth.recovery.title').' - '.APP_NAME)
->setParam('title', 'Password Recovery - '.APP_NAME)
->setParam('body', $page);
});
@ -71,7 +71,7 @@ $utopia->get('/auth/confirm')
$page = new View(__DIR__.'/../views/home/auth/confirm.phtml');
$layout
->setParam('title', Locale::getText('home.auth.confirm.title').' - '.APP_NAME)
->setParam('title', 'Account Confirmation - '.APP_NAME)
->setParam('body', $page);
});
@ -83,7 +83,7 @@ $utopia->get('/auth/join')
$page = new View(__DIR__.'/../views/home/auth/join.phtml');
$layout
->setParam('title', Locale::getText('home.auth.join.title').' - '.APP_NAME)
->setParam('title', 'Invitation - '.APP_NAME)
->setParam('body', $page);
});
@ -95,7 +95,7 @@ $utopia->get('/auth/recovery/reset')
$page = new View(__DIR__.'/../views/home/auth/recovery/reset.phtml');
$layout
->setParam('title', Locale::getText('home.auth.reset.title').' - '.APP_NAME)
->setParam('title', 'Password Reset - '.APP_NAME)
->setParam('body', $page);
});

View file

@ -6,9 +6,9 @@ use Utopia\Locale\Locale;
Locale::$exceptions = false;
$roles = [
['type' => 'owner', 'label' => Locale::getText('general.roles.owner')],
['type' => 'developer', 'label' => Locale::getText('general.roles.developer')],
['type' => 'admin', 'label' => Locale::getText('general.roles.admin')],
['type' => 'owner', 'label' => 'Owner'],
['type' => 'developer', 'label' => 'Developer'],
['type' => 'admin', 'label' => 'Admin'],
];
$layout = new View(__DIR__.'/../../views/layouts/default.phtml');
@ -20,7 +20,6 @@ if (!empty($request->getQuery('version', ''))) {
$layout
->setParam('title', APP_NAME)
->setParam('description', Locale::getText('general.description'))
->setParam('protocol', $request->getServer('REQUEST_SCHEME', 'https'))
->setParam('domain', $domain)
->setParam('home', $request->getServer('_APP_HOME'))

View file

@ -22,15 +22,7 @@ const APP_NAME = 'Appwrite';
const APP_DOMAIN = 'appwrite.io';
const APP_EMAIL_TEAM = 'team@' . APP_DOMAIN;
const APP_EMAIL_SECURITY = 'security@' . APP_DOMAIN;
const APP_EMAIL_NEWSLETTER = 'newsletter@' . APP_DOMAIN;
const APP_USERAGENT = APP_NAME . '-Server/%s Please report abuse at ' . APP_EMAIL_SECURITY;
const APP_SOCIAL_TWITTER = 'https://twitter.com/appwrite_io';
const APP_SOCIAL_TWITTER_HANDLE = 'appwrite_io';
const APP_SOCIAL_FACEBOOK = 'https://www.facebook.com/appwrite.io';
const APP_SOCIAL_LINKEDIN = 'https://www.linkedin.com/company/appwrite';
const APP_SOCIAL_INSTAGRAM = 'https://www.instagram.com/appwrite.io';
const APP_SOCIAL_GITHUB = 'https://github.com/appwrite';
const APP_SOCIAL_DISCORD = 'https://discord.gg/GSeTUeA';
const APP_MODE_ADMIN = 'admin';
const APP_LOCALES = ['en', 'he'];
const APP_PAGING_LIMIT = 15;

View file

@ -62,7 +62,7 @@ $cli
'gitRepo' => 'git@github.com:appwrite/sdk-for-node.git',
'gitRepoName' => 'sdk-for-node',
'gitUserName' => 'appwrite',
'warning' => '',
'warning' => 'This SDK if compitable with Appwrite server version 0.2.0 for older versions check previous releases.',
'platform' => 'server',
],
'python' => [

View file

@ -1,10 +1,6 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="cover">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo Locale::getText('console.account.title'); ?>
Account
</h1>
</div>
@ -19,7 +15,7 @@ use Utopia\Locale\Locale;
data-failure="trigger"
data-failure-param-trigger-events="logout">
<h2><span class="number"><i class="icon-user"></i></span><?php echo Locale::getText('console.account.section.overview.title'); ?></h2>
<h2><span class="number"><i class="icon-user"></i></span>Overview</h2>
<div class="row responsive">
<div class="col span-9">
<div class="box margin-bottom-xl">
@ -35,14 +31,14 @@ use Utopia\Locale\Locale;
data-failure-param-alert-text="Failed to update your name"
data-failure-param-alert-classname="error">
<label for="name"><?php echo Locale::getText('console.account.section.overview.labels.name'); ?></label>
<label for="name">Name</label>
<div class="row">
<div class="col span-8">
<input name="name" id="name" type="text" autocomplete="off" data-ls-bind="{{account.name}}" required class="margin-bottom-no">
</div>
<div class="col span-4">
<button type="submit" class="fill reverse"><?php echo Locale::getText('console.account.section.overview.actions.update-name'); ?></button>
<button type="submit" class="fill reverse">Update Name</button>
</div>
</div>
@ -64,18 +60,18 @@ use Utopia\Locale\Locale;
data-failure-param-alert-text="Failed updating email address"
data-failure-param-alert-classname="error">
<label><?php echo Locale::getText('console.account.section.overview.labels.email'); ?></label>
<label>Email</label>
<div class="row">
<div class="col span-8">
<input name="email" type="email" class="margin-bottom-no" autocomplete="off" placeholder="me@example.com" data-ls-bind="{{account.email}}" required>
</div>
<div class="col span-4">
<div data-ui-modal class="modal close width-small height-small" data-button-text="<?php echo $this->escape(Locale::getText('console.account.section.overview.actions.update-email')); ?>" data-button-class="fill reverse">
<label><?php echo Locale::getText('console.account.section.overview.labels.password'); ?></label>
<div data-ui-modal class="modal close width-small height-small" data-button-text="Update Email" data-button-class="fill reverse">
<label>Password</label>
<input name="password" type="password" class="full-width" autocomplete="off" placeholder="" required>
<footer>
<button type="submit"><?php echo Locale::getText('console.account.section.overview.actions.update'); ?></button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse"><?php echo Locale::getText('console.account.section.overview.actions.cancel'); ?></button>
<button type="submit">Update</button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
</footer>
</div>
</div>
@ -84,8 +80,8 @@ use Utopia\Locale\Locale;
<hr />
<div data-ui-modal class="modal close width-small" data-button-text="<?php echo $this->escape(Locale::getText('console.account.section.overview.actions.update-password')); ?>" data-button-class="reverse">
<h1><?php echo Locale::getText('console.account.section.overview.actions.update-password'); ?></h1>
<div data-ui-modal class="modal close width-small" data-button-text="Update Password" data-button-class="reverse">
<h1>Update Password</h1>
<form name="update-password"
data-service="account.updatePassword"
@ -98,14 +94,14 @@ use Utopia\Locale\Locale;
data-failure-param-alert-text="Failed updating password"
data-failure-param-alert-classname="error">
<label><?php echo Locale::getText('console.account.section.overview.labels.password1'); ?></label>
<label>Current Password</label>
<input name="oldPassword" type="password" class="full-width" autocomplete="off" placeholder="" required>
<label><?php echo Locale::getText('console.account.section.overview.labels.password2'); ?></label>
<label>New Password</label>
<input name="password" type="password" class="full-width" autocomplete="off" placeholder="" required data-forms-password-meter>
<footer>
<button type="submit"><?php echo Locale::getText('console.account.section.overview.actions.update-password'); ?></button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse"><?php echo Locale::getText('console.account.section.overview.actions.cancel'); ?></button>
<button type="submit">Update Password</button> &nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
</footer>
</form>
</div>
@ -122,7 +118,7 @@ use Utopia\Locale\Locale;
data-failure-param-alert-text="Logout failed"
data-failure-param-alert-classname="error">
<button class="fill danger icon fill"><i class="icon-login"></i> <?php echo Locale::getText('console.account.section.overview.actions.logout'); ?></button>
<button class="fill danger icon fill"><i class="icon-login"></i> Logout</button>
</form>
</div>
@ -133,25 +129,25 @@ use Utopia\Locale\Locale;
<br />
<a href="https://en.gravatar.com/gravatars/new/" rel="noopener" class="button margin-bottom-small" target="_blank"><i class="icon-upload"></i> <?php echo Locale::getText('console.account.section.overview.actions.update-avatar'); ?></a>
<a href="https://en.gravatar.com/gravatars/new/" rel="noopener" class="button margin-bottom-small" target="_blank"><i class="icon-upload"></i> Upload</a>
<br />
<small class="text-size-small">(<?php echo Locale::getText('console.account.section.overview.actions.update-avatar-via'); ?> <a href="https://gravatar.com/" target="_blank" rel="noopener">gravatar.com <i class="icon-link-ext"></i></a>)</small>
<small class="text-size-small">(via <a href="https://gravatar.com/" target="_blank" rel="noopener">gravatar.com <i class="icon-link-ext"></i></a>)</small>
</div>
</div>
<div class="row responsive">
<div class="col span-9">
<h3 class="text-danger"><?php echo Locale::getText('console.account.section.overview.danger.title'); ?></h3>
<h3 class="text-danger">Danger Zone</h3>
<div class="box danger">
<p><?php echo Locale::getText('console.account.section.overview.danger.subtitle'); ?></p>
<p>This is the area where you can delete your account.</p>
<p><?php echo Locale::getText('console.account.section.overview.danger.disclaimer'); ?></p>
<p>By deleting your account you will lose access to any of your teams and shared data.</p>
<p><?php echo Locale::getText('console.account.section.overview.danger.note'); ?></p>
<p>PLEASE NOTICE: Account deletion is irreversible.</p>
<form class="inline"
data-service="account.deactivate"
@ -163,7 +159,7 @@ use Utopia\Locale\Locale;
data-failure="alert"
data-failure-param-alert-text="Account deactivation failed"
data-failure-param-alert-classname="error">
<button class="danger reverse"><?php echo Locale::getText('console.account.section.overview.danger.action'); ?></button>
<button class="danger reverse">Delete Account</button>
</form>
</div>
</div>
@ -172,9 +168,9 @@ use Utopia\Locale\Locale;
</div>
</li>
<li data-state="/console/account/security">
<h2><span class="number"><i class="icon-shield"></i></span><?php echo Locale::getText('console.account.section.security.title'); ?></h2>
<h2><span class="number"><i class="icon-shield"></i></span>Security</h2>
<h3><?php echo Locale::getText('console.account.section.security.devices.title'); ?></h3>
<h3>Devices and Sessions</h3>
<div class="box margin-bottom"
data-service="account.getSessions"
@ -190,15 +186,15 @@ use Utopia\Locale\Locale;
data-service="auth.logoutBySession"
data-scope="console"
data-event="submit"
data-loading="<?php echo $this->escape(Locale::getText('general.loading')); ?>"
data-loading="Loading..."
data-success="trigger"
data-success-param-trigger-events="session-delete"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('console.account.section.security.devices.logout.failure')); ?>"
data-failure-param-alert-text="Logout from Session Failed"
data-failure-param-alert-classname="error">
<input type="hidden" name="id" data-ls-bind="{{session.id}}">
<button class="danger"><?php echo Locale::getText('console.account.section.security.devices.logout'); ?></button>
<button class="danger">Logout</button>
</form>
</span>
@ -208,15 +204,15 @@ use Utopia\Locale\Locale;
data-service="auth.logoutBySession"
data-scope="console"
data-event="submit"
data-loading="<?php echo $this->escape(Locale::getText('general.loading')); ?>"
data-loading="Loading..."
data-success="trigger,redirect"
data-success-param-trigger-events="logout"
data-success-param-redirect-url="/"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('console.account.section.security.devices.logout.failure')); ?>"
data-failure-param-alert-text="Logout from Session Failed"
data-failure-param-alert-classname="error">
<input type="hidden" name="id" data-ls-bind="{{session.id}}">
<button class="danger"><?php echo Locale::getText('console.account.section.security.devices.logout'); ?></button>
<button class="danger">Logout</button>
</form>
</span>
@ -225,7 +221,7 @@ use Utopia\Locale\Locale;
<span data-ls-bind="{{session.client.name}}"></span> <span data-ls-bind="{{session.client.version}}"></span> on <span data-ls-bind="{{session.model}}"></span> <span data-ls-bind="{{session.OS.name}}"></span> <span data-ls-bind="{{session.OS.version}}"></span>
&nbsp;
<span data-ls-if="true == {{session.current}}" style="display: none;">
<span class="tag green"><?php echo Locale::getText('console.account.section.security.devices.current'); ?></span>
<span class="tag green">Current Session</span>
</span>
<div class="margin-top-small">
@ -244,10 +240,10 @@ use Utopia\Locale\Locale;
data-success-param-trigger-events="session-delete"
data-success-redirect-url="/"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('console.account.section.security.devices.logout-all')); ?>"
data-failure-param-alert-text="Logout from All Sessions Failed"
data-failure-param-alert-classname="error">
<input type="hidden" name="id" value="0">
<button class="danger"><?php echo Locale::getText('console.account.section.security.devices.logout-all'); ?></button>
<button class="danger">Logout from all devices</button>
</form>
</li>
<li data-state="/console/account/activity">
@ -263,26 +259,26 @@ use Utopia\Locale\Locale;
<table class="vertical small">
<thead>
<tr>
<th width="140"><?php echo Locale::getText('console.account.section.security.recent-activity.date'); ?></th>
<th width="175"><?php echo Locale::getText('console.account.section.security.recent-activity.event'); ?></th>
<th><?php echo Locale::getText('console.account.section.security.recent-activity.client'); ?></th>
<th width="90"><?php echo Locale::getText('console.account.section.security.recent-activity.location'); ?></th>
<th width="90"><?php echo Locale::getText('console.account.section.security.recent-activity.ip'); ?></th>
<th width="140">Date</th>
<th width="175">Event</th>
<th>Client</th>
<th width="90">Location</th>
<th width="90">IP</th>
</tr>
</thead>
<tbody data-ls-loop="securityLogs" data-ls-as="log">
<tr>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.date')); ?>: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.event')); ?>: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.client')); ?>: ">
<td data-title="Date: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="Event: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="Client: ">
<img data-ls-attrs="src={{env.API}}/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80,title={{log.client.name}},alt={{log.client.name}}" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.location')); ?>: ">
<td data-title="Location: ">
<img data-ls-attrs="src={{env.API}}/avatars/flags/{{log.geo.isoCode}}?width=80&height=80" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.geo.country}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.ip')); ?>: "><span data-ls-bind="{{log.ip}}"></span></td>
<td data-title="IP: "><span data-ls-bind="{{log.ip}}"></span></td>
</tr>
</tbody>
</table>

View file

@ -1,10 +1,6 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="cover">
<h1 class="zone xxl margin-bottom-large margin-top">
<?php echo Locale::getText('console.database.title'); ?>
Database
</h1>
</div>

View file

@ -1,7 +1,5 @@
<?php
use Utopia\Locale\Locale;
$scopes = [ // TODO sync with project list
'users.read',
'users.write',
@ -17,7 +15,7 @@ $scopes = [ // TODO sync with project list
?>
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo Locale::getText('console.keys.title'); ?>
API Keys
</h1>
</div>
<div class="zone xl"

View file

@ -1,12 +1,6 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="cover">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo Locale::getText('console.settings.title'); ?>
Settings
</h1>
</div>
@ -22,7 +16,7 @@ use Utopia\Locale\Locale;
<div class="zone xl">
<ul class="phases clear" data-ui-phases data-selected="{{router.params.tab}}">
<li data-state="/console/settings?project={{router.params.project}}">
<h2><?php echo Locale::getText('console.settings.section.overview.title'); ?></h2>
<h2>Overview</h2>
<form
data-service="projects.updateProject"
@ -127,7 +121,7 @@ use Utopia\Locale\Locale;
</form>
</li>
<li data-state="/console/settings/members?project={{router.params.project}}">
<h2><?php echo Locale::getText('console.settings.section.members.title'); ?></h2>
<h2>Members</h2>
<div class="zone xl"
data-service="teams.getTeamMembers"
@ -146,16 +140,16 @@ use Utopia\Locale\Locale;
data-scope="console"
data-event="submit"
data-success="alert,trigger"
data-success-param-alert-text="<?php echo Locale::getText('console.settings.section.members.leave.success'); ?>"
data-success-param-alert-text="Member Removed Successfully"
data-success-param-trigger-events="membership-delete"
data-failure="alert"
data-failure-param-alert-text="<?php echo Locale::getText('console.settings.section.members.leave.failure'); ?>"
data-failure-param-alert-text="Failed to Remove Member"
data-failure-param-alert-classname="error">
<input name="teamId" id="teamId" type="hidden" data-ls-bind="{{console-project.teamId}}">
<input name="inviteId" id="inviteId" type="hidden" data-ls-bind="{{member.inviteId}}">
<button class="danger"><?php echo Locale::getText('console.settings.section.members.labels.leave'); ?></button>
<button class="danger">Leave</button>
</form>
<div data-ls-if="false === {{member.confirm}}" class="pull-end margin-end" style="display: none;">
@ -165,34 +159,34 @@ use Utopia\Locale\Locale;
data-event="submit"
data-loading="Resending invitation, please wait..."
data-success="alert,trigger"
data-success-param-alert-text="<?php echo Locale::getText('console.settings.section.members.invite.success'); ?>"
data-success-param-alert-text="Invitation Sent Successfully"
data-success-param-trigger-events="membership-resend"
data-failure="alert"
data-failure-param-alert-text="<?php echo Locale::getText('console.settings.section.members.invite.failure'); ?>"
data-failure-param-alert-text="Failed to Send Invite"
data-failure-param-alert-classname="error">
<input name="teamId" id="teamId" type="hidden" data-ls-bind="{{console-project.teamId}}">
<input name="inviteId" id="inviteId" type="hidden" data-ls-bind="{{member.inviteId}}">
<input name="redirect" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" />
<button class="reverse"><?php echo Locale::getText('console.settings.section.members.labels.resend'); ?></button>
<button class="reverse">Resend</button>
</form>
</div>
<img src="" data-ls-attrs="src={{member|gravatar}}" data-size="200" alt="User Avatar" class="avatar pull-start margin-end" loading="lazy" width="60" height="60" />
<div class="margin-bottom-small">
<span data-ls-bind="{{member.name}}"></span> &nbsp;&nbsp;<span class="tag" data-ls-bind="{{member.roles.0}}"></span> &nbsp;&nbsp;<span data-ls-if="false === {{member.confirm}}" class="tag red" style="display: none;"><?php echo Locale::getText('console.settings.section.members.labels.pending'); ?></span>
<span data-ls-bind="{{member.name}}"></span> &nbsp;&nbsp;<span class="tag" data-ls-bind="{{member.roles.0}}"></span> &nbsp;&nbsp;<span data-ls-if="false === {{member.confirm}}" class="tag red" style="display: none;">Pending Approval</span>
</div>
<small data-ls-bind="{{member.email}}"></small>
</li>
</ul>
</div>
<div data-ui-modal class="modal close width-small" data-button-text="<?php echo Locale::getText('console.settings.section.members.labels.invite'); ?>" data-button-class="">
<div data-ui-modal class="modal close width-small" data-button-text="Invite Member" data-button-class="">
<button type="button" class="close pull-end" data-ui-modal-close><i class="icon-cancel"></i></button>
<h1><?php echo Locale::getText('console.settings.section.members.labels.invite'); ?></h1>
<h1>Invite Member</h1>
<form name="teams.createTeamMembership"
data-service="teams.createTeamMembership"
@ -200,29 +194,29 @@ use Utopia\Locale\Locale;
data-event="submit"
data-loading="Sending invitation, please wait..."
data-success="alert,trigger,reset"
data-success-param-alert-text="<?php echo Locale::getText('console.settings.section.members.invite.success'); ?>"
data-success-param-alert-text="Invitation Sent Successfully"
data-success-param-trigger-events="membership-create,modal-close"
data-failure="alert"
data-failure-param-alert-text="<?php echo Locale::getText('console.settings.section.members.invite.failure'); ?>"
data-failure-param-alert-text="Failed to Send Invite"
data-failure-param-alert-classname="error">
<input name="teamId" id="teamId" type="hidden" data-ls-bind="{{console-project.teamId}}">
<input name="redirect" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/join?project={{router.params.project}}" />
<label for="name"><?php echo Locale::getText('console.settings.section.members.labels.name'); ?> <small>(<?php echo Locale::getText('general.optional'); ?>)</small></label>
<label for="name">Name <small>(optional)</small></label>
<input name="name" id="name" type="text" autocomplete="name">
<label for="email"><?php echo Locale::getText('console.settings.section.members.labels.email'); ?></label>
<label for="email">Email</label>
<input name="email" id="email" type="email" autocomplete="email" required>
<label for="roles"><?php echo Locale::getText('console.settings.section.members.labels.role'); ?></label>
<label for="roles">Role</label>
<select id="roles" name="roles" required data-ls-loop="env.ROLES" data-ls-as="role" data-cast-to="array">
<option data-ls-attrs="value={{role.type}}" data-ls-bind="{{role.label}}"></option>
</select>
<div class="clear">
<button><?php echo Locale::getText('console.settings.section.members.labels.send'); ?></button>
&nbsp; <button data-ui-modal-close="" type="button" class="reverse"><?php echo Locale::getText('console.settings.section.members.labels.cancel'); ?></button>
<button>Send Invite</button>
&nbsp; <button data-ui-modal-close="" type="button" class="reverse">Cancel</button>
</div>
</form>
</div>

View file

@ -1,10 +1,6 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo Locale::getText('console.storage.title'); ?>
Storage
</h1>
</div>

View file

@ -1,11 +1,6 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo Locale::getText('console.tasks.title'); ?>
Tasks
</h1>
</div>
<div class="zone xl"

View file

@ -1,8 +1,3 @@
<?php
use Utopia\Locale\Locale;
?>
<div
data-service="users.getUser"
data-name="user"
@ -13,7 +8,7 @@ use Utopia\Locale\Locale;
<div class="cover">
<h1 class="zone xl margin-bottom-large">
<a data-ls-attrs="href=/console/users?project={{router.params.project}}" class="back text-size-small"><i class="icon-left-open"></i> <?php echo $this->escape(Locale::getText('console.users.title')); ?></a>
<a data-ls-attrs="href=/console/users?project={{router.params.project}}" class="back text-size-small"><i class="icon-left-open"></i> Users</a>
<br />
<span data-ls-bind="{{user.name}}">&nbsp;</span>
@ -201,26 +196,26 @@ use Utopia\Locale\Locale;
<table class="vertical small">
<thead>
<tr>
<th width="140"><?php echo Locale::getText('console.account.section.security.recent-activity.date'); ?></th>
<th width="175"><?php echo Locale::getText('console.account.section.security.recent-activity.event'); ?></th>
<th><?php echo Locale::getText('console.account.section.security.recent-activity.client'); ?></th>
<th width="90"><?php echo Locale::getText('console.account.section.security.recent-activity.location'); ?></th>
<th width="90"><?php echo Locale::getText('console.account.section.security.recent-activity.ip'); ?></th>
<th width="140">Date</th>
<th width="175">Event</th>
<th>Client</th>
<th width="90">Location</th>
<th width="90">IP</th>
</tr>
</thead>
<tbody data-ls-loop="logs" data-ls-as="log">
<tr>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.date')); ?>: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.event')); ?>: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.client')); ?>: ">
<td data-title="Date: "><span data-ls-bind="{{log.time|date-time}}"></span></td>
<td data-title="Event: "><span data-ls-bind="{{log.event}}"></span></td>
<td data-title="Client: ">
<img data-ls-attrs="src={{env.API}}/avatars/browsers/{{log.client.short_name|lowercase}}?width=80&height=80,title={{log.client.name}},alt={{log.client.name}}" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.client.name}} {{log.client.version}} on {{log.model}} {{log.OS.name}} {{log.OS.version}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.location')); ?>: ">
<td data-title="Location: ">
<img data-ls-attrs="src={{env.API}}/avatars/flags/{{log.geo.isoCode}}?width=80&height=80" class="avatar xs inline margin-end-small" />
<span data-ls-bind="{{log.geo.country}}"></span>
</td>
<td data-title="<?php echo $this->escape(Locale::getText('console.account.section.security.recent-activity.ip')); ?>: "><span data-ls-bind="{{log.ip}}"></span></td>
<td data-title="IP: "><span data-ls-bind="{{log.ip}}"></span></td>
</tr>
</tbody>
</table>

View file

@ -1,7 +1,5 @@
<?php
use Utopia\Locale\Locale;
$events = [
'database.documents.create',
'database.documents.patch',
@ -18,7 +16,7 @@ $events = [
?>
<div class="cover margin-bottom-large">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo Locale::getText('console.webhooks.title'); ?>
Webhooks
</h1>
</div>

View file

@ -1,6 +1,3 @@
<?php
use Utopia\Locale\Locale;
?>
<section class="zone xl">
<form
data-service="auth.confirm"
@ -10,13 +7,13 @@ use Utopia\Locale\Locale;
data-param-user-id="{{router.params.userId}}"
data-success="redirect,alert,trigger"
data-success-redirect-url="/console"
data-success-alert="<?php echo $this->escape(Locale::getText('home.auth.confirm.success')); ?>"
data-success-alert="Confirmation Completed Successfully"
data-success-triggers="account.update"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.confirm.failure')); ?>"
data-failure-param-alert-text="Confirmation Failed"
data-failure-param-alert-classname="error">
<h2 class="margin-bottom-small"><?php echo $this->escape(Locale::getText('home.auth.confirm.title')); ?></h2>
<p><?php echo $this->escape(Locale::getText('home.auth.confirm.subtitle')); ?></p>
<h2 class="margin-bottom-small">Account Confirmation in Progress</h2>
<p>Please wait a few seconds while your account is verified.</p>
</form>
</section>

View file

@ -1,6 +1,3 @@
<?php
use Utopia\Locale\Locale;
?>
<section class="zone medium">
<form class="box margin-top-large"
data-service="auth.join"
@ -11,13 +8,13 @@ use Utopia\Locale\Locale;
data-param-secret="{{router.params.secret}}"
data-success="redirect,alert,trigger"
data-success-redirect-url="/console?project={{router.params.project}}"
data-success-alert="<?php echo $this->escape(Locale::getText('home.auth.join.success')); ?>"
data-success-alert="Joined Team Successfully"
data-success-triggers="account.update"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.join.failure')); ?>"
data-failure-param-alert-text="Failed to join team. Please try again later"
data-failure-param-alert-classname="error">
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} == 1"><?php echo $this->escape(Locale::getText('home.auth.join.failure')); ?></div>
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} == 1">Failed to join team. Please try again later</div>
<input name="success" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console?company={{router.params.company}}">
<input name="failure" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/join?failure=1&company={{router.params.company}}&inviteId={{router.params.inviteId}}&secret={{router.params.secret}}&userId={{router.params.userId}}">
@ -31,9 +28,9 @@ use Utopia\Locale\Locale;
data-success="trigger"
data-success-triggers="api-company.load">
<h2 class="margin-bottom-small"><?php echo $this->escape(Locale::getText('home.auth.join.title')); ?></h2>
<h2 class="margin-bottom-small">Invitation</h2>
<p><?php echo sprintf($this->escape(Locale::getText('home.auth.join.subtitle')), '<span data-ls-echo="{{api-company.name}}"></span>'); ?></p>
<p>You have been invited to join <span data-ls-bind="{{api-company.name}}"></span> team on <?php echo APP_NAME; ?></p>
<div data-ls-if="{{api-company.logo}} !== '' || {{api-company.logo}} !== undefined">
<div data-ls-style="background: {{api-company.theme-color}}; color: {{api-company.theme-color-contrast}}; width: 100px; height: 100px; line-height: 100px; border-radius: 50%; margin: 0 auto; text-align: center">
@ -46,14 +43,13 @@ use Utopia\Locale\Locale;
<div class="pull-start margin-end-small margin-bottom">
<input type="checkbox" required />
</div>
<?php echo sprintf($this->escape(Locale::getText('home.auth.join.agree')),
'<a href="/policy/terms" target="_blank">' . $this->escape(Locale::getText('home.auth.join.terms')) . '</a>',
'<a href="/policy/privacy" target="_blank">' . $this->escape(Locale::getText('home.auth.join.privacy')) . '</a>'); ?>
By accepting the invitation, you agree to the <a href="/policy/terms" target="_blank">Terms and Conditions</a> and <a href="/policy/privacy" target="_blank">Privacy Policy</a>.
</div>
<div class="clear">
<button class="pull-start margin-end"><?php echo $this->escape(Locale::getText('home.auth.join.accept')); ?></button>
<a href="/" class="button reverse pull-start"><?php echo $this->escape(Locale::getText('home.auth.join.cancel')); ?></a>
<button class="pull-start margin-end">Accept</button>
<a href="/" class="button reverse pull-start">Cancel</a>
</div>
</form>
</section>

View file

@ -1,32 +1,29 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="zone medium">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo $this->escape(Locale::getText('home.auth.recovery.title')); ?>
Password Recovery
</h1>
<small class="pull-end">* <?php echo $this->escape(Locale::getText('home.auth.recovery.required')); ?></small>
<small class="pull-end">* All fields are required</small>
<form name="recovery"
data-service="auth.recovery"
data-scope="console"
data-event="submit"
data-success="alert"
data-success-alert="<?php echo $this->escape(Locale::getText('home.auth.recovery.success')); ?>"
data-success-alert="We have sent you a mail with a password reset link"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.recovery.failure')); ?>"
data-failure-param-alert-text="Password recovery failed"
data-failure-param-alert-classname="error">
<label><?php echo $this->escape(Locale::getText('home.auth.recovery.labels.email')); ?></label>
<label>Email</label>
<input name="email" type="email" class="full-width" autocomplete="email" placeholder="me@example.com" required>
<input name="redirect" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/recovery/reset" />
<input name="confirmation" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/recovery/reset" />
<button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> <?php echo $this->escape(Locale::getText('home.auth.recovery.action')); ?></button>
<button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> Recover</button>
</form>
</div>
<div class="zone medium">
<a href="/auth/signin"><?php echo $this->escape(Locale::getText('home.auth.recovery.back')); ?></a>
<a href="/auth/signin">Back to sign in</a>
</div>

View file

@ -1,12 +1,9 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="zone medium">
<h1 class="zone xl margin-bottom margin-top">
<?php echo $this->escape(Locale::getText('home.auth.reset.title')); ?>
Password Reset
</h1>
<small class="pull-end">* <?php echo $this->escape(Locale::getText('home.auth.reset.required')); ?></small>
<small class="pull-end">* All fields are required</small>
<br />
<br />
@ -16,21 +13,21 @@ use Utopia\Locale\Locale;
data-scope="console"
data-event="submit"
data-success="alert,redirect"
data-success-alert="<?php echo $this->escape(Locale::getText('home.auth.reset.success')); ?>"
data-success-alert="Password Reset Completed"
data-success-redirect-url="/auth/signin"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.reset.failure')); ?>"
data-failure-param-alert-text="Password Reset Failed"
data-failure-param-alert-classname="error">
<input type="hidden" name="userId" data-ls-bind="{{router.params.userId}}">
<input type="hidden" name="token" data-ls-bind="{{router.params.token}}">
<label><?php echo $this->escape(Locale::getText('home.auth.reset.labels.passwordA')); ?></label>
<input name="passwordA" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.reset.labels.password.validation')); ?>">
<label>Password</label>
<input name="passwordA" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="Six or more characters">
<label><?php echo $this->escape(Locale::getText('home.auth.reset.labels.passwordB')); ?></label>
<input name="passwordB" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.reset.labels.password.validation')); ?>">
<label>Password Again</label>
<input name="passwordB" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="Six or more characters">
<button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> <?php echo $this->escape(Locale::getText('home.auth.reset.action')); ?></button>
<button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> Apply</button>
</form>
</div>

View file

@ -1,14 +1,11 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="zone medium">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo $this->escape(Locale::getText('home.auth.signin.title')); ?>
Sign In
</h1>
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} >= 1"><?php echo $this->escape(Locale::getText('home.auth.signin.failure')); ?></div>
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} >= 1">Login failed. Please check your credentials.</div>
<p><?php echo $this->escape(Locale::getText('home.auth.signin.regular.title')); ?></p>
<p>Login using email and password</p>
<form name="login"
data-service="auth.login"
@ -18,23 +15,23 @@ use Utopia\Locale\Locale;
data-success-param-trigger-events="login"
data-success-param-redirect-url="/console"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.signin.failure')); ?>"
data-failure-param-alert-text="Login failed. Please check your credentials."
data-failure-param-alert-classname="error">
<input name="success" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signin?failure=1">
<input name="email" type="email" class="full-width" autocomplete="email" placeholder="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.email')); ?>" required>
<input name="email" type="email" class="full-width" autocomplete="email" placeholder="Email" required>
<input name="password" type="password" class="full-width" autocomplete="off" placeholder="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.password')); ?>" required pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.signin.labels.password.validation')); ?>">
<input name="password" type="password" class="full-width" autocomplete="off" placeholder="Password" required pattern=".{6,}" title="Six or more characters">
<button><?php echo $this->escape(Locale::getText('home.auth.signin.labels.action1')); ?></button>
<button>Sign In</button>
</form>
<br />
<br />
<div class="text-line-high-large">
<a href="/auth/recovery"><?php echo $this->escape(Locale::getText('home.auth.signin.labels.action2')); ?></a> <?php echo $this->escape(Locale::getText('home.auth.signin.labels.or')); ?> <b><a href="/auth/signup"><?php echo $this->escape(Locale::getText('home.auth.signin.labels.action3')); ?></a></b>
<a href="/auth/recovery">Forgot password?</a> or don't have an account? <b><a href="/auth/signup">Sign up now</a></b>
</div>
</div>

View file

@ -1,15 +1,11 @@
<?php
use Utopia\Locale\Locale;
?>
<div class="zone medium signup">
<h1 class="zone xl margin-bottom-large margin-top">
<?php echo $this->escape(Locale::getText('home.auth.signup.title')); ?>
Sign Up
</h1>
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} == 1"><?php echo $this->escape(Locale::getText('home.auth.signup.failure')); ?></div>
<div class="text-danger margin-bottom-large" style="display: none;" data-ls-if="{{router.params.failure}} == 1">Registration Failed. Please try again later</div>
<small class="pull-end">* <?php echo $this->escape(Locale::getText('home.auth.signup.required')); ?></small>
<small class="pull-end">* All fields are required</small>
<form name="register"
data-service="auth.register"
@ -19,30 +15,31 @@ use Utopia\Locale\Locale;
data-success-param-trigger-events="auth-register"
data-success-redirect-url="/console/setup"
data-failure="alert"
data-failure-param-alert-text="<?php echo $this->escape(Locale::getText('home.auth.signup.failure')); ?>"
data-failure-param-alert-text="Registration Failed. Please try again later"
data-failure-param-alert-classname="error">
<input name="confirmation" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console">
<input name="success" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/console">
<input name="failure" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/signup?failure=1">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.name')); ?></label>
<label>Name</label>
<input name="name" type="text" autocomplete="name" placeholder="" required>
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.email')); ?></label>
<label>Email</label>
<input name="email" type="email" autocomplete="email" placeholder="" required data-ls-bind="{{router.params.email}}">
<label><?php echo $this->escape(Locale::getText('home.auth.signup.labels.password')); ?></label>
<input name="password" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="<?php echo $this->escape(Locale::getText('home.auth.signup.labels.password.validation')); ?>">
<label>Password</label>
<input name="password" type="password" autocomplete="off" placeholder="" required data-forms-password-meter pattern=".{6,}" title="Six or more characters">
<div class="agree margin-top-large margin-bottom-large">
<div class="pull-start margin-end-small margin-bottom">
<input type="checkbox" required />
</div>
<?php echo $this->escape(Locale::getText('home.auth.signup.labels.agree')); ?><a href="/policy/terms" tabindex="-1" target="_blank"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.terms')); ?></a><?php echo $this->escape(Locale::getText('home.auth.signup.labels.and')); ?><a href="/policy/privacy" target="_blank" tabindex="-1"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.privacy')); ?></a>
By signing up, you agree to the <a href="/policy/terms" tabindex="-1" target="_blank">Terms and Conditions</a> and <a href="/policy/privacy" target="_blank" tabindex="-1">Privacy Policy</a>
</div>
<input name="redirect" type="hidden" data-ls-bind="{{env.PROTOCOL}}://{{env.DOMAIN}}/auth/confirm" />
<button type="submit"><?php echo $this->escape(Locale::getText('home.auth.signup.labels.action')); ?></button>
<button type="submit">Sign Up</button>
</form>
</div>

View file

@ -91,7 +91,7 @@ $canonical = $this->getParam('canonical', '');
<div class="loader"></div>
<div data-cookie-policy="<?php echo Locale::getText('general.alerts.cookie'); ?>"></div>
<div data-cookie-policy="We are using cookies to make this website easier to use."></div>
<section data-ls-ui-alerts="" class="alerts">
<ul data-ls-loop="alerts.list" data-ls-as="alert">
@ -101,7 +101,7 @@ $canonical = $this->getParam('canonical', '');
<span data-ls-bind="{{alert.text}}"></span>
<span data-ls-if="undefined !== {{alert.link}}" style="display: none;">
<a data-ls-attrs="href={{alert.link}}" data-ls-ui-alerts-delete data-message="{{alert.id}}"><?php echo Locale::getText('general.alerts.learn'); ?></a>
<a data-ls-attrs="href={{alert.link}}" data-ls-ui-alerts-delete data-message="{{alert.id}}">Learn More</a>
</span>
</div>
</li>

View file

@ -26,7 +26,7 @@ services:
- _APP_DB_HOST=mariadb
- _APP_DB_PORT=3306
- _APP_DB_SCHEMA=appwrite
- _APP_DB_USER=root
- _APP_DB_USER=user
- _APP_DB_PASS=password
- _APP_INFLUXDB_HOST=influxdb
- _APP_INFLUXDB_PORT=8086
@ -37,7 +37,9 @@ services:
image: appwrite/mariadb:1.0.0 # fix issues when upgrading using: mysql_upgrade -u root -p
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_ROOT_PASSWORD=rootsecretpassword
- MYSQL_USER=user
- MYSQL_PASSWORD=password
volumes:
- ./storage/db:/var/lib/mysql:rw
ports:

12
package-lock.json generated
View file

@ -834,9 +834,9 @@
}
},
"appwrite": {
"version": "1.0.19",
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.19.tgz",
"integrity": "sha512-SP9VNSrrVZi0B9kkdQLpoEy6hAoAanXtc9pk5TwBqEZf6OIs0BRRTK64eethyvzSrklceeBxY8FwEb+lYBNhuw==",
"version": "1.0.21",
"resolved": "https://registry.npmjs.org/appwrite/-/appwrite-1.0.21.tgz",
"integrity": "sha512-NfNG9JQkOQypanMKOGzPzHVTZP1MTDipbTkRveIfmNd0W25OAqpE1up9f7KHaAi8yha1uyqkYW6l9QgjECZMEw==",
"dev": true
},
"archy": {
@ -3688,9 +3688,9 @@
}
},
"handlebars": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz",
"integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.3.1.tgz",
"integrity": "sha512-c0HoNHzDiHpBt4Kqe99N8tdLPKAnGCQ73gYMPWtAYM4PwGnf7xl8PBUHJqh9ijlzt2uQKaSRxbXRt+rZ7M2/kA==",
"dev": true,
"requires": {
"neo-async": "^2.6.0",

View file

@ -4,7 +4,7 @@
"license": "BSD-3-Clause",
"repository": "public",
"devDependencies": {
"appwrite": "^1.0.19",
"appwrite": "^1.0.21",
"gulp": "^4.0.0",
"gulp-clean-css": "^4.0.0",
"gulp-concat": "2.5.2",

View file

@ -5,7 +5,7 @@
{http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this;};let setMode=function(value)
{http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this;};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&amp;|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index<params[p].length;index++){let param=params[p][index];str.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param));}}
else{str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]));}}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.19');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:1.0.21');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
if(typeof path!=='string'){throw new Error('var path must be of type string');}
if(typeof headers!=='object'){throw new Error('var headers must be of type object');}
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value);}
@ -23,26 +23,30 @@ let path='/account/email';return http.patch(path,{'content-type':'application/js
let path='/account/name';return http.patch(path,{'content-type':'application/json'},{'name':name});},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"');}
if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"');}
let path='/account/password';return http.patch(path,{'content-type':'application/json'},{'password':password,'old-password':oldPassword});},getPrefs:function(){let path='/account/prefs';return http.get(path,{'content-type':'application/json'},{});},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"');}
let path='/account/prefs';return http.patch(path,{'content-type':'application/json'},{'prefs':prefs});},getSecurity:function(){let path='/account/security';return http.get(path,{'content-type':'application/json'},{});},getSessions:function(){let path='/account/sessions';return http.get(path,{'content-type':'application/json'},{});}};let auth={login:function(email,password,success='',failure=''){if(email===undefined){throw new Error('Missing required parameter: "email"');}
let path='/account/prefs';return http.patch(path,{'content-type':'application/json'},{'prefs':prefs});},getSecurity:function(){let path='/account/security';return http.get(path,{'content-type':'application/json'},{});},getSessions:function(){let path='/account/sessions';return http.get(path,{'content-type':'application/json'},{});}};let auth={login:function(email,password,success,failure){if(email===undefined){throw new Error('Missing required parameter: "email"');}
if(password===undefined){throw new Error('Missing required parameter: "password"');}
if(success===undefined){throw new Error('Missing required parameter: "success"');}
if(failure===undefined){throw new Error('Missing required parameter: "failure"');}
let path='/auth/login';return iframe('post',path,{project:config.project,'email':email,'password':password,'success':success,'failure':failure});},logout:function(){let path='/auth/logout';return http.delete(path,{'content-type':'application/json'},{});},logoutBySession:function(id){if(id===undefined){throw new Error('Missing required parameter: "id"');}
let path='/auth/logout/{id}'.replace(new RegExp('{id}','g'),id);return http.delete(path,{'content-type':'application/json'},{});},recovery:function(email,redirect){if(email===undefined){throw new Error('Missing required parameter: "email"');}
let path='/auth/logout/{id}'.replace(new RegExp('{id}','g'),id);return http.delete(path,{'content-type':'application/json'},{});},oauthCallback:function(projectId,provider,code,state=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/auth/oauth/callback/{provider}/{projectId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'code':code,'state':state});},oauth:function(provider,success='',failure=''){if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
let path='/auth/oauth/{provider}'.replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'success':success,'failure':failure});},recovery:function(email,redirect){if(email===undefined){throw new Error('Missing required parameter: "email"');}
if(redirect===undefined){throw new Error('Missing required parameter: "redirect"');}
let path='/auth/recovery';return http.post(path,{'content-type':'application/json'},{'email':email,'redirect':redirect});},recoveryReset:function(userId,token,passwordA,passwordB){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(token===undefined){throw new Error('Missing required parameter: "token"');}
if(passwordA===undefined){throw new Error('Missing required parameter: "passwordA"');}
if(passwordB===undefined){throw new Error('Missing required parameter: "passwordB"');}
let path='/auth/recovery/reset';return http.put(path,{'content-type':'application/json'},{'userId':userId,'token':token,'password-a':passwordA,'password-b':passwordB});},register:function(email,password,redirect,name='',success='',failure=''){if(email===undefined){throw new Error('Missing required parameter: "email"');}
let path='/auth/recovery/reset';return http.put(path,{'content-type':'application/json'},{'userId':userId,'token':token,'password-a':passwordA,'password-b':passwordB});},register:function(email,password,confirmation,success,failure,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"');}
if(password===undefined){throw new Error('Missing required parameter: "password"');}
if(redirect===undefined){throw new Error('Missing required parameter: "redirect"');}
let path='/auth/register';return iframe('post',path,{project:config.project,'email':email,'password':password,'name':name,'redirect':redirect,'success':success,'failure':failure});},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(confirmation===undefined){throw new Error('Missing required parameter: "confirmation"');}
if(success===undefined){throw new Error('Missing required parameter: "success"');}
if(failure===undefined){throw new Error('Missing required parameter: "failure"');}
let path='/auth/register';return iframe('post',path,{project:config.project,'email':email,'password':password,'confirmation':confirmation,'success':success,'failure':failure,'name':name});},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(token===undefined){throw new Error('Missing required parameter: "token"');}
let path='/auth/register/confirm';return http.post(path,{'content-type':'application/json'},{'userId':userId,'token':token});},confirmResend:function(redirect){if(redirect===undefined){throw new Error('Missing required parameter: "redirect"');}
let path='/auth/register/confirm/resend';return http.post(path,{'content-type':'application/json'},{'redirect':redirect});},oauthCallback:function(projectId,provider,code,state=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/oauth/callback/{provider}/{projectId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'code':code,'state':state});},oauth:function(provider,success='',failure=''){if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
let path='/oauth/{provider}'.replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'success':success,'failure':failure});}};let avatars={getBrowser:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/auth/register/confirm/resend';return http.post(path,{'content-type':'application/json'},{'redirect':redirect});}};let avatars={getBrowser:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/avatars/browsers/{code}'.replace(new RegExp('{code}','g'),code);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality});},getCreditCard:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/avatars/credit-cards/{code}'.replace(new RegExp('{code}','g'),code);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality});},getFavicon:function(url){if(url===undefined){throw new Error('Missing required parameter: "url"');}
let path='/avatars/favicon';return http.get(path,{'content-type':'application/json'},{'url':url});},getFlag:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}

View file

@ -5,7 +5,7 @@
{http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this;};let setMode=function(value)
{http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this;};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&amp;|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;index<params[p].length;index++){let param=params[p][index];str.push(encodeURIComponent(p+'[]')+"="+encodeURIComponent(param));}}
else{str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]));}}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.19');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:1.0.21');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
if(typeof path!=='string'){throw new Error('var path must be of type string');}
if(typeof headers!=='object'){throw new Error('var headers must be of type object');}
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value);}
@ -23,26 +23,30 @@ let path='/account/email';return http.patch(path,{'content-type':'application/js
let path='/account/name';return http.patch(path,{'content-type':'application/json'},{'name':name});},updatePassword:function(password,oldPassword){if(password===undefined){throw new Error('Missing required parameter: "password"');}
if(oldPassword===undefined){throw new Error('Missing required parameter: "oldPassword"');}
let path='/account/password';return http.patch(path,{'content-type':'application/json'},{'password':password,'old-password':oldPassword});},getPrefs:function(){let path='/account/prefs';return http.get(path,{'content-type':'application/json'},{});},updatePrefs:function(prefs){if(prefs===undefined){throw new Error('Missing required parameter: "prefs"');}
let path='/account/prefs';return http.patch(path,{'content-type':'application/json'},{'prefs':prefs});},getSecurity:function(){let path='/account/security';return http.get(path,{'content-type':'application/json'},{});},getSessions:function(){let path='/account/sessions';return http.get(path,{'content-type':'application/json'},{});}};let auth={login:function(email,password,success='',failure=''){if(email===undefined){throw new Error('Missing required parameter: "email"');}
let path='/account/prefs';return http.patch(path,{'content-type':'application/json'},{'prefs':prefs});},getSecurity:function(){let path='/account/security';return http.get(path,{'content-type':'application/json'},{});},getSessions:function(){let path='/account/sessions';return http.get(path,{'content-type':'application/json'},{});}};let auth={login:function(email,password,success,failure){if(email===undefined){throw new Error('Missing required parameter: "email"');}
if(password===undefined){throw new Error('Missing required parameter: "password"');}
if(success===undefined){throw new Error('Missing required parameter: "success"');}
if(failure===undefined){throw new Error('Missing required parameter: "failure"');}
let path='/auth/login';return iframe('post',path,{project:config.project,'email':email,'password':password,'success':success,'failure':failure});},logout:function(){let path='/auth/logout';return http.delete(path,{'content-type':'application/json'},{});},logoutBySession:function(id){if(id===undefined){throw new Error('Missing required parameter: "id"');}
let path='/auth/logout/{id}'.replace(new RegExp('{id}','g'),id);return http.delete(path,{'content-type':'application/json'},{});},recovery:function(email,redirect){if(email===undefined){throw new Error('Missing required parameter: "email"');}
let path='/auth/logout/{id}'.replace(new RegExp('{id}','g'),id);return http.delete(path,{'content-type':'application/json'},{});},oauthCallback:function(projectId,provider,code,state=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/auth/oauth/callback/{provider}/{projectId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'code':code,'state':state});},oauth:function(provider,success='',failure=''){if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
let path='/auth/oauth/{provider}'.replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'success':success,'failure':failure});},recovery:function(email,redirect){if(email===undefined){throw new Error('Missing required parameter: "email"');}
if(redirect===undefined){throw new Error('Missing required parameter: "redirect"');}
let path='/auth/recovery';return http.post(path,{'content-type':'application/json'},{'email':email,'redirect':redirect});},recoveryReset:function(userId,token,passwordA,passwordB){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(token===undefined){throw new Error('Missing required parameter: "token"');}
if(passwordA===undefined){throw new Error('Missing required parameter: "passwordA"');}
if(passwordB===undefined){throw new Error('Missing required parameter: "passwordB"');}
let path='/auth/recovery/reset';return http.put(path,{'content-type':'application/json'},{'userId':userId,'token':token,'password-a':passwordA,'password-b':passwordB});},register:function(email,password,redirect,name='',success='',failure=''){if(email===undefined){throw new Error('Missing required parameter: "email"');}
let path='/auth/recovery/reset';return http.put(path,{'content-type':'application/json'},{'userId':userId,'token':token,'password-a':passwordA,'password-b':passwordB});},register:function(email,password,confirmation,success,failure,name=''){if(email===undefined){throw new Error('Missing required parameter: "email"');}
if(password===undefined){throw new Error('Missing required parameter: "password"');}
if(redirect===undefined){throw new Error('Missing required parameter: "redirect"');}
let path='/auth/register';return iframe('post',path,{project:config.project,'email':email,'password':password,'name':name,'redirect':redirect,'success':success,'failure':failure});},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(confirmation===undefined){throw new Error('Missing required parameter: "confirmation"');}
if(success===undefined){throw new Error('Missing required parameter: "success"');}
if(failure===undefined){throw new Error('Missing required parameter: "failure"');}
let path='/auth/register';return iframe('post',path,{project:config.project,'email':email,'password':password,'confirmation':confirmation,'success':success,'failure':failure,'name':name});},confirm:function(userId,token){if(userId===undefined){throw new Error('Missing required parameter: "userId"');}
if(token===undefined){throw new Error('Missing required parameter: "token"');}
let path='/auth/register/confirm';return http.post(path,{'content-type':'application/json'},{'userId':userId,'token':token});},confirmResend:function(redirect){if(redirect===undefined){throw new Error('Missing required parameter: "redirect"');}
let path='/auth/register/confirm/resend';return http.post(path,{'content-type':'application/json'},{'redirect':redirect});},oauthCallback:function(projectId,provider,code,state=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"');}
if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/oauth/callback/{provider}/{projectId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'code':code,'state':state});},oauth:function(provider,success='',failure=''){if(provider===undefined){throw new Error('Missing required parameter: "provider"');}
let path='/oauth/{provider}'.replace(new RegExp('{provider}','g'),provider);return http.get(path,{'content-type':'application/json'},{'success':success,'failure':failure});}};let avatars={getBrowser:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/auth/register/confirm/resend';return http.post(path,{'content-type':'application/json'},{'redirect':redirect});}};let avatars={getBrowser:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/avatars/browsers/{code}'.replace(new RegExp('{code}','g'),code);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality});},getCreditCard:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}
let path='/avatars/credit-cards/{code}'.replace(new RegExp('{code}','g'),code);return http.get(path,{'content-type':'application/json'},{'width':width,'height':height,'quality':quality});},getFavicon:function(url){if(url===undefined){throw new Error('Missing required parameter: "url"');}
let path='/avatars/favicon';return http.get(path,{'content-type':'application/json'},{'url':url});},getFlag:function(code,width=100,height=100,quality=100){if(code===undefined){throw new Error('Missing required parameter: "code"');}

View file

@ -51,7 +51,7 @@ class ConsoleHealthTest extends BaseConsole
$this->assertIsInt($response['body']['local']);
$this->assertNotEmpty($response['body']['remote']);
$this->assertNotEmpty($response['body']['local']);
$this->assertEquals(0, $response['body']['diff']);
$this->assertLessThan(10, $response['body']['diff']);
}
public function testWebhooksSuccess()

View file

@ -20,7 +20,7 @@ services:
- _APP_DB_HOST=mariadb
- _APP_DB_PORT=3306
- _APP_DB_SCHEMA=appwrite
- _APP_DB_USER=root
- _APP_DB_USER=uesr
- _APP_DB_PASS=password
- _APP_INFLUXDB_HOST=influxdb
- _APP_INFLUXDB_PORT=8086
@ -31,7 +31,9 @@ services:
image: appwrite/mariadb:1.0.0
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_ROOT_PASSWORD=rootsecretpassword
- MYSQL_USER=user
- MYSQL_PASSWORD=password
ports:
- 3306:3306/tcp
#command: mysqld --innodb-flush-method=fsync