-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix redirect unix socket vulnerability * Force https only on production mode * Upgrade jointJs * Remove transitive imports * Upgrade database dependencies * Upgrade express * Bump terser from 5.10.0 to 5.14.2 Bumps [terser](https://github.com/terser/terser) from 5.10.0 to 5.14.2. - [Release notes](https://github.com/terser/terser/releases) - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/commits) --- updated-dependencies: - dependency-name: terser dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Update yarn packages * Update issue templates - Change issue template - Translate it's contents to pt-br * Update issue templates - Fix typo - Add separators * Improve login security * Improve register security * Improve reset password security * Hide user from recovery request * Short reuse refac * feat(config): Update Dockerfile and docker-compose * Bump loader-utils from 2.0.2 to 2.0.3 Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.3. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.3/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.2...v2.0.3) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump minimatch from 3.0.4 to 3.1.2 Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Commits](isaacs/minimatch@v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump loader-utils from 2.0.3 to 2.0.4 Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.3...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bump qs from 6.5.2 to 6.5.3 Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Create delete account rounte * WIP: Add Preferences page * Preferences page - Enable translations, - Add missing array when exporting app.preferences * User preferences page markup Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Idmar Ramos Jr. (Id) <idmarjr@gmail.com> Co-authored-by: João Paulo M Fiumari <joaopaulo_mf@outlook.com>
- Loading branch information
1 parent
84a8c04
commit 539e0e2
Showing
30 changed files
with
2,868 additions
and
2,317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
API_URL=http://localhost:3000 | ||
PORT=3000 | ||
MONGODB_LOCAL_URL="mongodb://localhost:27017/brmodeloDB" | ||
MONGODB_LOCAL_URL="mongodb://mongo:27017/brmodeloDB" | ||
SECRET_TOKEN=talkischeapshowmethecode |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Eu preciso de ajuda com... | ||
about: Para qualquer pergunta que você tenha | ||
title: '' | ||
labels: Question | ||
assignees: '' | ||
|
||
--- | ||
|
||
> Antes de fazer sua pergunta, por favor explore a documentação do BRModelo Web: | ||
> https://docs.brmodeloweb.com | ||
> | ||
> Se mesmo assim você não encontrou a resposta que precisa, adicione sua pergunta a seguir: | ||
--- | ||
|
||
### Pergunta | ||
Adicione aqui sua pergunta |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: Reportar Problema | ||
about: Reportar bugs no BRMW | ||
title: '' | ||
labels: Bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Link da modelagem | ||
Adicione aqui o link da modelagem na qual você estava trabalhando quando encontrou o problema. | ||
|
||
--- | ||
|
||
### Descreva o problema | ||
Adicione aqui uma breve descrição do problema. | ||
|
||
--- | ||
|
||
### Passos para reproduzir | ||
1. Na tela de... | ||
1. Selecione a opção... | ||
1. Clique em... | ||
|
||
--- | ||
|
||
### Screenshots e/ou video | ||
Adicione aqui imagens ou videos que possam nos ajudar a entender o problema | ||
|
||
--- | ||
|
||
### Sistema operacional e navegador | ||
- Adicione aqui seu sistema operacional (Windows, MacOS, Linux distro, etc...) | ||
- Adicione aqui seu navegador (Firefox, Chrome, Edge, etc) e a versão do mesmo | ||
|
||
--- | ||
|
||
### Informações extras | ||
Aqui você pode adicionar qualquer informação extra que ache relevante pra nos ajudar a entender o problema. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Requisitar funcionalidade | ||
about: Ideias e sugestões de como melhorar o BRMW | ||
title: '' | ||
labels: Feature request | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Sua sugestão de melhoria é relacionada a algum problema? | ||
|
||
Adicione aqui a descrição do problema | ||
_Ex: É muito complicado fazer..._ | ||
|
||
--- | ||
|
||
### Descreva sua ideia de como resolver o problema | ||
Adicione aqui como você acha que deveríamos resolver esse problema. | ||
Fique a vontade para adicionar imagens, videos, desenhos ou qualquer material que te ajude a explicar sua proposta de solução | ||
|
||
--- | ||
|
||
### Informações extras | ||
Aqui você pode adicionar qualquer informação extra que ache relevante pra nos ajudar a entender o problema. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
FROM node:16 | ||
FROM node:16-alpine | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
COPY package.json /usr/src/app/ | ||
ENV APP_PATH /usr/src/app | ||
COPY package.json $APP_PATH | ||
WORKDIR $APP_PATH | ||
RUN yarn install | ||
COPY . /usr/src/app | ||
EXPOSE 9000 | ||
CMD [ "yarn", "start:frontend", "yarn" , "start:dev" ] | ||
COPY . $APP_PATH | ||
# expose port 3000 for server and 9000 for webpack-dev-server | ||
EXPOSE 3000 9000 | ||
# run start:frontend and start:dev in parallel | ||
CMD ["yarn", "start:frontend", "start:dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<section class="view preferences"> | ||
|
||
<header class="navbar navbar-default navbar-fixed-top"> | ||
<div class="container"> | ||
<a class="back-button" href="#" data-ui-sref="main"> | ||
<i class="fa fa-arrow-left" aria-hidden="true"></i> | ||
</a> | ||
<div class="navbar-header pull-left"> | ||
<strong class="navbar-brand">{{ 'BR Modelo Web' | translate }}</strong> | ||
</div><!-- End .navbar-header --> | ||
<div class="nav navbar-nav pull-right nav-icons"> | ||
<dropdown-icon title="Options" options="$ctrl.dropdownOptions" on-select=$ctrl.menuOptionSelected(selected)></dropdown-icon> | ||
</div><!-- End .navbar-header --> | ||
</div> | ||
</header> | ||
|
||
|
||
<section class="mainContent"> | ||
<header class="container"> | ||
<div class="page-header clearfix"> | ||
<h2 class="h2 pull-left">{{ 'Preferences' | translate }}</h2> | ||
</div><!-- End .page-header --> | ||
</header><!-- End .container --> | ||
|
||
<div class="container userPreferences"> | ||
<img | ||
src="../../img/loading-dots.gif" | ||
alt="Loading" | ||
class="br-loader" | ||
ng-class="{'loading': $ctrl.loading}" | ||
/> | ||
|
||
<div class="alert alert-danger" role="alert" data-ng-class="{'hide': !$ctrl.feedback.showing}"> | ||
<p>{{ $ctrl.feedback.message }}</p> | ||
</div> | ||
|
||
<!-- User information --> | ||
<form class="form-horizontal" role="form" name="userPreferencesForm"> | ||
|
||
<section class="form-section deleteAccount"> | ||
<header> | ||
<h3>{{ 'Delete account' | translate }}</h3> | ||
</header> | ||
<p>{{ 'Remove all your models before removing your account.' | translate }}<br/> <strong>{{ 'Keep in mind this is a destructive action and cannot be undone.' | translate}}</strong></p> | ||
<button type="button" class="br-button destructive" ng-click="$ctrl.deleteAccount()">{{ 'Delete account' | translate }}</button> | ||
</section> | ||
|
||
</form> | ||
</div><!-- End .container.projectsList --> | ||
|
||
<bug-report-button></bug-report-button> | ||
</section><!-- End .mainContent --> | ||
</section><!-- End .view --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import angular from "angular"; | ||
import template from "./preferences.html"; | ||
import confirmationModal from "../components/confirmationModal"; | ||
|
||
const preferencesController = function(AuthService, $state, $filter, $uibModal, $timeout){ | ||
const ctrl = this; | ||
ctrl.loading = false; | ||
ctrl.feedback = { | ||
message: "", | ||
showing: false | ||
} | ||
|
||
ctrl.showFeedback = (show, newMessage) => { | ||
$timeout(() => { | ||
ctrl.feedback.showing = show; | ||
ctrl.feedback.message = $filter('translate')(newMessage); | ||
}); | ||
} | ||
|
||
const showLoading = (loading) => { | ||
ctrl.loading = loading; | ||
}; | ||
|
||
const handleDeleteAccountError = (error) => { | ||
if(error.status == 400) { | ||
const errorMessage = $filter('translate')("Delete account model error"); | ||
ctrl.showFeedback(true, errorMessage); | ||
} else { | ||
const errorMessage = $filter('translate')("Delete account default error"); | ||
ctrl.showFeedback(true, errorMessage); | ||
} | ||
} | ||
|
||
ctrl.dropdownOptions = [ | ||
{ name: $filter('translate')("Preferences"), type: 'preferences' }, | ||
{ name: $filter('translate')("Logout"), type: 'logout' } | ||
]; | ||
|
||
ctrl.deleteAccount = () => { | ||
const modalInstance = $uibModal.open({ | ||
animation: true, | ||
component: "confirmationModal", | ||
resolve: { | ||
modalData: () => ({ | ||
title: $filter('translate')("Delete account"), | ||
content: $filter('translate')("Are you sure you want to delete your account?"), | ||
cancelLabel: $filter('translate')("Cancel"), | ||
confirmLabel: $filter('translate')("Delete"), | ||
}), | ||
}, | ||
}); | ||
|
||
modalInstance.result.then(() => { | ||
showLoading(true); | ||
AuthService.deleteAccount().then(() => { | ||
AuthService.logout(); | ||
$state.go("login"); | ||
}).catch(handleDeleteAccountError) | ||
.finally(() => { | ||
showLoading(false); | ||
}); | ||
}); | ||
} | ||
|
||
ctrl.menuOptionSelected = (option) => { | ||
switch(option.type) { | ||
case "logout": ctrl.doLogout() | ||
break; | ||
case "preferences": $state.go("preferences"); | ||
break; | ||
} | ||
} | ||
|
||
ctrl.doLogout = () => { | ||
AuthService.logout(); | ||
$state.go("login"); | ||
} | ||
} | ||
|
||
export default angular | ||
.module("app.preferences", [confirmationModal]) | ||
.component("preferences", { | ||
template, | ||
controller: preferencesController, | ||
}).name; |
Oops, something went wrong.