Commit graph

88 commits

Author SHA1 Message Date
Philip Molares
e014eb36b5
Adds an info banner to the app (#190)
* added info-banner component to show the banner.text, we got from the backend config. This banner is shown on top of the landing page (intro, history, login/signup and profile) and also on top of the editor and links to `/n/banner`
* added banner to backendConfig Redux state
* added BannerState to the ApplicationState with that the showing of the banner is globally controlled, the banner text is given to the banner component and the timestamp to acknowledge a banner was read by the user
* the timestamp of a dismissed note is saved in the browsers localStorage to determine in the future if the banner should be shown

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-06-15 21:54:20 +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
mrdrogdrog
f298d1469b
Add editor split component (#198)
Add split and split divider component
2020-06-13 01:22:27 +02:00
Philip Molares
c679f5524c
added redirector component (#199)
* added redirector component
    * it will redirect every request to /$something that is not handled otherwise (/intro, /login and such) to /n/$something
* added getNote API Call
* added NotFound component
* added LandingLayout around the NotFound component, so users can easily navigate away from the component

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-13 00:29:39 +02:00
Tilman Vatteroth
773fc60f07 Fix icon position in application loading screen
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-13 00:25:00 +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
Tilman Vatteroth
d9ce262ffb Add placeholder translation
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-11 20:50:54 +02:00
mrdrogdrog
46d68c3ab5
Add basic codemirror (#96)
* started work on codemirror integration
2020-06-11 20:14:40 +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
23c854dc9a Throw error if unexpected response code
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-07 01:04:18 +02:00
Erik Michelson
8c4621ec97 Changed API path to v2 instead of v2.0
We discussed whether the minor-version is relevant for the API base-path and came to the conclusion, that it's not really needed as breaking API changes need a new major version anyway.
This commit also removes the trailing slash from the URL which is returned by `getBackendUrl`. This is needed as we composed the API routes in our implementation always with a starting slash thus leading to double slashes.

Example of old behaviour:
getBackendUrl() + '/config'
=> example.com/api/v2.0//config

Example of new behaviuor:
getBackendUrl() + '/config'
=> example.com/api/v2/config
2020-06-07 00:55:46 +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
575407ab6d internal links now use the Link component instead of the LinkContainer component, because the later is intended for use with react-bootstrap components and not for simple translated strings.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-06-06 22:12:24 +02:00
mrdrogdrog
a376c95fab
Add function for language code shortening (#156)
Add function for language code shortening
2020-06-06 11:55:41 +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
renovate[bot]
ebfec522b3
Update dependency typescript to v3.9.5 (#146)
* Update dependency typescript to v3.9.5
* changed > to {'>'}, because typescript >=3.9 does not support > and } in tsx files anymore

see https://www.typescriptlang.org/docs/handbook/release-notes/overview.html#-and--are-now-invalid-jsx-text-characters

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

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Philip Molares <philip.molares@udo.edu>
2020-06-05 11:22:31 +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
Tilman Vatteroth
03e1bf361a Add show if component
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-06-04 23:00:42 +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
mrdrogdrog
39b1175850
Improvement/different background color (#118)
* Set new background color for body
2020-06-02 11:22:49 +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
8ab0e54431
Add flex to grow button (#110)
* Add flex to grow button

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

* Add flex to grow button

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-31 18:39:52 +02:00
Erik Michelson
b9d7880075
Fixed wrong translation (#107) 2020-05-31 18:34:10 +02:00
Philip Molares
727beb69f9 change dark mode button to show sun icon if toggled
see https://github.com/codimd/server/issues/378

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-31 15:38:21 +02:00
Philip Molares
d035ff26a5 moved style folder
added index.scss to index.tsx

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-31 13:27:20 +02:00
mrdrogdrog
5c716bd314
Restructure Link Components and fix internal link children error (#106)
* Restructure Link Components and fix internal link children error
2020-05-31 13:25:41 +02:00
Philip Molares
177f639492
Editor Help Modal (#99)
* removed css from body
* added internal-link and translated-internal-link
* icon in links are always fixedWidth
* added help button

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-31 11:36:27 +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
Tilman Vatteroth
afb2ea85b1 Rename var
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-30 22:43:31 +02:00
Tilman Vatteroth
7ef1b086bd Make application loader only trigger once
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-30 22:43:31 +02:00
Philip Molares
dbc592e6d7
better error messages for the loading-screen (#87)
better error messages for the loading-screen

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-30 16:22:07 +02:00
mrdrogdrog
68790dbe1b
Fix dark mode button (#86)
* Add no-active-focus css class
* Improve dark mode button
* Remove class
2020-05-30 16:02:58 +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
e2155e735d
Editor Basics (#43)
Add basic editor
2020-05-29 15:44:45 +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
mrdrogdrog
0e8d2f1639
Add version info (#80)
Add version info overlay. Fixes #78
2020-05-29 13:08:59 +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