249 Commits

Author SHA1 Message Date
cff156c024 advotracker_client: introduce Windows icon handling
* include `windres` crate
* create a `build.rs`
* include a `hotline.svg` that is converted to advotracker.ico
  using inkscape and imagemagick
* crate a `README.md`

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-18 11:06:36 +01:00
78851ebbcf Cargo: move profile definitions to workspace root
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-10 09:58:58 +01:00
f6ac43816f data:constants: correct callback_number bug
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-10 09:47:22 +01:00
2b4eb454cc examples: insert sdl2_demo
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-10 09:19:14 +01:00
abe56741e8 widgets:ticketdata: correct mail_from address
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-10 09:18:24 +01:00
0202d4a34b advotracker_client: bump version 0.1.5-alpha2
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 17:26:46 +01:00
520e0cb712 widget:ticketdata: error handling and button glyphs
* assign glyphs depending on action state
* feedback on send_ticketdata return code
* cleanup

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 17:24:07 +01:00
c555ce4d85 service:send_ticketdata: adapt alingnment of http mail and relay
* cleanup comments
* correct relay / credential handling

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 12:07:14 +01:00
a8f6ac6a37 services:send_ticketdata: correct relay authentication issues
* correct mail_from identifier
* correct mail_reply identifier
* correct mail_cc identifier

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 11:16:50 +01:00
8abdef6e44 widget: bump to 0.1.5-alpha2
* typo cleanup
* temporary disable mail-cc combobox
* correct mail_cc address

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 09:50:12 +01:00
a5dae6e397 advotrackerdb: update use reference after structure update
* binaries: reference advotrackerdb, not crate

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:32:12 +01:00
e03c5ab667 main: adapt window size
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:32:11 +01:00
d8e94513c3 widget:policycheck: enable ClearPolicyNumber
* new action button "Clear", "New ticket"
* enable needed send_message routine
* create action method
* update visibility state of involved view properties

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:32:11 +01:00
5a9965751a advotracker: reorganize the project using a crate based structure
* advotracker: the framework project
* crate/advotrackerdb: implementation of the database backend
* crate/advotrackerd: implementation of the backend (daemon)
* crate/adovtracker: implementaton of the application (CLI and GUI)

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:32:11 +01:00
4c88167bef advotracker: restructure project using crate tree
* advotracker: the framework crate
* crate/advotrackerdb: crate implementing the database backend
* crate/advotrackerd: the backend daemon
* crate/adovtracker: the application (CLI and GUI)

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:32:11 +01:00
1ce1d029e5 widget:ticketdata: bug correction for ComboBox
* always use 'TextBlock', since editing is not allowed
  'TextBox ' also disturbs correct rendering

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:32:10 +01:00
2e927c8a6a widget:ticketdata: implement ClearForm
* reset all children of a given form to clean initial state
* use `match` expression that compares the widget name,
  that resolves to the widget type (here: TextBox)

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:32:10 +01:00
f3db69ce62 Cargo.toml: bump version to 0.1.5-alpha0
* include dependency to crate lettre
* include depenency to crate maud
* this version initially supports ticketdata dialo
* data can be send via Email

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-08 04:31:40 +01:00
55040e37cf widget:global_state: remove usage of navigate
* this needs to be adopted to use event handler code

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-06 15:27:20 +01:00
ba3a6fb4d3 ticketdata: update ticketdata_view using widget builder
* create and handle items in combo boxes using list
  and widget builder

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-06 15:08:57 +01:00
8184af8135 ticketdata: code cleanup 2021-03-06 15:08:57 +01:00
87cbf493a2 advotracker: updated localization strings and constants
* update due to customer request
* constants
* translation strings
* disable WIP menu widget
* labels used in Email submission

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-06 15:08:57 +01:00
4381c3d299 main_view: disable wip menu widget
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-06 15:08:57 +01:00
791b451d39 main: handle test_policy_number
* provide cli-flag `testPolicyNumber` as String
  since viperus doesnt support u64
* handle stringconversion (String -> u64) inside main

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-04 07:07:01 +01:00
aeaafd8c57 widget:ticketdata: function extention to handle Email sending
* remap to use `policy code`
* adapt the constants
* start with clear_form()
* use service 'send_ticketdata' which crate lettre
* enable smtp authorization via credentilas
* support html using crate 'maud'
* provide the needed structures
* update the constants for property and entity assigns
* include send Email service (sendticketdata)
* send_ticketdata: include html  maud modules

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-04 07:06:03 +01:00
1af299dc01 widget:policycheck: map to ID_POLICY_CHECK_POLICY_CODE
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 22:35:20 +01:00
bd6971d4d0 .gitmodules: update dead module path
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 16:32:33 +01:00
85fb4ceb16 advotracker-db: update to head
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 16:32:21 +01:00
a451b58ab4 widget:menu: deactivate requirement for new popup_code
* since new popup code is just in PR #304, do not rely on its availibility

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 11:53:17 +01:00
b96c3c510f widgets:main_view: update widget activation handling
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 11:51:50 +01:00
2c903c67dd data:constants: update widget id's identifier
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 11:50:33 +01:00
a40f6e94dd widget:global_state: activate navigate() method
* allow widgets to nagivate to other widget context

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 11:48:16 +01:00
8af49deb34 widget:ticketdata: introduce message passing
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 11:47:26 +01:00
202ba81b4f widget:policycheck: introduce message passing
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 11:46:39 +01:00
43db004179 examples: move csv-test
* test validity of a given policy number
* cli program will match via  hashmap
* hashmap is constructed from a csv file

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 00:38:10 +01:00
3b65dafbec examples: introduce messages_test
* showcase demenstrating messages passing from a sender (widget1)
  to a receiver (widget 2)
* use modular source tree structure

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-03-03 00:33:26 +01:00
23732350ca policycheck: refine header bar
* place tenent logo at upper right
* adapt header text placement

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 20:15:31 +01:00
3c40055e2e theming: update default_dark
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:25 +01:00
6a61d2f878 policycheck: functionality cleanup
* sorting
* string usage

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:25 +01:00
044ad84598 services: allianzdireectcall update
* rust update using &str instead of &String

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:25 +01:00
b2a9d9aa52 widget/configuration: typo and documentation update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
157da4228a include substring handling
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
26cf43bfae ticketdata: introduce new widget
* Cargo.toml: introduce carte `lettre` used in send_ticketdata.rs
* locales: extend translations
* theme: extend translations
* send_ticketdata: send harm data via email
* ticket_data: aquisition of harm data
* update constant usage

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
a2314d4909 envy: update .env
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
0dab2dddb3 csv-test: typo update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>

csv-test: update

* move to subdir `examples`
* typo update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
bb40033554 parse_args: typo update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
a4a09bc37c data/structures: typo update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
9fba66d8a6 widget/configuration: styling update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
7d6476205f Cargo.toml: include crate if_cfg
* use macro to compile os-dependent features

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:24 +01:00
41ebf4168a widgets/configuration: reference styling to theme handling
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
c4caf12706 widget/policycheck: update logic
* remove handling of the menu logic (isolated in dedicated widget)
* reference styling via theme
* update documentation strings

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
075505eec9 widgets/menu: introduce dedicated module menu
* new menu_view
* new menu_state
* update constants
* update main_view referencing a tab_view

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
59e7e71143 assets: update theme definitions for default_dark.ron
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
7440f7a6dd widgets/menu: introduce dedicated menu module
* new menu_view
* new menu_state
* adapt constant values for the menu structure

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
a401379f9e theme update dark
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
be9b8b1a1c widget/configuration: correcting label constant
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
70bd6b8b8d language: update
* update constants
* adopt width of languages combo box

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
1f3c6a7fff widget/policycheck: intoduce os dependent theme handling
* theme_fluent: only makes sense in windows environment

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:23 +01:00
ef26a3bf65 widgets/localization: update label constant
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:22 +01:00
fa4914839e assets: adapt default_dark theme definitions
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:46:18 +01:00
571243731d assets: adapt fluent_dark theme definitions
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:45:57 +01:00
b38a677b7b policycheck: function update
* insert copyright hint
* more descriptive import of allianzdirectcall function
* documentation update
* introduce KeyHandler in menu popup
* rename action function to `set_action`

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2021-02-28 19:45:33 +01:00
26cea8e844 widgets/configuration: break out configuration functionality
* handle widget `configuration` in dedicated subdir
* adopt constants to handle widget id's

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-05 17:43:23 +01:00
48545d2879 widgets/localization: break out as localization functionality
* handle widget `localization` in dedicated subdir
* adopt constants to handle widget id's

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-05 17:38:11 +01:00
b352f2a581 widget/policycheck: introduce key_event
* handle Escape in menu

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-03 10:27:07 +01:00
89a6842106 policycheck: introduce toggle theme
* new functions:
  - popup_menu_toggle_theme
  - set_menu_toggle_theme
  - create_menu_toggle_theme
  - messages
* rename function: menu  -> popup_menu
* reorder enum: PolicycheckAction
* new actions: SetMenuPopup, SetToggleTheme

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-02 14:00:06 +01:00
76e6e7503f Merge branch 'next' of https://gitea.networkx.de:50443/rzerres/advotracker into wip_toggle_theme_menu
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-02 09:43:32 +01:00
520b959302 structure update
* rename PolicyCheckView to PolicycheckView
* rename PolicyCheckState to PolicycheckState
* rename menu to popup_menu

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:45:27 +01:00
7d459516d9 module structure update 2
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:19:55 +01:00
c511bdd62f main: reflect new module structure
* include from assets
* get widgets into place
* introduce style extensions (theme_fluent)

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:19:55 +01:00
40f715a79a update project structure
* assets: all resources are bundled in this subdirectory
* widgets: use subdirs to group them by function
  the subdir hold their callbacks (state handling) and views
* theming: update to new theming syntax
* fonts: remove fonts that are provovided by default in OrbTK

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:19:55 +01:00
6ea1f95ef0 main_view: introduce configuration view
* allow to load and save config parameters to ron file

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:19:54 +01:00
8986812038 policycheck_view: update to 0.3.1-alpha4 changes
* lose_focus_on_activate()

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:19:54 +01:00
e0eb0c5c90 policycheck_state: update localization of menu entries
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:19:54 +01:00
a1541ae307 implement a toggle theme menu
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:15:57 +01:00
c66335951f structure update
* rename PolicyCheckView to PolicycheckView
* rename PolicyCheckState to PolicycheckState
* rename menu to popup_menu

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-11-01 20:09:45 +01:00
d0e661d5d0 module structure update 2
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-31 16:42:04 +01:00
2253c2892b main: reflect new module structure
* include from assets
* get widgets into place
* introduce style extensions (theme_fluent)

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-31 14:39:41 +01:00
8cc9ba5782 update project structure
* assets: all resources are bundled in this subdirectory
* widgets: use subdirs to group them by function
  the subdir hold their callbacks (state handling) and views
* theming: update to new theming syntax
* fonts: remove fonts that are provovided by default in OrbTK

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-31 14:23:03 +01:00
ef8b884efa main_view: introduce configuration view
* allow to load and save config parameters to ron file

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-07 03:22:51 +02:00
6b7ae9d17d policycheck_view: update to 0.3.1-alpha4 changes
* lose_focus_on_activate()

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-07 03:20:56 +02:00
f0e9014fb7 policycheck_state: update localization of menu entries
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-02 17:34:15 +02:00
0ba99b3fb2 Merge branch 'orbtk-localization' into master
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-02 12:09:56 +02:00
f0d5f82549 advotracker: bump release to 0.1.4
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-10-02 11:57:52 +02:00
d2a188eee6 policycheck: update styling, constants and localization
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-28 13:06:50 +02:00
e297c82b85 resources: references used at runtime
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-27 10:44:03 +02:00
f87ab8ce08 advotracker: implement get_lang
* readin language environment and preset the strings

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 21:12:54 +02:00
0c16237c6c callbacks: remove unused global functions
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 19:29:34 +02:00
777fff3776 locales: remove redundant locales in json file
* locales in policy_check.json are included in advotracker.json

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 19:27:30 +02:00
c949b5fe32 Cargo.toml: update package dependencies
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:53:19 +02:00
0afe1f3bf8 Nodes.toml: application settings for nodes module
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:53:19 +02:00
bf54cb2242 .env: adapt test defaults for environment variables
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:53:19 +02:00
5b79229c00 advotracker: change localization handling
* main: adapt resource path for localization information
* data/constants: Stings used in policycheck state/view
* widgets/policycheck_view: change the used localization strings
* callbacks/policycheck_state: change child ID'S to use constants and localization strings

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:53:19 +02:00
16a538a805 resources: cleanup unneeded files since
* now using ron based files for localization
* resources are referencing application path names

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:53:19 +02:00
a887ffef1f services: adapte/update used strings
* for importp module
* for export module

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:52:15 +02:00
65c2da7706 advotracker-db: update to new head
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:52:15 +02:00
0467f601f0 locales: adapt language identifiers
* use lang in logging/tracing
* typo cleanup

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-26 17:51:55 +02:00
8a50e1ea78 widget: main_view: add obtk ron based localization support
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-24 10:18:14 +02:00
c54cca5f22 main: include orbtk ron based localization
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-24 10:18:14 +02:00
bf638ac196 callbacks/policycheck_state: convert to new API (orbtk v0.3.1-alpha4)
Before
* let text = *button(&mut ctx.widget()).text();
* let text = Button::get(&mut ctx.widget()).text();
* let text = *button(&mut ctx.widget()).clone_text();
* let text = Button::get(&mut ctx.widget()).clone_text();
* button(&mut ctx.widget()).text_mut().push_str("test");
* Button::get(&mut ctx.widget()).text_mut().push_str("test");
* button(&mut ctx.widget()).set_text(String16::from("test"));
* Button::get(&mut ctx.widget()).set_text(String16::from("test"));

Now
* let text = Button::text_clone(&ctx.widget());
* Button::text_mut(&mut ctx.widget()).push_str("test");
* Button::text_set(&mut ctx.widget(), String16::from("test"));
* ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), new_width);

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-17 16:49:49 +02:00
06e68adce6 callbacks/policycheck_state: convert to new API (orbtk-alpha4)
Before
* let text = *button(&mut ctx.widget()).text();
* let text = Button::get(&mut ctx.widget()).text();
* let text = *button(&mut ctx.widget()).clone_text();
* let text = Button::get(&mut ctx.widget()).clone_text();
* button(&mut ctx.widget()).text_mut().push_str("test");
* Button::get(&mut ctx.widget()).text_mut().push_str("test");
* button(&mut ctx.widget()).set_text(String16::from("test"));
* Button::get(&mut ctx.widget()).set_text(String16::from("test"));

Now
* let text = Button::text_clone(&ctx.widget());
* Button::text_mut(&mut ctx.widget()).push_str("test");
* Button::text_set(&mut ctx.widget(), String16::from("test"));
* ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), new_width);

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-09-17 16:24:02 +02:00
645ea50350 callbacks: update commenting code in policycheck_state
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-28 11:56:22 +02:00
13d56e2e05 examples: new increment_progress_bar source
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-28 11:55:42 +02:00
ef63f62734 Main: update position
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-22 19:08:51 +02:00
5aff69c526 widgets/policycheck_view: template id's
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-22 19:03:52 +02:00
70e2e7f1e5 callbacks/policycheck_state: update theme, popup
* popup handling update
* handling of themes

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-22 19:02:18 +02:00
3697bc567a widgets/main_view: update use statement for our crate
* just a style update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-15 19:34:37 +02:00
ece95344bf Grid .add() to .push()
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-15 19:34:13 +02:00
69405aaa76 main: initialize orbtk with initialize() functions
* needed at least for wayland client

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-15 19:33:24 +02:00
cd82f62a82 widgets/policycheck: update new syntax for Grid
* Columns,Row use create() functions
* update from .add() to new .push() method

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-15 19:31:51 +02:00
eb7a3608d7 data/structures: derive PartialEq macro
* enable PartialEq needed from new wayland client backend

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-08-15 19:30:32 +02:00
b6b12c45bb u64 update
* policynumber has 10 unsigned integers. usize is 32bit on
  on 32 machines. So we need to use u64 to assign the needed ram
  space to fit numbers like '9999999999'

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 20:55:53 +02:00
9b9afc2b5a examples: advowidgets: update to upstream orbtk example
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 20:55:11 +02:00
094fb6d0ea Node.toml: adapt fonts and app options
* remove unused fonts
* correct typo in app name
* correct active font name

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 20:54:25 +02:00
f983eca9aa widgets: policycheck_view: hinting NumericBox, typo correction
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:57:06 +02:00
bceec88741 Cargo.toml: reference to upstream orbtk (branch develop)
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:57:06 +02:00
daaa544e93 main: remove unused comments
* implement lazy pointer to struct if orbtk can handle it

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:57:06 +02:00
33da48b1b1 stylesheets: use explicit theme name
* Cargo.toml: add feature
* policy_state.rs: add handling of feature for choosen theme
* advotracker_dark.ron: advotrackers dark theme
* advotracker_light.ron: advotrackers light theme

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:57:06 +02:00
046812e04f README.md: typo correction
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:57:00 +02:00
bd70ad653b main: move theming support to callback code, cleanup
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:33:22 +02:00
ac855d0a54 widgets: policycheck_view: global "lang" and styling
* use ron styling
* language variable in struct

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:33:22 +02:00
b099064776 services: imports: refine tests in allianzdirectcall.rs
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-24 19:33:14 +02:00
65bec5a4a1 callbacks: introduce theming, i18n truning, introduce menu
* global_state: use global "lang", support env
* policycheck_state: use global "lang", new menu function, ron theming

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-22 18:11:39 +02:00
276c0fb5f0 bin: policycheck: simplified core to check policy number
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-22 18:10:51 +02:00
0f97202fbb widgets: policycheck_menu: update styling
* not used, since menu is dynamically created via function

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-22 18:08:16 +02:00
e91b91a2db i18n: update constants and translation messages
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-22 18:07:43 +02:00
25de70e75c examples: remove unused code
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-22 18:07:11 +02:00
9fffb093c3 resources: stylesheets: switching to ron bases CSS
* remove unused old theme.css files
* advotracker.ron: new ron based theming style
* main.rs: extend the dark theme with our stylesheet

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-20 16:43:51 +02:00
11d12718e8 README.md: update to version 1.0.3
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:33:37 +02:00
6e4ba029b7 Cargo.toml: bump version to 0.1.3
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:21:20 +02:00
fd61f90277 callbacks: policycheck_state refine popup widget handling
* on first access, show a processing popup
* calculate the processing time
* update process status
* show processing time in popup

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:18:27 +02:00
ffa8c18efb services: imports: refine to use SystemTime
* Use standard library to calculate SystemTime and Duration
* exporse results to be accessible in orbtk views

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:18:27 +02:00
3d913e7127 widgets: policycheck_view - use constants
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:17:16 +02:00
8ca257bf5c advotracker: rename 'keys' to 'constants'
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:17:16 +02:00
6907c0c393 callbacks: progressing I18n handling
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:17:16 +02:00
9e1a1e7359 widgets: policycheck_view typo cleanup
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:17:07 +02:00
16f174d53a I18N: update translation constants
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-15 00:16:46 +02:00
4406efc955 data: define constanst to be static strings
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-14 11:11:19 +02:00
20ddd78a8d Cargo.toml: enable cross-compile to target Windows x86_64
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-14 11:09:59 +02:00
863826a294 Cargo.toml: bump version to 0.1.2
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:47 +02:00
53d8f80b75 services: import allianzdirectcall update
* use usize for counter

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:47 +02:00
555a02fcc3 structures: CsvExportRecord type update for policy_number
* policy_number: type reset to usize

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:47 +02:00
4d2427a058 callbacks: policycheck_state update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:38 +02:00
5eeb80cdd4 structure: cosmetic update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:38 +02:00
aa26e6634d widgets: policycheck_view update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:24 +02:00
19ad9198d0 data: keys: update ID's
* ID_POLICY_CHECK_DATA_COUNT_BLOCK
* ID_POLICY_CHECK_PROGRESS_BOX

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>

keys: update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:24 +02:00
e62fb8e990 I18N: translation update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-13 03:43:12 +02:00
d3d3be1442 I18N: README.md language variants (v0.1.2)
* update contents inside README.md
* provide language variant (english, german)
* document translation handling
* installation: download via git

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:27:26 +02:00
b579d039f1 advotracker: update copyright header
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:27:26 +02:00
c5334ac898 .env: test environment file
* use an .env with testing parameters

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:27:26 +02:00
224606d72e resources: new log and font to create the logo
* svg: scalable logo
* CynthoPro-Regular: font used to create text typo

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:27:26 +02:00
4e0b8166f2 callbacks: policycheck_state update
* experimental handling of a progress bar

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:27:26 +02:00
193f2de7ea widgets: update policycheck_view
* update margins
* add widget IDs
* experimental inclusion of a progress bar

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:27:21 +02:00
e2ced73db9 imports: policy_data_count as required variable
* function call will gain access

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:26:10 +02:00
09ec027e79 data: update widget static for used widget IDs
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:26:08 +02:00
656ffae9bf resources: update customer logo
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:25:49 +02:00
9753c37477 policycheck_state: import data to hashmap
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:25:49 +02:00
f503fc9713 parse_args: remove duplicate test of dotenv variables
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:25:49 +02:00
8564aaaf8d policycheck: i18n, tracing updates
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:25:46 +02:00
947e79eea4 policy_check: remove println macro calls
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
a9f7c62e3d main: lazy_static prototyping, env handling
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
c0d8e7a898 main: introduce machine specific handling
* machine_kind: differenciate depending on detected machine OS

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
7a82640fd6 main: make log level dynamic
* set the log level via environment variable

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
f9453ee18c main: suppress creation of consol window on MS Windows
* Rust applications on Windows always open a new console window
  if started by double-clicking on the executable.
* since rust 1.18 the the macro suppresses this behaviour

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
f9dd2e3797 README: update project documentation
* i18n: howto extend translations
* installation: download via git

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
ea57346119 examples: introduce advowidgets
* merge orbtk example widgets
* rename to advowidgets
* incorporate functionality of wip-orbtk branch
  - using latest material-icons-font code
  - merge bugfix to add ComboBox items
  - merge bugfix to handle ComboList

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
e7ef33ee40 examples: advowidgets: update to new api syntax
* when addressing widgets properties the new api syntax
  seems more natural. It accesses the properties via a function
  oriented notation:

  - view_name(<ctx.widget()).<entity>_mut()

  - ctx.child("<entity>").set::<type>("<field>", <new_property>)

  - <widget_class>(ctx.child(<entity)).set_<field>(<new_property>)

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:47 +02:00
5a5bbb5d5e stylesheet: add advotracker.css
* redefine resources in a new application stylesheet

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:45 +02:00
e8c7d78de3 callbacks: global_state: save data vector to ron file on disk
* new functionality
* save imported / edited data-structures persitantliy
  on disk to file in 'ron' format

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:21 +02:00
bf0ee18f55 callbacks: global_state: compiler sanitization
* use unspecific lifetimes

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:21 +02:00
b709c90682 callbacks: policy_check: update identifier for tracing
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:21 +02:00
32405504a7 widgets: main_view: activate structure init via default()
* possible, since structure provides access via orbtk

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:17 +02:00
891919b64d imports: allianzdirectcall: use array to verify on startup
* using test dataset

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:02 +02:00
40896c6b8e structures: include reference to orbtk
* make structures accessible for orbtk
* documentation update

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:23:02 +02:00
9beeaa7190 data: keys: cleanup DCES id's and properties
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:22:59 +02:00
7e604f050a locales: remove redundant allianzdirectcal
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:22:40 +02:00
ebaf05132f policycheck_state: set_visibility: make param entity non-required
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:22:36 +02:00
ce7f802d3a policycheck_view: adapt width of policy number text_box
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:22:16 +02:00
d7da1335b1 policycheck_view: brake up bigger widget definitions into sub-groups
* improve maintainability
  - make sub-entities grouped into sub-widgets
  - reference this sub-widgets from inside their parents

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:22:12 +02:00
d6703e8df6 policycheck: introduce policy_check_button_result
* after validation, show suitables glyph and corresponding text
* improve user feedback with corresponding color

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:20:52 +02:00
24b9b08566 policycheck: use material_icons_font
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:14:21 +02:00
274a96b908 policycheck: functionality update
* show count of active hashmap members in GUI
* move import call to init function
* show results of policy_number validation in GUI
* improve tracing information
* disable stdout messages via println!()

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:13:49 +02:00
65e0ce3319 policycheck: initial standalone frontend
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:13:06 +02:00
77d41f733e csv-test: bugfix missing translation string
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:13:06 +02:00
18588ce75f csv-test: remove unneeded references
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:13:06 +02:00
d5788b9848 csv-test: structure path update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:13:06 +02:00
e853975c86 services: update im/exporter and remove unused source
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:13:06 +02:00
bc161878b3 parse_args: make vektor 'viperus' explicit
* when using as a globel, this is more easy to recognize

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:13:06 +02:00
d0c7a16ac7 main_view: set id to be non-required
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:55 +02:00
5745a3bd6c advotracker: policy_state update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:28 +02:00
7196013bb2 advotracker: get correct crates and modules into scope
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:28 +02:00
1aebd4338f advotracker: link to resources
* call from binary-directory will search resource files
  in subdirecotries beneath this directory

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:28 +02:00
6f668bf4c3 advotracker: widget update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:27 +02:00
97622ba5f5 advotracker: callback: update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:27 +02:00
533ae6f8d2 .gitignore: typo correction and commenting user config settings
* we don't save config.toml in upstream

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:27 +02:00
23c1875272 database: remove stale submodule
* substitued with 'advetrackerd'

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:12:27 +02:00
02d388c14f advotracker-db: update commit refering to new head
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:11:27 +02:00
016595d702 advotrackerd: introduce new submodule
* orign: https://gitea.networkx.de:50443/rzerres/advotrackerd
* for now, we do have a Microsoft CA which isn't handled as an
  official CA.
  You need to exclude SSL verification to push/pull/clone like this:

