Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 2 additions & 27 deletions www/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</div>

<div class="description my-2">
<textarea style="min-height: 120px;" class="w-100 p-3 bg-transparent" name="desc" id="desc"></textarea>
<textarea style="min-height: 120px;" class="w-100 p-3" name="desc" id="desc"></textarea>
</div>

<script type="text/javascript">
Expand All @@ -91,31 +91,6 @@
});
});
</script>
<style>
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown{
background-color: var(--bs-dark);
color: var(--bs-light);
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
[data-bs-theme="dark"] .select2-results__option.select2-results__message{
color: var(--bs-light);
}
[data-bs-theme="dark"] .select2-search__field{
background-color: transparent !important;
color: var(--bs-light) !important;
}
[data-bs-theme="dark"] .select2-dropdown.select2-dropdown--below,
[data-bs-theme="dark"] .select2-container--bootstrap-5.select2-container--focus .select2-selection,
[data-bs-theme="dark"] .select2-container--bootstrap-5.select2-container--open .select2-selection,
[data-bs-theme="dark"] .select2-search__field{
border-color: var(--bs-light);
}
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted{
background-color: var(--bs-secondary);
color: var(--bs-light) !important;
}
</style>
<div class="customer my-2">
<label for="customerSelect">Customer</label>
<select class="form-select" id="customerSelect" aria-label="Customer">
Expand All @@ -134,7 +109,7 @@
</div>
</div>

<div class="btns my-2">
<div class="btns my-2 pb-4">
<a href="#" class="btn btn-primary d-block my-2 py-3 save-item" onclick="saveItem()">
<i class="fas fa-save"></i> <span class="text">Save</span>
</a>
Expand Down
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<div class="row">
<div class="col-12">
<div class="desc-area d-inline-block" style="width: calc(100% - 120px);">
<input type="text" name="desc" id="desc" style="color: #fff;" placeholder="Description of your work" class="w-100 px-2 py-2 bg-transparent border-0"/>
<input type="text" name="desc" id="desc" placeholder="Description of your work" class="w-100 px-2 py-2 bg-transparent border-0"/>
</div>
<div class="btns-area d-inline-block float-end">
<a href="#" class="btn btn-primary d-inline-block start-btn px-4" onclick="window.location.href='/detail.html?description='+encodeURIComponent($('#desc').val());">
Expand Down
3 changes: 3 additions & 0 deletions www/js/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ function testConnection(){
var token = $('#token').val();

if(host.indexOf('/api')!==-1) host = host.replace('/api','');
if(!/^https?:\/\//i.test(host)) host = 'https://' + host;

var result = checkConnection(host,token);

Expand All @@ -22,6 +23,7 @@ function testConnection(){

function checkConnection(host, token){
var api = new API();
//console.log('checkConnection',host,token);
api.setCredentials(host,token);
var result = api.testConnection();
return result;
Expand Down Expand Up @@ -61,6 +63,7 @@ function saveSetting(){
var token = $('#token').val();

if(host.indexOf('/api')!==-1) host = host.replace('/api','');
if(!/^https?:\/\//i.test(host)) host = 'https://' + host;

var min_tray = 0;
if($('#min_tray').prop('checked')) min_tray=1;
Expand Down
71 changes: 33 additions & 38 deletions www/setting.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<div class="container">
<div class="header pt-4">
<div class="row">
<div class="row align-items-center">
<div class="col-6 col-md-8">
<img src="icons/logo.png" class="logo" onclick="openHomepage()">
</div>
Expand All @@ -53,46 +53,41 @@
</div>
</div>

<div class="mt-3 p-1 pb-0 d-inline-block w-100">
<div class="row">
<div class="col-12 mb-2">
<div class="form-floating">
<input type="text" class="form-control" id="host" placeholder="kimai.org" value="">
<label for="host">Host</label>
</div>
</div>
<div class="col-12 mb-2">
<div class="form-floating">
<input type="password" class="form-control" id="token" placeholder="*****" value="">
<label for="token">API Token</label>
</div>
</div>
<br/><br/>
<div class="row">
<div class="col-12">
<p><i class="fas fa-circle-question"></i> Go to your Kimai app and fill <i><u>host</u></i> and <i><u> API token</u></i> data from your user account!</p>
<p>More info at <span onclick="window.open('https://github.com/owlysk/CodeTimer-Mobile','_system');"><i class="fab fa-github"></i> <u>GitHub</u></span></p>
<br/>
</div>
<div class="col-6">
<a href="#" class="btn btn-warning w-100" onclick="testConnection()">
<i class="fas fa-satellite-dish"></i> Test
</a>
</div>
<div class="col-6">
<a href="#" class="btn btn-primary w-100" onclick="saveSetting()">
<i class="fas fa-save"></i> Save
</a>
</div>
</div>
<div class="setting-card mt-3">
<div class="setting-section-title">Connection</div>

<div class="setting-field">
<label for="host"><i class="fas fa-server"></i> Host</label>
<input type="text" class="form-control" id="host" placeholder="kimai.example.com">
</div>

<div class="setting-field">
<label for="token"><i class="fas fa-key"></i> API Token</label>
<input type="password" class="form-control" id="token" placeholder="Enter your API token">
</div>

<div class="setting-actions mt-4">
<a href="#" class="btn btn-outline-warning setting-btn" onclick="testConnection()">
<i class="fas fa-satellite-dish"></i> Test
</a>
<a href="#" class="btn btn-primary setting-btn" onclick="saveSetting()">
<i class="fas fa-save"></i> Save
</a>
</div>
</div>
</div>
<div class="footer text-center pt-2 py-2">
<div class="d-none">
v. <span class="app-version">0.0.0</span><br/>

<div class="setting-hint mt-3">
<i class="fas fa-circle-info"></i>
Go to your Kimai profile and copy the <strong>host URL</strong> and your <strong>API token</strong>.
<span class="setting-hint-link" onclick="window.open('https://github.com/owlysk/CodeTimer-Mobile','_system');">
<i class="fab fa-github"></i> GitHub
</span>
</div>
&copy; 2025 Martin Lačný - Owly
</div>

<div class="footer text-center">
<div class="d-none">v. <span class="app-version">0.0.0</span></div>
&copy; 2025 Martin Lačný - Owly
</div>

<script src="cordova.js"></script>
Expand Down
Loading