promote breaks feature in sidebar banner

This commit is contained in:
Gregor Vostrak
2026-07-24 16:12:57 +02:00
parent 34f8eb0970
commit 8a68673a48
3 changed files with 25 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ import { PLAYWRIGHT_BASE_URL, TEST_USER_PASSWORD } from '../playwright/config';
async function goToOrganizationSettings(page) {
await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard');
await page.locator('[data-testid="organization_switcher"]:visible').click();
await page.getByText('Organization Settings').click();
await page.getByRole('menuitem', { name: 'Organization Settings' }).click();
}
async function createTimeEntry(page, duration: string) {

View File

@@ -50,7 +50,7 @@ async function goToTimeOverview(page: Page) {
async function goToOrganizationSettings(page: Page) {
await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard');
await page.locator('[data-testid="organization_switcher"]:visible').click();
await page.getByText('Organization Settings').click();
await page.getByRole('menuitem', { name: 'Organization Settings' }).click();
}
async function createEmptyTimeEntry(page: Page) {

View File

@@ -2,10 +2,17 @@
import { BellAlertIcon, XMarkIcon } from '@heroicons/vue/20/solid';
import { SecondaryButton } from '@/packages/ui/src';
import { useStorage } from '@vueuse/core';
const showReleaseInfo = useStorage('showReleaseInfo-desktop', true);
import { router } from '@inertiajs/vue3';
import { getCurrentOrganizationId } from '@/utils/useUser';
import { canUpdateOrganization } from '@/utils/permissions';
const showReleaseInfo = useStorage('showReleaseInfo-breaks', true);
function openDesktopGithubRepo() {
window.open('https://github.com/solidtime-io/solidtime-desktop', '_blank')?.focus();
function openOrganizationSettings() {
router.visit(route('organizations.show', getCurrentOrganizationId()));
}
function openBreaksDocs() {
window.open('https://docs.solidtime.io/user-guide/breaks', '_blank')?.focus();
}
</script>
@@ -16,7 +23,7 @@ function openDesktopGithubRepo() {
<div
class="text-xs pb-1.5 font-semibold text-text-tertiary flex items-center space-x-1">
<BellAlertIcon class="w-3.5"></BellAlertIcon>
<span> New Update </span>
<span> New Feature </span>
</div>
<button>
<XMarkIcon
@@ -26,14 +33,22 @@ function openDesktopGithubRepo() {
</div>
<p class="text-xs">
<span class="font-semibold">Solidtime Desktop Beta</span> is here! Test our brand
new clients for Windows, macOS and Linux now.
<span class="font-semibold">Breaks</span> are here! Enable them in the organization
settings to track break time in the time tracker and timesheet.
</p>
<SecondaryButton
v-if="canUpdateOrganization()"
size="small"
class="w-full text-center justify-center mt-1.5"
@click="openDesktopGithubRepo"
>Download now</SecondaryButton
@click="openOrganizationSettings"
>Enable now</SecondaryButton
>
<SecondaryButton
v-else
size="small"
class="w-full text-center justify-center mt-1.5"
@click="openBreaksDocs"
>Learn more</SecondaryButton
>
</div>
</div>