* # git config  --file .git/modules/advotrackerd/config --list
* # git config --file .git/modules/advotrackerd/config  http.https://gitea.networkx.de:50443.sslverify false

* # git -c http.https://gitea.networkx.de:50443.sslverify=false submodule add  https://gitea.networkx.de:50443/rzerres/advotrackerd

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:49 +02:00
8506b0ce90 advotracker-db: introduce new submodule
* orign: https://gitea.networkx.de:50443/rzerres/advotracker.db
* for now, we do have a Microsoft CA which isn't handled as an
  official CA.
  You need to exclude SSL verification to push/pull/clone like this:

* # git config  --file .git/modules/advotracker-db/config --list
* # git config --file .git/modules/advotracker-db/config  http.https://gitea.networkx.de:50443.sslverify false

* # git -c http.https://gitea.networkx.de:50443.sslverify=false submodule add  https://gitea.networkx.de:50443/rzerres/advotracker-db

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:49 +02:00
74fc662a67 Cargo.toml: rebase root of local orbtk sources
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:49 +02:00
4f3a63425a Cargo.toml: update repository location
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:49 +02:00
42dcd82df2 Cargo.toml: identifier change
* use 'nwx' as company prefix

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:49 +02:00
82c1aab492 Cargo.toml: preset the default binary
* use the GUI variant 'advotracker' as the default binary

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:48 +02:00
cf375770c1 Corgo.toml: change syntax to reference dependencies
* use explicit style with braces

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:48 +02:00
da24fea764 Cargo.toml: add workspace advotracker-db
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 19:10:48 +02:00
321b868bb8 Cargo.toml: comment out orbtk/debug
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:33 +02:00
5f4d01d919 advotracker-framework: restructure source tree
* remove subdirectory backend
  new handling as new submodule advotrackerd
* remove subdirectory frontend
  new hanling as advotracker
* examples: example binaries
* locales: i18n definitions
* src/callbacks: rust state handling for widgets
* src/services: provide service methods (e.g import/export)
* src/widgets: handle frontend definitions
* src/data: provide test-data

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
8f7be15ef3 services: allianzdirectcall: update process logic
* return value: usize
* import: fill HashMap from source record
* import: fill in vector PolicyData

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
cddb47b3ad csv-test: update the .env test environment
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
56aa6ac72c csv-test: include cli flag to provide a test policy number
* TODO: viperus does not offer the input of usize/i64
  therefore we can't use big integer for now

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
bde94bcce1 csv-test: update test data
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
8a1f92e44d csv-test: integrate HashMap functionality
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
267680f547 csv-test: new minimal test datasets
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
ea4bcaabd6 data.rs: include copy macro for PolicyCode
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:19:32 +02:00
268207318d I18n: update translation patterns
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:18:41 +02:00
5dc3fa1509 Cargo.toml: update umbrella project name, rename submodules
* submodule advotrackerd: provides the database api
* submodule advotracker: the frontend app

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:16:21 +02:00
d57827ca4e examples: csv-test: new testfile that holds enough test records
* no need to parse 40MB
* ~15000 records are more then enough

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:16:16 +02:00
97a5a966d3 advotracker: services substructure
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:48 +02:00
5016cb6b47 advotracker: library definition to use as crate
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:48 +02:00
84e7a86bb3 I18N: update localization file to meet new project name
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:48 +02:00
b7e6d269dc advotracker-framework: Rename 'frontend' to advotracker
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:48 +02:00
0582c1be43 frontend: policycheck_menu
* orbtk code to handle a menu structure

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
507f13ade3 frontend: examples: pdf_check example
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
2bc37f6a24 frontend: resources: used in example code
* example advotracker: stylesheet orbtk test widgets
* example advotracker: MaterialIcons ttf font

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
985cee4f0b frontend: locales: i18n updates
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
267c4faa2c frontend: function update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
22ecaaa0fe frontend: Cargo.toml: include csv for example csv-test
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
9c2beabd33 frontend: examples: remove old orbtk examples maintained upstream
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
53702555a3 Cargo.toml: set projects framework name
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
c3e939c6bb frontend: examples: introduce csv-test
* cli to test data import and export
  - import from a csv file
  - export to a csv file

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
dd8c840cf9 fontend: examples: .env for testing
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:47 +02:00
9e65ef198a frontend: example: csv-import helper update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
6a7d9a39d1 .gitignore: update new patterns
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
3b889d24e6 frontend: Node.toml
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
a6b6f84fec frontend: example: csv-import helper
* cli to import a given csv configured text file

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
de99076e53 frontend: Cargo.toml: new dependencies
* commandline parsing: clap, viperus
* csv file handling
* envirenment variable: dotenv, envy
* i18n: locales
* serde json support
* tracing: tracing, tracing-subscriber

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
8a8941f0cf policylist: wip: view and state handling updates
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
29b3876264 policydata: wip: view and state handling updates
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
62c786b671 policycheck: wip: view and state handling updates
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
717dc9ba03 frontend: update main_view
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
d4ae415ece frontend: main: update stylesheet reference, basic geometry
* new module 'policycheck_menu'
* reference the project stylesheet
* update a default geometry

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:46 +02:00
9354ea29ab frontend: keys: update Classes, DCES entities, component values
* the elements are available as public advertised string values

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:14:39 +02:00
7600f1b8df frontend: base: update 'PROP_POLICY_LISTS'
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 14:00:01 +02:00
f3af573bd7 frontend: data: define export structure for csv files
* data need to be transfered as a csv-file attachment via email
* each row takes a semicolon separeted list of string fields
* this structure is defined as rust 'struct CSVExport'
* the struct CSVExport will reference to its child stuctures.

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 13:59:56 +02:00
e93c19aacc Cargo.toml: reference to orbtk's local repository
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 13:55:10 +02:00
930d916e3f frontend: resources: assets/resources used inside the frontend
* images: referenced image files
* fonts: rendering elements
* stylesheets: theme definition using CSS subsystem

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 13:55:09 +02:00
2159cc0c24 frontend: base_state: global methods implemented as a trait
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 13:55:09 +02:00
36e90081b5 frontend: keys: static variables used in themes
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 13:55:09 +02:00
a59d364b62 advotracker: delete unused lib definition
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
2020-07-12 13:54:41 +02:00
231 changed files with 11333 additions and 4490 deletions

11
.gitmodules vendored
View File

@@ -1,9 +1,6 @@
[submodule "backend"]
path = backend
url = ./backend/
[submodule "advotracker-db"]
path = advotracker-db
url = https://gitea.networkx.de:50443/rzerres/advotracker-db
[submodule "advotrackerdb"]
path = crates/advotrackerdb
url = https://gitea.networkx.de:50443/rzerres/advotrackerdb
[submodule "advotrackerd"]
path = advotrackerd
path = crates/advotrackerd
url = https://gitea.networkx.de:50443/rzerres/advotrackerd

View File

@@ -1,17 +1,46 @@
[package]
name = "advotracker-framework"
name = "advotracker"
version = "0.1.0"
authors = ["Ralf Zerres <ralf.zerres@networkx.de>"]
description = "Supports lawyers to capture relevant data encountered during an online legal advice\n"
repository = "https://github.com/rzerres/advotracker"
homepage = "https://github.com/rzerres/advotracker"
repository = "https://gitea.networkx.de:50443/rzerres/advotracker"
homepage = "https://gitea.networkx.de:50443/rzerres/advotracker"
documentation = "https://docs.rs/advotracker"
readme = "README.md"
license = "0BSD OR MIT"
keywords = [
"advotracker",
"lawyer",
]
edition = "2018"
publish = false
#default-run = "crates/advotracker_client"
[dependencies]
advotrackerdb = { version = "0.1.0-alpha1", path = "crates/advotrackerdb" }
advotrackerd = { version = "0.1.0-alpha1", path = "crates/advotrackerd", default-features = false }
advotracker_client = { version = "0.1.5-alpha2", path = "crates/advotracker_client", default-features = false }
[features]
default = ["sqlite"]
# enable optional db backends
sqlite = []
#sqlite = ["advotrackerdb_sqlite"]
#postgresql = ["advotrackerdb_pstgresql"]
[profile.dev]
#opt-level = 0
opt-level = 1
incremental = true
debug = true
lto = false
codegen-units = 5
panic = 'unwind'
overflow-checks = true
[profile.release]
incremental = true
panic = "abort"
lto = true
codegen-units=1
@@ -21,15 +50,6 @@ opt-level="s"
# optimize to smallest size
#opt-level = "z"
[profile.dev]
opt-level = 0
debug = true
lto = false
codegen-units = 5
panic = 'unwind'
incremental = true
overflow-checks = true
[profile.test]
opt-level = 0
debug = 2
@@ -43,8 +63,7 @@ overflow-checks = true
[workspace]
members = [
"advotrackerd",
"advotracker-db",
"advotracker",
"advotracker_qml",
"crates/advotrackerd",
"crates/advotrackerdb",
"crates/advotracker_client",
]

147
README.md
View File

@@ -1,24 +1,145 @@
<!-- AdvoTracker.markdown -->
<!-- version: 1.1 -->
<!-- AdvoTracker README.md -->
<!-- version: 0.1.3 -->
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
<!-- markdown-toc end -->
# AdvoTracker - Hotline tool für Advokaten #
## About
AdvoTracker unterstützt Anwälte bei der Erfassung von Mandatsdaten zu einer Online-Beratung.
`advotracker` supports lawyers to capture relevant data encountered during an online
legal advice.
Das Tool wurde als multi-Pattform Anwendung konzipiert.
The application components are implemented using the programming language *Rust*.
The graphical user interface (GUI) uses the class-lib *OrbTk*, which is natively
encoded in *Rust* as well.
Als Programmiersprache wird *Rust* verwendet. Die Implementierung der
GUI Elemente erfolgt mit der Klassenbibliothek *OrbTk*.
`advotracker` can be deployed on every target operating system that is officialy
supported by the `OrbTK` toolkit. Currently included are:
Als Dokumentationsquellen wird auf die offiziellen Projektseiten [Rust Book][^1] und [OrbTk][^2] verwiesen.
* macOS
* Linux
* openBSD
* Redox OS
* Web-Browser
* Windows
# Internationalisierung #
Porting to and in activ development are:
In allen Dialogen und Meldungen erfolgt die Ausgabe entsprechend der Sprache, die als
aktive Sprache in der Umgebungsvariable definiert ist (default: LANG = en_US.UTF8 ) ausgewählt.
* Android
* iOS
* ubuntu Touch
Reference is made to the official project pages of [Rust Book][^1] and [OrbTk][^2]
as documentation sources.
## Internationalization
Dialogs and messages generated inside the application will respect the system language
of the active user. This is adaptable via the environment variable
(default: LANG = en_US.UTF8 or LANG = C).
Within the source code you can find translated constants in the subdirectory 'locales'
(<crate-root>/src/locales/advotracker.json).
For every supported language-string, you will find a block starting with the
generic message code, followed by the target language translation. Translation lines
are identified by its ISO Code (e.g. de_DE.UTF8, es_ES.UTF8).
## Installation from source code
You can either download the `advotracker` source code as a Zip-File or using `git`
from projects repositoy URL.
The source code is subdiveded in three crates:
* advotracker
* advotrackerd
* advotrackerdb
Currently the given WEB-URL certificate is signed by a Microsoft CA.
Since this CA can't be verified from offical CA-lists you have to proceed as follows:
```sh
$ cd <your_path>
$ git -c http.https://gitea.networkx.de:50443.sslverify=false \
clone --recurse-submodules --jobs=10 \
https://gitea.networkx.de:50443/rzerres/advotracker
```
To compile the target binary code, you have to use rusts toolchain.
If this isn't already installed on your development system, please go ahead
and either use the official supported installation tool from the rust communtiy
([rustup][^3]). As an alternitiv, you can download and install the compiler package
using your systems package manager.
### native operating system binaries
A binary compatible with your target operating system will be compiled
with the following command:
```sh
$ cd <advotracker_root>
$ cargo build --release
```
The toolchain also allows to cross-compile for other operating systems. Please
consult the rust documentation for further instructions.
### web-browser application
- **Prerequisits**
To run as a browser, electron or cordova app, you have to install cargo-node:
```sh
cargo install -f cargo-node
```
cargo-node will require a working version of `npm` (>=v6.9.0).
You may download [Node.js][^4], which includes npm as well.
- **Start as browser app**
You can run `Advotracker` as a web-browser app with the following call.
Once the app is running, you can connect to it opening the given URL
in you Web-Browser.
```sh
cargo node run --target browser --bin advotracker
```
- **Start as electron app**
```sh
cargo node run --target electron advotracker
```
- **Start as android app**
```sh
cargo node run --target android --bin advotracker
```
## Build and run documentation
You can build and view the latest documentation by executing the following command:
```sh
cargo doc --no-deps --open
```
This will render the web-pages, collecting the documentation paragraphs in the
source-code. When finished, it will open a new tab in your web browser
presenting the documentation.
## Installation
To install the compiled binary you can use rust package manager `cargo` as well.
```sh
cd <advotracker_root>
$ cargo install
```
In addition, you will need to copy the resource folder into your target directory.
This will provide the access to used fonts, images und stylesheets.
---
@@ -28,7 +149,7 @@ This work is licensed under a [Creative Common License 4.0][License-CC_BY]
![Creative Common Logo][Logo-CC_BY]
© 2020 Ralf Zerres, Networkx GmbH
<EFBFBD> 2020-2021 Ralf Zerres, Networkx GmbH
---
@@ -36,3 +157,5 @@ Foodnotes
[^1]: Rust Book: https://doc.rust-lang.org/book/
[^2]: OrbTK GUI: https://gitlab.redox-os.org/redox-os/orbtk
[^3]: Rustup: https://rustup.rs/
[^4]: Node.js: https://nodejs.org/dist/v10.16.3/

Submodule advotracker-db deleted from 5534da7f29

View File

@@ -1,14 +0,0 @@
+[[apps]]
+name = "advotracker_frontend"
+width = 800
+height = 600
[[apps.fonts]]
font_family = "Material Icons"
src = "fonts/MaterialIcons-Regular.ttf"
[[apps.fonts]]
font_family = "Roboto Regular"
src = "fonts/Roboto-Regular.ttf"
[[apps.fonts]]
font_family = "Roboto Medium"
src = "fonts/Roboto-Medium.ttf"

View File

@@ -1,235 +0,0 @@
use orbtk::prelude::*;
use orbtk::theme::DEFAULT_THEME_CSS;
//use orbtk::theme::LIGHT_THEME_EXTENSION_CSS;
//#[cfg(feature = "light-theme")]
static WIDGET_EXT: &'static str = include_str!("../resources/stylesheets/policyholder_check.css");
fn get_theme() -> ThemeValue {
//ThemeValue::create_from_css(LIGHT_THEME_EXTENSION_CSS)
ThemeValue::create_from_css(DEFAULT_THEME_CSS)
.extension_css(WIDGET_EXT)
.build()
}
#[derive(Debug, Copy, Clone)]
enum Action {
ClearText,
EntryActivated(Entity),
EntryChanged(Entity),
//ValueChanged(Entity),
ValueOk,
ValueNone,
}
#[derive(AsAny)]
pub struct MainViewState {
action: Option<Action>,
}
impl Default for MainViewState {
fn default() -> Self {
MainViewState { action: None }
}
}
impl MainViewState {
fn action(&mut self, action: impl Into<Option<Action>>) {
self.action = action.into();
}
}
impl State for MainViewState {
fn update(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
if let Some(action) = self.action {
match action {
Action::ClearText => {
ctx.widget().set("policynumber", String16::from(""));
}
Action::ValueOk => {
//let mut text_box = TextBox::get(ctx.get_widget(entity));
//let text = text_box.text_mut();
//ctx.widget().set("policynumber", background("#4d4c4c"));
}
Action::ValueNone => {
//let mut text_box = TextBox::get(ctx.get_widget(entity));
//let text = text_box.text_mut();
//ctx.widget().set("policynumber", background("#5b0f22"));
}
Action::EntryActivated(entity) => {
let mut text_box = TextBox::get(ctx.get_widget(entity));
let text = text_box.text_mut();
//let mut widget = ctx.get_widget(entity);
//let text = widget.get_mut::<String16>("text");
println!("got value policynumber: {}", text);
//text.clear();
}
Action::EntryChanged(entity) => {
let widget = ctx.get_widget(entity);
let text = widget.get::<String16>("text");
println!("entry changed: {}", text);
}
// Action::ValueChanged(entity) => {
// let val =
// ((*ctx.get_widget(entity).get::<f64>("val")).floor() as i32).to_string();
// ctx.child("value_text").set("text", String16::from(val));
//}
}
self.action = None;
}
}
}
fn create_header(ctx: &mut BuildContext, text: &str) -> Entity {
TextBlock::new()
.text(text)
.element("text-block")
.class("h1")
.build(ctx)
}
widget!(
MainView<MainViewState> {
sum_policynumbers: usize,
policynumber: String16,
result: String16
}
);
impl Template for MainView {
fn template(self, id: Entity, ctx: &mut BuildContext) -> Self {
self.name("MainView").child(
//.result("Anzahl Versicherungsnummern: 0")
//.result("Policyholders count: 0").sum_policynumbers(0)
//.sum_policynumbers(0)
Grid::new()
.background("#fafafa")
//.width(200.0)
//.height(360.0)
.columns(
Columns::new()
.add(150.0)
.add("*")
//.add(120.0)
//.add("auto")
.add(150.0)
.build(),
)
.rows(
Rows::new()
.add("*")
.add("*")
.build(),
)
.child(
Grid::new()
.element("policyholder_check")
.margin((4.0, 24.0, 24.0, 4.0))
.min_width(180.0)
.min_height(80.0)
.attach(Grid::column(1))
.attach(Grid::row(0))
.child(
Stack::new()
.spacing(8.0)
.orientation("vertical")
.h_align("center")
//.child(create_header(ctx, "Validation number policyholder"))
.child(create_header(ctx, "Validierung Versicherungsnummer"))
.child(
TextBox::new()
//.class("text_box")
// overwriting the class defaults
/* .background("transparent")
.foreground("#9dafbf")
.background("#fafafa")
/* .foreground(colors::LINK_WATER_COLOR) */
.border_brush("#5b0f22")
.border_width(5)
.border_radius(15) */
//.name("policynumber")
.focused(true)
.water_mark("Versicherungs-Nr...")
//.text("Number policyholder", id)
.text(("policynumber", id))
.font_size(24.0)
.h_align("stretch")
.on_activate(move |states, entity| {
state(id, states).action(Action::EntryActivated(entity));
})
.on_changed(move |states, entity| {
state(id, states).action(Action::EntryChanged(entity));
})
.build(ctx),
)
.child(
TextBlock::new()
.element("text-block")
.id("result")
.min_width(80.0)
.max_width(180.0)
//.text("Result:")
.text("Ergebnis:")
.build(ctx),
)
.build(ctx),
)
.build(ctx)
)
.child(
Grid::new()
.element("logo_customer")
.margin((9.0, 16.0, 16.0, 9.0))
.attach(Grid::column(0))
.attach(Grid::row(1))
.v_align("end")
.child(
ImageWidget::new()
.image("./resources/images/hiedemann_logo.png")
.build(ctx),
)
.build(ctx),
)
.child(
Grid::new()
.element("logo_vendor")
.margin((9.0, 16.0, 16.0, 9.0))
.attach(Grid::column(2))
.attach(Grid::row(1))
.v_align("end")
.child(
ImageWidget::new()
.image("./resources/images/networkx_logo.png")
.build(ctx),
)
.build(ctx),
)
.build(ctx),
) // MainView
}
}
fn main() {
Application::new()
.window(|ctx| {
Window::new()
//.title("OrbTk - Policyholder checker example")
.name("MainWindow")
.title("AdvoTracker - Versicherungsnummern")
.position((-500.0, -100.0))
.size(480.0, 260.0)
.min_width(460.0)
.min_height(180.0)
.resizeable(true)
.theme(get_theme())
.child(MainView::new().build(ctx))
.build(ctx)
})
.run();
}
// helper to request MainViewState
fn state<'a>(id: Entity, states: &'a mut StatesContext) -> &'a mut MainViewState {
states.get_mut(id)
}

View File

@@ -1,32 +0,0 @@
.header {
background: #444e55;
}
.content {
background: #3b434a;
}
text_box {
background: transparent;
border-width: 0;
color: #9dafbf;
font-size: 16;
}
#input {
font-size: 16;
}
text-block {
font-size: 42;
color: #dfebf5;
}
#input {
background: transparent;
}
button {
border-radius: 1;
font-size: 20;
}

View File

@@ -1,15 +0,0 @@
.header {
background: #ffffff;
}
.content {
background: #fafafa;
}
text_box {
color: #4d4c4c;
}
text-block {
color: #4d4c4c;
}

View File

