mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +02:00
chore(biome): update line width biome config
This commit is contained in:
parent
375285feb6
commit
088cc2a8f6
9 changed files with 31 additions and 90 deletions
|
@ -16,7 +16,7 @@
|
|||
"enabled": true,
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 2,
|
||||
"lineWidth": 100,
|
||||
"lineWidth": 128,
|
||||
"useEditorconfig": true
|
||||
},
|
||||
"files": {
|
||||
|
|
|
@ -91,9 +91,7 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => navigatePage(page - 1)}
|
||||
className={`px-3 py-2 ${
|
||||
page === 1 ? 'pointer-events-none text-gray-400' : 'text-dark hover:text-gray-600'
|
||||
}`}
|
||||
className={`px-3 py-2 ${page === 1 ? 'pointer-events-none text-gray-400' : 'text-dark hover:text-gray-600'}`}
|
||||
>
|
||||
<
|
||||
</button>
|
||||
|
@ -112,9 +110,7 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
|||
}
|
||||
return (
|
||||
<span key={value} className="text-sm">
|
||||
{value
|
||||
.replace('{totalPages}', totalPages.toString())
|
||||
.replace('{totalItems}', totalItems.toString())}
|
||||
{value.replace('{totalPages}', totalPages.toString()).replace('{totalItems}', totalItems.toString())}
|
||||
</span>
|
||||
)
|
||||
})}
|
||||
|
@ -122,11 +118,7 @@ export default function ModsList({ allMods, locale }: ModsListProps) {
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => navigatePage(page + 1)}
|
||||
className={`px-3 py-2 ${
|
||||
page === totalPages
|
||||
? 'pointer-events-none text-gray-400'
|
||||
: 'text-dark hover:text-gray-600'
|
||||
}`}
|
||||
className={`px-3 py-2 ${page === totalPages ? 'pointer-events-none text-gray-400' : 'text-dark hover:text-gray-600'}`}
|
||||
>
|
||||
>
|
||||
</button>
|
||||
|
|
|
@ -4,11 +4,7 @@ import { Info } from 'lucide-astro'
|
|||
|
||||
import { releaseNotes as releaseNotesData } from '~/release-notes'
|
||||
import { getLocale, getPath, getUI } from '~/utils/i18n'
|
||||
import {
|
||||
type BreakingChange,
|
||||
type ReleaseNote,
|
||||
getReleaseNoteFirefoxVersion,
|
||||
} from '../release-notes'
|
||||
import { type BreakingChange, type ReleaseNote, getReleaseNoteFirefoxVersion } from '../release-notes'
|
||||
export type Props = ReleaseNote
|
||||
const { isTwilight, ...props } = Astro.props
|
||||
|
||||
|
@ -29,9 +25,7 @@ if (props.date) {
|
|||
}
|
||||
|
||||
const ffVersion = getReleaseNoteFirefoxVersion(props)
|
||||
const currentReleaseIndex = releaseNotesData.findIndex(
|
||||
(releaseNote: ReleaseNote) => releaseNote.version === props.version,
|
||||
)
|
||||
const currentReleaseIndex = releaseNotesData.findIndex((releaseNote: ReleaseNote) => releaseNote.version === props.version)
|
||||
const prevReleaseNote = releaseNotesData[currentReleaseIndex + 1]
|
||||
let compareLink = ''
|
||||
if (prevReleaseNote && !isTwilight) {
|
||||
|
|
|
@ -2,13 +2,7 @@
|
|||
const { gap = 4 } = Astro.props
|
||||
|
||||
import { icon, library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
faBluesky,
|
||||
faGithub,
|
||||
faMastodon,
|
||||
faReddit,
|
||||
faXTwitter,
|
||||
} from '@fortawesome/free-brands-svg-icons'
|
||||
import { faBluesky, faGithub, faMastodon, faReddit, faXTwitter } from '@fortawesome/free-brands-svg-icons'
|
||||
|
||||
library.add(faMastodon, faBluesky, faGithub, faXTwitter, faReddit)
|
||||
const Mastodon = icon({ prefix: 'fab', iconName: 'mastodon' })
|
||||
|
|
|
@ -57,7 +57,7 @@ import DownloadCard from './ButtonCard.astro'
|
|||
/>
|
||||
</div>
|
||||
</div>}
|
||||
{releases.x86_64 && 'tarball' in releases.x86_64 && <div>
|
||||
{releases.x86_64 && Object.hasOwn(releases.x86_64, 'tarball') && <div>
|
||||
<h4 class="mb-3 text-lg font-medium">Tarball</h4>
|
||||
<div class="grid grid-cols-1 gap-3 sm:grid-cols-2">
|
||||
<DownloadCard
|
||||
|
@ -85,7 +85,7 @@ import DownloadCard from './ButtonCard.astro'
|
|||
checksum={releases.universal.checksum}
|
||||
/>
|
||||
)}
|
||||
{releases.x86_64 && 'tarball' in releases.x86_64 && releases.x86_64.tarball && releases.x86_64.tarball.label && (
|
||||
{releases.x86_64 && Object.hasOwn(releases.x86_64, 'tarball') && releases.x86_64.tarball && releases.x86_64.tarball.label && (
|
||||
<DownloadCard
|
||||
label={releases.x86_64.tarball.label}
|
||||
href={releases.x86_64.tarball.link}
|
||||
|
|
|
@ -70,9 +70,7 @@ export function useModsSearch(mods: ZenTheme[]) {
|
|||
searchParams.delete('limit')
|
||||
}
|
||||
|
||||
const newUrl = `${window.location.pathname}${
|
||||
searchParams.toString() ? `?${searchParams.toString()}` : ''
|
||||
}`
|
||||
const newUrl = `${window.location.pathname}${searchParams.toString() ? `?${searchParams.toString()}` : ''}`
|
||||
|
||||
if (state.page > 1) {
|
||||
window.history.pushState({}, '', newUrl)
|
||||
|
@ -128,8 +126,7 @@ export function useModsSearch(mods: ZenTheme[]) {
|
|||
const toggleCreatedSort = () => {
|
||||
setState((prev) => ({
|
||||
...prev,
|
||||
createdSort:
|
||||
prev.createdSort === 'default' ? 'asc' : prev.createdSort === 'asc' ? 'desc' : 'default',
|
||||
createdSort: prev.createdSort === 'default' ? 'asc' : prev.createdSort === 'asc' ? 'desc' : 'default',
|
||||
page: 1, // Reset page when sort changes
|
||||
}))
|
||||
}
|
||||
|
@ -137,8 +134,7 @@ export function useModsSearch(mods: ZenTheme[]) {
|
|||
const toggleUpdatedSort = () => {
|
||||
setState((prev) => ({
|
||||
...prev,
|
||||
updatedSort:
|
||||
prev.updatedSort === 'default' ? 'asc' : prev.updatedSort === 'asc' ? 'desc' : 'default',
|
||||
updatedSort: prev.updatedSort === 'default' ? 'asc' : prev.updatedSort === 'asc' ? 'desc' : 'default',
|
||||
page: 1, // Reset page when sort changes
|
||||
}))
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@ const RSS_ENTRY_LIMIT = 20
|
|||
*/
|
||||
export function GET(context: { url: URL }) {
|
||||
// Just in case the release notes array is empty for whatever reason.
|
||||
const latestDate =
|
||||
releaseNotes.length > 0 ? formatRssDate(releaseNotes[0].date as string) : new Date()
|
||||
const latestDate = releaseNotes.length > 0 ? formatRssDate(releaseNotes[0].date as string) : new Date()
|
||||
|
||||
const rssData: RSSOptions = {
|
||||
title: 'Zen Browser Release Notes',
|
||||
|
@ -87,10 +86,7 @@ function formatReleaseNote(releaseNote: ReleaseNote) {
|
|||
content += `<p>${releaseNote.extra.replace(/(\n)/g, '<br />')}</p>`
|
||||
}
|
||||
|
||||
content += addReleaseNoteSection(
|
||||
'⚠️ Breaking changes',
|
||||
releaseNote.breakingChanges?.map(breakingChangeToReleaseNote),
|
||||
)
|
||||
content += addReleaseNoteSection('⚠️ Breaking changes', releaseNote.breakingChanges?.map(breakingChangeToReleaseNote))
|
||||
content += addReleaseNoteSection('✓ Fixes', releaseNote.fixes?.map(fixToReleaseNote))
|
||||
content += addReleaseNoteSection('🖌 Theme Changes', releaseNote.themeChanges)
|
||||
content += addReleaseNoteSection('⭐ Features', releaseNote.features)
|
||||
|
@ -130,9 +126,7 @@ function fixToReleaseNote(fix?: Exclude<ReleaseNote['fixes'], undefined>[number]
|
|||
return note
|
||||
}
|
||||
|
||||
function breakingChangeToReleaseNote(
|
||||
breakingChange?: Exclude<ReleaseNote['breakingChanges'], undefined>[number],
|
||||
) {
|
||||
function breakingChangeToReleaseNote(breakingChange?: Exclude<ReleaseNote['breakingChanges'], undefined>[number]) {
|
||||
if (typeof breakingChange === 'string') {
|
||||
return breakingChange
|
||||
}
|
||||
|
|
|
@ -601,10 +601,7 @@
|
|||
"version": "1.0.0-a.30",
|
||||
"date": "26/08/2024",
|
||||
"extra": "This release is the thirtieth alpha release of the 1.0.0-alpha series.",
|
||||
"features": [
|
||||
"Added support for 24 more languages!",
|
||||
"Update installed mods from the browser settings"
|
||||
],
|
||||
"features": ["Added support for 24 more languages!", "Update installed mods from the browser settings"],
|
||||
"fixes": [
|
||||
{
|
||||
"description": "Letterboxing option is missing",
|
||||
|
@ -932,11 +929,7 @@
|
|||
"image": false,
|
||||
"workflowId": 11020784612,
|
||||
"extra": "This update is a small patch to fix some issues that weren't addressed in the previous release!",
|
||||
"features": [
|
||||
"Moved application menu button to the right",
|
||||
"Added new shortcuts",
|
||||
"Collapsed tab sidebar is now smaller"
|
||||
],
|
||||
"features": ["Moved application menu button to the right", "Added new shortcuts", "Collapsed tab sidebar is now smaller"],
|
||||
"fixes": [
|
||||
{
|
||||
"description": "Fixed issue with hovering over window control buttons (macOS)"
|
||||
|
@ -962,9 +955,7 @@
|
|||
"Improved Expand Tabs on Hover layout"
|
||||
],
|
||||
"themeChanges": ["Toggle inputs will not use the themed tertiary color"],
|
||||
"breakingChanges": [
|
||||
"The keyboard shortcuts will be overriden by the defaults ones in this update"
|
||||
],
|
||||
"breakingChanges": ["The keyboard shortcuts will be overriden by the defaults ones in this update"],
|
||||
"fixes": [
|
||||
{
|
||||
"description": "Fixed Firefox add-ons not updating",
|
||||
|
@ -1140,10 +1131,7 @@
|
|||
"description": "Fixed about page linking 'global Community' to a Mozilla page"
|
||||
}
|
||||
],
|
||||
"features": [
|
||||
"About page will now display the Firefox version used",
|
||||
"Disabled forcing container grouping for workspaces"
|
||||
]
|
||||
"features": ["About page will now display the Firefox version used", "Disabled forcing container grouping for workspaces"]
|
||||
},
|
||||
{
|
||||
"version": "1.0.1-a.11",
|
||||
|
@ -1284,9 +1272,7 @@
|
|||
"description": "Fixed sidebar webpanels being in a darker contrast"
|
||||
}
|
||||
],
|
||||
"features": [
|
||||
"Added a confirmation dialog when the gradient generator has successfully saved the gradient"
|
||||
]
|
||||
"features": ["Added a confirmation dialog when the gradient generator has successfully saved the gradient"]
|
||||
},
|
||||
{
|
||||
"version": "1.0.1-a.15",
|
||||
|
@ -2142,10 +2128,7 @@
|
|||
"date": "30/01/2025",
|
||||
"workflowId": 13062083313,
|
||||
"extra": "Quick fix for a critical bug that was introduced in the previous release.",
|
||||
"fixes": [
|
||||
"Fixed the browser not opening when having multiple windows",
|
||||
"Fixed macos fullscreen having a weird shadow"
|
||||
]
|
||||
"fixes": ["Fixed the browser not opening when having multiple windows", "Fixed macos fullscreen having a weird shadow"]
|
||||
},
|
||||
{
|
||||
"version": "1.7.5b",
|
||||
|
@ -2204,9 +2187,7 @@
|
|||
"Fixed opening glance tabs on essentials messing up the sidebar",
|
||||
"Fixed pinned tabs appearing on normal container after a restart"
|
||||
],
|
||||
"features": [
|
||||
"Tabs can now be dragged into pinned tabs by dragging them into the workspace indicator"
|
||||
],
|
||||
"features": ["Tabs can now be dragged into pinned tabs by dragging them into the workspace indicator"],
|
||||
"workflowId": 13209591935,
|
||||
"date": "08/02/2025"
|
||||
},
|
||||
|
@ -2739,10 +2720,7 @@
|
|||
"version": "1.12.5b",
|
||||
"image": false,
|
||||
"extra": "",
|
||||
"fixes": [
|
||||
"Fixed a weird shadow with the URL bar.",
|
||||
"Fixed all tabs button appearing unexpectedly."
|
||||
],
|
||||
"fixes": ["Fixed a weird shadow with the URL bar.", "Fixed all tabs button appearing unexpectedly."],
|
||||
"features": [],
|
||||
"workflowId": 15024223699,
|
||||
"date": "14/05/2025"
|
||||
|
|
|
@ -44,9 +44,7 @@ export const locales = CONSTANT.I18N.LOCALES.map(({ value }) => value)
|
|||
* List of locales excluding the default locale
|
||||
* @type {Locale[]}
|
||||
*/
|
||||
const otherLocales = CONSTANT.I18N.LOCALES.filter(
|
||||
({ value }) => value !== CONSTANT.I18N.DEFAULT_LOCALE,
|
||||
)
|
||||
const otherLocales = CONSTANT.I18N.LOCALES.filter(({ value }) => value !== CONSTANT.I18N.DEFAULT_LOCALE)
|
||||
|
||||
/**
|
||||
* Retrieves locales other than the default locale
|
||||
|
@ -108,10 +106,7 @@ export const getUI = (locale?: Locale | string): UI => {
|
|||
typeof overrideValue === 'object'
|
||||
) {
|
||||
// Type assertion to handle nested merging
|
||||
;(result as Record<keyof T, unknown>)[key] = deepMerge(
|
||||
defaultValue as object,
|
||||
overrideValue as Partial<object>,
|
||||
)
|
||||
;(result as Record<keyof T, unknown>)[key] = deepMerge(defaultValue as object, overrideValue as Partial<object>)
|
||||
} else if (overrideValue !== undefined) {
|
||||
// Override with the new value if it exists
|
||||
;(result as Record<keyof T, unknown>)[key] = overrideValue
|
||||
|
@ -142,14 +137,12 @@ export const getStaticPaths = (() => {
|
|||
params: { locale: undefined },
|
||||
props: { locale: CONSTANT.I18N.DEFAULT_LOCALE },
|
||||
},
|
||||
...CONSTANT.I18N.LOCALES.filter(({ value }) => value !== CONSTANT.I18N.DEFAULT_LOCALE).map(
|
||||
({ value }) => ({
|
||||
...CONSTANT.I18N.LOCALES.filter(({ value }) => value !== CONSTANT.I18N.DEFAULT_LOCALE).map(({ value }) => ({
|
||||
params: { locale: value },
|
||||
props: {
|
||||
locale: value,
|
||||
},
|
||||
}),
|
||||
),
|
||||
})),
|
||||
]
|
||||
}) satisfies GetStaticPaths
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue