Skip to content
Merged
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
40 changes: 40 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: macOS Build

on:
push:
branches: [ "master", "feature/*" ]

jobs:
build-macos:
runs-on: macos-latest
defaults:
run:
working-directory: ./src

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: src/package-lock.json

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
run: npm ci

- name: Build the app
run: npm run tauri build

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Temprix-macOS-App
path: |
src/src-tauri/target/release/bundle/dmg/*.dmg
src/src-tauri/target/release/bundle/macos/*.app
if-no-files-found: warn
46 changes: 46 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Windows Build

on:
push:
branches: [ "master", "feature/*" ]

jobs:
build-windows:
runs-on: windows-latest
defaults:
run:
working-directory: ./src

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: src/package-lock.json

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc

- name: Install dependencies
run: npm ci

- name: Fix Icon for Windows
run: |
magick convert src-tauri/icons/icon.png -define icon:auto-resize=256,128,64,48,32,16 src-tauri/icons/icon.ico

- name: Build the app
run: npm run tauri build

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Temprix-Windows-Installer
path: |
src/src-tauri/target/release/bundle/nsis/*.exe
src/src-tauri/target/release/bundle/msi/*.msi
if-no-files-found: warn
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h1>Temprix</h1>

<p>
<strong>Automatic Window Title & Ticket Tracking for macOS</strong>
<strong>Automatic Window Title & Ticket Tracking for macOS & Windows</strong>
</p>

<p>
Expand All @@ -18,6 +18,7 @@
<img src="https://img.shields.io/badge/Rust-%23ed6a5a?style=for-the-badge&logo=rust&logoColor=white" alt="Rust" />
<img src="https://img.shields.io/badge/Tauri-%235d576b?style=for-the-badge&logo=tauri&logoColor=white" alt="Tauri" />
<img src="https://img.shields.io/badge/macOS-%239bc1bc?style=for-the-badge&logo=apple&logoColor=white" alt="macOS" />
<img src="https://img.shields.io/badge/Windows-%230078D6?style=for-the-badge&logo=windows&logoColor=white" alt="Windows" />
<img src="https://img.shields.io/badge/Node.js-%23e6ebe0?style=for-the-badge&logo=nodedotjs&logoColor=5d576b" alt="Node.js" />
</p>
</div>
Expand All @@ -35,14 +36,16 @@
- **🔒 Local & Private**: Securely logs activity to JSON files in `~/Documents/ActivityLogs/`. Data never leaves your machine.
- **🖥️ System Tray Integration**: Unobtrusive menu bar app that stays out of your way.
- **⚙️ Configurable**: Customize regex patterns to match your organization's ticket format.
- **🪟 Cross-Platform**: Works seamlessly on both macOS and Windows.

---

## 🛠️ Prerequisites

- **macOS**: Designed specifically for the macOS ecosystem.
- **OS**: macOS or Windows.
- **Node.js** & **npm**: Required for the frontend build process.
- **Rust**: Required for the high-performance backend.
- **Visual Studio C++ Build Tools** (Windows only): Required for compiling Rust on Windows.

---

Expand Down
4 changes: 2 additions & 2 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "temprix",
"private": true,
"version": "0.1.0",
"version": "0.2.0",
"type": "module",
"scripts": {
"tauri": "tauri"
Expand Down
2 changes: 1 addition & 1 deletion src/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "temprix"
version = "0.1.0"
version = "0.2.0"
description = "The non AI, smart local activity tracker !"
authors = ["you"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion src/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub fn run() {
tauri::WebviewUrl::App("settings.html".into()),
)
.title("Activity Tracker Settings")
.inner_size(650.0, 700.0)
.inner_size(650.0, 400.0)
.build();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Temprix",
"version": "0.1.0",
"version": "0.2.0",
"identifier": "com.robertkeller.temprix",
"build": {
"frontendDist": "../src"
Expand Down
39 changes: 0 additions & 39 deletions src/src/index.html

This file was deleted.

18 changes: 0 additions & 18 deletions src/src/main.js

This file was deleted.

101 changes: 28 additions & 73 deletions src/src/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,83 +10,38 @@
<div class="container">
<div class="header-container">
<img src="assets/logo.png" alt="Temprix Logo" class="settings-logo">
<h1>Settings</h1>
<h1>Temprix</h1>
</div>
<div class="description">
Configure Regex patterns to identify ticket IDs from window titles.<br>
Use standard Regex syntax. Capture group 1 will be used as the ID.
<div class="settings-section">
<h2>ID Detection Patterns</h2>
<div class="description">
Configure Regex patterns to identify ticket IDs from window titles.<br>
Use standard Regex syntax. Capture group 1 will be used as the ID.
</div>

<div id="pattern-list" class="pattern-list">
<!-- Patterns will be loaded here -->
</div>

<div class="actions">
<button id="add-pattern">Add Pattern</button>
<button id="save-patterns">Save Changes</button>
</div>
</div>

<div id="pattern-list" class="pattern-list">
<!-- Patterns will be loaded here -->
</div>

<div class="actions">
<button id="add-pattern">Add Pattern</button>
<button id="save-patterns">Save Changes</button>
<div class="settings-section" style="display: none;">
<h2>Activity log folder</h2>
<div class="description">
Define the directory where you wan't the activity logs to be stored.
</div>
<div id="activity-log-folder" class="activity-log-folder">

</div>
<div class="actions">
<button id="open-folder">Open Folder</button>
</div>
</div>
</div>

<script>
const { invoke } = window.__TAURI__.core;

const patternListEl = document.getElementById('pattern-list');
const addBtn = document.getElementById('add-pattern');
const saveBtn = document.getElementById('save-patterns');

function createPatternItem(value = '') {
const div = document.createElement('div');
div.className = 'pattern-item';

const input = document.createElement('input');
input.type = 'text';
input.value = value;
input.placeholder = 'e.g. #(\\d+)';

const removeBtn = document.createElement('button');
removeBtn.className = 'remove';
removeBtn.textContent = 'Remove';
removeBtn.onclick = () => div.remove();

div.appendChild(input);
div.appendChild(removeBtn);
return div;
}

async function loadPatterns() {
try {
const patterns = await invoke('get_patterns');
patternListEl.innerHTML = '';
patterns.forEach(p => {
patternListEl.appendChild(createPatternItem(p));
});
} catch (e) {
console.error('Failed to load patterns', e);
alert('Failed to load patterns: ' + e);
}
}

async function savePatterns() {
const inputs = patternListEl.querySelectorAll('input');
const patterns = Array.from(inputs).map(input => input.value).filter(v => v.trim() !== '');

try {
await invoke('update_patterns', { patterns });
alert('Settings saved successfully!');
} catch (e) {
console.error('Failed to save patterns', e);
alert('Failed to save settings: ' + e);
}
}

addBtn.onclick = () => {
patternListEl.appendChild(createPatternItem());
};

saveBtn.onclick = savePatterns;

// Initial load
loadPatterns();
</script>
<script src="settings.js" />
</body>
</html>
Loading