@@ -1,581 +0,0 @@
<!DOCTYPE html>
<html lang="de-DE">
<head data-suburl="">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>flovanco/doit: Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk. - static/fonts/MaterialIcons-Regular.ttf at master - doit - Codeberg.org</title>
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials">
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/serviceworker.js').then(function(registration) {
console.info('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.info('ServiceWorker registration failed: ', err);
});
}
</script>
<meta name="theme-color" content="#6cc644">
<meta name="author" content="flovanco" />
<meta name="description" content="doit - Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk." />
<meta name="keywords" content="git,non-profit,foss,oss,free,software,open,source,code,hosting">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw" />
<meta name="_suburl" content="" />
<script>
/*
@licstart The following is the entire license notice for the
JavaScript code in this page.
Copyright (c) 2016 The Gitea Authors
Copyright (c) 2015 The Gogs Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---
Licensing information for additional javascript libraries can be found at:
{{StaticUrlPrefix}}/vendor/librejs.html
@licend The above is the entire license notice
for the JavaScript code in this page.
*/
</script>
<script>
window.config = {
StaticUrlPrefix: ''
}
</script>
<link rel="shortcut icon" href="/img/favicon.png" />
<link rel="mask-icon" href="/img/gitea-safari.svg" color="#609926">
<link rel="preload" href="/vendor/assets/font-awesome/css/font-awesome.min.css" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/vendor/assets/font-awesome/css/font-awesome.min.css"></noscript>
<link rel="stylesheet" href="/vendor/assets/octicons/octicons.min.css">
<link rel="stylesheet" href="/vendor/plugins/fomantic/semantic.min.css?v=6b0a0a50c7fb0aaef957cb0ab4f596e7">
<link rel="stylesheet" href="/css/index.css?v=6b0a0a50c7fb0aaef957cb0ab4f596e7">
<noscript>
<style>
.dropdown:hover > .menu { display: block; }
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
</style>
</noscript>
<link rel="stylesheet" href="/vendor/plugins/highlight/github.css">
<style class="list-search-style"></style>
<script src="/vendor/plugins/promise-polyfill/polyfill.min.js"></script>
<script src="/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
<script src="/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
<meta property="og:title" content="doit" />
<meta property="og:url" content="https://codeberg.org/flovanco/doit" />
<meta property="og:description" content="Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk." />
<meta property="og:type" content="object" />
<meta property="og:image" content="https://codeberg.org/user/avatar/flovanco/-1" />
<meta property="og:site_name" content="Codeberg.org" />
<link rel="stylesheet" href="/codeberg.css">
</head>
<body>
<div class="full height">
<noscript>Diese Webseite funktioniert besser mit JavaScript.</noscript>
<div class="ui top secondary stackable main menu following bar light">
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="/">
<img class="ui mini image" src="/img/gitea-sm.png">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>
<a class="item " href="/">Startseite</a>
<a class="item " href="/explore/repos">Erkunden</a>
<a class="item" href="/Codeberg/Community/issues">Codeberg Issues</a>
<a class="item" href="https://blog.codeberg.org">Blog</a>
<a class="item" href="https://join.codeberg.org/">Join Codeberg e.V.</a>
<a class="item" href="https://liberapay.com/codeberg/donate">Donate</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">Hilfe</a>
<div class="right stackable menu">
<a class="item" href="/user/sing_up">
<i class="octicon octicon-person"></i> Registrieren
</a>
<a class="item" rel="nofollow" href="/user/login?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fMaterialIcons-Regular.ttf">
<i class="octicon octicon-sign-in"></i> Anmelden
</a>
</div>
</div>
</div>
<div class="repository file list">
<div class="header-wrapper">
<div class="ui container">
<div class="repo-header">
<div class="ui huge breadcrumb repo-title">
<i class="mega-octicon octicon-repo"></i>
<a href="/flovanco">flovanco</a>
<div class="divider"> / </div>
<a href="/flovanco/doit">doit</a>
</div>
<div class="repo-buttons">
<form method="post" action="/flovanco/doit/action/watch?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fMaterialIcons-Regular.ttf">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<div class="ui labeled button" tabindex="0">
<button type="submit" class="ui compact basic button">
<i class="icon fa-eye-slash"></i>Beobachten
</button>
<a class="ui basic label" href="/flovanco/doit/watchers">
1
</a>
</div>
</form>
<form method="post" action="/flovanco/doit/action/star?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fMaterialIcons-Regular.ttf">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<div class="ui labeled button" tabindex="0">
<button type="submit" class="ui compact basic button">
<i class="icon star outline"></i>Favorisieren
</button>
<a class="ui basic label" href="/flovanco/doit/stars">
1
</a>
</div>
</form>
<div class="ui labeled button " tabindex="0">
<a class="ui compact basic button poping up" data-content="Bitte melde dich an, um dieses Repository zu forken." rel="nofollow" href="/user/login?redirect_to=/repo/fork/3183" data-position="top center" data-variation="tiny">
<i class="octicon octicon-repo-forked"></i>Fork
</a>
<a class="ui basic label" href="/flovanco/doit/forks">
0
</a>
</div>
</div>
</div>
</div>
<div class="ui tabs container">
<div class="ui tabular stackable menu navbar">
<a class="active item" href="/flovanco/doit">
<i class="octicon octicon-code"></i> Code
</a>
<a class=" item" href="/flovanco/doit/issues">
<i class="octicon octicon-issue-opened"></i> Issues <span class="ui blue small label">4</span>
</a>
<a class=" item" href="/flovanco/doit/pulls">
<i class="octicon octicon-git-pull-request"></i> Pull-Requests <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/flovanco/doit/releases">
<i class="octicon octicon-tag"></i> Releases <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/flovanco/doit/wiki" >
<i class="octicon octicon-book"></i> Wiki
</a>
<a class=" item" href="/flovanco/doit/activity">
<i class="octicon octicon-pulse"></i> Aktivität
</a>
</div>
</div>
<div class="ui tabs divider"></div>
</div>
<div class="ui container">
<div class="ui repo-description">
<div id="repo-desc">
<span class="description has-emoji">Task app based on OrbTk <a href="https://gitlab.redox-os.org/redox-os/orbtk" rel="nofollow">https://gitlab.redox-os.org/redox-os/orbtk</a>.</span>
<a class="link" href=""></a>
</div>
</div>
<div class="ui" id="repo-topics">
</div>
<div class="hide" id="validate_prompt">
<span id="count_prompt">Du kannst nicht mehr als 25 Themen auswählen</span>
<span id="format_prompt">Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.</span>
</div>
<div class="ui segment sub-menu">
<div class="ui two horizontal center link list">
<div class="item">
<a class="ui" href="/flovanco/doit/commits/branch/master"><i class="octicon octicon-history"></i> <b>57</b> Commits</a>
</div>
<div class="item">
<a class="ui" href="/flovanco/doit/branches/"><i class="octicon octicon-git-branch"></i> <b>2</b> Branches</a>
</div>
<div class="item">
<a class="ui" href="#"><i class="octicon octicon-database"></i> <b>922KB</b></a>
</div>
</div>
</div>
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
<div class="fitted item choose reference">
<div class="ui floating filter dropdown custom" data-can-create-branch="false" data-no-results="Keine Ergebnisse verfügbar.">
<div class="ui basic small compact button" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible">
<span class="text">
<i class="octicon octicon-git-branch"></i>
Branch:
<strong>master</strong>
</span>
<i class="dropdown icon"></i>
</div>
<div class="data" style="display: none" data-mode="branches">
<div class="item branch selected" data-url="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf">master</div>
<div class="item branch " data-url="/flovanco/doit/src/branch/overview/static/fonts/MaterialIcons-Regular.ttf">overview</div>
</div>
<div class="menu transition" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
<div class="ui icon search input">
<i class="filter icon"></i>
<input name="search" ref="searchField" v-model="searchTerm" @keydown="keydown($event)" placeholder="Branch oder Tag filtern...">
</div>
<div class="header branch-tag-choice">
<div class="ui grid">
<div class="two column row">
<a class="reference column" href="#" @click="mode = 'branches'; focusSearchField()">
<span class="text" :class="{black: mode == 'branches'}">
<i class="octicon octicon-git-branch"></i> Branches
</span>
</a>
<a class="reference column" href="#" @click="mode = 'tags'; focusSearchField()">
<span class="text" :class="{black: mode == 'tags'}">
<i class="reference tags icon"></i> Tags
</span>
</a>
</div>
</div>
</div>
<div class="scrolling menu" ref="scrollContainer">
<div v-for="(item, index) in filteredItems" :key="item.name" class="item" :class="{selected: item.selected, active: active == index}" @click="selectItem(item)" :ref="'listItem' + index">${ item.name }</div>
<div class="item" v-if="showCreateNewBranch" :class="{active: active == filteredItems.length}" :ref="'listItem' + filteredItems.length">
<a href="#" @click="createNewBranch()">
<div>
<i class="octicon octicon-git-branch"></i>
Erstelle Branch <strong>${ searchTerm }</strong>
</div>
<div class="text small">
von „master“
</div>
</a>
<form ref="newBranchForm" action="/flovanco/doit/branches/_new/branch/master" method="post">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<input type="hidden" name="new_branch_name" v-model="searchTerm">
</form>
</div>
</div>
<div class="message" v-if="showNoResults">${ noResults }</div>
</div>
</div>
</div>
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="/flovanco/doit/src/branch/master" title="doit">doit</a><span class="divider">/</span><span class="section"><a href="/flovanco/doit/src/branch/master/static" title="static">static</a></span><span class="divider">/</span><span class="section"><a href="/flovanco/doit/src/branch/master/static/fonts" title="fonts">fonts</a></span><span class="divider">/</span><span class="active section" title="MaterialIcons-Regular.ttf">MaterialIcons-Regular.ttf</span></span></div>
<div class="right fitted item" id="file-buttons">
<div class="ui tiny blue buttons">
</div>
</div>
<div class="fitted item">
</div>
<div class="fitted item">
</div>
</div>
<div class="tab-size-8 non-diff-file-content">
<h4 class="file-header ui top attached header">
<div class="file-header-left">
<div class="file-info text grey normal mono">
<div class="file-info-entry">
125KB
</div>
</div>
</div>
<div class="file-header-right">
<div class="ui right file-actions">
<div class="ui buttons">
<a class="ui button" href="/flovanco/doit/raw/branch/master/static/fonts/MaterialIcons-Regular.ttf">Originalformat</a>
<a class="ui button" href="/flovanco/doit/src/commit/417acaf7ac867ed47ab73e7e66f07f15f1f124cc/static/fonts/MaterialIcons-Regular.ttf">Permalink</a>
<a class="ui button" href="/flovanco/doit/commits/branch/master/static/fonts/MaterialIcons-Regular.ttf">Verlauf</a>
</div>
<i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="Binärdateien können nicht im Webinterface bearbeitet werden." data-position="bottom center" data-variation="tiny inverted"></i>
<i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="Du benötigst Schreibzugriff, um Änderungen an dieser Datei vorzuschlagen oder vorzunehmen." data-position="bottom center" data-variation="tiny inverted"></i>
</div>
</div>
</h4>
<div class="ui attached table unstackable segment">
<div class="file-view has-emoji">
<div class="view-raw ui center">
<a href="/flovanco/doit/raw/branch/master/static/fonts/MaterialIcons-Regular.ttf" rel="nofollow" class="btn btn-gray btn-radius">Originalformat anzeigen</a>
</div>
</div>
</div>
</div>
<script>
function submitDeleteForm() {
var message = prompt("delete_confirm_message\n\ndelete_commit_summary", "Delete ''");
if (message != null) {
$("#delete-message").val(message);
$("#delete-file-form").submit()
}
}
</script>
</div>
</div>
</div>
<footer>
<div class="ui container">
<div class="ui left">
</div>
<div class="ui right links">
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">Deutsch</div>
<div class="menu">
<a lang="de-DE" class="item active selected" href="#">Deutsch</a>
<a lang="en-US" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=en-US">English</a>
<a lang="zh-CN" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=zh-CN">简体中文</a>
<a lang="zh-HK" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=zh-HK">繁體中文(香港)</a>
<a lang="zh-TW" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=zh-TW">繁體中文(台灣)</a>
<a lang="fr-FR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=fr-FR">français</a>
<a lang="nl-NL" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=nl-NL">Nederlands</a>
<a lang="lv-LV" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=lv-LV">latviešu</a>
<a lang="ru-RU" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=ru-RU">русский</a>
<a lang="uk-UA" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=uk-UA">Українська</a>
<a lang="ja-JP" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=ja-JP">日本語</a>
<a lang="es-ES" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=es-ES">español</a>
<a lang="pt-BR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=pt-BR">português do Brasil</a>
<a lang="pl-PL" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=pl-PL">polski</a>
<a lang="bg-BG" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=bg-BG">български</a>
<a lang="it-IT" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=it-IT">italiano</a>
<a lang="fi-FI" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=fi-FI">suomi</a>
<a lang="tr-TR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=tr-TR">Türkçe</a>
<a lang="cs-CZ" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=cs-CZ">čeština</a>
<a lang="sr-SP" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=sr-SP">српски</a>
<a lang="sv-SE" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=sv-SE">svenska</a>
<a lang="ko-KR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/MaterialIcons-Regular.ttf?lang=ko-KR">한국어</a>
</div>
</div>
<a href="/vendor/librejs.html" data-jslicense="1">JavaScript licenses</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/PrivacyPolicy.md">Privacy Policy</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/Satzung.md">Bylaws/Satzung</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/Imprint.md">Imprint/Impressum</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/TermsOfUse.md">Terms of Use</a>
</div>
</div>
</footer>
<script src="/vendor/plugins/jquery/jquery.min.js?v=3.4.1"></script>
<script src="/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1"></script>
<script src="/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>
<script src="/vendor/plugins/highlight/highlight.pack.js"></script>
<script src="/vendor/plugins/emojify/emojify.custom.js"></script>
<script src="/vendor/plugins/clipboard/clipboard.min.js"></script>
<script src="/vendor/plugins/vue/vue.min.js"></script>
<script src="/vendor/plugins/fomantic/semantic.min.js?v=6b0a0a50c7fb0aaef957cb0ab4f596e7"></script>
<script src="/js/index.js?v=6b0a0a50c7fb0aaef957cb0ab4f596e7"></script>
</body>
</html>

View File

@@ -1,581 +0,0 @@
<!DOCTYPE html>
<html lang="de-DE">
<head data-suburl="">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>flovanco/doit: Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk. - static/fonts/Roboto-Medium.ttf at master - doit - Codeberg.org</title>
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials">
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/serviceworker.js').then(function(registration) {
console.info('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.info('ServiceWorker registration failed: ', err);
});
}
</script>
<meta name="theme-color" content="#6cc644">
<meta name="author" content="flovanco" />
<meta name="description" content="doit - Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk." />
<meta name="keywords" content="git,non-profit,foss,oss,free,software,open,source,code,hosting">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw" />
<meta name="_suburl" content="" />
<script>
/*
@licstart The following is the entire license notice for the
JavaScript code in this page.
Copyright (c) 2016 The Gitea Authors
Copyright (c) 2015 The Gogs Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---
Licensing information for additional javascript libraries can be found at:
{{StaticUrlPrefix}}/vendor/librejs.html
@licend The above is the entire license notice
for the JavaScript code in this page.
*/
</script>
<script>
window.config = {
StaticUrlPrefix: ''
}
</script>
<link rel="shortcut icon" href="/img/favicon.png" />
<link rel="mask-icon" href="/img/gitea-safari.svg" color="#609926">
<link rel="preload" href="/vendor/assets/font-awesome/css/font-awesome.min.css" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/vendor/assets/font-awesome/css/font-awesome.min.css"></noscript>
<link rel="stylesheet" href="/vendor/assets/octicons/octicons.min.css">
<link rel="stylesheet" href="/vendor/plugins/fomantic/semantic.min.css?v=6b0a0a50c7fb0aaef957cb0ab4f596e7">
<link rel="stylesheet" href="/css/index.css?v=6b0a0a50c7fb0aaef957cb0ab4f596e7">
<noscript>
<style>
.dropdown:hover > .menu { display: block; }
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
</style>
</noscript>
<link rel="stylesheet" href="/vendor/plugins/highlight/github.css">
<style class="list-search-style"></style>
<script src="/vendor/plugins/promise-polyfill/polyfill.min.js"></script>
<script src="/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
<script src="/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
<meta property="og:title" content="doit" />
<meta property="og:url" content="https://codeberg.org/flovanco/doit" />
<meta property="og:description" content="Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk." />
<meta property="og:type" content="object" />
<meta property="og:image" content="https://codeberg.org/user/avatar/flovanco/-1" />
<meta property="og:site_name" content="Codeberg.org" />
<link rel="stylesheet" href="/codeberg.css">
</head>
<body>
<div class="full height">
<noscript>Diese Webseite funktioniert besser mit JavaScript.</noscript>
<div class="ui top secondary stackable main menu following bar light">
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="/">
<img class="ui mini image" src="/img/gitea-sm.png">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>
<a class="item " href="/">Startseite</a>
<a class="item " href="/explore/repos">Erkunden</a>
<a class="item" href="/Codeberg/Community/issues">Codeberg Issues</a>
<a class="item" href="https://blog.codeberg.org">Blog</a>
<a class="item" href="https://join.codeberg.org/">Join Codeberg e.V.</a>
<a class="item" href="https://liberapay.com/codeberg/donate">Donate</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">Hilfe</a>
<div class="right stackable menu">
<a class="item" href="/user/sing_up">
<i class="octicon octicon-person"></i> Registrieren
</a>
<a class="item" rel="nofollow" href="/user/login?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fRoboto-Medium.ttf">
<i class="octicon octicon-sign-in"></i> Anmelden
</a>
</div>
</div>
</div>
<div class="repository file list">
<div class="header-wrapper">
<div class="ui container">
<div class="repo-header">
<div class="ui huge breadcrumb repo-title">
<i class="mega-octicon octicon-repo"></i>
<a href="/flovanco">flovanco</a>
<div class="divider"> / </div>
<a href="/flovanco/doit">doit</a>
</div>
<div class="repo-buttons">
<form method="post" action="/flovanco/doit/action/watch?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fRoboto-Medium.ttf">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<div class="ui labeled button" tabindex="0">
<button type="submit" class="ui compact basic button">
<i class="icon fa-eye-slash"></i>Beobachten
</button>
<a class="ui basic label" href="/flovanco/doit/watchers">
1
</a>
</div>
</form>
<form method="post" action="/flovanco/doit/action/star?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fRoboto-Medium.ttf">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<div class="ui labeled button" tabindex="0">
<button type="submit" class="ui compact basic button">
<i class="icon star outline"></i>Favorisieren
</button>
<a class="ui basic label" href="/flovanco/doit/stars">
1
</a>
</div>
</form>
<div class="ui labeled button " tabindex="0">
<a class="ui compact basic button poping up" data-content="Bitte melde dich an, um dieses Repository zu forken." rel="nofollow" href="/user/login?redirect_to=/repo/fork/3183" data-position="top center" data-variation="tiny">
<i class="octicon octicon-repo-forked"></i>Fork
</a>
<a class="ui basic label" href="/flovanco/doit/forks">
0
</a>
</div>
</div>
</div>
</div>
<div class="ui tabs container">
<div class="ui tabular stackable menu navbar">
<a class="active item" href="/flovanco/doit">
<i class="octicon octicon-code"></i> Code
</a>
<a class=" item" href="/flovanco/doit/issues">
<i class="octicon octicon-issue-opened"></i> Issues <span class="ui blue small label">4</span>
</a>
<a class=" item" href="/flovanco/doit/pulls">
<i class="octicon octicon-git-pull-request"></i> Pull-Requests <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/flovanco/doit/releases">
<i class="octicon octicon-tag"></i> Releases <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/flovanco/doit/wiki" >
<i class="octicon octicon-book"></i> Wiki
</a>
<a class=" item" href="/flovanco/doit/activity">
<i class="octicon octicon-pulse"></i> Aktivität
</a>
</div>
</div>
<div class="ui tabs divider"></div>
</div>
<div class="ui container">
<div class="ui repo-description">
<div id="repo-desc">
<span class="description has-emoji">Task app based on OrbTk <a href="https://gitlab.redox-os.org/redox-os/orbtk" rel="nofollow">https://gitlab.redox-os.org/redox-os/orbtk</a>.</span>
<a class="link" href=""></a>
</div>
</div>
<div class="ui" id="repo-topics">
</div>
<div class="hide" id="validate_prompt">
<span id="count_prompt">Du kannst nicht mehr als 25 Themen auswählen</span>
<span id="format_prompt">Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.</span>
</div>
<div class="ui segment sub-menu">
<div class="ui two horizontal center link list">
<div class="item">
<a class="ui" href="/flovanco/doit/commits/branch/master"><i class="octicon octicon-history"></i> <b>57</b> Commits</a>
</div>
<div class="item">
<a class="ui" href="/flovanco/doit/branches/"><i class="octicon octicon-git-branch"></i> <b>2</b> Branches</a>
</div>
<div class="item">
<a class="ui" href="#"><i class="octicon octicon-database"></i> <b>922KB</b></a>
</div>
</div>
</div>
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
<div class="fitted item choose reference">
<div class="ui floating filter dropdown custom" data-can-create-branch="false" data-no-results="Keine Ergebnisse verfügbar.">
<div class="ui basic small compact button" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible">
<span class="text">
<i class="octicon octicon-git-branch"></i>
Branch:
<strong>master</strong>
</span>
<i class="dropdown icon"></i>
</div>
<div class="data" style="display: none" data-mode="branches">
<div class="item branch selected" data-url="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf">master</div>
<div class="item branch " data-url="/flovanco/doit/src/branch/overview/static/fonts/Roboto-Medium.ttf">overview</div>
</div>
<div class="menu transition" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
<div class="ui icon search input">
<i class="filter icon"></i>
<input name="search" ref="searchField" v-model="searchTerm" @keydown="keydown($event)" placeholder="Branch oder Tag filtern...">
</div>
<div class="header branch-tag-choice">
<div class="ui grid">
<div class="two column row">
<a class="reference column" href="#" @click="mode = 'branches'; focusSearchField()">
<span class="text" :class="{black: mode == 'branches'}">
<i class="octicon octicon-git-branch"></i> Branches
</span>
</a>
<a class="reference column" href="#" @click="mode = 'tags'; focusSearchField()">
<span class="text" :class="{black: mode == 'tags'}">
<i class="reference tags icon"></i> Tags
</span>
</a>
</div>
</div>
</div>
<div class="scrolling menu" ref="scrollContainer">
<div v-for="(item, index) in filteredItems" :key="item.name" class="item" :class="{selected: item.selected, active: active == index}" @click="selectItem(item)" :ref="'listItem' + index">${ item.name }</div>
<div class="item" v-if="showCreateNewBranch" :class="{active: active == filteredItems.length}" :ref="'listItem' + filteredItems.length">
<a href="#" @click="createNewBranch()">
<div>
<i class="octicon octicon-git-branch"></i>
Erstelle Branch <strong>${ searchTerm }</strong>
</div>
<div class="text small">
von „master“
</div>
</a>
<form ref="newBranchForm" action="/flovanco/doit/branches/_new/branch/master" method="post">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<input type="hidden" name="new_branch_name" v-model="searchTerm">
</form>
</div>
</div>
<div class="message" v-if="showNoResults">${ noResults }</div>
</div>
</div>
</div>
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="/flovanco/doit/src/branch/master" title="doit">doit</a><span class="divider">/</span><span class="section"><a href="/flovanco/doit/src/branch/master/static" title="static">static</a></span><span class="divider">/</span><span class="section"><a href="/flovanco/doit/src/branch/master/static/fonts" title="fonts">fonts</a></span><span class="divider">/</span><span class="active section" title="Roboto-Medium.ttf">Roboto-Medium.ttf</span></span></div>
<div class="right fitted item" id="file-buttons">
<div class="ui tiny blue buttons">
</div>
</div>
<div class="fitted item">
</div>
<div class="fitted item">
</div>
</div>
<div class="tab-size-8 non-diff-file-content">
<h4 class="file-header ui top attached header">
<div class="file-header-left">
<div class="file-info text grey normal mono">
<div class="file-info-entry">
134KB
</div>
</div>
</div>
<div class="file-header-right">
<div class="ui right file-actions">
<div class="ui buttons">
<a class="ui button" href="/flovanco/doit/raw/branch/master/static/fonts/Roboto-Medium.ttf">Originalformat</a>
<a class="ui button" href="/flovanco/doit/src/commit/417acaf7ac867ed47ab73e7e66f07f15f1f124cc/static/fonts/Roboto-Medium.ttf">Permalink</a>
<a class="ui button" href="/flovanco/doit/commits/branch/master/static/fonts/Roboto-Medium.ttf">Verlauf</a>
</div>
<i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="Binärdateien können nicht im Webinterface bearbeitet werden." data-position="bottom center" data-variation="tiny inverted"></i>
<i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="Du benötigst Schreibzugriff, um Änderungen an dieser Datei vorzuschlagen oder vorzunehmen." data-position="bottom center" data-variation="tiny inverted"></i>
</div>
</div>
</h4>
<div class="ui attached table unstackable segment">
<div class="file-view has-emoji">
<div class="view-raw ui center">
<a href="/flovanco/doit/raw/branch/master/static/fonts/Roboto-Medium.ttf" rel="nofollow" class="btn btn-gray btn-radius">Originalformat anzeigen</a>
</div>
</div>
</div>
</div>
<script>
function submitDeleteForm() {
var message = prompt("delete_confirm_message\n\ndelete_commit_summary", "Delete ''");
if (message != null) {
$("#delete-message").val(message);
$("#delete-file-form").submit()
}
}
</script>
</div>
</div>
</div>
<footer>
<div class="ui container">
<div class="ui left">
</div>
<div class="ui right links">
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">Deutsch</div>
<div class="menu">
<a lang="de-DE" class="item active selected" href="#">Deutsch</a>
<a lang="en-US" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=en-US">English</a>
<a lang="zh-CN" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=zh-CN">简体中文</a>
<a lang="zh-HK" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=zh-HK">繁體中文(香港)</a>
<a lang="zh-TW" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=zh-TW">繁體中文(台灣)</a>
<a lang="fr-FR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=fr-FR">français</a>
<a lang="nl-NL" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=nl-NL">Nederlands</a>
<a lang="lv-LV" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=lv-LV">latviešu</a>
<a lang="ru-RU" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=ru-RU">русский</a>
<a lang="uk-UA" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=uk-UA">Українська</a>
<a lang="ja-JP" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=ja-JP">日本語</a>
<a lang="es-ES" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=es-ES">español</a>
<a lang="pt-BR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=pt-BR">português do Brasil</a>
<a lang="pl-PL" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=pl-PL">polski</a>
<a lang="bg-BG" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=bg-BG">български</a>
<a lang="it-IT" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=it-IT">italiano</a>
<a lang="fi-FI" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=fi-FI">suomi</a>
<a lang="tr-TR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=tr-TR">Türkçe</a>
<a lang="cs-CZ" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=cs-CZ">čeština</a>
<a lang="sr-SP" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=sr-SP">српски</a>
<a lang="sv-SE" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=sv-SE">svenska</a>
<a lang="ko-KR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Medium.ttf?lang=ko-KR">한국어</a>
</div>
</div>
<a href="/vendor/librejs.html" data-jslicense="1">JavaScript licenses</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/PrivacyPolicy.md">Privacy Policy</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/Satzung.md">Bylaws/Satzung</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/Imprint.md">Imprint/Impressum</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/TermsOfUse.md">Terms of Use</a>
</div>
</div>
</footer>
<script src="/vendor/plugins/jquery/jquery.min.js?v=3.4.1"></script>
<script src="/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1"></script>
<script src="/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>
<script src="/vendor/plugins/highlight/highlight.pack.js"></script>
<script src="/vendor/plugins/emojify/emojify.custom.js"></script>
<script src="/vendor/plugins/clipboard/clipboard.min.js"></script>
<script src="/vendor/plugins/vue/vue.min.js"></script>
<script src="/vendor/plugins/fomantic/semantic.min.js?v=6b0a0a50c7fb0aaef957cb0ab4f596e7"></script>
<script src="/js/index.js?v=6b0a0a50c7fb0aaef957cb0ab4f596e7"></script>
</body>
</html>

View File

@@ -1,581 +0,0 @@
<!DOCTYPE html>
<html lang="de-DE">
<head data-suburl="">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>flovanco/doit: Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk. - static/fonts/Roboto-Regular.ttf at master - doit - Codeberg.org</title>
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials">
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/serviceworker.js').then(function(registration) {
console.info('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
console.info('ServiceWorker registration failed: ', err);
});
}
</script>
<meta name="theme-color" content="#6cc644">
<meta name="author" content="flovanco" />
<meta name="description" content="doit - Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk." />
<meta name="keywords" content="git,non-profit,foss,oss,free,software,open,source,code,hosting">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw" />
<meta name="_suburl" content="" />
<script>
/*
@licstart The following is the entire license notice for the
JavaScript code in this page.
Copyright (c) 2016 The Gitea Authors
Copyright (c) 2015 The Gogs Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---
Licensing information for additional javascript libraries can be found at:
{{StaticUrlPrefix}}/vendor/librejs.html
@licend The above is the entire license notice
for the JavaScript code in this page.
*/
</script>
<script>
window.config = {
StaticUrlPrefix: ''
}
</script>
<link rel="shortcut icon" href="/img/favicon.png" />
<link rel="mask-icon" href="/img/gitea-safari.svg" color="#609926">
<link rel="preload" href="/vendor/assets/font-awesome/css/font-awesome.min.css" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/vendor/assets/font-awesome/css/font-awesome.min.css"></noscript>
<link rel="stylesheet" href="/vendor/assets/octicons/octicons.min.css">
<link rel="stylesheet" href="/vendor/plugins/fomantic/semantic.min.css?v=6b0a0a50c7fb0aaef957cb0ab4f596e7">
<link rel="stylesheet" href="/css/index.css?v=6b0a0a50c7fb0aaef957cb0ab4f596e7">
<noscript>
<style>
.dropdown:hover > .menu { display: block; }
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
</style>
</noscript>
<link rel="stylesheet" href="/vendor/plugins/highlight/github.css">
<style class="list-search-style"></style>
<script src="/vendor/plugins/promise-polyfill/polyfill.min.js"></script>
<script src="/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
<script src="/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
<meta property="og:title" content="doit" />
<meta property="og:url" content="https://codeberg.org/flovanco/doit" />
<meta property="og:description" content="Task app based on OrbTk https://gitlab.redox-os.org/redox-os/orbtk." />
<meta property="og:type" content="object" />
<meta property="og:image" content="https://codeberg.org/user/avatar/flovanco/-1" />
<meta property="og:site_name" content="Codeberg.org" />
<link rel="stylesheet" href="/codeberg.css">
</head>
<body>
<div class="full height">
<noscript>Diese Webseite funktioniert besser mit JavaScript.</noscript>
<div class="ui top secondary stackable main menu following bar light">
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="/">
<img class="ui mini image" src="/img/gitea-sm.png">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>
<a class="item " href="/">Startseite</a>
<a class="item " href="/explore/repos">Erkunden</a>
<a class="item" href="/Codeberg/Community/issues">Codeberg Issues</a>
<a class="item" href="https://blog.codeberg.org">Blog</a>
<a class="item" href="https://join.codeberg.org/">Join Codeberg e.V.</a>
<a class="item" href="https://liberapay.com/codeberg/donate">Donate</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">Hilfe</a>
<div class="right stackable menu">
<a class="item" href="/user/sing_up">
<i class="octicon octicon-person"></i> Registrieren
</a>
<a class="item" rel="nofollow" href="/user/login?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fRoboto-Regular.ttf">
<i class="octicon octicon-sign-in"></i> Anmelden
</a>
</div>
</div>
</div>
<div class="repository file list">
<div class="header-wrapper">
<div class="ui container">
<div class="repo-header">
<div class="ui huge breadcrumb repo-title">
<i class="mega-octicon octicon-repo"></i>
<a href="/flovanco">flovanco</a>
<div class="divider"> / </div>
<a href="/flovanco/doit">doit</a>
</div>
<div class="repo-buttons">
<form method="post" action="/flovanco/doit/action/watch?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fRoboto-Regular.ttf">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<div class="ui labeled button" tabindex="0">
<button type="submit" class="ui compact basic button">
<i class="icon fa-eye-slash"></i>Beobachten
</button>
<a class="ui basic label" href="/flovanco/doit/watchers">
1
</a>
</div>
</form>
<form method="post" action="/flovanco/doit/action/star?redirect_to=%2fflovanco%2fdoit%2fsrc%2fbranch%2fmaster%2fstatic%2ffonts%2fRoboto-Regular.ttf">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<div class="ui labeled button" tabindex="0">
<button type="submit" class="ui compact basic button">
<i class="icon star outline"></i>Favorisieren
</button>
<a class="ui basic label" href="/flovanco/doit/stars">
1
</a>
</div>
</form>
<div class="ui labeled button " tabindex="0">
<a class="ui compact basic button poping up" data-content="Bitte melde dich an, um dieses Repository zu forken." rel="nofollow" href="/user/login?redirect_to=/repo/fork/3183" data-position="top center" data-variation="tiny">
<i class="octicon octicon-repo-forked"></i>Fork
</a>
<a class="ui basic label" href="/flovanco/doit/forks">
0
</a>
</div>
</div>
</div>
</div>
<div class="ui tabs container">
<div class="ui tabular stackable menu navbar">
<a class="active item" href="/flovanco/doit">
<i class="octicon octicon-code"></i> Code
</a>
<a class=" item" href="/flovanco/doit/issues">
<i class="octicon octicon-issue-opened"></i> Issues <span class="ui blue small label">4</span>
</a>
<a class=" item" href="/flovanco/doit/pulls">
<i class="octicon octicon-git-pull-request"></i> Pull-Requests <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/flovanco/doit/releases">
<i class="octicon octicon-tag"></i> Releases <span class="ui gray small label">0</span>
</a>
<a class=" item" href="/flovanco/doit/wiki" >
<i class="octicon octicon-book"></i> Wiki
</a>
<a class=" item" href="/flovanco/doit/activity">
<i class="octicon octicon-pulse"></i> Aktivität
</a>
</div>
</div>
<div class="ui tabs divider"></div>
</div>
<div class="ui container">
<div class="ui repo-description">
<div id="repo-desc">
<span class="description has-emoji">Task app based on OrbTk <a href="https://gitlab.redox-os.org/redox-os/orbtk" rel="nofollow">https://gitlab.redox-os.org/redox-os/orbtk</a>.</span>
<a class="link" href=""></a>
</div>
</div>
<div class="ui" id="repo-topics">
</div>
<div class="hide" id="validate_prompt">
<span id="count_prompt">Du kannst nicht mehr als 25 Themen auswählen</span>
<span id="format_prompt">Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.</span>
</div>
<div class="ui segment sub-menu">
<div class="ui two horizontal center link list">
<div class="item">
<a class="ui" href="/flovanco/doit/commits/branch/master"><i class="octicon octicon-history"></i> <b>57</b> Commits</a>
</div>
<div class="item">
<a class="ui" href="/flovanco/doit/branches/"><i class="octicon octicon-git-branch"></i> <b>2</b> Branches</a>
</div>
<div class="item">
<a class="ui" href="#"><i class="octicon octicon-database"></i> <b>922KB</b></a>
</div>
</div>
</div>
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
<div class="fitted item choose reference">
<div class="ui floating filter dropdown custom" data-can-create-branch="false" data-no-results="Keine Ergebnisse verfügbar.">
<div class="ui basic small compact button" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible">
<span class="text">
<i class="octicon octicon-git-branch"></i>
Branch:
<strong>master</strong>
</span>
<i class="dropdown icon"></i>
</div>
<div class="data" style="display: none" data-mode="branches">
<div class="item branch selected" data-url="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf">master</div>
<div class="item branch " data-url="/flovanco/doit/src/branch/overview/static/fonts/Roboto-Regular.ttf">overview</div>
</div>
<div class="menu transition" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
<div class="ui icon search input">
<i class="filter icon"></i>
<input name="search" ref="searchField" v-model="searchTerm" @keydown="keydown($event)" placeholder="Branch oder Tag filtern...">
</div>
<div class="header branch-tag-choice">
<div class="ui grid">
<div class="two column row">
<a class="reference column" href="#" @click="mode = 'branches'; focusSearchField()">
<span class="text" :class="{black: mode == 'branches'}">
<i class="octicon octicon-git-branch"></i> Branches
</span>
</a>
<a class="reference column" href="#" @click="mode = 'tags'; focusSearchField()">
<span class="text" :class="{black: mode == 'tags'}">
<i class="reference tags icon"></i> Tags
</span>
</a>
</div>
</div>
</div>
<div class="scrolling menu" ref="scrollContainer">
<div v-for="(item, index) in filteredItems" :key="item.name" class="item" :class="{selected: item.selected, active: active == index}" @click="selectItem(item)" :ref="'listItem' + index">${ item.name }</div>
<div class="item" v-if="showCreateNewBranch" :class="{active: active == filteredItems.length}" :ref="'listItem' + filteredItems.length">
<a href="#" @click="createNewBranch()">
<div>
<i class="octicon octicon-git-branch"></i>
Erstelle Branch <strong>${ searchTerm }</strong>
</div>
<div class="text small">
von „master“
</div>
</a>
<form ref="newBranchForm" action="/flovanco/doit/branches/_new/branch/master" method="post">
<input type="hidden" name="_csrf" value="PG49nQsNVNDzL7j830GxV6baicY6MTU5MjMzNDMwNzQ5ODk4MzkwMw">
<input type="hidden" name="new_branch_name" v-model="searchTerm">
</form>
</div>
</div>
<div class="message" v-if="showNoResults">${ noResults }</div>
</div>
</div>
</div>
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="/flovanco/doit/src/branch/master" title="doit">doit</a><span class="divider">/</span><span class="section"><a href="/flovanco/doit/src/branch/master/static" title="static">static</a></span><span class="divider">/</span><span class="section"><a href="/flovanco/doit/src/branch/master/static/fonts" title="fonts">fonts</a></span><span class="divider">/</span><span class="active section" title="Roboto-Regular.ttf">Roboto-Regular.ttf</span></span></div>
<div class="right fitted item" id="file-buttons">
<div class="ui tiny blue buttons">
</div>
</div>
<div class="fitted item">
</div>
<div class="fitted item">
</div>
</div>
<div class="tab-size-8 non-diff-file-content">
<h4 class="file-header ui top attached header">
<div class="file-header-left">
<div class="file-info text grey normal mono">
<div class="file-info-entry">
142KB
</div>
</div>
</div>
<div class="file-header-right">
<div class="ui right file-actions">
<div class="ui buttons">
<a class="ui button" href="/flovanco/doit/raw/branch/master/static/fonts/Roboto-Regular.ttf">Originalformat</a>
<a class="ui button" href="/flovanco/doit/src/commit/417acaf7ac867ed47ab73e7e66f07f15f1f124cc/static/fonts/Roboto-Regular.ttf">Permalink</a>
<a class="ui button" href="/flovanco/doit/commits/branch/master/static/fonts/Roboto-Regular.ttf">Verlauf</a>
</div>
<i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="Binärdateien können nicht im Webinterface bearbeitet werden." data-position="bottom center" data-variation="tiny inverted"></i>
<i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="Du benötigst Schreibzugriff, um Änderungen an dieser Datei vorzuschlagen oder vorzunehmen." data-position="bottom center" data-variation="tiny inverted"></i>
</div>
</div>
</h4>
<div class="ui attached table unstackable segment">
<div class="file-view has-emoji">
<div class="view-raw ui center">
<a href="/flovanco/doit/raw/branch/master/static/fonts/Roboto-Regular.ttf" rel="nofollow" class="btn btn-gray btn-radius">Originalformat anzeigen</a>
</div>
</div>
</div>
</div>
<script>
function submitDeleteForm() {
var message = prompt("delete_confirm_message\n\ndelete_commit_summary", "Delete ''");
if (message != null) {
$("#delete-message").val(message);
$("#delete-file-form").submit()
}
}
</script>
</div>
</div>
</div>
<footer>
<div class="ui container">
<div class="ui left">
</div>
<div class="ui right links">
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
<div class="text">Deutsch</div>
<div class="menu">
<a lang="de-DE" class="item active selected" href="#">Deutsch</a>
<a lang="en-US" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=en-US">English</a>
<a lang="zh-CN" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=zh-CN">简体中文</a>
<a lang="zh-HK" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=zh-HK">繁體中文(香港)</a>
<a lang="zh-TW" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=zh-TW">繁體中文(台灣)</a>
<a lang="fr-FR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=fr-FR">français</a>
<a lang="nl-NL" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=nl-NL">Nederlands</a>
<a lang="lv-LV" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=lv-LV">latviešu</a>
<a lang="ru-RU" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=ru-RU">русский</a>
<a lang="uk-UA" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=uk-UA">Українська</a>
<a lang="ja-JP" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=ja-JP">日本語</a>
<a lang="es-ES" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=es-ES">español</a>
<a lang="pt-BR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=pt-BR">português do Brasil</a>
<a lang="pl-PL" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=pl-PL">polski</a>
<a lang="bg-BG" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=bg-BG">български</a>
<a lang="it-IT" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=it-IT">italiano</a>
<a lang="fi-FI" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=fi-FI">suomi</a>
<a lang="tr-TR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=tr-TR">Türkçe</a>
<a lang="cs-CZ" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=cs-CZ">čeština</a>
<a lang="sr-SP" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=sr-SP">српски</a>
<a lang="sv-SE" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=sv-SE">svenska</a>
<a lang="ko-KR" class="item " href="/flovanco/doit/src/branch/master/static/fonts/Roboto-Regular.ttf?lang=ko-KR">한국어</a>
</div>
</div>
<a href="/vendor/librejs.html" data-jslicense="1">JavaScript licenses</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/PrivacyPolicy.md">Privacy Policy</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/Satzung.md">Bylaws/Satzung</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/Imprint.md">Imprint/Impressum</a>
<a target="_blank" rel="noopener" href="/codeberg/org/src/branch/master/TermsOfUse.md">Terms of Use</a>
</div>
</div>
</footer>
<script src="/vendor/plugins/jquery/jquery.min.js?v=3.4.1"></script>
<script src="/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1"></script>
<script src="/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>
<script src="/vendor/plugins/highlight/highlight.pack.js"></script>
<script src="/vendor/plugins/emojify/emojify.custom.js"></script>
<script src="/vendor/plugins/clipboard/clipboard.min.js"></script>
<script src="/vendor/plugins/vue/vue.min.js"></script>
<script src="/vendor/plugins/fomantic/semantic.min.js?v=6b0a0a50c7fb0aaef957cb0ab4f596e7"></script>
<script src="/js/index.js?v=6b0a0a50c7fb0aaef957cb0ab4f596e7"></script>
</body>
</html>

View File

@@ -1,25 +0,0 @@
* {
font-size: 24;
}
lynch {
background: #647b91;
}
bluebayoux {
background: #516475;
}
linkwater {
background: #dfebf5;
color: #3b434a;
}
light-text {
color: #dfebf5;
}
goldendream {
background: #efd035;
color: #3b434a;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

View File

@@ -1,25 +0,0 @@
* {
font-size: 24;
}
lynch {
background: #647b91;
}
bluebayoux {
background: #516475;
}
linkwater {
background: #dfebf5;
color: #3b434a;
}
light-text {
color: #dfebf5;
}
goldendream {
background: #efd035;
color: #3b434a;
}

View File

@@ -1,32 +0,0 @@
.header {
background: #444e55;
}
.content {
background: #3b434a;
}
text-box {
background: transparent;
border-width: 0;
color: #9dafbf;
font-size: 16;
}
#input {
font-size: 16;
}
text-block {
font-size: 42;
color: #dfebf5;
}
#input {
background: transparent;
}
button {
border-radius: 1;
font-size: 20;
}

View File

@@ -1,23 +0,0 @@
* {
font-size: 16;
}
.header {
background: #ffffff;
}
.content {
background: #fafafa;
}
text-box {
color: #4d4c4c;
}
text-block {
color: #4d4c4c;
}
light-text {
color: #dfebf5;
}

View File

@@ -1,217 +0,0 @@
.my_header {
font-size: 24;
}
/* defaults: dark.css
* {
background: #ffffff;
font-size: 16;
font-family: "Roboto Medium";
icon-size: 16;
icon-family: "Material Icons";
}
window {
background: #ffffff;
}
.h1 {
font-size: 36;
}
*/
/*
.top_bar {
padding-left: 4;
padding-right: 4;
min-height: 150;
background: #ffffff;
border-color: #5b0f22;
}
.bottom_bar {
height: 40;
background: #ffffff;
}
*/
/*
font-family: "Roboto Medium";
background: transparent;
border-width: 2;
border-color: #5b0f22;
border-radius: 2;
padding: 6;
}
.text_form {
background: #ffffff;
}
.text_block {
background: #ffffff;
border-color: #5b0f22;
border-width: 0;
color: #5b0f22;
}
text_box:empty {
color: #9E9E9E
}
text_box:focus {
border-color: #f8de4c;
}
/*
text_box.inplace {
color: #dfebf5;
background: transparent;
border-color: transparent;
border-width: 1;
border-radius: 2;
padding: 6;
font-size: 48;
}
text_box.inplace:focus {
background: #ffffff;
border-color: #5b0f22;
}
text_box.inplace:empty {
color: #9E9E9E
}
.icon_only {
icon-color: transparent;
background: transparent;
}
.icon_only:active {
icon-color: #5b0f22;
background: #5b0f22;
}
.icon_only:disabled {
icon-color: transparent;
background: transparent;
}
items-widget {
padding: 0;
border-color: transparent;
font-size: 48;
}
list-view-item {
padding-left: 0;
padding-right: 0;
height: 62;
}
list-view-item:active {
background: #ffffff;
}
policy_check.text_box {
font-size: 48;
}
policy_list.text_box {
font-size: 48;
}
policy_list.text_box {
font-size: 48;
}
.transparent {
icon-color: transparent;
background: transparent;
}
.transparent:active {
icon-color: transparent;
background: transparent;
}
.item_button {
background: transparent;
border-radius: 0;
font-size: 48;
}
.separator {
background: #f8de4c;
color: #f8de4c;
border-width: 2;
border-color: #5b0f22;
}
*/
/*
const LINK_WATER_COLOR
color: #dfebf5;
const LYNCH_COLOR
color: #647b91;
const BOMBAY_COLOR
color: #adb3B8;
const SLATE_GRAY_COLOR
color: #6c7a90;
const BRIGHT_GRAY_COLOR
color: #3b434a;
const MATERIAL_RED_COLOR
color: #5b0f22;
.header {
background: #ffffff;
}
.content {
background: #fafafa;
}
text-box {
color: #5b0f22;
}
text-block {
color: #5b0f22;
}
top-bar {
color: #5b0f22;
background: #fafafa;
}
*/
/*
light-text {
color: #dfebf5;
}
*/
/* // Hiedemann blue */
/* color: #a5b3bf; */
/* // Hiedemann red */
/* color: #5b0f22; */
/* // Hiedemann darkgrey */
/* color: #879488; */
/* // Hiedemann grey */
/* color: ##b6c3b7; */
/* // Qt Green */
/* color: #41cd52; */
/* // lightgrey */
/* color: #f0f0f0; */
/* Accent=#5b0f22 */
/* Foreground=#000000 */
/* Background=#f0f0f0 */

View File

@@ -1,75 +0,0 @@
.top_bar {
padding-left: 4;
padding-right: 4;
min-height: 52;
background: #475b6e;
}
.bottom_bar {
height: 40;
background: #475b6e;
}
.header {
font-size: 24;
font-family: "Roboto Medium";
}
text_box.inplace {
color: #dfebf5;
background: transparent;
border-color: transparent;
border-width: 1;
border-radius: 2;
padding: 6;
}
text_box.inplace:focus {
background: #3b434a;
border-color: #5b0f22;
}
text_box.inplace:empty {
color: #9E9E9E;
border-color: #5b0f22;
}
.icon_only {
background: #5b0f22;
icon-color: #ffffff;
spacing: 0;
}
.icon_only:active {
background: #5b0f22;
icon-color: #ffffff;
}
.icon_only:disabled {
icon-color: #ffffff;
background: #ffffff;
}
items-widget {
padding: 0;
border-color: transparent;
}
.transparent {
icon-color: transparent;
background: transparent;
}
.transparent:active {
icon-color: transparent;
background: transparent;
}
.item_button {
background: transparent;
border-radius: 0;
}
.separator {
background: #212121;
}

View File

@@ -1,55 +0,0 @@
* {
font-size: 16;
}
lynch {
background: #647b91;
}
bluebayoux {
background: #516475;
}
linkwater {
background: #dfebf5;
color: #3b434a;
}
light-text {
color: #dfebf5;
}
goldendream {
background: #efd035;
color: #3b434a;
}
lightgrey {
#f0f0f0;
}
darkgrey {
#879488;
}
grey {
#b6c3b7;
}
Indigo-bases {
#5c6bc0;
}
hiedemann-blue {
#a5b3bf;
}
hiedemann-red {
color: #5b0f22;
}
hiedemann {
background: #5b0f22;
color: #879488;
//color: #3b434a;
}

View File

@@ -1,53 +0,0 @@
* {
font-size: 24;
}
.header {
background: #ffffff;
}
.background {
background: #fafafa;
}
.content {
background: #fafafa;
}
text-box {
color: #5b0f22;
}
text-block {
color: #5b0f22;
}
light-text {
color: #dfebf5;
}
/* // Hiedemann blue */
/* color: #a5b3bf; */
/* color: #4d4c4c; */
/* // Hiedemann red */
/* color: #5b0f22; */
/* // Hiedemann darkgrey */
/* color: #879488; */
/* // Hiedemann grey */
/* color: ##b6c3b7; */
/* // Qt Green */
/* color: #41cd52; */
/* // lightgrey */
/* color: #f0f0f0; */
/* Accent=#5b0f22 */
/* Foreground=#000000 */
/* Background=#f0f0f0 */

View File

@@ -1,48 +0,0 @@
.header {
background: #ffffff;
}
.content {
background: #fafafa;
}
.content {
background: #fafafa;
}
text-box {
color: #5b0f22;
}
text-block {
color: #5b0f22;
}
/*
light-text {
color: #dfebf5;
}
*/
/* // Hiedemann blue */
/* color: #a5b3bf; */
/* // Hiedemann red */
/* color: #5b0f22; */
/* // Hiedemann darkgrey */
/* color: #879488; */
/* // Hiedemann grey */
/* color: ##b6c3b7; */
/* // Qt Green */
/* color: #41cd52; */
/* // lightgrey */
/* color: #f0f0f0; */
/* Accent=#5b0f22 */
/* Foreground=#000000 */
/* Background=#f0f0f0 */

View File

@@ -1,91 +0,0 @@
.top_bar {
padding-left: 4;
padding-right: 4;
min-height: 52;
background: #475b6e;
}
.bottom_bar {
height: 40;
background: #475b6e;
}
.header {
font-size: 64;
font-family: "Roboto Medium";
}
text_box.inplace {
color: #dfebf5;
background: transparent;
border-color: transparent;
border-width: 1;
border-radius: 2;
padding: 6;
font-size: 48;
}
text_box.inplace:focus {
background: #3b434a;
border-color: #f8de4c;;
}
text_box.inplace:empty {
color: #9E9E9E
}
.icon_only {
icon-color: #dfebf5;
background: transparent;
spacing: 0;
}
.icon_only:active {
background: #516475;
icon-color: #dfebf5;
}
.icon_only:disabled {
icon-color: #949ca5;
background: transparent;
}
items-widget {
padding: 0;
border-color: transparent;
font-size: 48;
}
list-view-item {
padding-left: 0;
padding-right: 0;
height: 62;
}
list-view-item:active {
background: #516475;
}
overview_view.text_box {
font-size: 48;
}
.transparent {
icon-color: transparent;
background: transparent;
}
.transparent:active {
icon-color: transparent;
background: transparent;
}
.item_button {
background: transparent;
border-radius: 0;
font-size: 48;
}
.separator {
background: #212121;
}

View File

@@ -1,59 +0,0 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
use orbtk::prelude::*;
//use crate::data::keys;
use crate::{
data::structures::PolicyList,
data::keys::*
};
/// Provides generic methods to handle states of datatypes (e.g. used in `PolicyList`).
pub trait GlobalState {
/// Navigates to the given entity.
fn navigate(&self, to: Entity, ctx: &mut Context<'_>) {
if let Some(old_focused_element) = ctx.window().get::<Global>("global").focused_widget {
let mut old_focused_element = ctx.get_widget(old_focused_element);
old_focused_element.set("focused", false);
old_focused_element.update_theme_by_state(false);
}
ctx.window().get_mut::<Global>("global").focused_widget = None;
ctx.widget().set("visibility", Visibility::Collapsed);
ctx.get_widget(to).set("visibility", Visibility::Visible);
}
/// Get the text of a widget.
fn get_text(&self, ctx: &mut Context<'_>, entity: Entity) -> Option<String> {
let mut widget = ctx.get_widget(entity);
let entry = widget.get_mut::<String>("text");
if entry.is_empty() {
return None;
}
let copy = entry.to_string();
entry.clear();
Some(copy)
}
/// Save the our data structure and convert it to `ron` file format.
/// The cargo package identifier (here: 'nwx.advotracker') is taken to create the app directory.
/// in users 'settings directory'. The directory location is OS dependant
/// (Windows: AppData, Unix: XDG_CONFIG_HOME, MacOS: $HOME/Library/Preferences).
/// The data is stored in filename PROP_ADVOTRACKER (here: `advotracker.ron`)
fn save(&self, registry: &mut Registry, ctx: &mut Context<'_>) {
registry
.get::<Settings>("settings")
.save(
PROP_ADVOTRACKER,
ctx.widget().get::<PolicyList>(PROP_ADVOTRACKER),
)
.unwrap();
}
}

View File

@@ -1,21 +0,0 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
/// global helper functions
pub mod global_state;
/// policycheck helper functions
pub mod policycheck_state;
// /// policylist helper functions
// pub mod policylist_state;
// /// policydata helper functions
// pub mod policydata_state;
/// policy verification methods
pub mod policy_check;

View File

@@ -1,64 +0,0 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
use chrono::{Local, DateTime};
//use serde::Deserialize;
//use std::env;
//use std::{error::Error, process};
use std::collections::HashMap;
use tracing::{info, trace};
use crate::data::structures::{PolicyCode, PolicyDataList};
/// validate a given policy number
/// result will return true or false
pub fn is_valid(policy_number: &usize, policy_list: &PolicyDataList,
policy_numbers: &mut HashMap<usize, PolicyCode>, lang: &String)
-> Result<bool, Box<dyn std::error::Error>> {
let dt_start: DateTime<Local> = Local::now();
trace!(target: "advotracker",
process = ?"validation",
state = ?"started",
policy_number = ?policy_number,
policy_list = ?policy_list.name,
elements = ?policy_list.policy_data.len(),
date_start = ?dt_start.to_string());
let mut result = false;
match policy_numbers.get(&policy_number) {
Some(&policy_code) => {
println!("policy_number: {} ({:?})",
policy_number, policy_code);
info!("policy-check => {} ({:?})", policy_number, policy_code);
result = true;
trace!(target: "advotracker",
policy_number = ?policy_number,
validation = "success",
policy_code = ?policy_code);
},
_ => {
println!("Noop! Number isn't valid!");
info!("policy-check => {}", policy_number);
trace!(target: "csv-test",
policy_number = ?policy_number,
validation = "failed");
},
}
let dt_end: DateTime<Local> = Local::now();
let duration = dt_end.signed_duration_since(dt_start);
trace!(target: "advotracker",
process = "validation",
state = "finished",
date_stop = ?dt_end.to_string(),
duration = ?duration);
Ok(result)
}

View File

@@ -1,355 +0,0 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
use dotenv::dotenv;
use orbtk::prelude::*;
use serde::Deserialize;
use std::{env, process};
use std::collections::HashMap;
use tracing::{debug, error, info, trace};
use crate::services::imports::allianzdirectcall::import;
//use crate::callbacks::policy_check::is_valid;
use crate::{
callbacks::global_state::GlobalState,
data::structures::{PolicyCheck, PolicyCode, PolicyDataList, PolicyList},
data::keys::*,
};
/// Actions that can execute on the task view.
#[derive(Debug, Clone, Copy)]
pub enum Action {
ClearEntry(Entity),
InputTextChanged(Entity),
OpenMenu(Entity),
ParseEntry(Entity),
RemoveFocus(Entity),
SetEntry(Entity),
SetVisibility(Entity),
TextChanged(Entity, usize),
}
#[derive(Debug, Deserialize)]
struct Environment {
test_lang: String,
log: String,
}
/// Handles the requests of the `PolicyCheckView`.
#[derive(Default, AsAny)]
pub struct PolicyCheckState {
action: Option<Action>,
label_result_text_block: Entity,
last_focused: Option<Entity>,
menu_button: Entity,
//policy_check_clean_button: Entity,
policy_check: PolicyCheck,
policy_data_count: usize,
//policy_number_text_box: Entity,
policy_numbers: HashMap<usize, PolicyCode>
}
impl GlobalState for PolicyCheckState {}
/// method definitions, that react on any given state change inside the view
impl PolicyCheckState {
/// Sets a new action.
pub fn action(&mut self, action: Action) {
self.action = action.into();
}
pub fn create_hashmap(&mut self) -> Result<(), Box<dyn std::error::Error>> {
// WIP: redundant lang selection (already in main!)
let mut lang = env::var("LANG").unwrap_or("en".to_string());
// testing environment: read from .env file
dotenv().ok();
match envy::from_env::<Environment>() {
Ok(environment) => {
if environment.test_lang != lang { lang = environment.test_lang; }
},
Err(e) => { debug!(target: "advotracker", "{}", e); }
}
// importing policy code elements from csv-file
let policy_list = PolicyList::new("Allianz Versicherungsnummen-List");
//println!("Policy List {:?} ", policy_list.name);
let mut policy_data = PolicyDataList::new("Allianz-Import latest");
//println!("Policy Data List {:?} ", policy_data.name);
let mut policy_numbers : HashMap<usize, PolicyCode> = HashMap::new();
// Wip: use cli parameter stored in viperus ...
//let mut csv_import_path = v.get::<String>("import_file").unwrap();
let mut csv_import_path = String::from("POLLFNR_WOECHENTLICH.txt");
//println!("Importing from: {:?}", csv_import_path);
match import(&mut csv_import_path, &mut policy_data,
&mut policy_numbers, &lang) {
Ok(count) => {
self.policy_data_count = count;
//println!("Imported {:?} records", self.policy_data_count);
}
Err(err) => {
//println!("error running CSV-Import: {}", err);
process::exit(1);
}
};
self.policy_numbers = policy_numbers;
Ok(())
}
/// Clear text in text box.
pub fn clear_entry(&mut self, text_box: Entity, ctx: &mut Context<'_>) {
let mut text_box = TextBox::get(ctx.get_widget(text_box));
let text = text_box.text_mut();
//println!("reset {}", text);
}
/// Open menu.
pub fn open_menu(&mut self, text_block: Entity, ctx: &mut Context<'_>) {
let mut text_block = TextBlock::get(ctx.get_widget(text_block));
let text = text_block.text_mut();
//println!("Menu text: {}", text);
}
fn parse_entry(&mut self, policy_check_policy_number: Entity,
ctx: &mut Context<'_>) {
let policy_string = ctx.get_widget(policy_check_policy_number).get::<String16>("text").as_string();
let policy_number_length = policy_string.len();
trace!(target: "advotracker", state = "parsing", policy_number = ?policy_string);
// Parse policy code: "AS-123456789"
// DION VERS POLLFNR
// 1 AS 1515735810
if policy_number_length == 10 {
let mut label_wrapper : TextBlockCtx<'_> = text_block(ctx.child("policy_check_label_result"));
let string_label = "Prüfungsergebnis:".to_string();
// needs to be an integer
match policy_string.parse::<usize>() {
Ok(p) => {
//println!(" ... verify policy Number {:?}", p);
label_wrapper.set_text(string_label);
label_wrapper.set_visibility(Visibility::Visible);
label_wrapper.set_enabled(true);
let mut result_wrapper: TextBlockCtx<'_> = text_block(ctx.child("policy_check_result"));
result_wrapper.set_text("Prüfung läuft ...");
match self.policy_numbers.get(&p) {
// check hashmap value field
Some(policy_code) => {
trace!(target: "advotracker", state = "success",
policy_number = ?p, policy_code = ?policy_code);
result_wrapper.set_enabled(true);
let string_result = format!("gütig! => vollständig: 1-{:?}-{}",
policy_code, p);
result_wrapper.set_text(string_result);
}
_ => {
trace!(target: "advotracker", state = "failed",
policy_number = ?p);
result_wrapper.set_enabled(true);
result_wrapper.set_text("noop, ungültig!");
}
}
},
Err(e) => {
trace!(target: "advotracker", state = "error", error_type = "invalid type");
// Feedback
let mut result_wrapper: TextBlockCtx<'_> = text_block(ctx.child("policy_check_result"));
result_wrapper.set_enabled(true);
result_wrapper.set_text("bitte nur Nummern erfassen!");
}
}
}
if policy_number_length < 10 {
//println!("Policy number is to short!");
let mut text_block_wrapper: TextBlockCtx<'_> = text_block(ctx.child("policy_check_result"));
text_block_wrapper.set_enabled(true);
text_block_wrapper.set_text("zu kurz!");
//ctx.get_widget(policy_check_policy_number).set("policy_check_result", true);
//ctx.child(ID_POLICY_CHECK_POLICY_NUMBER).set("text", String::from(""));
}
if policy_number_length > 10 {
//println!("Policy number is to big!");
let mut text_block_wrapper: TextBlockCtx<'_> = text_block(ctx.child("policy_check_result"));
text_block_wrapper.set_enabled(true);
text_block_wrapper.set_text("zu lang!");
}
}
/// If TextBox 'policy_check_policy_number' is empty, disable button "clear"
/// otherwise enabled it.
// fn set_policy_check_clear_button(&self, policy_check_policy_number: Entity, ctx: &mut Context<' >) {
// if ctx.get_widget(clear_button).get::<String>("policy_check_policy_number").is_empty() {
// ctx.get_widget(self.policy_check_clear_button).set("enabled", false);
// } else {
// ctx.get_widget(self.policy_check_clear_button).set("enabled", true);
// }
// ctx.get_widget(self.policy_check_policy_number).update_theme_by_state(true);
// }
/// Change status of given text box to edit mode.
fn set_entry(&self, policy_check_policy_number: Entity, ctx: &mut Context<'_>) {
if *ctx.get_widget(policy_check_policy_number).get::<bool>("focused") {
//let mut my_ctx: WidgetContainer<'_> = ctx.widget();
//let mut child: WidgetContainer<'_> = ctx.get_widget(policy_check_policy_number);
//ctx.get_widget(policy_check_policy_number).set("enabled", true);
let mut text_box_wrapper: TextBoxCtx<'_> = text_box(ctx.child("policy_check_policy_number"));
//ctx.push_event_by_window(FocusEvent::RemoveFocus(policy_check_policy_number));
text_box_wrapper.set_visibility( Visibility::Visible);
text_box_wrapper.set_enabled(true);
text_box_wrapper.set_text("");
text_box_wrapper.set_water_mark("Neue Eingabe ...");
return;
}
if let Some(old_focused_element) = ctx.window().get::<Global>("global").focused_widget {
ctx.push_event_by_window(FocusEvent::RemoveFocus(old_focused_element));
}
}
/// Change visibility of the result label
fn set_visibility(&self, entity: Entity, ctx: &mut Context<'_>) {
if ctx.get_widget(entity).get::<String16>("text").is_empty() {
text_block(ctx.child(ID_POLICY_CHECK_LABEL_RESULT)).set_visibility(Visibility::Visible);
} else {
text_block(ctx.child(ID_POLICY_CHECK_LABEL_RESULT)).set_visibility(Visibility::Collapsed);
//ctx.get_widget(self.policy_check_label_policy_number).set("enabled", false);
}
ctx.get_widget(self.label_result_text_block).update_theme_by_state(true);
}
// Update count of elements in the policy data list.
fn update_data_count(&self, ctx: &mut Context<'_>) {
// old api syntax
let data_list_count = ctx.widget().get::<PolicyDataList>(PROP_POLICY_DATA_LIST).len();
ctx.widget().set(PROP_POLICY_DATA_COUNT, data_list_count);
}
}
/// upported states for our view
impl State for PolicyCheckState {
fn init(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
self.menu_button = ctx
.entity_of_child(ID_POLICY_CHECK_MENU_BUTTON)
.expect("PolicyCheckState.init: Can't find entity id defined as resource 'ID_POLICY_CHECK_POLICY_MENU_BUTTON'.");
// self.policy_number_text_box = ctx
// .entity_of_child(ID_POLICY_CHECK_POLICY_NUMBER)
// .expect("PolicyCheckState.init: Can't find entity id defined as resource 'ID_POLICY_CHECK_POLICY_NUMBER'.");
// import data
// WIP: for now, only import once per session
if self.policy_data_count == 0 {
match self.create_hashmap() {
Ok(()) => {
//let res = t!("policy.hashmap.success", lang);
//println!("{:?}", res);
info!("hashmap has: {:?} entries", self.policy_data_count);
trace!(target: "advotracker",
hashmap_status = "new import",
hashmap_entries = ?self.policy_data_count);
}
_ => {
// let res = t!("policy.hashmap.failed", lang);
// println
// !("{:?}", res);
error!("Creation of a hashmap failed!");
trace!(target: "advotracker", hashmap_status = "failed");
}
}
} else {
//println!("Already imported {} records.", self.policy_data_count);
trace!(target: "advotracker",
hashmap_status = "consume",
hashmap_entries = ?self.policy_data_count);
}
// // Load the saved data from a file in 'ron' format into our data structure.
// // The cargo package identifier (default: 'nwx.advotracker') is used as the
// // app directory name. The directory location is OS dependant
// // (Windows: AppData, Unix: XDG_CONFIG_HOME, MacOS: $HOME/Library/Preferences).
// // The filename is taken from the propertey PROP_ADVOTRACKER (default: 'advotracker'.ron).
// if let Ok(policy_data) = registry
// .get::<Settings>("settings")
// .load::<PolicyDataList>(PROP_ADVOTRACKER)
// {
// ctx.widget().set(PROP_ADVOTRACKER, policy_data);
// }
// number of elements in the restored policy data
//policy_data_count = policy_data.len().clone;
//self.update_data_count(ctx);
}
fn update(&mut self, _registry: &mut Registry, ctx: &mut Context<'_>) {
// clear focus on focus moved
if self.last_focused != ctx.window().get::<Global>("global").focused_widget {
if let Some(last_focused) = self.last_focused {
ctx.get_widget(last_focused).set("focused", false);
// widget is unvisible, but takes space to be considered
ctx.get_widget(last_focused)
.set("visibility", Visibility::Collapsed);
}
}
if let Some(action) = self.action {
match action {
Action::ClearEntry(policy_check_policy_number) => {
ctx.get_widget(policy_check_policy_number).set("enabled", false);
}
Action::InputTextChanged(entity) => {
//println!("entry changed: {}", text_box(ctx.get_widget(entity)).text());
//self.set_check_button(policy_check_label_policy_number, ctx);
self.set_visibility(entity, ctx);
}
Action::OpenMenu(text_block) => {
self.open_menu(text_block, ctx);
}
Action::ParseEntry(text_box) => {
self.parse_entry(text_box, ctx);
ctx.get_widget(text_box).get::<String16>("text").as_string();
//self.parse_entry(text_box, &mut policy_numbers,
// &lang, ctx);
}
Action::RemoveFocus(policy_check_policy_number) => {
ctx.get_widget(policy_check_policy_number).set("enabled", false);
ctx.push_event_by_window(FocusEvent::RemoveFocus(policy_check_policy_number));
}
Action::SetEntry(policy_check_policy_number) => {
//self.last_focused = Some();
self.set_entry(policy_check_policy_number, ctx);
}
Action::SetVisibility(entity) => {
//text_block(ctx.child(entity).set_visibility(Visibility::Visible));
text_block(ctx.child(ID_POLICY_CHECK_LABEL_RESULT)).set_visibility(Visibility::Collapsed);
}
Action::TextChanged(entity, _index) => {
self.set_entry(entity, ctx);
}
}
}
self.action = None;
}
fn update_post_layout(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
let string_result = "Prüfungsergebnis:".to_string();
//string_result = format!("{} {:?}", string_result, self.??;
text_block(ctx.child(ID_POLICY_CHECK_LABEL_RESULT)).set_text(string_result);
text_block(ctx.child(ID_POLICY_CHECK_LABEL_RESULT)).set_visibility(Visibility::Collapsed);
let mut string_data_count = "Prüflisten-Elemente:".to_string();
string_data_count = format!("{} {:?}", string_data_count, self.policy_numbers.len());
text_block(ctx.child(ID_POLICY_DATA_COUNT_BLOCK)).set_text(string_data_count);
}
}

View File

@@ -1,54 +0,0 @@
// CSS => transform to RON based theme system
// https://github.com/ron-rs/ronRon
// Classes
pub static CLASS_BOTTOM_BAR: &str = "bottom_bar";
pub static CLASS_HEADER: &str = ".my_header";
pub static CLASS_ICON_ONLY: &str = "icon_only";
pub static CLASS_ITEM_BUTTON: &str = "item_button";
pub static CLASS_MENU: &str = "menu";
pub static CLASS_POLICY_CHECK_FORM: &str = "check_form";
pub static CLASS_TEXT_BOX: &str = "text_box";
pub static CLASS_TEXT_BLOCK: &str = "text_block";
pub static CLASS_TOP_BAR: &str = "top_bar";
pub static CLASS_TRANSPARENT: &str = "transparent";
pub static CLASS_SEPERATOR: &str = "seperator";
// Widget IDs (DCES: Entity[id] => [Component1, .. , Component<n>] -> data or state)
pub static ID_POLICY_CHECK_FORM: &str = "policy_check_form";
pub static ID_POLICY_CHECK_HEADER: &str = "policy_check_header";
pub static ID_POLICY_CHECK_ITEMS_WIDGET: &str = "policy_check_items_widget";
pub static ID_POLICY_CHECK_CLEAR_BUTTON: &str = "policy_check_clear_button";
pub static ID_POLICY_CHECK_MENU_BUTTON: &str = "policy_check_menu_button";
pub static ID_POLICY_CHECK_LABEL_POLICY_NUMBER: &str = "policy_check_label_policy_number";
pub static ID_POLICY_CHECK_LABEL_RESULT: &str = "policy_check_label_result";
pub static ID_POLICY_CHECK_MENU_TEXT_BLOCK: &str = "policy_check_menu_text_block";
pub static ID_POLICY_CHECK_POLICY_NUMBER: &str = "policy_check_policy_number";
pub static ID_POLICY_CHECK_RESULT: &str = "policy_check_result";
pub static ID_POLICY_CHECK_WIDGET: &str = "policy_check_widget";
pub static ID_POLICY_DATA_ADD_BUTTON: &str = "policy_data_add_button";
pub static ID_POLICY_DATA_COUNT_BLOCK: &str = "policy_data_count_block";
pub static ID_POLICY_DATA_ITEMS_WIDGET: &str = "policy_data_items_widget";
//pub static ID_POLICY_DATA_TEXT_BOX: &str = "policy_data_text_box";
pub static ID_POLICY_DATA_DATE_INSERTED: &str = "policy_data_date_inserted";
pub static ID_POLICY_DATA_DION: &str = "policy_data_dion";
pub static ID_POLICY_DATA_POLICY_CODE: &str = "policy_data_policy_code";
pub static ID_POLICY_DATA_POLICY_NUMBER: &str = "policy_data_policy_number";
pub static ID_POLICY_DATA_STATUS: &str = "policy_data_status";
pub static ID_POLICY_DATA_LIST_NAME: &str = "policy_data_list_name";
pub static ID_POLICY_LIST_ADD_BUTTON: &str = "policy_list_add_button";
pub static ID_POLICY_LIST_ITEMS_WIDGET: &str = "policy_list_items_widget";
//pub static ID_POLICY_LIST_TEXT_BOX: &str = "policy_list_text_box";
//pub static ID_POLICY_LIST_TEXT_BLOCK: &str = "policy_list_text_block";
// Component Values (Properties)
pub static PROP_ADVOTRACKER: &str = "advotracker";
pub static PROP_POLICY_CHECK: &str = "policy_check";
pub static PROP_POLICY_DATA_LIST: &str = "policy_data_list";
pub static PROP_POLICY_DATA_COUNT: &str = "policy_data_count";
pub static PROP_POLICY_LIST: &str = "policy_list";
pub static PROP_POLICY_LIST_COUNT: &str = "policy_list_count";

View File

@@ -1,149 +0,0 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
//#[macro_use]
//extern crate lazy_static;
//use chrono::{Local, DateTime};
//use serde::{Deserialize, Serialize};
use serde::Deserialize;
use std::env;
//use std::process;
//use std::{error::Error, process};
//use std::collections::HashMap;
use tracing::{debug, trace, Level};
use orbtk::prelude::*;
use orbtk::theme::DEFAULT_THEME_CSS;
//use orbtk::theme::LIGHT_THEME_EXTENSION_CSS;
// The Main view
use advotracker::widgets::main_view;
mod parse_args;
/// respect environment variables set in .env files
/// located in the current call directory
/// this is primarily used in testing scenarios (eg. debugging)
#[derive(Debug, Deserialize)]
struct Environment {
test_lang: String,
log: String,
}
//#[cfg(feature = "light-theme")]
static STYLESHEET: &'static str = include_str!("../resources/stylesheets/advotracker.css");
//static STYLESHEET: &'static str = include_str!("../resources/stylesheets/policyholder-check.css");
fn get_theme() -> ThemeValue {
//ThemeValue::create_from_css(LIGHT_THEME_EXTENSION_CSS)
ThemeValue::create_from_css(DEFAULT_THEME_CSS)
.extension_css(STYLESHEET)
.build()
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
use dotenv::dotenv;
use parse_args::parse_args;
//use std::process;
//use std::sync::Arc;
use tracing_subscriber::fmt;
use viperus::Viperus;
//use advotracker::callbacks::policy_check::is_valid;
//use advotracker::data::structures::{PolicyCode, PolicyDataList, PolicyList};
// WIP: can't push pointer by value to widget, call import in widget callback for now
//use advotracker::services::imports::allianzdirectcall::*;
//static DEFAULT_FILTER: &str = concat!(module_path!(), "=", "trace");
// initialize the tracing subsystem
// a drop in replacement for classical logging
// reference: https://tokio.rs/blog/2019-08-tracing/
let span = tracing::span!(Level::TRACE, "advotracker");
let _enter = span.enter();
let subscriber = fmt::Subscriber::builder()
//.with_env_filter("trace")
.with_max_level(tracing::Level::INFO)
.finish();
tracing::subscriber::with_default(subscriber, || {
// get system environment
let mut lang = env::var("LANG").unwrap_or("en".to_string());
trace!(target: "csv-test", message = "main", state = "started");
trace!(target: "csv-test", environment = "system", lang = ?lang);
// testing environment: read from .env file
dotenv().ok();
match envy::from_env::<Environment>() {
Ok(environment) => {
if environment.test_lang != lang { lang = environment.test_lang; }
},
Err(e) => { debug!(target: "advotracker", "{}", e); }
}
// how to handle unumplemented lang resources??
trace!(target: "csv-test", environment = "envy");
// initialize viperus structure
let mut viperus = Viperus::new();
// lazy_static! {
// static ref VIPERUS: Viperus + 'static = { let mut viperus = Viperus::new(); };
// static ref VIPERUS_COUNT: usize = VIPERUS.len();
// }
// lazy_static! {
// static ref HASHMAP: HashMap<usize, PolicyCode> = {
// let mut policy_numbers = HashMap::new();
// policy_numbers
// }
// static ref COUNT: usize = HASHMAP.len();
// println!("The map has {} entries.", *COUNT);
// }
// parse commandline arguments
trace!(target: "csv-test", process = "parse.arguments", state = "started");
let _ = parse_args(&mut viperus);
trace!(target: "csv-test", process = "parse_argument", state = "finished");
//trace!(target: "Viperus", "Count of Config parameters: {:?}", VIPERUS_COUNT);
// main tasks
trace!(target: "csv-test", process = "main", state = "started");
// moved to callback: checkview_state.rs
Application::from_name("rzerres.advotracker")
.window(move |ctx| {
Window::new()
//.title("OrbTk - Policyholder checker")
.title("AdvoTracker - Versicherungsnummern")
.position((500.0, 100.0))
.size(580.0, 320.0)
.min_width(460.0)
.min_height(180.0)
.resizeable(true)
.theme(get_theme())
.child(main_view::MainView::new().build(ctx))
.build(ctx)
})
.run();
trace!(target: "csv-test", process = "main", state = "finished");
});
Ok(())
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}

View File

@@ -1,107 +0,0 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
use chrono::{Local, DateTime};
use std::error::Error;
use std::collections::HashMap;
use tracing::trace;
//use crate::db::redis;
use crate::data::structures::{PolicyCode, PolicyDataList, PolicyData};
//use crate::data::structures::PolicyDataList;
/// import AllianzDirectCall data from a csv delimeted file
/// save records to redis backend
/// https://docs.rs/csv/1.1.3/csv/cookbook/index.html
/// https://blog.burntsushi.net/csv/
pub fn import(p: &mut String, data_list: &mut PolicyDataList,
policy_numbers: &mut HashMap<usize, PolicyCode>, lang: &String)
-> Result<usize, Box<dyn Error>> {
use std::fs::File;
use std::path::Path;
use std::ffi::OsStr;
let dt_start: DateTime<Local> = Local::now();
trace!(target: "advotrackerd", process = "import", state = "started", date_start = ?dt_start.to_string());
// Note: slash syntax also workd on Windows!
let path = Path::new(p);
// must be a readable file
trace!(target: "advotrackerd", path = ?path);
assert_eq!(path.is_file(), true);
// only accept files with '.txt' extensions
let extension = path.extension();
assert_eq!(extension, Some(OsStr::new("txt")));
// open the file
let file = File::open(path)?;
trace!(target: "advotrackerd", extension = ?extension, file = ?file);
// Build the CSV reader
let mut csv_reader = csv::ReaderBuilder::new()
.has_headers(true)
.delimiter(b' ')
//.comment(Some(b'#'))
//.flexible(true)
.from_reader(file);
{
// We nest this call in its own scope because of lifetimes.
let headers = csv_reader.headers()?;
trace!(target: "advotrackerd", header = ?headers);
}
// Iterate over each record, deserialize und write to our structures
let mut count = 0;
for result in csv_reader.deserialize() {
// The iterator yields Result<StringRecord, Error>, so we check the
// error here.
let record: PolicyData = result?;
//if verbose > 3 {
// println!("{:?}", record);
//}
// WIP: write to redis backend
// append the policy_number to the HashMap
policy_numbers.insert(record.policy_number, record.policy_code);
// push record as new vector elements
data_list.push(record);
count +=1;
};
let dt_end: DateTime<Local> = Local::now();
let duration = dt_end.signed_duration_since(dt_start);
trace!(target: "advotrackerd", record_count = ?count, duration = ?duration);
// Tests
// Takes a reference and returns Option<&V>
let my_policy_numbers : [usize; 2] = [1511111111, 9999999993];
assert_eq!(my_policy_numbers, [1511111111, 9999999993]);
for p in &my_policy_numbers {
match policy_numbers.get(&p) {
Some(policy_code) => {
//println!("Test: Policy-Number {:?} => Policy-Type {:?}, as expected!",
// p, policy_code);
trace!(target: "advotrackerd",
record_test = ?p, status = "success", policy_typ = ?policy_code);
},
_ => {
//println!("Test: Policy-Number {:?} => not valid, can't dereference the Policy-Type as expected", p),
trace!(target: "advotrackerd", record_fail_test = ?p, status = "failed");
}
}
}
trace!(target: "advotrackerd", process = "import", state = "finished", date_stop = ?dt_end.to_string());
Ok(count)
}

View File

