promote breaks feature in sidebar banner

This commit is contained in:
Gregor Vostrak
2026-07-24 16:12:57 +02:00
parent c0c8fee6be
commit 885abf3333
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) { async function goToOrganizationSettings(page) {
await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard'); await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard');
await page.locator('[data-testid="organization_switcher"]:visible').click(); 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) { async function createTimeEntry(page, duration: string) {

View File

@@ -50,7 +50,7 @@ async function goToTimeOverview(page: Page) {
async function goToOrganizationSettings(page: Page) { async function goToOrganizationSettings(page: Page) {
await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard'); await page.goto(PLAYWRIGHT_BASE_URL + '/dashboard');
await page.locator('[data-testid="organization_switcher"]:visible').click(); 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) { async function createEmptyTimeEntry(page: Page) {

View File

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