Skip to content

Commit ecee849

Browse files
committed
Release v1.2.2: Move tabs to titlebar center
1 parent 9fdc5d2 commit ecee849

7 files changed

Lines changed: 70 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to MarkViewPro will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.2.2] - 2026-01-26
9+
10+
### Improved
11+
- **Tabs in Titlebar**: Tabs now centered in titlebar for cleaner design
12+
- Removed separate tab bar row
13+
- Tabs integrated directly into titlebar center
14+
- More vertical space for content
15+
- Professional, modern appearance like VS Code
16+
- Smooth transitions between title and tabs
17+
18+
### Technical
19+
- Merged TabBar component into Titlebar
20+
- Tabs now render in titlebar's center flex container
21+
- Removed redundant TabBar import and component
22+
823
## [1.2.1] - 2026-01-26
924

1025
### Improved
@@ -162,6 +177,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
162177
- Vite build system
163178
- Automated CI/CD pipeline with GitHub Actions
164179

180+
[1.2.2]: https://github.com/OffLine911/MarkViewPro/releases/tag/v1.2.2
165181
[1.2.1]: https://github.com/OffLine911/MarkViewPro/releases/tag/v1.2.1
166182
[1.2.0]: https://github.com/OffLine911/MarkViewPro/releases/tag/v1.2.0
167183
[1.1.7]: https://github.com/OffLine911/MarkViewPro/releases/tag/v1.1.7

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "markview-pro",
33
"private": true,
4-
"version": "1.2.1",
4+
"version": "1.2.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

frontend/package.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b38268aa7185cc6afe6ed595f0155e34
1+
affd92bd8a55012b8c0199fb631fa565

frontend/src/App.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useState, useCallback, useEffect } from 'react';
22
import { Sidebar } from './components/Sidebar/Sidebar';
33
import { Titlebar } from './components/Titlebar/Titlebar';
4-
import { TabBar } from './components/TabBar/TabBar';
54
import { MarkdownViewer } from './components/Viewer/MarkdownViewer';
65
import { StatusBar } from './components/StatusBar/StatusBar';
76
import { SettingsModal } from './components/Settings/SettingsModal';
@@ -208,6 +207,10 @@ export default function App() {
208207

209208
<Titlebar
210209
hasOpenFiles={hasOpenFiles}
210+
tabs={tabs}
211+
activeTabId={activeTabId}
212+
onTabClick={setActiveTabId}
213+
onTabClose={closeTab}
211214
onNew={handleNew}
212215
onOpen={handleOpen}
213216
onSave={handleSave}
@@ -221,15 +224,6 @@ export default function App() {
221224
isFullscreen={isFullscreen}
222225
/>
223226

224-
{hasOpenFiles && (
225-
<TabBar
226-
tabs={tabs}
227-
activeTabId={activeTabId}
228-
onTabClick={setActiveTabId}
229-
onTabClose={closeTab}
230-
/>
231-
)}
232-
233227
<div className="flex flex-1 overflow-hidden">
234228
<Sidebar
235229
isOpen={sidebarOpen}

frontend/src/components/Titlebar/Titlebar.tsx

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import { useSettings } from '../../hooks/useSettings';
2323

2424
interface TitlebarProps {
2525
hasOpenFiles: boolean;
26+
tabs: Array<{ id: string; fileName: string; isModified: boolean }>;
27+
activeTabId: string;
28+
onTabClick: (tabId: string) => void;
29+
onTabClose: (tabId: string) => void;
2630
onNew: () => void;
2731
onOpen: () => void;
2832
onSave: () => void;
@@ -38,6 +42,10 @@ interface TitlebarProps {
3842

3943
export function Titlebar({
4044
hasOpenFiles,
45+
tabs,
46+
activeTabId,
47+
onTabClick,
48+
onTabClose,
4149
onNew,
4250
onOpen,
4351
onSave,
@@ -137,16 +145,47 @@ export function Titlebar({
137145
</div>
138146
</div>
139147

140-
{!hasOpenFiles && (
141-
<div className="flex-1 flex items-center justify-center min-w-0">
148+
<div className="flex-1 flex items-center justify-center min-w-0 px-4">
149+
{!hasOpenFiles ? (
142150
<div className="flex items-center gap-2 select-none wails-no-drag">
143151
<div className="w-5 h-5 rounded bg-gradient-to-br from-cyan-400 to-blue-500" />
144152
<span className="text-sm font-semibold text-zinc-300 titlebar-text">MarkView Pro</span>
145153
</div>
146-
</div>
147-
)}
148-
149-
{hasOpenFiles && <div className="flex-1" />}
154+
) : (
155+
<div className="flex items-center gap-1 overflow-x-auto no-scrollbar wails-no-drag max-w-full">
156+
{tabs.map(tab => (
157+
<div
158+
key={tab.id}
159+
onClick={() => onTabClick(tab.id)}
160+
className={`
161+
flex items-center gap-2 px-3 py-1 min-w-[100px] max-w-[180px] cursor-pointer rounded
162+
transition-colors group
163+
${tab.id === activeTabId
164+
? 'bg-zinc-800 text-zinc-100'
165+
: 'bg-zinc-900/50 text-zinc-400 hover:bg-zinc-800/50 hover:text-zinc-200'
166+
}
167+
`}
168+
>
169+
<span className="flex-1 truncate text-xs">
170+
{tab.fileName || 'Untitled'}
171+
</span>
172+
{tab.isModified && (
173+
<span className="w-1.5 h-1.5 rounded-full bg-amber-500 flex-shrink-0" />
174+
)}
175+
{tabs.length > 1 && (
176+
<button
177+
onClick={(e) => { e.stopPropagation(); onTabClose(tab.id); }}
178+
className="flex-shrink-0 p-0.5 rounded hover:bg-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity"
179+
title="Close tab"
180+
>
181+
<X className="w-3 h-3" />
182+
</button>
183+
)}
184+
</div>
185+
))}
186+
</div>
187+
)}
188+
</div>
150189

151190
<div className="flex items-center gap-0.5 wails-no-drag">
152191
<button onClick={onPrint} className="titlebar-btn" title="Print (Ctrl+P)">

wails.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"info": {
1414
"companyName": "MarkViewPro",
1515
"productName": "MarkViewPro",
16-
"productVersion": "1.2.1",
16+
"productVersion": "1.2.2",
1717
"copyright": "Copyright © 2024 MarkViewPro Contributors",
1818
"comments": "A modern Markdown viewer and editor"
1919
},

0 commit comments

Comments
 (0)