diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c370c8b..3d743dc 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -38,7 +38,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. + tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. releaseName: 'Release v__VERSION__' releaseBody: 'See the assets to download this version and install.' releaseDraft: false diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 14b997a..f1736bd 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "JSLive", - "version": "0.1.0", + "version": "0.1.2", "identifier": "io.monawwar.jslive", "build": { "beforeDevCommand": "bun run dev", diff --git a/src/App.css b/src/App.css index 1874598..2d4850c 100644 --- a/src/App.css +++ b/src/App.css @@ -5,4 +5,10 @@ :root { color-scheme: dark; background-color: #282a36; + -webkit-overflow-scrolling: touch; + overflow: hidden; +} + +.tabs::-webkit-scrollbar { + display: none; /* Safari and Chrome */ } diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index 75f3cc8..0de83a8 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -33,7 +33,7 @@ function Tabs() { {macTitleIconColors.map((icon, index) => (
))} - {tabs.map(tab => ( -
+ {tabs.map(tab => ( +
{ + setCurrent(tab.id); + }} + > +

+ {tab.title} +

+ { + if (tabs.length === 1) return; + + deleteTab(tab.id); + }} + /> +
+ ))} +
- ))} - + + ); } diff --git a/src/store.ts b/src/store.ts index 7211b3f..ff10213 100644 --- a/src/store.ts +++ b/src/store.ts @@ -86,7 +86,9 @@ const useStore = create()( set(state => { state.tabs = state.tabs.filter(tab => tab.id !== id); if (state.current.id === id) { - state.current = state.tabs[0]; + if (state.tabs.length > 0) { + state.current = state.tabs[state.tabs.length - 1]; + } else state.current = state.tabs[0]; } return { tabs: state.tabs, current: state.current }; });