7 Commits
master ... next

Author SHA1 Message Date
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
63 changed files with 415 additions and 1628 deletions

3
.gitmodules vendored
View File

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

View File

@@ -25,11 +25,23 @@ Dictionary (
"The given policy number is invalid": "Die Versicherungsnummer ist ungültig", "The given policy number is invalid": "Die Versicherungsnummer ist ungültig",
"The given policy number is valid": "Die Versicherungsnummer ist gültig", "The given policy number is valid": "Die Versicherungsnummer ist gültig",
"Only numbers are valid": "Nur Nummern sind zulässig", "Only numbers are valid": "Nur Nummern sind zulässig",
// localization "Account": "Benutzer",
"Toggle theme": "Thema wechseln",
"Quit": "Beenden",
// localization view
"Hello": "Hallo", "Hello": "Hallo",
"User": "Anwender", "User": "Anwender",
"Localization dialog": "Lokalisierungs-Dialog", "Localization dialog": "Lokalisierungs-Dialog",
"German": "Deutsch", "German": "Deutsch",
"English": "Englisch" "English": "Englisch",
// configuration view
"Configuration settings": "Konfigurationseinstellungen",
"Configuration file": "Konfigurationsdatei",
"Language Id": "Sprach-Id",
"Default theme": "Standard-Thema",
"load": "laden",
"save": "speichern"
} }
) )

View File

@@ -0,0 +1,16 @@
Theme (
styles: {
"button_single_content_segmdl2": (
base: "button_single_content",
properties: {
"icon font": "$SEGEO_ICON_FONT",
},
),
"container_master_detail": (
base: "container",
properties: {
"padding": 14,
},
),
}
)

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

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

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 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

View File

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 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

@@ -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,122 +0,0 @@
Theme (
styles: {
"button_menu": (
base: "menu",
properties: {
"background": "transparent",
//"background": "$GOLDEN_DREAM",
//"background": "$LINK_WATER",
//"border_brush": "$LINK_WATER",
//"border_brush": "$GOLDEN_DREAM",
"border_radius": 0,
"border_width": 0,
//"foreground": "$BRIGHT_GRAY",
//"icon_brush": "$BRIGHT_GRAY",
"font_size": "$ICON_SIZE_16",
"h_align": "left",
//"height": 14,
"margin": (0, 4, 0, 0),
//"padding": (8, 0, 8, 0),
},
),
"container_menu": (
properties: {
"border_radius": 0,
"border_width": 1,
"background": "$BRIGHT_GRAY",
"border_brush": "$LINK_WATER",
//"border_brush": "$GOLDEN_DREAM",
"padding": 4,
},
),
"container_progress": (
properties: {
"border_radius": 3,
"border_width": 1,
"background": "$BRIGHT_GRAY",
"border_brush": "$LINK_WATER",
//"border_brush": "$GOLDEN_DREAM",
"padding": 14,
"h_align": "end"
},
),
"container_form": (
base: "container",
properties: {
"background": "$BRIGHT_GRAY",
"border_brush": "$LINK_WATER",
"border_radius": 3,
"border_width": 1,
"padding": 14,
"v_align": "top",
},
),
"header_bar": (
base: "header",
properties: {
"foreground": "$LINK_WATER",
},
),
"hint": (
base: "body",
properties: {
"font_size": 11,
"font_family": "$MEDIUM_FONT",
"width": "250",
"min_width": "250"
},
),
"menu": (
//base: "base",
properties: {
"font_size": 16,
"font_family": "$MEDIUM_FONT",
"background": "$BLACK",
"opacity": 1,
},
states: {
"pressed": {
"background": "$WHITE",
},
},
),
"popup_progress": (
base: "popup",
properties: {
//"h_align": "center",
"width": 300,
"heigth": 120,
},
),
"stack_menu": (
properties: {
//"background": "transparent",
"spacing": 2,
"orientation": "vertical",
"h_align": "left",
},
),
"stack_progress": (
properties: {
//"background": "transparent",
"spacing": 8,
"margin": (16, 16, 16, 16),
},
),
"textblock": (
//base: "base",
properties: {
"font_size": "$ICON_SIZE_12",
},
),
"textblock_progress": (
base: "textblock",
properties: {
//"background": "transparent",
//"font_size": 12,
"h_align": "center",
"v_align": "center",
},
),
}
)

View File

