Skip to content

Commit

Permalink
Merge branch 'main' into feat-new-logo
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenWeathers committed Apr 8, 2024
2 parents eb0f083 + 5780ba6 commit b9de658
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 72 deletions.
3 changes: 2 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"test:watch": "npm run test -- --watch",
"test:snapshot": "npm test -- -u",
"locales": "npx typesafe-i18n --no-watch",
"locales:watch": "typesafe-i18n"
"locales:watch": "typesafe-i18n",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
"compute-scroll-into-view": "^3.1.0",
Expand Down
14 changes: 6 additions & 8 deletions ui/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import '../node_modules/quill/dist/quill.core.css';
import '../node_modules/quill/dist/quill.snow.css';
import Navaid from 'navaid';
import { onDestroy, onMount } from 'svelte';
import { onDestroy } from 'svelte';
import { AppConfig, appRoutes } from './config';
import apiclient from './apiclient';
Expand Down Expand Up @@ -52,12 +52,12 @@
import AdminSubscription from './pages/admin/Subscription.svelte';
import { setLocale } from './i18n/i18n-svelte';
import { detectLocale } from './i18n/i18n-util';
import { loadLocaleAsync } from './i18n/i18n-util.async';
import Confirmation from './pages/subscription/Confirmation.svelte';
import Pricing from './pages/subscription/Pricing.svelte';
import PrivacyPolicy from './pages/support/PrivacyPolicy.svelte';
import TermsConditions from './pages/support/TermsConditions.svelte';
import Support from './pages/support/Support.svelte';
import { loadLocale } from './i18n/i18n-util.sync';
const {
FeaturePoker,
Expand All @@ -73,6 +73,10 @@
activeWarrior = w;
});
const detectedLocale = activeWarrior.locale || detectLocale();
loadLocale(detectedLocale);
setLocale(detectedLocale);
$: if (document.dir !== $dir) {
document.dir = $dir;
}
Expand Down Expand Up @@ -529,12 +533,6 @@
});
}
onMount(async () => {
const detectedLocale = activeWarrior.locale || detectLocale();
await loadLocaleAsync(detectedLocale);
setLocale(detectedLocale);
});
onDestroy(router.unlisten);
</script>

Expand Down
2 changes: 1 addition & 1 deletion ui/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@import 'tailwindcss/utilities';

.font-rajdhani {
font-family: 'Rajdhani', sans-serif;
font-family: 'Rajdhani', 'Arial Narrow', sans-serif;
}

::-webkit-calendar-picker-indicator {
Expand Down
22 changes: 22 additions & 0 deletions ui/src/components/Editor.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
import { quill } from '../quill';
export let content = '';
export let placeholder = '';
export let handleTextChange = text => {};
export let id = '';
function onTextChange(e) {
handleTextChange(e.detail.html);
}
</script>

<div
class="w-full"
use:quill="{{
placeholder: `${placeholder}`,
content: content,
}}"
on:text-change="{onTextChange}"
id="{id}"
></div>
54 changes: 21 additions & 33 deletions ui/src/components/checkin/Checkin.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import Modal from '../global/Modal.svelte';
import SolidButton from '../global/SolidButton.svelte';
import { quill } from '../../quill';
import LL from '../../i18n/i18n-svelte';
import Editor from '../Editor.svelte';
export let toggleCheckin = () => {};
export let handleCheckin = () => {};
Expand Down Expand Up @@ -50,15 +50,12 @@
{$LL.yesterday()}
</div>
<div class="bg-white">
<div
class="w-full"
use:quill="{{
placeholder: `${$LL.yesterdayPlaceholder()}`,
content: yesterday,
}}"
on:text-change="{e => (yesterday = e.detail.html)}"
<Editor
content="{yesterday}"
placeholder="{$LL.yesterdayPlaceholder()}"
id="yesterday"
></div>
handleTextChange="{c => (yesterday = c)}"
/>
</div>
</div>
<div class="mb-4">
Expand Down Expand Up @@ -93,15 +90,12 @@
{$LL.today()}
</div>
<div class="bg-white">
<div
class="w-full"
use:quill="{{
placeholder: `${$LL.todayPlaceholder()}`,
content: today,
}}"
on:text-change="{e => (today = e.detail.html)}"
<Editor
content="{today}"
placeholder="{$LL.todayPlaceholder()}"
id="today"
></div>
handleTextChange="{c => (today = c)}"
/>
</div>
</div>
</div>
Expand All @@ -114,15 +108,12 @@
{$LL.blockers()}
</div>
<div class="bg-white">
<div
class="w-full"
use:quill="{{
placeholder: `${$LL.blockersPlaceholder()}`,
content: blockers,
}}"
on:text-change="{e => (blockers = e.detail.html)}"
<Editor
content="{blockers}"
placeholder="{$LL.blockersPlaceholder()}"
id="blockers"
></div>
handleTextChange="{c => (blockers = c)}"
/>
</div>
</div>

