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
2 changes: 1 addition & 1 deletion assets/localization/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
"%shareLayoutDialog_manageScriptureResources_label%": "Manage",
"%shareLayoutDialog_modelText_label%": "Model text",
"%shareLayoutDialog_modelText_none%": "None selected",
"%shareLayoutDialog_scriptureResources_label%": "Bible texts",
"%shareLayoutDialog_scriptureResources_label%": "Project Bible texts",
"%shareLayoutDialog_shownByDefault_label%": "Show {resourceName} by default",
"%shareLayoutDialog_textCollectionResources_label%": "Text collection resources",
"%shareLayoutDialog_title%": "Share layout with team",
Expand Down
2 changes: 1 addition & 1 deletion assets/localization/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
"%shareLayoutDialog_manageScriptureResources_label%": "Administrar",
"%shareLayoutDialog_modelText_label%": "Texto modelo",
"%shareLayoutDialog_modelText_none%": "Ninguno seleccionado",
"%shareLayoutDialog_scriptureResources_label%": "Textos bíblicos",
"%shareLayoutDialog_scriptureResources_label%": "Recursos bíblicos del proyecto",
"%shareLayoutDialog_shownByDefault_label%": "Mostrar {resourceName} de forma predeterminada",
"%shareLayoutDialog_textCollectionResources_label%": "Recursos de la colección de textos",
"%shareLayoutDialog_title%": "Compartir diseño con el equipo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1868,11 +1868,14 @@ globalThis.webViewComponent = function PlatformScriptureEditor({
localizedStrings={localizedStrings}
className="tw:h-8"
/>
<ShareLayoutButton
projectId={projectId}
localizedStrings={localizedStrings}
className="tw:h-8"
/>
{/* Share Layout is only available in 10 Simple right now. Later it will be made available in 10 Power too. */}
{!isPowerMode && (
<ShareLayoutButton
projectId={projectId}
localizedStrings={localizedStrings}
className="tw:h-8"
/>
)}
{scrollGroupSelector}
</>
}
Expand Down
42 changes: 23 additions & 19 deletions src/renderer/components/dialogs/share-layout.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ export function ShareLayoutDialogContent({
<div className="tw:flex tw:min-h-0 tw:flex-col tw:gap-4 tw:overflow-y-auto tw:p-4">
<div className="tw:shrink-0 tw:divide-y tw:divide-border tw:overflow-hidden tw:rounded-xl tw:border tw:bg-muted/30">
<div className="tw:flex tw:items-center tw:justify-between tw:gap-2 tw:px-4 tw:py-3">
<span>{localizeString(strings, '%shareLayoutDialog_modelText_label%')}</span>
<span className="tw:font-medium">
{localizeString(strings, '%shareLayoutDialog_modelText_label%')}
</span>
<Popover open={isModelTextPickerOpen} onOpenChange={setIsModelTextPickerOpen}>
<PopoverTrigger asChild>
<Button
Expand Down Expand Up @@ -325,7 +327,9 @@ export function ShareLayoutDialogContent({

<div className="tw:flex tw:items-center tw:justify-between tw:gap-2 tw:px-4 tw:py-3">
<div className="tw:flex tw:flex-col">
<span>{localizeString(strings, '%shareLayoutDialog_activeTab_label%')}</span>
<span className="tw:font-medium">
{localizeString(strings, '%shareLayoutDialog_activeTab_label%')}
</span>
<span className="tw:text-xs tw:text-muted-foreground">
{localizeString(strings, '%shareLayoutDialog_activeTab_sublabel%')}
</span>
Expand All @@ -336,7 +340,7 @@ export function ShareLayoutDialogContent({
if (isShareLayoutActiveTab(value)) setActiveTab(value);
}}
>
<SelectTrigger className="tw:h-8">
<SelectTrigger className="tw:h-8 tw:bg-background">
<SelectValue
placeholder={localizeString(strings, '%shareLayoutDialog_activeTab_none%')}
/>
Expand All @@ -359,27 +363,27 @@ export function ShareLayoutDialogContent({
</div>
</div>

<div className="tw:shrink-0 tw:divide-y tw:divide-border tw:overflow-hidden tw:rounded-xl tw:border tw:bg-muted/30">
{renderResourceHeaderRow(
'ScriptureResource',
scriptureResources,
'%shareLayoutDialog_scriptureResources_label%',
)}
<div className="tw:shrink-0 tw:overflow-hidden tw:rounded-xl tw:border tw:bg-muted/30">
<div className="tw:divide-y tw:divide-border">
{renderResourceHeaderRow(
'ScriptureResource',
scriptureResources,
'%shareLayoutDialog_scriptureResources_label%',
)}

{renderResourceHeaderRow(
'CommentaryResource',
commentaryResources,
'%shareLayoutDialog_commentaryResources_label%',
)}
</div>
{renderResourceHeaderRow(
'CommentaryResource',
commentaryResources,
'%shareLayoutDialog_commentaryResources_label%',
)}
</div>

<div className="tw:shrink-0 tw:overflow-hidden tw:rounded-xl tw:border tw:bg-muted/30">
<div className="tw:border-b tw:border-border tw:px-4 tw:py-3">
<div className="tw:border-t tw:border-border tw:px-4 tw:py-3">
<span className="tw:font-medium">
{localizeString(strings, '%shareLayoutDialog_textCollectionResources_label%')}
</span>
</div>
<div className="tw:divide-y tw:divide-border">
<div>
{[
...scriptureResources.map((ref) => ({ tab: 'ScriptureResource' as const, ref })),
...commentaryResources.map((ref) => ({ tab: 'CommentaryResource' as const, ref })),
Expand All @@ -388,7 +392,7 @@ export function ShareLayoutDialogContent({
key={referenceKey(ref)}
className="tw:flex tw:items-center tw:gap-2 tw:px-4 tw:py-2"
>
<span className="tw:flex-1 tw:truncate">
<span className="tw:flex-1 tw:truncate tw:text-sm">
{formatResourceDisplayName(ref, allResources)}
</span>
<Checkbox
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/dialogs/share-layout.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SHARE_LAYOUT_STRINGS: ShareLayoutDialogLocalizedStrings = {
'%shareLayoutDialog_activeTab_commentaryResource%': 'Commentaries',
'%shareLayoutDialog_activeTab_comments%': 'Comments',
'%shareLayoutDialog_activeTab_textCollection%': 'Text collection',
'%shareLayoutDialog_scriptureResources_label%': 'Bible texts',
'%shareLayoutDialog_scriptureResources_label%': 'Project Bible texts',
'%shareLayoutDialog_commentaryResources_label%': 'Project commentaries',
'%shareLayoutDialog_manageScriptureResources_label%': 'Manage',
'%shareLayoutDialog_manageCommentaryResources_label%': 'Manage',
Expand Down
Loading