@@ -1,100 +0,0 @@
Theme (
styles: {
"button_menu": (
base: "menu",
properties: {
"background": "transparent",
"border_radius": 0,
"border_width": 0,
"font_size": "$ICON_SIZE_16",
"h_align": "left",
"margin": (0, 4, 0, 0),
},
),
"container_menu": (
properties: {
"border_radius": 0,
"border_width": 1,
"background": "$BRIGHT_GRAY",
"border_brush": "$LINK_WATER",
"padding": 4,
},
),
"container_progress": (
properties: {
"border_radius": 3,
"border_width": 1,
"background": "$BRIGHT_GRAY",
"border_brush": "$LINK_WATER",
"padding": 14,
"h_align": "end",
},
),
"container_form": (
base: "container",
properties: {
"background": "$GRAY_NURSE",
"border_brush": "$LINK_WATER",
"border_radius": 3,
"border_width": 1,
"padding": 14,
"v_align": "top",
},
),
"header_bar": (
base: "header",
properties: {
"background": "$GRAY_NURSE",
"foreground": "$BRIGHT_GRAY",
},
),
"menu": (
//base: "base",
properties: {
"font_size": 16,
"font_family": "$MEDIUM_FONT",
"background": "$GRAY_NURSE",
"opacity": 1,
"foreground": "$BRIGHT_GRAY",
},
states: {
"pressed": {
"background": "$WHITE",
},
},
),
"popup_progress": (
base: "popup",
properties: {
"width": 300,
"heigth": 120,
},
),
"stack_menu": (
properties: {
"spacing": 2,
"orientation": "vertical",
"h_align": "left",
},
),
"stack_progress": (
properties: {
"spacing": 8,
"margin": (16, 16, 16, 16),
},
),
"textblock": (
//base: "base",
properties: {
"font_size": "$ICON_SIZE_12",
},
),
"textblock_progress": (
base: "textblock",
properties: {
"h_align": "center",
"v_align": "center",
},
),
}
)

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,65 +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 locales::t;
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 mut res = t!("policy.validation.started", lang);
let mut state = t!("state.started", lang);
let dt_start: DateTime<Local> = Local::now();
trace!(target: "advotracker",
process = ?res,
state = ?state,
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) => {
let res = t!("policy.validation.success", lang);
info!("{} => {} ({:?})", res, policy_number, policy_code);
result = true;
trace!(target: "advotracker",
policy_number = ?policy_number,
validation = ?res,
policy_code = ?policy_code);
},
_ => {
let res = t!("policy.validation.failed", lang);
info!("{} => {}", res, policy_number);
trace!(target: "advotracker",
policy_number = ?policy_number,
validation = ?res);
},
}
let dt_end: DateTime<Local> = Local::now();
let duration = dt_end.signed_duration_since(dt_start);
res = t!("policy.validation.finished", lang);
state = t!("state.finished", lang);
trace!(target: "advotracker",
process = ?res,
state = ?state,
date_stop = ?dt_end.to_string(),
duration = ?duration);
Ok(result)
}

View File

@@ -26,13 +26,10 @@
// /// The client specific services // /// The client specific services
// pub mod clients; // pub mod clients;
/// provides helper functions to manage orbtk callbacks
pub mod callbacks;
/// provides data definitions /// provides data definitions
pub mod data; pub mod data;
/// provides orbtk widget structures /// provides orbtk widgets (handling views and states)
pub mod widgets; pub mod widgets;
/// provides services /// provides services

View File