@@ -1,72 +0,0 @@
use orbtk::prelude::*;
//use orbtk::theme::vector_graphics::material_icons_font;
use crate::data::keys::*;
//pub struct PolicyMenu {
// pub isvalid: bool
//}
widget!(
PolicyCheckMenu {
isvalid: String
}
);
impl Template for PolicyCheckMenu {
fn template(self, _id: Entity, ctx: &mut BuildContext) -> Self {
self.name("PolicyCheckMenu").child(
Stack::new()
.orientation("vertical")
.spacing(8.0)
.h_align("center")
.child(
Stack::new()
.orientation("horizontal")
.spacing(4.0)
.h_align("start")
.child(
Button::new()
.element("button-user")
.icon("")
.min_width(32.0)
.max_width(32.0)
.build(ctx),
)
.child(
TextBlock::new()
.element("menu-user")
.min_width(80.0)
.max_width(180.0)
.text("angemeldeter Benutzer")
.build(ctx),
)
.build(ctx),
)
.child(
Stack::new()
.orientation("horizontal")
.spacing(4.0)
.h_align("start")
.child(
Button::new()
.element("button-user")
.icon("")
.min_width(32.0)
.max_width(32.0)
.build(ctx),
)
.child(
TextBlock::new()
.element("menu-quit")
.min_width(80.0)
.max_width(180.0)
.text("Quit")
.build(ctx),
)
.build(ctx),
)
.build(ctx)
)
}
}

View File

@@ -1,380 +0,0 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
use orbtk::prelude::*;
use crate::{
data::structures::PolicyCheck,
data::keys::*,
callbacks::policycheck_state::*,
//policycheck_state::{Action, PolicyCheckState},
};
// Macro that initializes the widget structures/variables for our view (essential!)
widget!(
/// Dialog to enter a policy identifier/number.
/// This identifier is checked agains a map of valid policy codes.
PolicyCheckView<PolicyCheckState> {
policy_check: PolicyCheck,
policy_check_title: String16,
policy_data_count: u32
}
);
// The template implementation for our View
impl Template for PolicyCheckView {
fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self {
let policy_check_menu_text_block = TextBlock::new()
.foreground("#3b434a")
.text("Help Menu")
.v_align("center")
.h_align("center")
.build(ctx);
let policy_check_menu_button = Button::new()
.id(ID_POLICY_CHECK_MENU_BUTTON)
.margin((0.0, 0.0, 12.0, 12.0))
.icon(material_icons_font::MD_MENU)
.class(CLASS_ICON_ONLY)
//.attach(Grid::row(0))
.attach(Grid::column(2))
.margin((8.0, 0.0, 2.0, 0.0))
//.text("Menu Button")
//.min_size(8.0, 8.0)
.min_size(16.0, 16.0)
.h_align("end")
//.v_align("center")
//.enabled(true)
.on_mouse_down(|_, _| true)
//.child(policycheck_menu_container)
.on_click(move |ctx, _| {
ctx.get_mut::<PolicyCheckState>(id)
.action(Action::OpenMenu(policy_check_menu_text_block));
true
})
.build(ctx);
let policy_data_count_block = TextBlock::new()
.id(ID_POLICY_DATA_COUNT_BLOCK)
//.class(CLASS_TEXT_BLOCK)
.attach(Grid::row(2))
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.margin((0., 0., 0., 16.))
.h_align("end")
.v_align("end")
.enabled(true)
.min_width(250.0)
.min_height(45.0)
.text("Anzahl Prüfsätze:")
.build(ctx);
// let policy_check_menu_container = Container::new()
// .id(ID_POLICY_CHECK_MENU_CONTAINER)
// .class(CLASS_MENU)
// .attach(Grid::row(3))
// .attach(Grid::column(8))
// .margin((0.0, 0.0, 4.0, 0.0))
// .enabled(false)
// .min_size(120.0, 180.0)
// .v_align("center")
// .on_click(move |ctx, _| {
// ctx.get_mut::<PolicyCheckState>(id)
// .action(Action::NewEntry(quit));
// true
// })
// .build(ctx);
// let policycheck_menu_container = Container::new()
// .id(ID_POLICY_CHECK_MENU_CONTAINER)
// .background("#dfebf5")
// .width(200.0)
// .height(200.0)
// .child(
// The menu implemented as an overlay
//ctx.append_child_to_overlay(policy_check_menu_button).unwrap();
// Starter page: check for valid policy number
self.name("PolicyCheckView")
// initialize struct consuming the derived default macro
.policy_check(PolicyCheck::default())
.child(
Grid::new()
.id(ID_POLICY_CHECK_WIDGET)
.background("#fafafa")
.columns(
Columns::new()
.add(84.0)
.add("*")
.add(50.0)
.build(),
)
.rows(
Rows::new()
// Top Bar
.add("auto")
.add(1.0)
// Content
.add("*")
.add(1.0)
// Bottom Bar
.add(52.0)
/* .add("auto") */
.build(),
)
// Header Bar
.child(
//.border_color("transparent")
Container::new()
//.class(CLASS_TOP_BAR)
.attach(Grid::row(0))
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.child(
Grid::new()
.child(
TextBlock::new()
//.class(CLASS_HEADER)
.class("h1")
//.class(".myheader")
.id(ID_POLICY_CHECK_HEADER)
//.font_size(24)
//.font("Roboto Medium")
.v_align("center")
.h_align("center")
.margin((32.0, 32.0, 32.0, 32.0))
.text("Validierung Versicherungsnummer")
.build(ctx),
)
.build(ctx),
)
.child(policy_check_menu_button)
.build(ctx),
)
.child(
Container::new()
.class("separator")
.attach(Grid::row(1))
.attach(Grid::column_span(3))
.build(ctx),
)
// Policy Check Form
.child(
Container::new()
//.class(CLASS_POLICY_CHECK_FORM)
.attach(Grid::row(2))
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.margin((16.0, 26.0, 26.0, 16.0))
.child(
Grid::new()
.id(ID_POLICY_CHECK_FORM)
.columns(
Columns::new()
// Labels
.add("220.0")
// Seperator
.add("16.0")
// Values
.add("100.0")
.build(),
)
.rows(
Rows::new()
.add("64.0")
.add("64.0")
.build(),
)
.child(
// Labels
Stack::new()
.attach(Grid::column(0))
.attach(Grid::row(0))
.orientation("vertical")
//.v_align("center")
.child(
TextBlock::new()
.id(ID_POLICY_CHECK_LABEL_POLICY_NUMBER)
//.class(CLASS_TEXT_BLOCK)
.margin((0.0, 0.0, 16.0, 16.0))
.h_align("end")
.v_align("center")
.min_width(250.0)
.min_height(45.0)
//.size(250.0, 45.0)
.text("Versicherungsnummer:")
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_POLICY_CHECK_LABEL_RESULT)
.class(CLASS_TEXT_BLOCK)
.attach(Grid::column(0))
.attach(Grid::row(1))
.margin((0.0, 0.0, 16.0, 0.0))
.h_align("end")
.v_align("center")
.min_width(250.0)
.text("Result:")
.build(ctx),
)
.build(ctx)
)
.child(
// Values
Stack::new()
.attach(Grid::column(1))
.attach(Grid::row(0))
//.attach(Grid::column_span(3))
.orientation("vertical")
//.margin((16.0, 16.0, 16.0, 16.0))
//.child(policy_check_text_box)
.child(
TextBox::new()
.id(ID_POLICY_CHECK_POLICY_NUMBER)
.h_align("start")
.width(280.0)
.min_width(200.0)
.margin((0.0, 0.0, 0.0, 16.0))
.lost_focus_on_activation(false)
.water_mark("Nummer 10-stellig")
.text("")
.on_activate(move |ctx, entity| {
// Entity is entered/activated via Mouse/Keyboard
ctx.get_mut::<PolicyCheckState>(id)
.action(Action::ParseEntry(entity));
})
.on_changed(move |ctx, entity| {
// Element value has changed
ctx.get_mut::<PolicyCheckState>(id)
.action(Action::InputTextChanged(entity));
ctx.get_mut::<PolicyCheckState>(id)
.action(Action::SetVisibility(entity));
//ctx.get_widget(policy_check_label_policy_number).set("visible");
// ctx.get_mut::<PolicyCheckState>(id)
// .action(Action::SetVisility(entity));
})
// .on_mouse_down | .on_mouse_move | .on_mouse_up (move |ctx, entity| {
// state(id, states).action(Action::AddItem);
// })
// .on_click(move |states, _| {
// state(id, states).action(Action::AddItem);
// true
// })
.build(ctx),
)
//.icon(material_icons_font::MD_ADD_CIRCLE)
// .child()
// NumericBox::new()
// .id(ID_POLICY_CHECK_POLICY_NUMBER)
// .h_align("start")
// .width(250.0)
// .min(1000000000)
// .max(9999999999)
// .val(0)
// .min_width(200.0)
// .margin((0.0, 0.0, 0.0, 16.0))
// //.lost_focus_on_activation(false)
// //.water_mark("10-stellige Nummer (ohne 'AS')")
// //.text("")
// //.on_activate(move |ctx, entity| {
// // ctx.get_mut::<PolicyCheckState>(id)
// // .action(Action::ParseEntry(entity));
// //})
// // .on_changed(move |ctx, entity| {
// // ctx.get_mut::<PolicyCheckState>(id)
// // .action(Action::InputTextChanged(entity));
// // })
// // .on_update(move |ctx, entity| {
// // ctx.get_mut::<PolicyCheckState>(id)
// // .action(Action::InputTextChanged(entity));
// // })
// .build(ctx),
//)
.child(
TextBlock::new()
.id(ID_POLICY_CHECK_RESULT)
//.id("policy_check_result")
.h_align("start")
.attach(Grid::column(1))
.attach(Grid::row(1))
.text("")
.width(250.)
//.margin((4.0, 0.0, 0.0, 0.0))
//.lost_focus_on_activation(false)
// .on_activate(move |ctx, entity| {
// ctx.get_mut::<PolicyCheckState>(id)
// .action(Action::ParseEntry(entity));
// })
// .on_changed(move |ctx, entity| {
// ctx.get_mut::<PolicyCheckState>(id)
// .action(Action::InputTextChanged(entity));
// })
.build(ctx),
)
.build(ctx)
)
.build(ctx)
)
.build(ctx)
)
.child(
Container::new()
.class("")
.attach(Grid::row(3))
.attach(Grid::column_span(3))
.build(ctx),
)
.child(policy_data_count_block)
// Bottom bar
.child(
Container::new()
.class(CLASS_BOTTOM_BAR)
.attach(Grid::row(4))
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.v_align("end")
.child(
Grid::new()
.element("logo_customer")
.margin((9.0, 16.0, 16.0, 9.0))
.attach(Grid::column(0))
.attach(Grid::row(1))
.h_align("start")
.v_align("center")
.child(
ImageWidget::new()
.image("resources/images/hiedemann_logo.png")
.build(ctx),
)
.build(ctx),
)
.child(
Grid::new()
.element("logo_vendor")
.margin((9.0, 16.0, 16.0, 9.0))
.attach(Grid::column(0))
.attach(Grid::row(5))
.h_align("end")
.v_align("center")
.child(
ImageWidget::new()
.image("resources/images/networkx_logo.png")
.build(ctx),
)
.build(ctx),
//ctx.append_child_to_overlay(policycheck_menu_text_block).unwrap()
)
.build(ctx),
)
.build(ctx),
)
}
}

View File

@@ -1,196 +0,0 @@
use orbtk::prelude::*;
use crate::{
base_state::BaseState,
data::{PolicyDataList, PolicyList},
keys::*,
};
/// Actions that can execute on the task view.
#[derive(Debug, Clone, Copy)]
pub enum Action {
InputTextChanged(Entity),
NewEntry(Entity),
RemoveFocus(Entity),
RemoveEntry(usize),
OpenPolicyList(usize),
SetEntry(Entity),
TextChanged(Entity, usize),
}
/// Handles the requests of the `PolicyListView`.
#[derive(Default, AsAny)]
pub struct PolicyListState {
action:Option<Action>,
add_button: Entity,
items_widget: Entity,
policydata_view: Entity,
last_focused: Option<Entity>,
text_box: Entity,
}
impl BaseState for PolicyListState {}
impl PolicyListState {
/// Sets a new action.
pub fn action(&mut self, action: Action) {
self.action = action.into();
}
/// If policy data element 'name' is empty, disable the add button
/// otherwise otherwise enabled it.
fn adjust_add_button_enabled(&self, text_box: Entity, ctx: &mut Context) {
/* Old syntax
if ctx.get_widget(text_box).get::<String>("name").is_empty() {
ctx.get_widget(self.add_button).set("enabled", false);
} else {
ctx.get_widget(self.add_button).set("enabled", true);
}
ctx.get_widget(self.add_button).update_theme_by_state(true);
*/
if TextBox::get(ctx.get_widget(text_box)).text().is_empty() {
Button::get(ctx.child("add_button")).set_enabled(false);
} else {
Button::get(ctx.child("add_button")).set_enabled(true);
}
// new syntax not implemented yet
ctx.get_widget(self.add_button).update_theme_by_state(true);
}
/// update number of available policy list entries.
fn adjust_count(&self, ctx: &mut Context) {
let policy_list_count = ctx.widget().get::<PolicyList>(PROP_POLICY_LIST).len();
ctx.widget().set(PROP_POLICY_LIST_COUNT, policy_list_count);
}
// Creates a new policy data list.
fn new_entry(&self, name: String, registry: &mut Registry, ctx: &mut Context) {
ctx.widget()
.get_mut::<PolicyList>(PROP_POLICY_LIST)
.push(PolicyList::new(name));
self.adjust_count(ctx);
self.save(registry, ctx);
}
// opens a given policy list name.
fn open_policy_list(&self, index: usize, ctx: &mut Context) {
ctx.get_widget(self.text_box)
.set("text", String16::from(""));
ctx.get_widget(self.policydata_view)
.set("list_index", Some(index));
self.navigate(self.policydata_view, ctx);
}
// removes a policy list.
fn remove_entry(&self, index: usize, registry: &mut Registry, ctx: &mut Context) {
ctx.widget()
.get_mut::<PolicyList>(PROP_POLICY_LIST)
.remove(index);
self.adjust_count(ctx);
self.save(registry, ctx);
}
/// Change status of given text box to edit mode.
fn set_entry(&self, text_box: Entity, ctx: &mut Context) {
if *ctx.get_widget(text_box).get::<bool>("focused") {
ctx.get_widget(text_box).set("enabled", false);
ctx.push_event_by_window(FocusEvent::RemoveFocus(text_box));
return;
}
if let Some(old_focused_element) = ctx.window().get::<Global>("global").focused_widget {
ctx.push_event_by_window(FocusEvent::RemoveFocus(old_focused_element));
}
ctx.get_widget(text_box).set("enabled", true);
// select all
ctx.get_widget(text_box)
.get_mut::<TextSelection>("text_selection")
.start_index = 0;
ctx.get_widget(text_box)
.get_mut::<TextSelection>("text_selection")
.length = ctx.get_widget(text_box).get::<String16>("name").len();
ctx.push_event_by_window(FocusEvent::RequestFocus(text_box));
}
}
impl State for PolicyListState {
fn init(&mut self, registry: &mut Registry, ctx: &mut Context) {
self.text_box = ctx
.entity_of_child(ID_POLICY_LIST_TEXT_BOX)
.expect("PolicyListState.init: Child 'Text box' not found.");
self.add_button = ctx
.entity_of_child(ID_POLICY_LIST_ADD_BUTTON)
.expect("PolicyListState.init: Child 'Add button' not found.");
self.items_widget = ctx
.entity_of_child(ID_POLICY_LIST_ITEMS_WIDGET)
.expect("PolicyListState.init: Child 'Items widget' not found.");
self.policydata_view = (*ctx.widget()
.get::<u32>("policy_list_view")).into();
if let Ok(policy_list_name) = registry
.get::<Settings>("settings")
.load::<PolicyList>(PROP_POLICY_LIST)
{
ctx.widget().set(PROP_POLICY_LIST, policy_list_name);
}
self.adjust_count(ctx);
}
fn update(&mut self, registry: &mut Registry, ctx: &mut Context) {
// clear focus on focus moved
if self.last_focused != ctx.window().get::<Global>("global").focused_widget {
if let Some(last_focused) = self.last_focused {
ctx.get_widget(last_focused).set("focused", false);
ctx.get_widget(last_focused)
.set("visibility", Visibility::Collapsed);
}
}
if let Some(action) = self.action {
match action {
Action::InputTextChanged(text_box) => {
self.adjust_add_button_enabled(text_box, ctx);
}
Action::NewEntry(entity) => {
if let Some(name) = self.fetch_text(ctx, entity) {
self.new_entry(name, registry, ctx);
}
}
Action::RemoveEntry(index) => {
self.remove_entry(index, registry, ctx);
}
Action::TextChanged(entity, index) => {
let text: String16 = ctx.get_widget(entity).clone("text");
if let Some(header) = ctx
.widget()
.get_mut::<PolicyList>("policy_list")
.get_mut(index)
{
header.name = text.to_string();
}
self.save(registry, ctx);
}
Action::SetEntry(text_box) => {
self.last_focused = Some(text_box);
self.set_entry(text_box, ctx);
}
Action::RemoveFocus(text_box) => {
self.last_focused = None;
ctx.push_event_by_window(FocusEvent::RemoveFocus(text_box));
}
Action::OpenPolicyList(index) => {
self.open_policy_list(index, ctx);
}
}
}
self.action = None;
}
}

Submodule advotrackerd deleted from 3331aa284d

View File

@@ -0,0 +1,16 @@
###
# .env
# will overwrite standard environment viariables
###
# set the language variable used in test-runs
#test LANG=es-ES
#test LANG=it-IT
#test LANG=C
# set the language variable (overwriting standard Enviroment)
#TEST_LANG=de_DE
#TEST_LANG=C
#RUST_LOG=advotracker=trace
RUST_LOG=trace
#RUST_LOG=none
USERNAME=hiedemann
DB_DRIVER=sqlite

View File

@@ -0,0 +1 @@
data/POLLFNR_WOECHENTLICH.txt

View File

@@ -0,0 +1,17 @@
###
# .env
# will overwrite standard environment viariables
###
# set the language variable used in test-runs
#test LANG=de-DE
#test LANG=es-ES
#test LANG=C
# set the language variable (overwriting standard Enviroment)
#TEST_LANG=de_DE
#TEST_LANG=C
#RUST_LOG=advotracker=trace
#LANG=de_DE
RUST_LOG=trace
#RUST_LOG=none
USERNAME=hiedemann
DB_DRIVER=sqlite

View File

@@ -0,0 +1,16 @@
###
# .env
# will overwrite standard environment viariables
###
# set the language variable used in test-runs
#test LANG=es-ES
#test LANG=it-IT
#test LANG=C
# set the language variable (overwriting standard Enviroment)
#TEST_LANG=de_DE
#TEST_LANG=C
#RUST_LOG=advotracker=trace
RUST_LOG=trace
#RUST_LOG=none
USERNAME=hiedemann
DB_DRIVER=sqlite

View File

@@ -1,42 +1,71 @@
[package]
name = "advotracker"
version = "0.1.1"
name = "advotracker_client"
version = "0.1.5-alpha2"
authors = ["Ralf Zerres <ralf.zerres@networkx.de>"]
description = "Frontend component that supports lawyers to capture relevant data encountered during an online legal advice."
readme = "README.md"
license = "(0BSD OR MIT)"
edition = "2018"
default-run = "advotracker"
build = "build.rs"
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["winuser"] }
winapi = { version = "0.3", features = [ "winuser" ] }
#diesel = { version = "1.4", features = [ "postgres", "sqlite" ] }
[target.'cfg(target_os = "windows")'.build-dependencies]
winres = { version = "0.1" }
# for language constants
winapi = { version = "0.3", features = [ "winnt" ] }
[dependencies]
async-stream = "~0.2"
chrono = { version = "~0.4.0", features = ["serde"] }
cfg-if = { version = "~1.0" }
clap = { version = "~2.33", features = ["suggestions", "color"] }
csv = { version = "~1.1" }
dotenv = { version = "~0.15.0" }
envy = { version = "~0.4" }
#lazy_static = { version = "~1.4.0" }
#lettre ={ version = "0.10.0-beta.1", features = ["smtp-transport", "native-tls", "hostname", "r2d2", "builder"] }
lettre ={ version = "0.10.0-beta.1" }
lazy_static = { version = "~1.4.0" }
log = { version = "~0.4.8" }
#orbtk = { version = "~0.3.1-alpha3" }
locales = { version = "~0.1" }
maud = { version = "~0.22.1" }
#orbtk = { version = "~0.3.1-alpha4" }
#orbtk = { git = "https://github.com/redox-os/orbtk.git", branch = "develop" }
orbtk = { path = "../../orbtk" }
orbtk = { path = "../../../orbtk" }
serde = { version = "~1.0", features = ["derive"] }
sdl2 = { version = "~0.34" }
substring = { version = "~1" }
#tokio = { version = "~0.2", features = ["macros", "rt-threaded", "stream", "time"] }
tracing = { version = "~0.1" }
tracing-subscriber = { version = "0.2.0-alpha", features = ["tracing-log"] }
tracing-subscriber = { version = "~0.2.0", features = ["tracing-log"] }
viperus = { git = "https://github.com/maurocordioli/viperus", features = ["cache", "fmt-clap", "fmt-env", "global", "watch"] }
[build-dependencies]
winres = { version = "0.1" }
#[dev-dependencies]
[features]
# no features by default
default = []
testing = ["orbtk/debug"]
debug = ["orbtk/debug"]
light = []
[package.metadata.bundle]
name = "advotracker"
identifier = "nwx.advotracker"
short_description = "Online legal advice helper."
description = "Supports lawyers to capture relevant data encountered during an online legal advice.\n"
[package.metadata.winres]
LegalCopyright = "Copyright © 2020-2021"
#[[bin]]
#//name = "policycheck"
#path = "src/bin/policycheck.rs"
[[bin]]
name = "advotracker"
path = "src/main.rs"

View File

@@ -0,0 +1,8 @@
[[apps]]
name = "advotracker"
width = 580
height = 280
assets = "resources/advotracker"
[[apps.fonts]]
font_family = "MaterialIcons-Regular"
src = "resources/fonts/MaterialIcons.ttf"

View File

@@ -0,0 +1 @@
POLLFNR_WOECHENTLICH_test.txt

View File

@@ -0,0 +1 @@
data/POLLFNR_WOECHENTLICH.txt

View File

@@ -0,0 +1 @@
data/POLLFNR_TEST.txt

View File

@@ -0,0 +1 @@
Allianz DirectCall Protokoll!

View File

