Commit graph

50 commits

Author SHA1 Message Date
Erik Michelson
d13adcc9c3
Refactoring of modals (#294)
* Refactored modals (added CommonModal and DeletionModal besides ErrorModal)

This change allows more code reusage by defining a common modal that has a translated title with an optional icon.

* Replace the eslint-hack with a proper TypeScript conform solution

Instead of asserting non-null and disabling eslint, the 'as ...'-syntax is used to convince the compiler that everything is fine.

* Improved property names and ShowIf-construct

* Fixed missing renamings
2020-06-28 00:00:05 +02:00
Erik Michelson
2d0b605257
Add links from recent note history entries to the actual note (#203)
* Added Link objects around history-cards and the title in table-view

This commit adds one Link element wrapping the title of a note in the table view and one Link element wrapping the whole card of a note in cards view.

This behaviour currently doesn't work completely correct as other buttons on the card become unclickable and needs to be fixed in another commit before merging this branch.

* Fixed Link behaviour for card view

The cards aren't wrapped inside a Link element anymore but the middle column of a card (where the title and tags are located) is now wrapped inside the Link element.
With this approach not the whole card is clickable anymore, but it's enough clickable space anyway. The positive aspect is that we don't have to deal with "position: absolute"-elements that may break responsiveness.
2020-06-14 12:25:45 +02:00
Tilman Vatteroth
eb92d38133 Redesign history context button
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-13 23:50:28 +02:00
Tilman Vatteroth
1937fe2418 Show footer always at the bottom
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-13 00:13:43 +02:00
Philip Molares
72a161ea16
Context menu to each history entry (#171)
- added entry-menu
- added subsection in entry-menu with the location of the history entry and the action to remove an entry from history
- added uploadAll functionality
- show uploadAll Button in history only if the user is logged in
- added deleteNote api call

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-09 22:35:09 +02:00
Philip Molares
7794538c6a
better support for rtl languages (#170)
* set text direction on language load and change to rtl if arabic is chosen

see https://www.w3schools.com/tags/att_global_dir.asp

* minor fixes to make rtl-mode look good:
- margins not only on the right, but on both sides
- fix bootstrap ToggleButtonGroup to always be ltr

* removed console.log statements

* fixed margin on the name in the user-avatar

* '$Icon CodiMD' on the intro page now always uses ftr text direction, since we don't translate the same of the software

* fixed import

* removed setHTMLDirection function

* added toplevel div with dir='auto'
some elements got dir='auto' if they contain potentially not translated or intended english text

* added text-align: start to the user-dropdown

* moved toplevel dir='auto'

* moved shortenLanguageCode to language-picker

* Changed mr-2 to mx-2 for profile buttons

Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-06-08 23:49:14 +02:00
mrdrogdrog
c949b6950e
Sort components (#163)
* Move common components to the `common` directory
* rename style directory
* Move ForkAwesome to common
* Move initializers and restructure application-loader.tsx
2020-06-07 21:29:09 +02:00
Tilman Vatteroth
f2e273fc40 Use more show-if
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-07 01:09:41 +02:00
Philip Molares
7b5b73a289
show local and remote History (#128)
* added history toolbar functionality for local and remote history
2020-06-07 01:09:04 +02:00
Tilman Vatteroth
e64b07b289 Add fixed sizes for history table columns
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-06 23:59:12 +02:00
Philip Molares
046d434f4c
added error modal (#124)
added error modal component

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-05 14:23:09 +02:00
Erik Michelson
b051b109e5
Show login-buttons and boxes only if providers are configured (#122)
* Hide "Sign-in via ..." box if no provider is enabled

* Show sign-in buttons only if auth-providers exist

* Rebase fixes

* Replaced ternary operators with ShowIf

* Added ShowIf on two other code positions
2020-06-04 23:38:21 +02:00
Philip Molares
0d8ca681f8
finished history toolbar buttons (#117)
* added history toolbar functionality
* export now adds a version number
* renamed OldHistoryEntry to V0HistoryEntry

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-04 22:41:44 +02:00
mrdrogdrog
a62e3857b4
Improve sign in button (#123)
* Improve sign in button

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Add missing size attribute

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* reformat code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-03 13:17:46 +02:00
Tilman Vatteroth
ef725c8b6e Fix text color when hovering social link buttons
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-31 23:14:48 +02:00
mrdrogdrog
570c45017c
Restructure redux code (#109)
* Restructure redux code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-05-31 22:51:36 +02:00
mrdrogdrog
db5bec7000
Split user.ts into auth.ts and me.ts (#113)
Split user.ts into auth.ts and me.ts
2020-05-31 22:27:12 +02:00
Philip Molares
1fa8c8ac53 clear history modal now correctly closes
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-31 22:25:05 +02:00
Philip Molares
c8e42eebd4
Replace font awesome with fork awesome (#114)
* added fork-awesome-icon
* removed fontAwesome
* changed FontAwesomeIcon to ForkAwesomeIcon

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-31 22:21:32 +02:00
Erik Michelson
747d9686fa
User profile page (#102)
* Added mock profile page

* Added translations

* Modularized page, added LoginProvider, started validation

* Re-adding profile route after router refactoring

* Added API calls for password and name change

* Added user deletion modal

* Refactored translations in profile-page to match new locales

* Fixed merge-conflicted locales/de.json

* Removed values for password fields

* Fixed capitalization of LoginProvider

* Fixed codestyle method declarations

* Fix names of methods and started countdown

* Fix countdown

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-31 21:56:39 +02:00
mrdrogdrog
1f347fb653
New locale format (#94)
* Add new format for translation files
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-31 08:53:22 +02:00
Philip Molares
02f1b2abcc
Feature/history api (#84)
added /api/v2.0/ to the backend url

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-30 10:12:01 +02:00
Philip Molares
557386f78f
added clearHistory functionality (#82)
added clearHistory functionality

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
2020-05-29 15:09:51 +02:00
Philip Molares
eba59ae622
better linting (#72)
Improve linting and fix linting errors

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-27 15:43:28 +02:00
Erik Michelson
efb6513205 Added translation component for history-page title 2020-05-27 14:58:57 +02:00
Henrik Hüttemann
7a33177014
Card-ify login components (#53)
* Card-ify login components

* Fix lint warnings

* Replace HTML with react-bootstrap components

* Remove now obsolete flex div

* Apply fixed width to fa-icons

* Reset sign-in buttons to normal size
2020-05-25 20:48:27 +02:00
Philip Molares
f185c76c6e
unclutter the intro page (#64)
* removed cover.scss
* uncluttered intro

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-24 23:58:09 +02:00
Erik Michelson
f5a851814a Redirect logged-in users from /login to /history 2020-05-24 23:21:04 +02:00
mrdrogdrog
a5af15b278
use async and await (#62)
Use async and await instead of promise chains
2020-05-24 22:55:06 +02:00
mrdrogdrog
11f01094b4
History pagination (#58)
Adds pagination for the history page. fixes #32
2020-05-24 15:27:16 +02:00
Tilman Vatteroth
70ab02431c Add tags to history table
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-24 14:32:02 +02:00
Philip Molares
8e291a7b34 added translation for or
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-23 22:50:03 +02:00
mrdrogdrog
d03e000bd1
Feature/history toolbar (#44)
Add the history bar
2020-05-21 22:01:23 +02:00
Philip Molares
4c785b345b
Fix/email open id separator (#39)
Fix/email open id separator 

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-21 21:23:24 +02:00
Philip Molares
0e18d0f8da changed oauth icon to fa-address-book
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-17 15:23:41 +02:00
Philip Molares
81c1df2a6d made one-click-button arbitrary long to accompany arbitrary long custom names
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-17 15:23:23 +02:00
Philip Molares
a50ad6e6c8
Feature/open id sign in (#35)
* added errorOpenIdLogin i18n key
* added openid authProvider
* added postOpenIdLogin api call
* added via-open-id component

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 23:21:05 +02:00
Philip Molares
d2c6ea464d fixed controlId in via-ldap
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 22:58:11 +02:00
Philip Molares
58f3bb4d3b renamed via-oauth2 to via-one-click
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 22:07:20 +02:00
Philip Molares
aeeb08ea5a
Feature/custom oauth saml names (#31)
* using saml and oauth2 customAuthNames in login
* add saml and oauth2 customAuthNames to backend config
* changed default name of oauth button

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 20:38:02 +02:00
mrdrogdrog
83ab0bbe7e
Feature/history page (#28)
* add alert message and use only entry for card and table

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Refresh table view when translation was changed

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Add sort by date and pinning

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* save history to localstorage

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* improve card and table history

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* extract functions

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Sort in history component

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Fix i18n key

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Move scss imports

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* fix scss import

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* modify state with setState

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* fix import

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* add sortAndFilterEntries function

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-16 19:54:08 +02:00
Philip Molares
5eb8ab7517
Feature/ldap sign in (#27)
* reworked via-ldap component
* added username i18nkey
* added customAuthNames to backend config
* added postLdapLogin api call

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 19:12:49 +02:00
Philip Molares
fbd29c0338 changed the intro page when logged in
fixes #2

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 16:02:33 +02:00
Philip Molares
5b8247f455 renamed i18nKey slogan to coverSlogan
this should indicate where this text will be used

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 15:57:15 +02:00
Philip Molares
aedd86fbed
changed date-fns to moment (#23)
changed date-fns to moment
fixes #22
made use of i18n support of moment

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 15:42:02 +02:00
Philip Molares
194199aee1
convert the old history from localStorage (#21)
* convert the old localStorage["notehistory"] to the new history format, if there is no new history in localStorage
fixes #20

Signed-off-by: Philip Molares <philip.molares@udo.edu>

* used toDate instead of fromUnixTime

Signed-off-by: Philip Molares <philip.molares@udo.edu>

* extracted OldHistoryEntry interface

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-16 14:24:49 +02:00
mrdrogdrog
a490e1240b
Frontend config and Loader component (#12)
* Add FrontendConfig and Loader

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Merge more setup into the application loader

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Rename config files

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Remove blank line

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Fix url

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Make strings more specific

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Restructure store use

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* split methods and actions

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* extract code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* remove actions.ts

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* add reason and rename component

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* remove unused call

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Use redux store in api

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* activate email in backend config

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* add new line

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* reduce code

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Make error more specific

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Use expectedResponseCode

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

* Update src/redux/backend-config/types.ts

Co-authored-by: Philip Molares <git@molar.es>

* Update src/components/application-loader/application-loader.tsx

Co-authored-by: Philip Molares <git@molar.es>

* Update src/components/application-loader/application-loader.tsx

Co-authored-by: Philip Molares <git@molar.es>

* Update src/components/application-loader/application-loader.tsx

Co-authored-by: Philip Molares <git@molar.es>

* Use fragment

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>

Co-authored-by: Philip Molares <git@molar.es>
2020-05-15 23:10:12 +02:00
Philip Molares
56ff708e35 fixed unique key prop error in the cols mapping the login buttons
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-15 21:08:10 +02:00
Philip Molares
41f969fda6
Email sign in (#13)
polished via-email component
used state to track email and password.
explicitly did not put email and password in value of the appropriate input fields because that is not necessary nor do we want to write the clear text password into the dom

Signed-off-by: Philip Molares <philip.molares@udo.edu>
(cherry picked from commit c5f5956b8d8bb02553f85443f8b04acbf0c31f2b)
2020-05-15 20:43:43 +02:00
Philip Molares
93ce059577 imported current state of the mockup into the public repo
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-14 15:41:38 +02:00