@@ -19,12 +19,16 @@ use std::env;
//use std::process; //use std::process;
use tracing::{info, trace, Level}; use tracing::{info, trace, Level};
use orbtk::prelude::*; use orbtk::{
prelude::*,
};
// The Main view // The Main view
use advotracker::{ use advotracker::{
callbacks::policycheck_state::PolicyCheckState, widgets::{
widgets::main_view, main_view,
//policycheck::policycheck_state::PolicyCheckState,
}
}; };
mod parse_args; mod parse_args;
@@ -39,8 +43,12 @@ struct Environment {
rust_log: String, rust_log: String,
} }
// Style extension
//static FLUENT_DARK_EXT: &str = include_str!("../assets/advotracker/fluent_dark.ron");
//static FLUENT_LIGHT_EXT: &str = include_str!("../assets/advotracker/fluent_light.ron");
// German localization file. // German localization file.
static ADVOTRACKER_DE_DE: &str = include_str!("../resources/advotracker/advotracker_de_DE.ron"); static ADVOTRACKER_DE_DE: &str = include_str!("../assets/advotracker/advotracker_de_DE.ron");
/// Get the active language environment. /// Get the active language environment.
fn get_lang() -> String { fn get_lang() -> String {
@@ -59,6 +67,20 @@ fn get_lang() -> String {
lang lang
} }
// /// Extend and register theme assets.
// fn theme() -> Theme {
// register_default_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)),
// // ThemeConfig::from(FLUENT_LIGHT_EXT)
// // .extend(ThemeConfig::from(THEME_FLUENT))
// // .extend(ThemeConfig::from(THEME_FLUENT_COLORS_DARK))
// // .extend(ThemeConfig::from(THEME_FLUENT_FONTS)),
// ))
// }
fn main() -> Result<(), Box<dyn std::error::Error>> { fn main() -> Result<(), Box<dyn std::error::Error>> {
use parse_args::parse_args; use parse_args::parse_args;
use tracing_subscriber::fmt; use tracing_subscriber::fmt;
@@ -129,7 +151,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.build(); .build();
Application::from_name("nwx.advotracker") Application::from_name("nwx.advotracker")
.theme(PolicyCheckState::theme())
.localization(localization) .localization(localization)
.window(|ctx| { .window(|ctx| {
Window::new() Window::new()

View File

@@ -9,7 +9,7 @@ use orbtk::prelude::*;
use crate::{ use crate::{
data::structures::PolicyCheck, data::structures::PolicyCheck,
widgets::policycheck_view::PolicyCheckView, widgets::policycheck::policycheck_view::PolicycheckView,
}; };
type List = Vec<String>; type List = Vec<String>;
@@ -26,7 +26,7 @@ widget!(MainView {
impl Template for MainView { impl Template for MainView {
fn template(self, _id: Entity, ctx: &mut BuildContext<'_>) -> Self { fn template(self, _id: Entity, ctx: &mut BuildContext<'_>) -> Self {
let policycheck_view = PolicyCheckView::new() let policycheck_view = PolicycheckView::new()
//.policy_number_count(0) //.policy_number_count(0)
//.policylist_view(id) //.policylist_view(id)
.build(ctx); .build(ctx);
@@ -56,13 +56,17 @@ impl Template for MainView {
TabWidget::new() TabWidget::new()
.tab("Policynumber check", policycheck_view) .tab("Policynumber check", policycheck_view)
.tab("Localization", LocalizationView::new().build(ctx)) .tab("Localization", LocalizationView::new().build(ctx))
.tab("Configuration", ConfigurationView::new().build(ctx))
.build(ctx), .build(ctx),
) )
//.child(policycheck_view) //.child(policycheck_view)
} }
} }
widget!(LocalizationView<LocalizationState> { languages: List, selected_index: i32 }); widget!(LocalizationView<LocalizationState> {
languages: List,
selected_index: i32 }
);
impl Template for LocalizationView { impl Template for LocalizationView {
fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self { fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self {
@@ -97,6 +101,123 @@ impl Template for LocalizationView {
} }
} }
widget!(
ConfigurationView<ConfigurationState> {
configuration_file: String,
language_id: String
}
);
impl Template for ConfigurationView {
fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self {
self.child(
Grid::new()
.margin(4)
.columns(
Columns::create()
.push(120)
.push(12)
.push("auto")
)
.rows(Rows::create()
.push("auto")
.push(4)
.push("auto")
.push(4)
.push("auto")
.push(12)
.push("auto"),
)
.child(
TextBlock::new()
.h_align("start")
.attach(Grid::column(0))
.attach(Grid::row(0))
.attach(Grid::column_span(3))
.text("Configuration settings")
.style("header")
.build(ctx),
)
.child(
TextBlock::new()
.attach(Grid::column(0))
.attach(Grid::row(2))
.v_align("center")
.h_align("end")
.text("Configuration file")
.build(ctx),
)
.child(
TextBox::new()
.attach(Grid::column(2))
.attach(Grid::row(2))
.text(("configuration_file", id))
.water_mark("Filename...")
.build(ctx),
)
.child(
TextBlock::new()
.attach(Grid::column(0))
.attach(Grid::row(4))
.v_align("center")
.h_align("end")
.text("Language Id")
.build(ctx),
)
.child(
TextBox::new()
.attach(Grid::column(2))
.attach(Grid::row(4))
.text(("language_id", id))
.water_mark("Locale Identifier...")
.build(ctx),
)
.child(
Grid::new()
.h_align("center")
.attach(Grid::column(0))
.attach(Grid::row(6))
.attach(Grid::column_span(3))
.columns(
Columns::create()
.push("auto")
.push(8)
.push("auto")
)
.rows(Rows::create()
.push("auto")
)
.child(
Button::new()
.style("button_single_content")
.attach(Grid::column(0))
.attach(Grid::row(0))
.text("load")
.on_click(move |ctx, _| {
ctx.send_message(ConfigurationAction::LoadConfiguration, id);
true
})
.build(ctx),
)
.child(
Button::new()
.text("save")
.style("button_single_content")
.attach(Grid::column(2))
.attach(Grid::row(0))
.on_click(move |ctx, _| {
ctx.send_message(ConfigurationAction::SaveConfiguration, id);
true
})
.build(ctx),
)
.build(ctx),
)
.build(ctx),
)
}
}
// [END] views // [END] views
// [START] states // [START] states
@@ -131,4 +252,67 @@ impl State for LocalizationState {
} }
} }
#[derive(Debug, Default, AsAny)]
struct ConfigurationState {}
impl State for ConfigurationState {
fn messages(
&mut self,
mut messages: MessageReader,
registry: &mut Registry,
ctx: &mut Context<'_>,
) {
for message in messages.read::<ConfigurationAction>() {
match message {
ConfigurationAction::LoadConfiguration => registry
.get::<Settings>("settings")
.load_async::<ConfigurationData>("configuration_data".to_string(), ctx.entity()),
ConfigurationAction::SaveConfiguration => {
let configuration_file: String = ConfigurationView::configuration_file_clone(&ctx.widget());
let language_id: String = ConfigurationView::language_id_clone(&ctx.widget());
registry.get::<Settings>("settings").save_async(
"configuration_data".to_string(),
ConfigurationData(
configuration_file,
language_id
),
ctx.entity(),
);
}
}
}
// save result
for message in messages.read::<SettingsResult<()>>() {
println!("Result {:?}", message);
}
// load result
for message in messages.read::<SettingsResult<ConfigurationData>>() {
if let Ok(data) = message {
ConfigurationView::configuration_file_set(&mut ctx.widget(), data.0);
ConfigurationView::language_id_set(&mut ctx.widget(), data.1);
}
}
}
}
// [END] states // [END] states
// [START] Configuration data
#[derive(Clone, Debug)]
enum ConfigurationAction {
SaveConfiguration,
LoadConfiguration,
}
use serde::{Deserialize, Serialize};
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
pub struct ConfigurationData(
pub String,
pub String
);
// [END] Configuration data

View File

@@ -5,11 +5,17 @@
* SPDX-License-Identifier: (0BSD or MIT) * SPDX-License-Identifier: (0BSD or MIT)
*/ */
/// global helper functions
pub mod global_state;
/// The starting point (Main View) /// The starting point (Main View)
pub mod main_view; pub mod main_view;
/// The policy check wigdet /// The policy check wigdet
pub mod policycheck_view; pub mod policycheck;
// /// The policy data widget
// pub mod policydata;
// /// The policy lists widget // /// The policy lists widget
// pub mod policylist_view; // pub mod policylist;

View File

@@ -0,0 +1,12 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
/// The policy check state
pub mod policycheck_state;
/// The policy check view
pub mod policycheck_view;

View File

@@ -1,16 +1,5 @@
use locales::t; use locales::t;
use orbtk::{ use orbtk::prelude::*;
prelude::*,
shell::WindowRequest,
theme::{COLORS_RON, FONTS_RON},
theming::config::ThemeConfig,
};
#[cfg(not(feature = "light"))]
use orbtk::theme::DARK_THEME_RON;
#[cfg(feature = "light")]
use orbtk::theme::LIGHT_THEME_RON;
use serde::Deserialize; use serde::Deserialize;
use std::process; use std::process;
@@ -19,16 +8,19 @@ use std::time::{Duration, SystemTime};
use tracing::{error, info, trace}; use tracing::{error, info, trace};
use crate::{ use crate::{
callbacks::global_state::GlobalState, widgets::global_state::GlobalState,
data::structures::{PolicyCode, PolicyDataList, PolicyList}, data::{
data::constants::*, structures::{PolicyCode, PolicyDataList, PolicyList},
constants::*,
},
services::imports::allianzdirectcall::import, services::imports::allianzdirectcall::import,
}; };
/// Actions that can execute on the task view. /// Actions that can execute on the task view.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub enum Action { pub enum PolicycheckAction {
ClearEntry(Entity), ClearEntry(Entity),
ChangeTheme(),
InputTextChanged(Entity), InputTextChanged(Entity),
ImportData, ImportData,
OpenMenu(Entity), OpenMenu(Entity),
@@ -39,11 +31,12 @@ pub enum Action {
SetProgress(f64), SetProgress(f64),
SetProgressPopup(Entity), SetProgressPopup(Entity),
RemoveFocus(Entity), RemoveFocus(Entity),
RemoveMenu(Entity),
RemovePopup(Entity), RemovePopup(Entity),
SetEntry(Entity), SetEntry(Entity),
SetVisibility(Entity), SetVisibility(Entity),
TextChanged(Entity, usize), TextChanged(Entity, usize),
ToggleTheme(Entity), ToggleTheme(Entity)
} }
/// define valid environment variables provided via .env files /// define valid environment variables provided via .env files
@@ -55,36 +48,29 @@ struct Environment {
rust_log: String, rust_log: String,
} }
/// Handles the requests from `PolicyCheckView`. /// Handles the requests from `PolicycheckView`.
#[derive(AsAny, Default)] #[derive(AsAny, Default)]
pub struct PolicyCheckState { pub struct PolicycheckState {
action: Option<Action>, action: Option<PolicycheckAction>,
duration: Duration, duration: Duration,
label_result: Entity, label_result: Entity,
lang: String, lang: String,
//last_focused: Option<Entity>, //last_focused: Option<Entity>,
button_menu: Entity, button_menu: Entity,
menu: Entity,
policy_data_count: u64, policy_data_count: u64,
policy_numbers: HashMap<u64, PolicyCode>, policy_numbers: HashMap<u64, PolicyCode>,
popup_menu: Entity,
progress_bar: Entity, progress_bar: Entity,
progress_count: f64, progress_count: f64,
progress_popup: Entity, progress_popup: Entity
theme_name: String
} }
#[cfg(not(feature = "light"))] impl GlobalState for PolicycheckState {}
static DARK_EXT: &'static str = include_str!("../../resources/stylesheets/advotracker_dark.ron");
#[cfg(feature = "light")]
static LIGHT_EXT: &'static str = include_str!("../../resources/stylesheets/advotracker_light.ron");
impl GlobalState for PolicyCheckState {}
/// method definitions, that react on any given state change inside the view /// method definitions, that react on any given state change inside the view
impl PolicyCheckState { impl PolicycheckState {
/// Sets a new action. /// Sets a new action.
pub fn action(&mut self, action: Action) { pub fn action(&mut self, action: PolicycheckAction) {
self.action = action.into(); self.action = action.into();
} }
@@ -142,11 +128,11 @@ impl PolicyCheckState {
if self.policy_numbers.len() == 0 { if self.policy_numbers.len() == 0 {
// initialize popup widget // initialize popup widget
let sender = ctx.window_sender(); //let sender = ctx.send_window_request();
self.set_popup_progress(ctx); self.set_popup_progress(ctx);
self.progress_count += 0.33; self.progress_count += 0.33;
self.update_progress_bar(ctx); self.update_progress_bar(ctx);
sender.send(WindowRequest::Redraw).unwrap(); //sender.send(WindowRequest::Redraw).unwrap();
// for _ in 1..4 { // for _ in 1..4 {
// self.progress_count += 0.33; // self.progress_count += 0.33;
@@ -166,7 +152,7 @@ impl PolicyCheckState {
self.progress_count = 1.; self.progress_count = 1.;
self.update_progress_bar(ctx); self.update_progress_bar(ctx);
sender.send(WindowRequest::Redraw).unwrap(); //sender.send(WindowRequest::Redraw).unwrap();
} }
_ => { _ => {
let res = t!("policy.hashmap.failed", self.lang); let res = t!("policy.hashmap.failed", self.lang);
@@ -188,8 +174,7 @@ impl PolicyCheckState {
pub fn open_menu(&mut self, _entity: Entity, ctx: &mut Context<'_>) { pub fn open_menu(&mut self, _entity: Entity, ctx: &mut Context<'_>) {
//let menu_string = ctx.get_widget(entity).get::<String16>("text"); //let menu_string = ctx.get_widget(entity).get::<String16>("text");
//.child(policycheck_menu); //.child(policycheck_menu);
//self.set_popup_menu(ctx); self.set_popup_menu(ctx);
self.set_menu(ctx);
} }
/// Parse validity of the given policy number. /// Parse validity of the given policy number.
@@ -332,8 +317,13 @@ impl PolicyCheckState {
} }
/// Remove the menu popup box /// Remove the menu popup box
fn remove_menu(&mut self, id: Entity, ctx: &mut Context<'_>) {
ctx.remove_child(self.popup_menu);
println!("Popup {:?} removed !", id);
}
/// Remove the popup box
fn remove_popup(&mut self, id: Entity, ctx: &mut Context<'_>) { fn remove_popup(&mut self, id: Entity, ctx: &mut Context<'_>) {
ctx.remove_child(self.menu);
ctx.remove_child(self.progress_popup); ctx.remove_child(self.progress_popup);
println!("Popup {:?} removed !", id); println!("Popup {:?} removed !", id);
} }
@@ -363,14 +353,20 @@ impl PolicyCheckState {
} }
/// Set a menu /// Set a menu
fn set_menu(&mut self, ctx: &mut Context<'_>) { fn set_popup_menu(&mut self, ctx: &mut Context<'_>) {
let current_entity = ctx.entity; let stack = ctx
.entity_of_child(ID_POLICY_CHECK_BUTTON_MENU)
.expect("PolicycheckState: Can't find entity of resource 'ID_POLICY_CHECK_POPUP_MENU'.");
let current_entity = ctx.entity();
let build_context = &mut ctx.build_context(); let build_context = &mut ctx.build_context();
// create a menu overlay // create a popup menu overlay
self.menu = create_menu(current_entity, build_context); self.popup_menu = create_menu(current_entity, build_context);
let _menu = build_context.append_child_to_overlay(self.menu)
.expect("PolicyCheckState: Can't create overlay as child of entity"); // create a menu_popup widget as a child of entity "ID_POLICY_CHECK_BUTTON_MENU"
build_context.append_child(stack, self.popup_menu);
println!("Popup Menu created: {:?}", self.popup_menu);
} }
/// Set a progress popup that updates the import status in a progress bar /// Set a progress popup that updates the import status in a progress bar
@@ -378,8 +374,8 @@ impl PolicyCheckState {
//println!("Set up Progress popup: {:?}", text_box); //println!("Set up Progress popup: {:?}", text_box);
let stack = ctx let stack = ctx
.entity_of_child(ID_POLICY_CHECK_RESULT) .entity_of_child(ID_POLICY_CHECK_RESULT)
.expect("PolicyCheckState: Can't find entity of resource 'ID_POLICY_CHECK_RESULT'."); .expect("PolicycheckState: Can't find entity of resource 'ID_POLICY_CHECK_RESULT'.");
let current_entity = ctx.entity; let current_entity = ctx.entity();
let build_context = &mut ctx.build_context(); let build_context = &mut ctx.build_context();
self.progress_popup = create_popup_progress(current_entity, build_context); self.progress_popup = create_popup_progress(current_entity, build_context);
@@ -389,7 +385,7 @@ impl PolicyCheckState {
self.progress_bar = ctx self.progress_bar = ctx
.entity_of_child(ID_POLICY_CHECK_PROGRESS_BAR) .entity_of_child(ID_POLICY_CHECK_PROGRESS_BAR)
.expect("PolicyCheckState.init: Can't find entity of resource 'ID_POLICY_CHECK_PROGRESS_BAR'."); .expect("PolicycheckState.init: Can't find entity of resource 'ID_POLICY_CHECK_PROGRESS_BAR'.");
println!("PopupProgress created: {:?}", self.progress_popup); println!("PopupProgress created: {:?}", self.progress_popup);
} }
@@ -407,29 +403,6 @@ impl PolicyCheckState {
//ctx.get_widget(self.label_result).update_theme_by_state(true); //ctx.get_widget(self.label_result).update_theme_by_state(true);
} }
/// Set and activate the theme attributes.
#[cfg(not(feature = "light"))]
pub fn theme() -> Theme {
Theme::from_config(
// sourcing: crates/theme/assets/dark/dark.ron
ThemeConfig::from(DARK_THEME_RON)
.extend(ThemeConfig::from(DARK_EXT))
.extend(ThemeConfig::from(COLORS_RON))
.extend(ThemeConfig::from(FONTS_RON)),
)
}
#[cfg(feature = "light")]
pub fn theme() -> Theme {
Theme::from_config(
ThemeConfig::from(LIGHT_THEME_RON)
.extend(ThemeConfig::from(LIGHT_EXT))
.extend(ThemeConfig::from(COLORS_RON))
.extend(ThemeConfig::from(FONTS_RON)),
)
}
/// Update count of elements in the policy data list. /// Update count of elements in the policy data list.
fn _update_data_count(&self, ctx: &mut Context<'_>) { fn _update_data_count(&self, ctx: &mut Context<'_>) {
let data_list_count = ctx.widget().get::<PolicyDataList>(PROP_POLICY_DATA_LIST).len(); let data_list_count = ctx.widget().get::<PolicyDataList>(PROP_POLICY_DATA_LIST).len();
@@ -448,7 +421,7 @@ impl PolicyCheckState {
} }
/// upported states for our view /// upported states for our view
impl State for PolicyCheckState { impl State for PolicycheckState {
/// Initialize the widget state /// Initialize the widget state
fn init(&mut self, _: &mut Registry, ctx: &mut Context<'_>) { fn init(&mut self, _: &mut Registry, ctx: &mut Context<'_>) {
let time_start= SystemTime::now(); let time_start= SystemTime::now();
@@ -458,11 +431,11 @@ impl State for PolicyCheckState {
// Entities // Entities
self.button_menu = ctx self.button_menu = ctx
.entity_of_child(ID_POLICY_CHECK_BUTTON_MENU) .entity_of_child(ID_POLICY_CHECK_BUTTON_MENU)
.expect("PolicyCheckState.init: Can't find resource entity 'ID_POLICY_CHECK_BUTTON_MENU'."); .expect("PolicycheckState.init: Can't find resource entity 'ID_POLICY_CHECK_BUTTON_MENU'.");
self.label_result = ctx self.label_result = ctx
.entity_of_child(ID_POLICY_CHECK_LABEL_RESULT) .entity_of_child(ID_POLICY_CHECK_LABEL_RESULT)
.expect("PolicyCheckState.init: Can't find resource entity 'ID_POLICY_CHECK_LABEL_RESULT'."); .expect("PolicycheckState.init: Can't find resource entity 'ID_POLICY_CHECK_LABEL_RESULT'.");
//TextBlock::visibility_set(&mut ctx.child(ID_POLICY_CHECK_LABEL_RESULT), Visibility::Collapsed); //TextBlock::visibility_set(&mut ctx.child(ID_POLICY_CHECK_LABEL_RESULT), Visibility::Collapsed);
//TextBlock::visibility_set(&mut ctx.child(ID_POLICY_CHECK_LABEL_RESULT), Visibility::Collapsed); //TextBlock::visibility_set(&mut ctx.child(ID_POLICY_CHECK_LABEL_RESULT), Visibility::Collapsed);
@@ -471,7 +444,7 @@ impl State for PolicyCheckState {
Stack::visibility_set(&mut ctx.child(ID_POLICY_CHECK_FORM_ROW_2), Visibility::Collapsed); Stack::visibility_set(&mut ctx.child(ID_POLICY_CHECK_FORM_ROW_2), Visibility::Collapsed);
// Preset localization with given environment lang // Preset localization with given environment lang
self.lang = PolicyCheckState::get_lang(); self.lang = PolicycheckState::get_lang();
ctx.set_language(&self.lang); ctx.set_language(&self.lang);
// // Load the saved data from a file in 'ron' format into our data structure. // // Load the saved data from a file in 'ron' format into our data structure.
@@ -506,7 +479,7 @@ impl State for PolicyCheckState {
if let Some(action) = self.action { if let Some(action) = self.action {
match action { match action {
Action::AddProgress(increment) => { PolicycheckAction::AddProgress(increment) => {
let old_width = ProgressBar::val_clone(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR)); let old_width = ProgressBar::val_clone(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR));
let new_width = old_width + increment; let new_width = old_width + increment;
@@ -518,13 +491,16 @@ impl State for PolicyCheckState {
ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), 1.); ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), 1.);
} }
} }
Action::ClearEntry(policy_check_policy_number) => { PolicycheckAction::ChangeTheme() => {
println!("Changing active theme.");
}
PolicycheckAction::ClearEntry(policy_check_policy_number) => {
ctx.get_widget(policy_check_policy_number).set("enabled", false); ctx.get_widget(policy_check_policy_number).set("enabled", false);
} }
Action::InputTextChanged(entity) => { PolicycheckAction::InputTextChanged(entity) => {
println!("entry changed: {}", TextBox::text_clone(&ctx.get_widget(entity))); println!("entry changed: {}", TextBox::text_clone(&ctx.get_widget(entity)));
} }
Action::ImportData => { PolicycheckAction::ImportData => {
match self.import_data(ctx) { match self.import_data(ctx) {
Ok(()) => { Ok(()) => {
trace!(target: "advotracker", import_data = "success"); trace!(target: "advotracker", import_data = "success");
@@ -535,58 +511,50 @@ impl State for PolicyCheckState {
} }
} }
} }
Action::OpenMenu(entity) => { PolicycheckAction::OpenMenu(entity) => {
self.open_menu(entity, ctx); self.open_menu(entity, ctx);
} }
Action::ParseEntry(text_box) => { PolicycheckAction::ParseEntry(text_box) => {
self.parse_entry(text_box, ctx); self.parse_entry(text_box, ctx);
} }
Action::RemoveFocus(policy_check_policy_number) => { PolicycheckAction::RemoveFocus(policy_check_policy_number) => {
ctx.get_widget(policy_check_policy_number).set("enabled", false); ctx.get_widget(policy_check_policy_number).set("enabled", false);
ctx.push_event_by_window(FocusEvent::RemoveFocus(policy_check_policy_number)); //ctx.EventAdapter(FocusEvent::RemoveFocus(policy_check_policy_number));
} }
Action::RemovePopup(entity) => { PolicycheckAction::RemoveMenu(entity) => {
self.remove_menu(entity, ctx);
}
PolicycheckAction::RemovePopup(entity) => {
self.remove_popup(entity, ctx); self.remove_popup(entity, ctx);
} }
Action::ResetProgress => { PolicycheckAction::ResetProgress => {
ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), 0.); ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), 0.);
} }
Action::SetEntry(policy_check_policy_number) => { PolicycheckAction::SetEntry(policy_check_policy_number) => {
//self.last_focused = Some(); //self.last_focused = Some();
self.set_entry(policy_check_policy_number, ctx); self.set_entry(policy_check_policy_number, ctx);
} }
Action::SetMenu(_entity) => { PolicycheckAction::SetMenu(_entity) => {
self.set_menu(ctx); self.set_popup_menu(ctx);
} }
Action::SetProgress(value) => { PolicycheckAction::SetProgress(value) => {
if value >= 0. || value <= 1. { if value >= 0. || value <= 1. {
ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), value); ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), value);
} else { } else {
ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), 0.); ProgressBar::val_set(&mut ctx.child(ID_POLICY_CHECK_PROGRESS_BAR), 0.);
} } } }
Action::SetProgressPopup(_entity) => { PolicycheckAction::SetProgressPopup(_entity) => {
self.set_popup_progress(ctx); self.set_popup_progress(ctx);
} }
Action::SetVisibility(_entity) => { PolicycheckAction::SetVisibility(_entity) => {
TextBlock::visibility_set(&mut ctx.child(ID_POLICY_CHECK_LABEL_RESULT), Visibility::Collapsed); TextBlock::visibility_set(&mut ctx.child(ID_POLICY_CHECK_LABEL_RESULT), Visibility::Collapsed);
} }
Action::TextChanged(entity, _index) => { PolicycheckAction::TextChanged(entity, _index) => {
self.set_entry(entity, ctx); self.set_entry(entity, ctx);
} }
Action::ToggleTheme(_entity) => { PolicycheckAction::ToggleTheme(_entity) => {
if self.theme_name == "light" { println!("TODO: toggle active theme");
let theme = dark_theme(); //self.toggle_theme(entity, ctx);
self.theme_name = "dark".to_string();
ctx.switch_theme(theme);
}
if self.theme_name == "dark" {
let theme = light_theme();
self.theme_name = "light".to_string();
ctx.switch_theme(theme);
};
println!{"Switch theme to {:?}", self.theme_name};
} }
} }
} }
@@ -601,12 +569,20 @@ impl State for PolicyCheckState {
} }
/// Create a menu popup /// Create a menu popup
fn create_menu(menu: Entity, ctx: &mut BuildContext<'_>) -> Entity { fn create_menu(target: Entity, ctx: &mut BuildContext<'_>) -> Entity {
Container::new() Popup::new()
.id(ID_POLICY_CHECK_POPUP_MENU)
.style("container_menu") .style("container_menu")
.width(280.0) .target(target)
.height(140.0) .open(true)
.position((100.0, 100.0)) .width(280)
.height(140)
.on_mouse_down(move |ctx, _| {
println!("on_click -> remove_menu()");
ctx.get_mut::<PolicycheckState>(target)
.action(PolicycheckAction::RemoveMenu(target));
true
})
.child( .child(
Grid::new() Grid::new()
.id(ID_POLICY_CHECK_MENU) .id(ID_POLICY_CHECK_MENU)
@@ -635,20 +611,21 @@ fn create_menu(menu: Entity, ctx: &mut BuildContext<'_>) -> Entity {
.attach(Grid::column(0)) .attach(Grid::column(0))
.attach(Grid::column_span(2)) .attach(Grid::column_span(2))
.icon(material_icons_font::MD_PERSON) .icon(material_icons_font::MD_PERSON)
.text("Account")
.build(ctx), .build(ctx),
) )
.child( .child(
Button::new() Button::new()
.id(ID_POLICY_CHECK_MENU_LABEL_TOGGLE_THEME) .id(ID_POLICY_CHECK_MENU_LABEL_TOGGLE_THEME)
//.style("body")
.style("button_menu") .style("button_menu")
.attach(Grid::row(1)) .attach(Grid::row(1))
.attach(Grid::column(0)) .attach(Grid::column(0))
.attach(Grid::column_span(2)) .attach(Grid::column_span(2))
.icon(material_icons_font::MD_EDIT) .icon(material_icons_font::MD_EDIT)
.text("Toggle theme")
.on_click(move |states, _| { .on_click(move |states, _| {
states.get_mut::<PolicyCheckState>(menu) states.get_mut::<PolicycheckState>(target)
.action(Action::ToggleTheme(menu)); .action(PolicycheckAction::ToggleTheme(target));
true true
}) })
.build(ctx), .build(ctx),
@@ -661,6 +638,7 @@ fn create_menu(menu: Entity, ctx: &mut BuildContext<'_>) -> Entity {
.attach(Grid::column(0)) .attach(Grid::column(0))
.attach(Grid::column_span(2)) .attach(Grid::column_span(2))
.icon(material_icons_font::MD_SETTINGS_POWER) .icon(material_icons_font::MD_SETTINGS_POWER)
.text("Quit")
.on_mouse_down(move |_states, _| { .on_mouse_down(move |_states, _| {
process::exit(0); process::exit(0);
}) })
@@ -694,8 +672,8 @@ fn create_popup_progress(target: Entity, ctx: &mut BuildContext<'_>) -> Entity {
.height(100) .height(100)
.on_mouse_down(move |ctx, _| { .on_mouse_down(move |ctx, _| {
println!("on_click -> remove_popup_progress()"); println!("on_click -> remove_popup_progress()");
ctx.get_mut::<PolicyCheckState>(target) ctx.get_mut::<PolicycheckState>(target)
.action(Action::RemovePopup(target)); .action(PolicycheckAction::RemovePopup(target));
true true
}) })
.child( .child(

View File

@@ -8,29 +8,32 @@
use orbtk::prelude::*; use orbtk::prelude::*;
use crate::{ use crate::{
data::constants::*, data::{
data::structures::PolicyCheck, constants::*,
callbacks::policycheck_state::*, structures::PolicyCheck,
},
widgets::policycheck::policycheck_state::*,
}; };
// Macro that initializes the widget structures/variables for our view // Macro that initializes the widget structures/variables for our view
widget!( widget!(
/// Dialog to enter a policy identifier/number. /// Dialog to enter a policy identifier/number.
/// This identifier is checked agains a map of valid policy codes. /// This identifier is checked agains a map of valid policy codes.
PolicyCheckView<PolicyCheckState> { PolicycheckView<PolicycheckState> {
lang: String, lang: String,
policy_check: PolicyCheck, policy_check: PolicyCheck,
policy_check_title: String16, policy_check_title: String,
policy_data_count: u32 policy_data_count: u32
} }
); );
/// The template implementation of the policy check view /// The template implementation of the policy check view
/// All GUI elements are styled using the "style" attribute referencing to a ron based css /// All GUI elements are styled using the "style" attribute referencing to a ron based css
impl Template for PolicyCheckView { impl Template for PolicycheckView {
//fn template(self, policycheck_view: Entity, ctx: &mut BuildContext<'_>) -> Self { //fn template(self, policycheck_view: Entity, ctx: &mut BuildContext<'_>) -> Self {
fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self { fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self {
let policy_check_bottom_bar = Container::new()
let policy_check_bottom_bar = Container::new()
//.style(STYLE_BOTTOM_BAR) //.style(STYLE_BOTTOM_BAR)
.attach(Grid::row(4)) .attach(Grid::row(4))
.attach(Grid::column(1)) .attach(Grid::column(1))
@@ -43,7 +46,7 @@ impl Template for PolicyCheckView {
.v_align("center") .v_align("center")
.child( .child(
ImageWidget::new() ImageWidget::new()
.image("resources/advotracker/hiedemann_logo.png") .image("assets/advotracker/hiedemann_logo.png")
.v_align("center") .v_align("center")
.build(ctx), .build(ctx),
) )
@@ -82,9 +85,9 @@ impl Template for PolicyCheckView {
//.min_size(16, 16) //.min_size(16, 16)
.h_align("end") .h_align("end")
.on_click(move |ctx, _| { .on_click(move |ctx, _| {
//ctx.get_mut::<PolicyCheckState>(policycheck_state) //ctx.get_mut::<PolicycheckState>(policycheck_state)
ctx.get_mut::<PolicyCheckState>(id) ctx.get_mut::<PolicycheckState>(id)
.action(Action::OpenMenu(policy_check_label_menu)); .action(PolicycheckAction::OpenMenu(policy_check_label_menu));
true true
}) })
.build(ctx); .build(ctx);
@@ -148,35 +151,35 @@ impl Template for PolicyCheckView {
.attach(Grid::column(2)) .attach(Grid::column(2))
.id(ID_POLICY_CHECK_POLICY_NUMBER) .id(ID_POLICY_CHECK_POLICY_NUMBER)
.h_align("start") .h_align("start")
.lost_focus_on_activation(false) .lose_focus_on_activation(false)
//WIP: localization for water_mark //WIP: localization for water_mark
.water_mark("10-stellig") .water_mark("10-stellig")
.on_activate(move |ctx, entity| { .on_activate(move |ctx, entity| {
// Entity is entered/activated via Mouse/Keyboard // Entity is entered/activated via Mouse/Keyboard
//ctx.get_mut::<PolicyCheckState>(policy_check_view) //ctx.get_mut::<PolicycheckState>(policy_check_view)
println!("ParseEntry: {:?}", entity); println!("ParseEntry: {:?}", entity);
ctx.get_mut::<PolicyCheckState>(id) ctx.get_mut::<PolicycheckState>(id)
.action(Action::ParseEntry(entity)); .action(PolicycheckAction::ParseEntry(entity));
}) })
//.on_changed(|_, entity, _, _| println!("Selection changed: {:?}", entity)) //.on_changed(|_, entity, _, _| println!("Selection changed: {:?}", entity))
// .on_changed(move |ctx, entity, _| { // .on_changed(move |ctx, entity, _| {
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::SetProgressBox(entity)); // .action(Action::SetProgressBox(entity));
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::AddProgress(0.5)); // .action(Action::AddProgress(0.5));
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::InputTextChanged(entity)); // .action(Action::InputTextChanged(entity));
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::SetVisibility(entity)); // .action(Action::SetVisibility(entity));
// ctx.get_widget(policy_check_label_policy_number).set("visible"); // ctx.get_widget(policy_check_label_policy_number).set("visible");
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::SetVisility(entity)); // .action(Action::SetVisility(entity));
// }) // })
// .on_mouse_down | .on_mouse_move | .on_mouse_up (move |ctx, entity| { // .on_mouse_down | .on_mouse_move | .on_mouse_up (move |ctx, entity| {
// state(id, states).action(Action::AddItem); // state(id, states).action(Action::AddItem);
// }) // })
//.on_key_down(move |ctx, _| { //.on_key_down(move |ctx, _| {
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::ImportData); // .action(Action::ImportData);
// true // true
//}) //})
@@ -216,6 +219,7 @@ impl Template for PolicyCheckView {
.attach(Grid::column(2)) .attach(Grid::column(2))
.h_align("start") .h_align("start")
.v_align("center") .v_align("center")
.text("empty")
.build(ctx) .build(ctx)
) )
.build(ctx); .build(ctx);
@@ -309,11 +313,11 @@ impl Template for PolicyCheckView {
.margin((0, 0, 0, 16)) .margin((0, 0, 0, 16))
// WIP code @kivimango // WIP code @kivimango
// .on_activate(move |ctx, entity| { // .on_activate(move |ctx, entity| {
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::ParseEntry(entity)); // .action(Action::ParseEntry(entity));
// }) // })
// .on_changed(move |ctx, entity| { // .on_changed(move |ctx, entity| {
// ctx.get_mut::<PolicyCheckState>(id) // ctx.get_mut::<PolicycheckState>(id)
// .action(Action::InputTextChanged(entity)); // .action(Action::InputTextChanged(entity));
//}) //})
.build(ctx); .build(ctx);
@@ -346,7 +350,7 @@ impl Template for PolicyCheckView {
.build(ctx); .build(ctx);
// Starter page: check policy numbers // Starter page: check policy numbers
self.name("PolicyCheckView") self.name("PolicycheckView")
// initialize struct (derived default macro) // initialize struct (derived default macro)
.policy_check(PolicyCheck::default()) .policy_check(PolicyCheck::default())
.child( .child(
@@ -387,7 +391,7 @@ impl Template for PolicyCheckView {
} }
} }
// helper to request PolicyCheckState // helper to request PolicycheckState
//fn state<'a>(id: Entity, states: &'a mut StatesContext) -> &'a mut PolicyCheckState { //fn state<'a>(id: Entity, states: &'a mut StatesContext) -> &'a mut PolicycheckState {
// states.get_mut(id) // states.get_mut(id)
//} //}

View File

@@ -0,0 +1,12 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
/// The policy check state
pub mod policycheck_state;
/// The policy check view
pub mod policycheck_view;

View File

@@ -0,0 +1,12 @@
/*
* advotracker - Hotline tackingtool for Advocats
*
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT)
*/
/// The policy check state
pub mod policylist_state;
/// The policy check view
pub mod policylist_view;