@@ -0,0 +1,38 @@
# About
This is the client component of `advotracker`.
## Windows specific
We like to support an icon an object attributes for the compiled
version of `advotracker`. While searching for a solution, the description of this
[Web link][https://graphicdesign.stackexchange.com/questions/77359/how-to-convert-a-square-svg-to-all-size-ico]
was adapted and combined with a `windres` crate.
### Icon creation
This commandline solution will create an icon that can be linked into the Windows binary.
* create the `svg` art file
You may use `inkscape`, a versitile and user frendly
tool to create your vector graphics art. Save it as `advotracker.svg`. Next export the scaled png files.
```
inkscape -w 16 -h 16 -o advotracker_16.png -l advotracker.svg
inkscape -w 32 -h 32 -o advotracker_32.png -l advotracker.svg
inkscape -w 48 -h 48 -o advotracker_48.png -l advotracker.svg
inkscape -w 64 -h 64 -o advotracker_64.png -l advotracker.svg
```
* create the `ico` file
The ico format can handle multiple layes with different resolutions.
We make use of ImageMagick to create the icon file like this:
```
convert advotracker_16.png advotracker_32.png advotracker_48.png advotracker_64.png advotracker.ico
```
* link in the icon
rust offers the `windres` crate, that will handle the linking of icons
as well as the definition of binary objet resources. `advotracker`
will define the needed settings in its `build.rs` file.

View File

@@ -0,0 +1,61 @@
// *
// * advotracker - Hotline tackingtool for Advocats
// *
// * Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
// * SPDX-License-Identifier: (0BSD or MIT)
// */
// the language class
Dictionary (
// the map of active identifiers
// like a struct, but keys are also values instead of just beenig identifiers
words: {
// policycheck_view
"Check result": "Prüfungsergebnis",
"Checklist elements: ": "Prüflistenelemente: ",
"Clear": "Zurücksetzen",
"Create ticket": "Ticket erstellen",
"Importing data": "Importiere Datensätze",
"Only numbers are valid": "Nur Nummern sind zulässig",
"Error:": "Fehler:",
"Quit": "Beenden",
"Policy code": "Vers.-Schein/Schadennummer",
"Policy holder": "Versicherungsnehmer",
"Policy number is to long": "Die Nummer ist zu lang",
"Policy number is to short": "Die Nummer ist zu kurz",
"Policy number": "Versicherungsnummer",
"Processing time": "Bearbeitungszeit",
"Reason": "Grund",
"The given policy number is invalid": "Die Versicherungsnummer ist ungültig",
"The given policy number is valid": "Die Versicherungsnummer ist gültig",
"Account": "Benutzer",
"Toggle theme": "Thema wechseln",
"Validation policy number": "Prüfung Versicherungsnummer",
// ticketdata_view
"Callback number": "Rückrufnummer",
"Callback date": "Erreichbarkeit",
"Clear": "Zurücksetzen",
"Deductible": "Selbstbehalt",
"Harm type": "Rechtsproblem",
"IVR comment": "Rechtsrat",
"Policy holder": "Versicherungsnehmer",
"Recipient (To)": "Empfänger (To)",
"Copie (CC)": "Kopie (CC)",
"Send": "Senden",
// localization view
"English": "Englisch",
"German": "Deutsch",
"Language ID": "Sprache ID",
"Localization dialog": "Lokalisierungs-Dialog",
// configuration view
"Configuration settings": "Konfigurationseinstellungen",
"Configuration file": "Konfigurationsdatei",
"Default theme": "Standard-Thema",
"Language Id": "Sprach-Id",
"Load": "Laden",
"Save": "Speichern",
}
)

View File

@@ -0,0 +1,179 @@
Theme (
styles: {
"button_action": (
base: "button",
properties: {
//"background": "transparent",
"border_radius": 3,
"h_align": "center",
"v_align": "center",
},
),
"button_menu": (
base: "button_single_content",
properties: {
"h_align": "end",
//"icon": "material_icons_font::MD_MENU",
},
),
"combo_box_form": (
base: "combo_box",
properties: {
"width": 200,
//"height": 28,
},
),
"combo_box_popup": (
base: "popup_box_popup",
properties: {
"height": 80,
"min_height": 80,
"width": 160,
"min_width": 80,
},
),
"mail_label": (
base: "base",
properties: {
"h_align": "end",
"v_align": "center",
},
),
"mail_to": (
base: "combo_box_form",
properties: {
"h_align": "end",
},
),
"mail_cc": (
base: "combo_box_form",
properties: {
"h_align": "end",
},
),
"configuration_form": (
base: "container",
properties: {
"margin": 4,
},
),
"container_action": (
base: "container_form",
properties: {
"border_width": 1,
"padding": {
"left": 14,
"top": 0,
"right": 14,
"bottom": 0,
},
"h_align": "center",
},
),
"container_form": (
base: "container",
properties: {
"padding": 14,
"border_brush": "$CONTAINER_BORDER",
"border_radius": 0,
"border_width": 1,
"min_height": 330,
},
),
"container_mail": (
base: "container_form",
properties: {
"border_width": 0,
"padding": {
"left": 14,
"top": 0,
"right": 14,
"bottom": 14,
}
},
),
"container_progress": (
base: "container",
properties: {
"border_brush": "$CONTAINER_BORDER",
"h_align": "center",
"padding": 14,
"v_align": "center",
},
),
"header_bar": (
base: "header",
properties: {
//"h_align": "center",
//"v_align": "center",
"min_height": 32,
//"padding": 14,
}
),
"header_text": (
base: "header",
properties: {
"h_align": "center",
"v_align": "center",
}
),
"popup_menu": (
//base: "popup",
properties: {
"width": 300,
"hight": 200,
"border_radius": 0,
"border_width": 1,
"h_align": "center",
},
),
"popup_progress": (
base: "popup",
properties: {
"padding": 4,
},
),
"stack_action": (
//base: "stack",
properties: {
//"min_height": 50,
"orientation": "Horizontal",
"spacing": 50,
},
),
"stack_progress": (
base: "container",
properties: {
"spacing": 10,
},
),
"ticket_data_form_label": (
base: "container_form",
properties: {
"padding": 1,
"h_align": "end",
"v_align": "center",
"margin": {
"left": 0,
"top": 0,
"right": 0,
"bottom": 0,
},
"min_size": 300,
"max_size": 400,
},
),
"ticket_data_form_input": (
base: "ticket_data_form_label",
properties: {
"h_align": "start",
},
),
"text_block_progress": (
base: "small_text",
properties: {
"background": "$PROGRESS_BAR_BACKGROUND",
},
),
}
)

View File

@@ -0,0 +1,10 @@
Theme (
styles: {
"container_form": (
base: "container",
properties: {
"border": 1,
},
),
}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View File

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 123 B

View File

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 123 B

View File

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 289 B

View File

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 126 B

View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

View File

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 351 B

View File

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 130 B

View File

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 193 B

View File

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 452 B

View File

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 131 B

View File

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

View File

@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="105mm"
height="74mm"
viewBox="0 0 105 74"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="Hiedemann_Logo.svg">
<title
id="title850">Hiedemann Rechtsanwälte</title>
<defs
id="defs2" />
<sodipodi:namedview
units="mm"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:window-maximized="1"
inkscape:window-y="27"
inkscape:window-x="0"
inkscape:window-height="1088"
inkscape:window-width="2048"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="285.11146"
inkscape:cx="343.98278"
inkscape:zoom="1.4564683"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Hiedemann Rechtsanwälte</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Hiedemann Rechtsanwälte</dc:title>
</cc:Agent>
</dc:creator>
<dc:publisher>
<cc:Agent>
<dc:title>Networkx GmbH</dc:title>
</cc:Agent>
</dc:publisher>
</cc:Work>
</rdf:RDF>
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:title>Hiedemann Rechtsanwälte</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
style="display:inline"
inkscape:label="Rahmen"
id="layer2"
inkscape:groupmode="layer" />
<g
style="display:inline"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Logo">
<g
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
inkscape:export-filename="/data/development/advotracker/advotracker/resources/images/hiedemann_logo.png"
transform="matrix(0.5,0,0,0.5,26.483775,16.188821)"
id="g1005">
<g
id="g910"
style="display:inline"
transform="translate(-1.958558,18.772823)"
inkscape:export-filename="/data/development/advotracker/advotracker/resources/images/hiedemann_logo.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<rect
ry="6.2927017"
rx="0.08973857"
y="1.2013354"
x="4.9724188"
height="24.806967"
width="99.907379"
id="rect852"
style="vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.0926207;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
</g>
<g
id="g1098"
transform="matrix(1.3250965,0,0,1.3250965,-38.983201,-118.19402)"
inkscape:export-filename="/data/development/advotracker/advotracker/resources/images/hiedemann_logo.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<text
transform="scale(0.95388348,1.0483461)"
id="text835"
y="108.37959"
x="36.210163"
style="font-size:8.71712px;line-height:125%;font-family:FreeSans;-inkscape-font-specification:'FreeSans, Normal';letter-spacing:2.60261px;word-spacing:0px;writing-mode:lr-tb;fill:#c46069;fill-opacity:1;stroke:#000000;stroke-width:0.363212px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.71712px;font-family:'Cyntho Pro';-inkscape-font-specification:'Cyntho Pro, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#c46069;fill-opacity:1;stroke:none;stroke-width:0.363212px"
y="108.37959"
x="36.210163"
id="tspan833"
sodipodi:role="line">HIEDE<tspan
id="tspan889"
style="letter-spacing:1.31762px">M</tspan><tspan
id="tspan883"
style="letter-spacing:1.31762px;stroke-width:0.363212px">A</tspan>NN</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;line-height:125%;font-family:FreeSans;-inkscape-font-specification:'FreeSans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:3.43958px;word-spacing:0px;writing-mode:lr-tb;fill:#9d9b9b;fill-opacity:1;stroke:none;stroke-width:0.444725px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="40.402027"
y="104.09837"
id="text853"
transform="scale(0.86606999,1.1546411)"><tspan
sodipodi:role="line"
id="tspan851"
x="40.402027"
y="104.09837"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333px;font-family:'Cyntho Pro';-inkscape-font-specification:'Cyntho Pro';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#9d9b9b;fill-opacity:1;stroke:none;stroke-width:0.444725px"><tspan
id="tspan925"
style="letter-spacing:3.70417px">REC</tspan><tspan
style="letter-spacing:3.33375px"
id="tspan1083">HT</tspan><tspan
style="letter-spacing:2.92894px"
id="tspan1075">S</tspan><tspan
style="letter-spacing:3.23585px"
id="tspan1069">AN</tspan><tspan
id="tspan921"
style="letter-spacing:2.94746px">WÄLTE</tspan></tspan></text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="181.41733"
height="181.41733"
viewBox="0 0 48 48"
version="1.1"
id="svg8"
sodipodi:docname="Hotline.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
inkscape:export-filename="/data/development/advotracker/images/Hotline.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<title
id="title903">Hotline</title>
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.5001171"
inkscape:cx="106.62221"
inkscape:cy="103.19504"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
units="px"
inkscape:window-width="1280"
inkscape:window-height="656"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
showguides="false"
inkscape:guide-bbox="true">
<sodipodi:guide
position="-2.2601038,30.435621"
orientation="0,-1"
id="guide1331" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Hotline</dc:title>
<cc:license
rdf:resource="http://artlibre.org/licence/lal" />
</cc:Work>
<cc:License
rdf:about="http://artlibre.org/licence/lal">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Hotline-Icon"
inkscape:groupmode="layer"
id="layer1"
style="display:inline">
<g
id="g1369"
transform="translate(47.971251,-0.00147642)">
<path
style="fill:#ffc49b;fill-opacity:0.470588;stroke:#d1b5a4;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.988588;paint-order:markers fill stroke"
d="m -43.193278,41.999791 c 1.49691,-2.40444 3.504494,-4.137234 3.97049,-7.897551 -8.897002,-20.115732 11.448594,-39.761883 23.320156,-25.6774766 4.111107,0.7296566 15.904257,0.2419988 9.448496,27.2025326 0.655793,2.44805 2.687955,4.433014 5.1147,6.285219 -7.038787,4.303603 -14.139814,3.119543 -21.26392,-0.09939 -7.121959,1.345389 -14.838126,5.638639 -20.589922,0.186666 z"
id="path954"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#fff69f;fill-opacity:1;stroke:#d1b4a3;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.992157;paint-order:markers fill stroke"
d="m -16.566294,17.564379 c 2.321537,1.627329 4.680103,3.221015 5.43583,6.271019 l -0.128201,11.537305 c -1.500786,4.68743 -3.897101,6.738521 -6.558077,8.314102 -1.547997,0.916578 -2.915462,2.596633 -4.733266,2.74464 -2.358949,0.192067 -3.335981,-1.37334 -4.702985,-2.208498 -10.561198,-6.452258 -9.299955,-15.045913 -3.54451,-18.563078 5.999351,-1.157234 11.292071,-3.485647 14.231209,-8.09549 z"
id="path956"
sodipodi:nodetypes="cccssscc" />
<path
style="fill:none;fill-opacity:1;stroke:#acbac7;stroke-width:0.999997;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="m -5.8305041,36.150455 c 0.3952343,5.0031 -3.5482004,3.771616 -15.3273579,3.956909"
id="path1001"
sodipodi:nodetypes="cc" />
<g
id="g1357">
<circle
style="opacity:0.902314;fill:#8c8c8c;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.470588;paint-order:markers fill stroke"
id="path1314"
cx="-16.847094"
cy="31.137058"
r="1.6374409" />
<circle
style="opacity:0.902314;fill:#8c8c8c;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.470588;paint-order:markers fill stroke"
id="circle1316"
cx="-29.12112"
cy="31.137058"
r="1.6374409" />
<ellipse
style="opacity:0.902314;fill:#8c8c8c;fill-opacity:1;stroke:none;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.470588;paint-order:markers fill stroke"
id="path1301"
ry="1.5932699"
rx="2.0367212"
cy="39.994835"
cx="-22.984106" />
</g>
<g
id="g1337"
transform="translate(0,1.7607786)">
<rect
style="opacity:1;vector-effect:none;fill:#d9e0e5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect1293"
width="4.1744041"
height="8.3096123"
x="-7.5382333"
y="25.556793" />
<path
style="opacity:0.902314;mix-blend-mode:normal;fill:none;fill-opacity:0.975108;stroke:#acbac7;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="m -7.6299573,25.267021 c 0,0 4.3765084,-0.627056 4.3333554,0.61985 -0.090936,2.627603 0.2119865,5.547594 -0.1762703,7.668357 -0.2291003,1.251407 -4.3491445,0.568011 -4.3491445,0.568011 z"
id="path999"
sodipodi:nodetypes="csscc" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 768 B

After

Width:  |  Height:  |  Size: 768 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 455 KiB

After

Width:  |  Height:  |  Size: 455 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 237 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -0,0 +1,19 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
use winres;
fn main() {
if cfg!(target_os = "windows") {
let mut res = winres::WindowsResource::new();
res.set_icon("assets/icons/adovtracker/advotracker.ico")
.set("InternalName", "ADVOTRACKER.EXE")
// manually set version 0.1.5.2
.set_version_info(winres::VersionInfo::PRODUCTVERSION, 0x0000000100050002);
res.compile().unwrap();
}
}

View File

@@ -11,6 +11,7 @@ enum Action {
ValueChanged(Entity),
IncrementCounter,
RemoveItem,
ToggleTheme(Entity),
}
#[derive(AsAny)]
@@ -31,7 +32,7 @@ impl MainViewState {
}
impl State for MainViewState {
fn update(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
fn update(&mut self, _: &mut Registry, ctx: &mut Context) {
if let Some(action) = self.action {
match action {
Action::AddItem => {
@@ -48,7 +49,8 @@ impl State for MainViewState {
if len == 4 {
button(ctx.child("add-item-button")).set_enabled(false);
button(ctx.child("add-item-button")).set_visibility(Visibility::Collapsed);
button(ctx.child("add-item-button"))
.set_visibility(Visibility::Collapsed);
}
}
}
@@ -62,7 +64,9 @@ impl State for MainViewState {
if len == 1 {
button(ctx.child("remove-item-button")).set_enabled(false);
button(ctx.child("remove-item-button")).set_visibility(Visibility::Collapsed); }
button(ctx.child("remove-item-button"))
.set_visibility(Visibility::Collapsed);
}
}
}
Action::IncrementCounter => {
@@ -86,10 +90,14 @@ impl State for MainViewState {
Action::EntryChanged(entity) => {
println!("entry changed: {}", text_box(ctx.get_widget(entity)).text());
}
Action::ValueChanged(entity) => {
let val = ((slider(ctx.get_widget(entity)).val()).floor() as i32).to_string();
Action::ValueChanged(_entity) => {
//println!("Slider value changed");
}
Action::ToggleTheme(entity) => {
let light = *ctx.get_widget(entity).get::<bool>("selected");
text_block(ctx.child("value_text")).set_text(String16::from(val));
let theme = if light { light_theme() } else { dark_theme() };
ctx.switch_theme(theme);
}
}
@@ -97,7 +105,7 @@ impl State for MainViewState {
}
}
fn update_post_layout(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
fn update_post_layout(&mut self, _: &mut Registry, ctx: &mut Context) {
let mut selection_string = "Selected:".to_string();
for index in &main_view(ctx.widget()).selected_indices().0 {
@@ -109,11 +117,7 @@ impl State for MainViewState {
}
fn create_header(ctx: &mut BuildContext, text: &str) -> Entity {
TextBlock::new()
.text(text)
.element("text-block")
.class("h1")
.build(ctx)
TextBlock::new().text(text).style("header").build(ctx)
}
type List = Vec<String>;
@@ -136,6 +140,14 @@ widget!(
impl Template for MainView {
fn template(self, id: Entity, ctx: &mut BuildContext) -> Self {
let slider = Slider::new()
.min(0.0)
.max(1.0)
.on_changed(move |states, entity| {
state(id, states).action(Action::ValueChanged(entity));
})
.build(ctx);
self.name("MainView")
.result("Button count: 0")
.counter(0)
@@ -147,16 +159,16 @@ impl Template for MainView {
])
.list_count(3)
.selection_list(vec![
"Item 1".to_string(),
"Item 2".to_string(),
"Item 3".to_string(),
"Item 4".to_string(),
"Item 5".to_string(),
"Item 6".to_string(),
"Item 7".to_string(),
"Item 8".to_string(),
"Item 9".to_string(),
"Item 10".to_string(),
"Select Item 1".to_string(),
"Select Item 2".to_string(),
"Select Item 3".to_string(),
"Select Item 4".to_string(),
"Select Item 5".to_string(),
"Select Item 6".to_string(),
"Select Item 7".to_string(),
"Select Item 8".to_string(),
"Select Item 9".to_string(),
"Select Item 10".to_string(),
])
.combo_box_list(vec![
"CB 1".to_string(),
@@ -174,24 +186,20 @@ impl Template for MainView {
.combo_box_list_count(10)
.child(
Grid::new()
.margin(8.)
.columns(
Columns::new()
.add(132.)
.add(16.)
.add(132.)
.add(16.)
.add(132.),
)
.margin(8)
.columns(Columns::new().add(132).add(16).add(132).add(16).add(132))
.rows(Rows::new().add("*").add(32))
.child(
// Row 0
Stack::new()
.attach(Grid::column(0))
.attach(Grid::row(0))
// Column 0
.child(create_header(ctx, "Buttons"))
.child(
Button::new()
.text("Button")
.margin((0., 8., 0., 0.))
.margin((0, 8, 0, 0))
.icon(material_icons_font::MD_CHECK)
.attach(Grid::column(0))
.attach(Grid::row(1))
@@ -204,9 +212,8 @@ impl Template for MainView {
.child(
Button::new()
.text("Primary")
.element("button")
.class("primary")
.margin((0., 8., 0., 0.))
.style("button_primary")
.margin((0, 8, 0, 0))
.icon(material_icons_font::MD_360)
.attach(Grid::column(0))
.attach(Grid::row(2))
@@ -214,9 +221,9 @@ impl Template for MainView {
)
.child(
ToggleButton::new()
.class("single_content")
.style("button_single_content")
.text("ToggleButton")
.margin((0., 8., 2., 0.))
.margin((0, 8, 2, 0))
.icon(material_icons_font::MD_ALARM_ON)
.attach(Grid::column(0))
.attach(Grid::row(3))
@@ -225,45 +232,38 @@ impl Template for MainView {
.child(
CheckBox::new()
.text("CheckBox")
.margin((0., 8., 0., 0.))
.margin((0, 8, 0, 0))
.attach(Grid::column(0))
.attach(Grid::row(4))
.build(ctx),
)
.child(
Switch::new()
.margin((0., 8., 0., 0.))
.margin((0, 8, 0, 0))
.attach(Grid::column(0))
.attach(Grid::row(5))
.build(ctx),
)
.child(slider)
.child(
TextBlock::new()
.margin((0., 8., 0., 0.))
.element("h1")
.id("value_text")
.text("0")
.h_align("center")
.build(ctx),
)
.child(
Slider::new()
.on_changed(move |states, entity| {
state(id, states).action(Action::ValueChanged(entity));
})
ProgressBar::new()
.val(slider)
.margin((0, 8, 0, 0))
.build(ctx),
)
.build(ctx),
)
.child(
Stack::new()
// Column 2
.attach(Grid::column(2))
.attach(Grid::row(0))
.child(create_header(ctx, "Text"))
.child(
TextBlock::new()
.class("body")
.style("body")
.text(("result", id))
.margin((0., 8., 0., 0.))
.margin((0, 8, 0, 0))
.attach(Grid::column(2))
.attach(Grid::row(1))
.build(ctx),
@@ -272,7 +272,7 @@ impl Template for MainView {
TextBox::new()
.water_mark("TextBox...")
.text(("text_one", id))
.margin((0., 8., 0., 0.))
.margin((0, 8, 0, 0))
.attach(Grid::column(2))
.attach(Grid::row(2))
.on_activate(move |states, entity| {
@@ -287,7 +287,7 @@ impl Template for MainView {
TextBox::new()
.water_mark("TextBox...")
.text(("text_two", id))
.margin((0., 8., 0., 0.))
.margin((0, 8, 0, 0))
.attach(Grid::column(2))
.attach(Grid::row(2))
.on_activate(move |states, entity| {
@@ -300,11 +300,10 @@ impl Template for MainView {
)
.child(
Button::new()
.margin((0., 8., 0., 0.))
.class("single_content")
.margin((0., 8., 8., 0.))
.icon(material_icons_font::MD_CLEAR)
.margin((0, 8, 0, 0))
.style("button_single_content")
.text("clear text")
.icon(material_icons_font::MD_CLEAR)
.on_click(move |states, _| {
state(id, states).action(Action::ClearText);
true
@@ -313,8 +312,8 @@ impl Template for MainView {
)
.child(
NumericBox::new()
.margin((-0., 8., 0., 0.))
.max(123.)
.margin((0, 8, 0, 0))
.max(123)
.step(0.123)
.val(0.123)
.build(ctx),
@@ -322,24 +321,25 @@ impl Template for MainView {
.build(ctx),
)
.child(
// Column 4
Grid::new()
.rows(
Rows::new()
.add("auto")
.add(32.)
.add(16.)
.add(204.)
.add(32)
.add(16)
.add(204)
.add("auto")
.add(192.)
.add(192)
.add("auto"),
)
.columns(Columns::new().add("*").add(4.).add("*"))
.columns(Columns::new().add("*").add(4).add("*"))
.attach(Grid::column(4))
.attach(Grid::row(0))
.child(
TextBlock::new()
.text("Items")
.element("text-block")
.class("h1")
.style("header")
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.attach(Grid::row(0))
@@ -353,7 +353,8 @@ impl Template for MainView {
.get::<Vec<String>>("combo_box_list")[index]
.clone();
TextBlock::new()
.margin((0., 0., 0., 2.))
.style("small_text")
.margin((0, 0, 0, 2))
.v_align("center")
.text(text)
.build(bc)
@@ -362,58 +363,53 @@ impl Template for MainView {
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.attach(Grid::row(1))
.margin((0., 8., 0., 0.))
.margin((0, 8, 0, 0))
.count(("combo_box_list_count", id))
.build(ctx),
)
.child(
ItemsWidget::new()
.element("items-widget")
.id("items")
.padding((4., 4., 4., 2.))
.padding((4, 4, 4, 2))
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.attach(Grid::row(3))
.margin((0., 0., 0., 8.))
.margin((0, 0, 0, 8))
// bc = build-context
.items_builder(move |bc, index| {
let text = bc.get_widget(id).get::<Vec<String>>("list")
[index]
.clone();
Button::new()
.margin((0., 0., 0., 2.))
.text(text)
.build(bc)
Button::new().margin((0, 0, 0, 2)).text(text).build(bc)
})
.count(("list_count", id))
.build(ctx),
)
.child(
Button::new()
.element("button")
.class("single_content")
.style("button_single_content")
.id("remove-item-button")
.icon(material_icons_font::MD_REMOVE_CIRCLE)
.on_click(move |states, _| {
state(id, states).action(Action::RemoveItem);
true
})
.min_width(0.)
.min_width(0)
.attach(Grid::column(0))
.attach(Grid::row(4))
.build(ctx),
)
.child(
Button::new()
.element("button")
.class("single_content")
.style("button_single_content")
.id("add-item-button")
.icon(material_icons_font::MD_ADD_CIRCLE)
.on_click(move |states, _| {
state(id, states).action(Action::AddItem);
true
})
.min_width(0.)
.min_width(0)
.attach(Grid::column(2))
.attach(Grid::row(4))
.build(ctx),
@@ -424,27 +420,28 @@ impl Template for MainView {
.attach(Grid::column_span(3))
.attach(Grid::row(5))
.selected_indices(id)
.margin((0., 16., 0., 8.))
.margin((0, 16, 0, 8))
.items_builder(move |bc, index| {
let text = bc
.get_widget(id)
.get::<Vec<String>>("selection_list")[index]
.clone();
TextBlock::new()
.margin((0., 0., 0., 2.))
.margin((0, 0, 0, 2))
.v_align("center")
.text(text)
.build(bc)
})
.on_selection_changed(|_, _, _| println!("Selection changed"))
.count(("selection_list_count", id))
.build(ctx),
)
.child(
// todo: wrong text width????
TextBlock::new()
.element("text-block")
.style("body")
.id("selection")
.max_width(120.)
.max_width(120)
.attach(Grid::column(0))
.attach(Grid::column_span(3))
.attach(Grid::row(6))
@@ -453,6 +450,30 @@ impl Template for MainView {
)
.build(ctx),
)
.child(
// Row 1
Stack::new()
.orientation("horizontal")
.attach(Grid::row(1))
.attach(Grid::column(0))
.child(
TextBlock::new()
.style("body")
.text("Toggle theme: ")
.v_align("center")
.margin((0, 0, 4, 0))
.build(ctx),
)
.child(
Switch::new()
.on_changed(move |states, entity| {
state(id, states).action(Action::ToggleTheme(entity));
})
.v_align("center")
.build(ctx),
)
.build(ctx),
)
.build(ctx),
)
}
@@ -460,14 +481,14 @@ impl Template for MainView {
fn main() {
// use this only if you want to run it as web application.
//orbtk::initialize();
orbtk::initialize();
Application::new()
.window(|ctx| {
Window::new()
.title("OrbTk - widgets example")
.position((100., 100.))
.size(468., 730.)
.position((100, 100))
.size(468, 730)
.resizeable(true)
.child(MainView::new().build(ctx))
.build(ctx)

View File

@@ -0,0 +1,89 @@
/*
* OrbTk - The Orbital Widget Toolkit
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (MIT)
*/
// use orbtk::prelude::*;
// /*
// * WidgetContainer = entity
// */
// // methods get, get_mut, try_get, try_get_mut and clone
// // ctx.widget returns a WidgetContainer that wraps the current widget of the state
// let mut widget_container: WidgetContainer = ctx.widget();
// // property handling (componets)
// // Gets a reference for the property
// // .get<PropertyType>("property_name");
// widget_container.get::<String16>("text");
// // Sets the value of a property
// // .set<PropertyType>("property_name", property_value);
// widget_container.set::<String16>("text", "my_text");
// /*
// * Child WidgetContainer = child entity
// */
// // child of a state's widget, that is referenced by an entity id.
// // e.g: .child(TextBox::new().id(child_entity_id).build(ctx)
// let mut child: WidgetContainer = ctx.get_widget(child_entity_id);
// // child of a state's widget that is referenced by an string id
// // e.g: .child(TextBox::new().id("text_box_id").build(ctx)
// let child: WidgetContainer = ctx.child("text_box_id");
// // property handling (components)
// // Gets an TextBoxCtx wrapper for the text box child.
// let mut text_box: TextBoxCtx = text_box(ctx.child("text_box_id"));
// // or as an alternative:
// let text_box: TextBoxCtx = TextBox::get(ctx.child("text_box_id"));
// // get child field attributes
// let text_len = text_box.text().len();
// // set child field attributes
// text_box.set_text("My new text");
// /*
// * Registry handling
// */
// // register service
// fn update(registry: &mut Registry, _: &mut Context) {
// registry.register("my_db_serve", MyDBServie::new());
// }
// // access service
// fn update(registry: &mut Registry, _: &mut Context) {
// let mut my_db_service: MyDBSerivce = registry.get_mut("my_db_service");
// }
// API Update: access properties of widgets in states
// Old style
// let text = *button(&mut ctx.widget()).text();
// let text = Button::get(&mut ctx.widget()).text();
// let text = *button(&mut ctx.widget()).clone_text();
// let text = Button::get(&mut ctx.widget()).clone_text();
// button(&mut ctx.widget()).text_mut().push_str("test");
// Button::get(&mut ctx.widget()).text_mut().push_str("test");
// button(&mut ctx.widget()).set_text(String16::from("test"));
// Button::get(&mut ctx.widget()).set_text(String16::from("test"));
// Current style
// let text = Button::text_clone(&ctx.widget());
// Button::text_mut(&mut ctx.widget()).push_str("test");
// Button::text_set(&mut ctx.widget(), String16::from("test"));
//
// TextBehaviour::offset_set(&mut ctx.widget(self.text_block), offset);
// or
// ctx.get_widget(self.text_block).set("offset", offset);
fn main() {}

View File

@@ -0,0 +1,800 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
// suppress creation of a new console window on window
#![windows_subsystem = "windows"]
use locales::t;
use orbtk::{
prelude::*,
theme_default::{THEME_DEFAULT, THEME_DEFAULT_COLORS_DARK, THEME_DEFAULT_FONTS},
theming::config::ThemeConfig,
};
use cfg_if::cfg_if;
use serde::Deserialize;
use std::env;
use std::time::SystemTime;
use tracing::{Level, info, trace};
use advotracker::{
data::{constants::*, structures::Email},
widgets::global_state::GlobalState,
//services::exports::send_ticketdata::sendticketdata,
widgets::policycheck::*,
widgets::policycheck_state::*,
widgets::main_view,
widgets::ticketdata::*,
};
#[cfg(target_os = "windows")]
use orbtk::theme_fluent::{THEME_FLUENT, THEME_FLUENT_COLORS_DARK, THEME_FLUENT_FONTS};
pub enum TicketdataAction {
ClearForm(),
SendForm(),
UpdatePolicyCode(String)
}
// German localization file.
static ADVOTRACKER_DE_DE: &str = include_str!("../assets/advotracker/advotracker_de_DE.ron");
/// Get the active language environment.
fn get_lang() -> String {
// get system environment
let mut lang = env::var("LANG").unwrap_or_else(|_| "C".to_string());
lang = lang.substring(0,5).to_string(); // "de_DE.UTF-8" -> "de_DE"
info!("GUI-Language: preset to {:?}", lang);
// return the active language
lang
}
cfg_if! {
if #[cfg(windows)] {
/// Extend and register theme assets.
fn theme() -> Theme {
register_default_fonts(Theme::from_config(
ThemeConfig::from(DEFAULT_DARK_EXT)
.extend(ThemeConfig::from(THEME_DEFAULT))
.extend(ThemeConfig::from(THEME_DEFAULT_COLORS_DARK))
.extend(ThemeConfig::from(THEME_DEFAULT_FONTS)),
))
}
fn theme_fluent() -> Theme {
register_fluent_fonts(Theme::from_config(
ThemeConfig::from(FLUENT_DARK_EXT)
.extend(ThemeConfig::from(THEME_FLUENT))
.extend(ThemeConfig::from(THEME_FLUENT_COLORS_DARK))
.extend(ThemeConfig::from(THEME_FLUENT_FONTS)),
))
// register_fluent_fonts(Theme::from_config(
// ThemeConfig::from(FLUENT_LIGHT_EXT)
// .extend(ThemeConfig::from(THEME_FLUENT))
// .extend(ThemeConfig::from(THEME_FLUENT_COLORS_DARK))
// .extend(ThemeConfig::from(THEME_FLUENT_FONTS)),
}
} else {
/// Extend and register theme assets.
fn theme() -> Theme {
register_default_fonts(Theme::from_config(
ThemeConfig::from(DEFAULT_DARK_EXT)
.extend(ThemeConfig::from(THEME_DEFAULT))
.extend(ThemeConfig::from(THEME_DEFAULT_COLORS_DARK))
.extend(ThemeConfig::from(THEME_DEFAULT_FONTS)),
))
}
}
}
// Main
fn main() -> Result<(), Box<dyn std::error::Error>> {
// initialize the tracing subsystem
// a drop in replacement for classical logging
// reference: https://tokio.rs/blog/2019-08-tracing/
let span = tracing::span!(Level::TRACE, "advotracker");
let _enter = span.enter();
let subscriber = fmt::Subscriber::builder()
.with_env_filter(trace)
//.with_max_level(tracing::Level::DEBUG)
.finish();
tracing::subscriber::with_default(subscriber, || {
// get system environment
let lang = get_lang();
let mut state = t!("state.started", lang);
let mut res = t!("parse.environment", lang);
trace!(target: "advotracker", process = ?res, state = ?state);
trace!(target: "advotracker", environment = "system", lang = ?lang);
trace!(target: "advotracker", machine = ?&machine_kind);
// how to handle unimplemented lang resources??
res = t!("parse.environment", lang);
trace!(target: "advotracker", environment = "envy", lang = ?lang);
state = t!("state.finished", lang);
trace!(target: "advotracker", process = ?res, state = ?state);
// main tasks
res = t!("main.started", lang);
state = t!("state.started", lang);
trace!(target: "advotracker", process = ?res, state = ?state);
// use this only if you want to run it as web application.
orbtk::initialize();
// Preset localization and language from given environment.
// if no dictionary is set for the chosen default language
// the content of the text property will be drawn.
//let language = lang.substring(0,5); // "de_DE.UTF-8" -> "de_DE"
//info!("GUI-Language: preset to {:?}", language);
let localization = RonLocalization::create()
.language(&lang)
.dictionary("de_DE", ADVOTRACKER_DE_DE)
.build();
Application::from_name("nwx.advotracker")
.localization(localization)
.theme(theme())
.window(|ctx| {
Window::new()
.title("AdvoTracker - DirectCall")
.position((500.0, 100.0))
.size(800.0, 600.0)
//.min_width(460.0)
//.min_height(380.0)
.resizeable(true)
.child(main_view::MainView::new().build(ctx))
.build(ctx)
})
.run();
state = t!("state.finished", lang);
res = t!("main.finished", lang);
trace!(target: "advotracker", process = ?res, state = ?state);
});
Ok(())
}
// View
widget!(MainView {
policycheck_view: PolicyCheck
});
impl Template for MainView {
fn template(self, _id: Entity, ctx: &mut BuildContext<'_>) -> Self {
let ticketdata_view = TicketdataView::new()
.build(ctx);
let policycheck_view = PolicycheckView::new()
.target(ticketdata_view.0)
.build(ctx);
self.name("MainView")
.child(
TabWidget::new()
.tab(ID_POLICY_CHECK_VIEW, policycheck_view)
.tab(ID_TICKET_DATA_VIEW, ticketdata_view)
.build(ctx),
)
}
}
// Macro that initializes the widget structures/variables for the policy check view
widget!(
/// Form to enter data of a ticket record
TicketdataView<TicketdataState> {
// language used inside the widget
lang: String,
// title used in the header
ticket_data_title: String,
// entity id that will receive the messages
target: u32
}
);
/// The template implementation of the ticket view
/// All GUI elements are styled using the "style" attribute referencing to a ron based css
impl Template for TicketdataView {
fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self {
let tenent_logo = Container::new()
.margin((16, 16, 0, 0))
.attach(Grid::column(0))
.v_align("center")
.child(
ImageWidget::new()
.image("assets/advotracker/hiedemann_logo.png")
.v_align("center")
.build(ctx),
)
.build(ctx);
let ticket_data_bottom_bar = Container::new()
.id(ID_TICKET_DATA_BOTTOM_BAR)
.style(STYLE_BOTTOM_BAR)
.attach(Grid::row(4))
.attach(Grid::column(1))
.attach(Grid::column_span(2))
.v_align("end")
.child(
Container::new()
.attach(Grid::column(1))
.h_align("end")
.v_align("end")
.child(
TextBlock::new()
.margin((0, 9, 48, 0))
.text("©Networkx GmbH")
.build(ctx)
)
.build(ctx),
)
.build(ctx);
let ticket_data_button_menu = Button::new()
.id(ID_TICKET_DATA_BUTTON_MENU)
.attach(Grid::row(0))
.attach(Grid::column(2))
.h_align("end")
.icon(material_icons_font::MD_MENU)
//.style("button_single_content")
.style(STYLE_BUTTON_MENU)
.build(ctx);
let ticket_data_form = Container::new()
.id(ID_TICKET_DATA_FORM)
.name(ID_TICKET_DATA_FORM)
.attach(Grid::row(2))
.attach(Grid::column(1))
.style("container_form")
.child(
Grid::new()
.id(ID_TICKET_DATA_GRID)
.name(ID_TICKET_DATA_GRID)
.columns(
Columns::create()
.push("auto") // Label
.push(16) // Delimiter
.push("*") // Data
.push(32) // Delimiter (2x margin)
)
.rows(
Rows::create()
.push("auto") // Row 0
.push(14) // Seperator
.push("auto") // Row 2
.push(14) // Seperator
.push("auto") // Row 4
.push(14) // Seperator
.push("auto") // Row 6
.push(14) // Seperator
.push("auto") // Row 8
.push(14) // Seperator
.push("auto") // Row 10
.push(14) // Seperator
.push("auto") // Row 12
.push(14) // Seperator
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_POLICY_CODE)
.attach(Grid::row(0))
.attach(Grid::column(0))
.text("Policy code")
.h_align("end")
.v_align("center")
.build(ctx),
)
.child(
TextBox::new()
.id(ID_TICKET_DATA_POLICY_CODE)
.attach(Grid::row(0))
.attach(Grid::column(2))
.text("")
.v_align("center")
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_POLICY_HOLDER)
.attach(Grid::row(2))
.attach(Grid::column(0))
.text("Policy holder")
.h_align("end")
.v_align("center")
.build(ctx),
)
.child(
TextBox::new()
.id(ID_TICKET_DATA_POLICY_HOLDER)
.attach(Grid::row(2))
.attach(Grid::column(2))
.text("")
.water_mark("Name des Versicherungsnehmers")
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_DEDUCTIBLE)
.attach(Grid::row(4))
.attach(Grid::column(0))
.text("Deductible")
.h_align("end")
.v_align("center")
.build(ctx),
)
.child(
TextBox::new()
.id(ID_TICKET_DATA_DEDUCTIBLE)
.attach(Grid::row(4))
.attach(Grid::column(2))
.text("")
.water_mark("im Beratungsgespräch erfragen")
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_CALLBACK_NUMBER)
.attach(Grid::row(6))
.attach(Grid::column(0))
.text("Callback number")
.h_align("end")
.v_align("center")
.build(ctx),
)
.child(
TextBox::new()
.id(ID_TICKET_DATA_CALLBACK_NUMBER)
.attach(Grid::row(6))
.attach(Grid::column(2))
.text("")
.water_mark("wie zu erreichen")
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_CALLBACK_DATE)
.attach(Grid::row(8))
.attach(Grid::column(0))
.text("Callback date")
.h_align("end")
.v_align("center")
.build(ctx),
)
.child(
TextBox::new()
.id(ID_TICKET_DATA_CALLBACK_DATE)
.attach(Grid::row(8))
.attach(Grid::column(2))
.text("")
.water_mark("Rückruf gewünscht um")
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_HARM_TYPE)
.attach(Grid::row(10))
.attach(Grid::column(0))
.text("Harm type")
.h_align("end")
.v_align("center")
.build(ctx),
)
.child(
TextBox::new()
.id(ID_TICKET_DATA_HARM_TYPE)
.name(ID_TICKET_DATA_HARM_TYPE)
.attach(Grid::row(10))
.attach(Grid::column(2))
.text("")
.water_mark("Schadenstyp")
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_IVR_COMMENT)
.attach(Grid::row(12))
.attach(Grid::column(0))
.text("IVR comment")
.h_align("end")
.v_align("center")
.build(ctx),
)
.child(
TextBox::new()
.id(ID_TICKET_DATA_IVR_COMMENT)
.attach(Grid::row(12))
.attach(Grid::column(2))
.text("")
.water_mark("Kommentar zur Haftung, bzw. zur Deckung")
//.height(48.0)
.build(ctx),
)
.build(ctx),
)
.build(ctx);
let ticket_data_form_action = Container::new()
.id(ID_TICKET_DATA_ACTION_GRID)
.attach(Grid::row(3))
.attach(Grid::column(1))
//.style(STYLE_CONTAINER_ACTION)
.padding(14)
.h_align("center")
.child(
Stack::new()
//.style(STYLE_STACK_ACTION)
.orientation("horizontal")
.spacing(50)
.child(
Button::new()
.id(ID_TICKET_DATA_ACTION_BUTTON_CLEAR)
.style(STYLE_BUTTON_ACTION)
.text("Clear")
.on_click(move |states, _| {
states.send_message(TicketdataAction::ClearForm(), id);
false
})
.build(ctx),
)
.child(
Button::new()
.id(ID_TICKET_DATA_ACTION_BUTTON_SEND)
.style(STYLE_BUTTON_ACTION)
.text("Send")
//.visibility(Visibility::Collapsed)
.on_click(move |states, _entity| {
states.send_message(TicketdataAction::SendForm(), id);
false
})
.build(ctx),
)
.build(ctx),
)
.build(ctx);
// vector with valid mail recipients addresses (mail_to)
let items_mail_to = vec![
PROP_MAIL_TO_1,
PROP_MAIL_TO_2,
PROP_MAIL_TO_3,
PROP_MAIL_TO_4,
];
let items_mail_to_count = items_mail_to.len();
// vector with valid carbon copy recipients addresses (mail_to)
let items_mail_cc = vec![
PROP_MAIL_CC_1,
PROP_MAIL_CC_2,
];
let items_mail_cc_count = items_mail_cc.len();
let ticket_data_form_mail = Container::new()
.id(ID_TICKET_DATA_CONTAINER_MAIL)
.name(ID_TICKET_DATA_CONTAINER_MAIL)
.attach(Grid::row(1))
.attach(Grid::column(1))
.style(STYLE_CONTAINER_MAIL)
.child(
Grid::new()
.columns(
Columns::create()
.push(16) // Delimiter
.push("stretch") // Label
.push(16) // Delimiter
.push("auto") // MailAddress
.push("32") // Delimiter (2x margin)
)
.rows(
Rows::create()
.push("auto") // Row 0
.push(2) // Seperator
.push("auto") // Row 2
.push(2) // Seperator
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_MAIL_TO)
.attach(Grid::row(0))
.attach(Grid::column(1))
.style(STYLE_MAIL_LABEL)
.text("Recipient (To)")
.build(ctx),
)
.child(
/// WIP: get selected item
ComboBox::new()
.id(ID_TICKET_DATA_MAIL_TO)
.attach(Grid::row(0))
.attach(Grid::column(3))
.style(STYLE_MAIL_TO)
.count(items_mail_to_count)
.items_builder(move |ibc, index| {
let text_mail_to = TicketdataView::items_mail_to_ref(&ibc.get_widget(id))[index].clone();
TextBox::new()
.text(text_mail_to)
.v_align("center")
.build(ibc)
})
.selected_index(0)
.build(ctx),
)
.child(
TextBlock::new()
.id(ID_TICKET_DATA_LABEL_MAIL_CC)
.attach(Grid::row(2))
.attach(Grid::column(1))
.style(STYLE_MAIL_LABEL)
.text("Copie (CC)")
.build(ctx),
)
.child(
ComboBox::new()
.id(ID_TICKET_DATA_MAIL_CC)
.attach(Grid::row(2))
.attach(Grid::column(3))
.style(STYLE_MAIL_CC)
.count(items_mail_cc_count)
.items_builder(move |ibc, index| {
let text_mail_cc = TicketdataView::items_mail_cc_ref(&ibc.get_widget(id))[index].clone();
TextBox::new()
.text(text_mail_cc)
.v_align("center")
.build(ibc)
})
.selected_index(0)
.build(ctx),
)
.build(ctx),
)
.build(ctx);
let ticket_data_header_text = TextBlock::new()
.id(ID_TICKET_DATA_HEADER)
.attach(Grid::column(0))
.style(STYLE_HEADER_TEXT)
.text("Ticket Data")
.build(ctx);
let ticket_data_header_bar = Container::new()
.id(ID_TICKET_DATA_HEADER_BAR)
.attach(Grid::row(0))
.attach(Grid::column_span(3))
.style(STYLE_HEADER_BAR)
.child(tenent_logo)
.child(ticket_data_header_text)
.child(ticket_data_button_menu)
.build(ctx);
// Widget: Ticket data view
self.id(ID_TICKET_DATA_VIEW)
.name(ID_TICKET_DATA_VIEW)
.min_height(410.0)
.child(
Grid::new()
.id(ID_TICKET_DATA_GRID)
.columns(
Columns::create()
.push(50) // Left margin
.push("*") // Content
.push(50) // Right margin
)
.rows(
Rows::create()
.push("auto") // Header_Bar
.push("auto") // Mail_Form
.push("*") // Input_Form
.push("auto") // Action
.push("auto") // Bottom_Bar
)
.child(ticket_data_header_bar) // row 0
.child(ticket_data_form_mail) // row 1
.child(ticket_data_form) // row 2
.child(ticket_data_form_action) // row 3
.child(ticket_data_bottom_bar) // row 4
.build(ctx),
)
}
}
// State
impl GlobalState for TicketdataState {}
/// Method definitions, that react on any given state change inside the `Ticketdata` widget.
impl TicketdataState {
/// Clear the text property of all children of the given form entity
pub fn clear_form(entity: Entity, ctx: &mut Context<'_>) {
if let Some(count) = ctx.get_widget(entity).children_count() {
info!("Widget name: {:?}", ctx.get_widget(entity).get::<String>("name"));
info!("Widget id: {:?}", ctx.get_widget(entity).get::<String>("id"));
}
// identify the form by its id
if let form_entity = ctx.child(ID_TICKET_DATA_GRID).entity() {
info!("Form id: {:?}", ctx.get_widget(form_entity).get::<String>("id"));
info!("Form node name: {:?}", ctx.get_widget(form_entity).get::<String>("name"));
// Loop through children
if let Some(count) = ctx.get_widget(form_entity).children_count() {
for c in 1..=count {
info!("WIP clear entry of child {:?}", c);
//info!("WIP clear entry of child {:?}: {:?}", c, ctx.get_child(form_entity).get::<String>("name"));
}
}
}
}
pub fn send_form(entity: Entity, ctx: &mut Context<'_>, lang: &str) {
// type conversion (String -> u64)
//let policy_code = ctx.child(ID_TICKET_DATA_POLICY_CODE).get::<String>("text").unwrap().parse::<u64>().unwrap();
// WIP: get selected items ComboBox'es
//let mail_cc_index = *TicketdataView::selected_index_ref(&ctx.widget()) as usize;
//let mail_cc_selected = TicketdataView::mail_cc_ref(&ctx.widget())[mail_cc_index].clone();
// create Email structures
let email = Email {
// WIP: mail_to -> selected index auslesen
//mail_to: ctx.child(ID_TICKET_DATA_MAIL_TO).get::<String>("text").to_string(),
// WIP: mail_cc -> selected index auslesen
//mail_cc: ctx.child(ID_TICKET_DATA_MAIL_CC).get::<String>("text").to_string(),
mail_to: PROP_MAIL_TO_1.to_string(),
mail_cc: PROP_MAIL_CC_1.to_string(),
mail_bcc: PROP_MAIL_BCC_1.to_string(),
mail_from: PROP_MAIL_FROM.to_string(),
mail_reply: PROP_MAIL_REPLY.to_string(),
subject: PROP_MAIL_SUBJECT.to_string(),
policy_code: ctx.child(ID_TICKET_DATA_POLICY_CODE).get::<String>("text").to_string(),
policy_holder: ctx.child(ID_TICKET_DATA_POLICY_HOLDER).get::<String>("text").to_string(),
deductible: ctx.child(ID_TICKET_DATA_DEDUCTIBLE).get::<String>("text").to_string(),
callback_number: ctx.child(ID_TICKET_DATA_CALLBACK_NUMBER).get::<String>("text").to_string(),
callback_date: ctx.child(ID_TICKET_DATA_CALLBACK_DATE).get::<String>("text").to_string(),
harm_type: ctx.child(ID_TICKET_DATA_HARM_TYPE).get::<String>("text").to_string(),
ivr_comment: ctx.child(ID_TICKET_DATA_IVR_COMMENT).get::<String>("text").to_string(),
};
info!("WIP: Sending form to construct eMail to {:?}", email);
// send email via service
let _ = sendticketdata(&email, &lang);
}
}
/// Supported methods handled inside the `TicketState`
impl State for TicketdataState {
/// Initialize the state of widgets inside `TicketState`
fn init(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
let time_start= SystemTime::now();
trace!(target: "advotracker", ticketdata_state = "init", status = "started");
// Initialize required entities
self.button_menu = ctx
.entity_of_child(ID_TICKET_DATA_BUTTON_MENU)
.expect("TicketState.init: Can't find resource entity 'ID_TICKET_DATA_BUTTON_MENU'.");
self.target = Entity::from(ctx.widget().try_clone::<u32>("target")
.expect("TicketState.init: Can't find resource entity 'target'."));
// Get language from environment
self.lang = TicketdataState::get_lang();
let time_end = SystemTime::now();
let duration = time_end.duration_since(time_start);
trace!(target: "advotracker", ticketdata_state = "init", status = "finished", duration = ?duration);
}
fn messages(
&mut self,
mut messages: MessageReader,
_registry: &mut Registry,
ctx: &mut Context<'_>,
) {
for message in messages.read::<TicketdataAction>() {
match message {
TicketdataAction::ClearForm() => {
info!("message: {:?} recieved", message);
TicketdataState::clear_form(ctx.entity(), ctx);
}
TicketdataAction::SendForm() => {
info!("message: {:?} recieved", message);
TicketdataState::send_form(ctx.entity(), ctx, &self.lang);
}
_ => { println!("messages: action not implemented!"); }
}
}
for message in messages.read::<PolicycheckAction>() {
match message {
PolicycheckAction::UpdatePolicyCode => {
info!("Message received: 'PolicycheckAction::UpdatePolicyCode'");
TextBlock::text_set(&mut ctx.child(ID_TICKET_DATA_POLICY_CODE), policy_code);
}
_ => { println!("messages: action not implemented!"); }
}
}
}
fn update(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
let actions: Vec<TicketdataAction> = self.actions.drain(..).collect();
for action in actions {
match action {
TicketdataAction::ClearForm() => {
info!("update: send_message {:?}", action);
ctx.send_message(TicketdataAction::ClearForm(), self.target);
}
TicketdataAction::SendForm() => {
//ctx.send_message(TicketdataAction::SendForm(), self.ID_TICKETDATA_FORM);
info!("update: send_message {:?}", action);
}
_ => { println!("TicketdataAction: action not implemented!"); }
}
}
}
}
/// send ticket data via eMail
pub fn sendticketdata(email: &Email, lang: &str) -> Result<(), Box<dyn Error>> {
let mut res = t!("sendticketdata.export.started", lang);
let mut state = t!("state.started", lang);
trace!(target: "sendticketdata", process = ?res, state = ?state);
let ascii_body = String::new()
+ &"Vers.-Schein/Schadennummer".to_string() + &(email.policy_code) + &"\n"
+ &"Versicherungsnehmer: ".to_string() + &(email.policy_holder) + &"\n"
+ &"Selbstbehalt: ".to_string() + &(email.deductible) + &"\n"
+ &"Rückrufnummer: ".to_string()+ &(email.callback_number) + &"\n"
+ &"Erreichbarkeit: ".to_string() + &(email.callback_date) + &"\n"
+ &"Rechtsproblem: ".to_string() + &(email.harm_type) + &"\n"
+ &"Rechtsrat: ".to_string() + &(email.ivr_comment) + &"\n";
info!("email body: {:?}", ascii_body);
let message = Message::builder()
//.reply_to("Kanzlei Hiedemann <info@hiedemann.de>".parse().unwrap())
.to("Kanzlei Hiedemann <info@hiedemann.de>".parse().unwrap())
.cc(" <ralf.zerres@networkx.de>".parse().unwrap())
.reply_to((email.mail_reply).parse().unwrap())
//.to((email.mail_to).parse().unwrap())
//.cc((email.mail_cc).parse().unwrap())
//.bcc((email.mail_bcc).parse().unwrap())
.from((email.mail_from).parse().unwrap())
.subject(String::new()
+ &email.subject.to_string()
+ &" (".to_string()
+ &email.policy_code.to_string()
+ &")".to_string()
)
.multipart(
MultiPart::alternative() // This is composed of two parts.
.singlepart(
SinglePart::builder()
.header(header::ContentType(
"text/plain; charset=utf8".parse().unwrap(),
))
.body(String::from(ascii_body)),
)
)
.expect("failed to build email");
info!("message: {:?}", message);
trace!(target: "sendticketdata", email = ?email);
state = t!("state.finished", lang);
res = t!("sendticketdata.export.finished", lang);
trace!(target: "sendticketdata", process = ?res, state = ?state);
Ok(())
}

Some files were not shown because too many files have changed in this diff Show More