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
9 changes: 6 additions & 3 deletions app/routes/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,11 @@ def _module_preset_choices():
choices = [
(
ModulePreset.SOLO.value,
_("Just me"),
_("Track time, organise it by project and client, and bill it. The leanest setup."),
_("Focus mode (just me)"),
_(
"Timer-first: track time, Focus/Pomodoro sessions, weekly goals, "
"projects, clients, and invoices. Hides CRM, inventory, and team tools."
),
),
(
ModulePreset.TEAM.value,
Expand Down Expand Up @@ -209,7 +212,7 @@ def _render_setup(settings, timezones):
settings=settings,
timezones=timezones,
module_presets=_module_preset_choices(),
default_module_preset=ModulePreset.TEAM.value,
default_module_preset=ModulePreset.SOLO.value,
rounding_methods=get_available_rounding_methods(),
rounding_minimums=get_available_minimum_durations(),
)
8 changes: 7 additions & 1 deletion app/templates/admin/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,17 @@ <h2 class="text-sm font-semibold mb-2">{{ _('Quick presets') }}</h2>
{{ _('Apply a module preset (e.g. Solo focus disables CRM, inventory, and other non-essential areas).') }}
</p>
<div class="flex flex-wrap gap-2">
{% set preset_labels = {
'solo': _('Focus (Solo)'),
'team': _('Team'),
'compliance': _('Compliance'),
'everything': _('Everything')
} %}
{% for preset in ['solo', 'team', 'compliance', 'everything'] %}
<form method="POST" class="inline">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="apply_module_preset" value="{{ preset }}">
<button type="submit" class="btn btn-secondary text-sm">{{ preset|replace('_', ' ')|title }}</button>
<button type="submit" class="btn btn-secondary text-sm">{{ preset_labels[preset] }}</button>
</form>
{% endfor %}
</div>
Expand Down
22 changes: 21 additions & 1 deletion app/templates/main/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@
{% set dashboard_breadcrumbs = [{'text': _('Dashboard')}] %}
{{ page_header('fas fa-tachometer-alt', _('Dashboard'), _("Here's a quick overview of your work."), breadcrumbs=dashboard_breadcrumbs) }}

{% if not is_module_enabled('deals') and not is_module_enabled('inventory') %}
<div class="mb-6 rounded-xl border border-primary/20 bg-primary/5 p-4" role="status">
<p class="font-semibold text-text-light dark:text-text-dark mb-1">
<i class="fas fa-bullseye mr-2 text-primary" aria-hidden="true"></i>{{ _('Focus mode') }}
</p>
<p class="text-sm text-text-muted-light dark:text-text-muted-dark mb-2">
{{ _('Your workspace is lean: timer, projects, and billing. CRM and inventory stay hidden until you enable them in Admin → Modules.') }}
</p>
<div class="flex flex-wrap gap-2">
<a href="{{ url_for('timer.focus_mode') }}" class="btn btn-primary btn-sm">{{ _('Start Focus session') }}</a>
{% if is_module_enabled('weekly_goals') %}
<a href="{{ url_for('weekly_goals.index') }}" class="btn btn-secondary btn-sm">{{ _('Weekly goals') }}</a>
{% endif %}
</div>
</div>
{% endif %}

{% if pending_violations %}
<div class="mb-6 rounded-xl border border-amber-300 dark:border-amber-700 bg-amber-50 dark:bg-amber-900/20 p-4" role="alert">
<p class="font-semibold text-amber-900 dark:text-amber-100 mb-1">
Expand Down Expand Up @@ -412,7 +429,10 @@ <h2 class="text-lg font-semibold text-text-light dark:text-text-dark">{{ _('Rece
<p class="mt-1 text-xs text-text-muted-light dark:text-text-muted-dark">
{{ focus_today_minutes|default(0) }} {{ _('min') }} · {{ focus_today_sessions|default(0) }} {{ _('sessions') }}
</p>
<a href="{{ url_for('timer.timer_page') }}" class="text-xs text-primary hover:underline mt-2 inline-block">{{ _('Open timer') }}</a>
<div class="mt-2 flex flex-wrap gap-3">
<a href="{{ url_for('timer.focus_mode') }}" class="text-xs text-primary hover:underline">{{ _('Start Focus session') }}</a>
<a href="{{ url_for('timer.timer_page') }}" class="text-xs text-primary hover:underline">{{ _('Open timer') }}</a>
</div>
</div>
<div class="bg-card-light dark:bg-card-dark border border-border-light dark:border-border-dark p-4 rounded-tt dashboard-widget">
<p class="text-sm font-medium text-text-muted-light dark:text-text-muted-dark mb-1">{{ _('Badges') }}</p>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/setup/initial_setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h3 class="text-sm font-semibold text-primary mb-2">🎉 {{ _('Thank you for cho
<div class="wizard-step hidden" data-step="2">
<h2 class="text-xl font-bold tracking-tight">{{ _('What will you use TimeTracker for?') }}</h2>
<p class="mt-2 text-sm text-text-muted-light dark:text-text-muted-dark">
{{ _('TimeTracker ships with a lot of modules. Pick the closest match and we will switch off the ones you are unlikely to need, so the navigation stays manageable. You can change this any time in Admin → Modules.') }}
{{ _('Start in Focus mode if you mainly track and bill your own time. We switch off CRM, inventory, and other modules you are unlikely to need so the navigation stays simple. You can change this any time in Admin → Modules.') }}
</p>
<fieldset class="mt-4 space-y-3">
<legend class="sr-only">{{ _('Module preset') }}</legend>
Expand Down
9 changes: 5 additions & 4 deletions app/utils/module_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,9 @@ def initialize_defaults(cls):
# First-run presets
# ------------------------------------------------------------------

#: Modules that make up the "Solo freelancer" preset: track time, organise it by
#: project/client, bill it, and see where it went. Nothing else.
#: Modules that make up the "Solo / Focus" preset: timer-first workflow with
#: projects, clients, quick log templates, weekly goals, billing, and reports.
#: CRM, inventory, and team surfaces stay off until the user expands the preset.
_SOLO_MODULES = {
"auth",
"main",
Expand All @@ -846,6 +847,8 @@ def initialize_defaults(cls):
"expenses",
"saved_filters",
"import_export",
"weekly_goals",
"time_entry_templates",
}

#: Adds collaboration, scheduling and light process on top of SOLO.
Expand All @@ -854,12 +857,10 @@ def initialize_defaults(cls):
"kanban",
"gantt",
"issues",
"weekly_goals",
"activity_feed",
"team_chat",
"time_approvals",
"project_templates",
"time_entry_templates",
"recurring_tasks",
"recurring_invoices",
"quotes",
Expand Down
Loading
Loading