Expand All @@ -133,15 +124,12 @@
{$LL.discuss()}
</div>
<div class="bg-white">
<div
class="w-full"
use:quill="{{
placeholder: `${$LL.discussPlaceholder()}`,
content: discuss,
}}"
on:text-change="{e => (discuss = e.detail.html)}"
<Editor
content="{discuss}"
placeholder="{$LL.discussPlaceholder()}"
id="discuss"
></div>
handleTextChange="{c => (discuss = c)}"
/>
</div>
</div>

Expand Down
30 changes: 12 additions & 18 deletions ui/src/components/poker/AddStory.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { quill } from '../../quill';
import SolidButton from '../global/SolidButton.svelte';
import Modal from '../global/Modal.svelte';
import NoSymbol from '../icons/NoSymbol.svelte';
Expand All @@ -12,6 +11,7 @@
import { AppConfig } from '../../config';
import TextInput from '../global/TextInput.svelte';
import SelectInput from '../global/SelectInput.svelte';
import Editor from '../Editor.svelte';
export let handlePlanAdd = () => {};
export let toggleAddPlan = () => {};
Expand Down Expand Up @@ -186,15 +186,12 @@
{#if descriptionExpanded}
<div class="mb-2">
<div class="bg-white">
<div
class="w-full bg-white"
use:quill="{{
placeholder: $LL.planDescriptionPlaceholder(),
content: description,
}}"
on:text-change="{e => (description = e.detail.html)}"
id="description"
></div>
<Editor
content="{description}"
placeholder="{$LL.planDescriptionPlaceholder()}"
id="storyDescription"
handleTextChange="{c => (description = c)}"
/>
</div>
</div>
{/if}
Expand All @@ -218,15 +215,12 @@
{#if acceptanceExpanded}
<div class="mb-2">
<div class="bg-white">
<div
class="w-full"
use:quill="{{
placeholder: $LL.planAcceptanceCriteriaPlaceholder(),
content: acceptanceCriteria,
}}"
on:text-change="{e => (acceptanceCriteria = e.detail.html)}"
<Editor
content="{acceptanceCriteria}"
placeholder="{$LL.planAcceptanceCriteriaPlaceholder()}"
id="acceptanceCriteria"
></div>
handleTextChange="{c => (acceptanceCriteria = c)}"
/>
</div>
</div>
{/if}
Expand Down
19 changes: 8 additions & 11 deletions ui/src/components/storyboard/StoryForm.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { quill } from '../../quill';
import Modal from '../global/Modal.svelte';
import HollowButton from '../global/HollowButton.svelte';
import UserIcon from '../icons/UserIcon.svelte';
import { user } from '../../stores';
import LL from '../../i18n/i18n-svelte';
import TextInput from '../global/TextInput.svelte';
import Editor from '../Editor.svelte';
export let toggleStoryForm = () => {};
export let sendSocketEvent = () => {};
Expand Down Expand Up @@ -279,18 +279,15 @@
Story Content
</label>
<div class="bg-white">
<div
class="w-full bg-white"
use:quill="{{
placeholder: 'Enter story content',
content: story.content,
}}"
on:text-change="{e => {
story.content = e.detail.html;
<Editor
content="{story.content}"
placeholder="Enter story content"
id="storyDescription"
handleTextChange="{c => {
story.content = c;
updateContent();
}}"
id="storyDescription"
></div>
/>
</div>
</div>
<div class="mb-4">
Expand Down
1 change: 1 addition & 0 deletions ui/src/pages/storyboard/Storyboards.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import LL from '../../i18n/i18n-svelte';
import CreateStoryboard from '../../components/storyboard/CreateStoryboard.svelte';
import BoxList from '../../components/BoxList.svelte';
import Pagination from '../../components/global/Pagination.svelte';
export let xfetch;
export let notifications;
Expand Down

0 comments on commit b9de658

Please sign in to comment.