Skip to content

Commit

Permalink
Upgrade to tailwindcss v4 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
fitztrev authored Feb 5, 2025
1 parent 35c7068 commit 0870f54
Show file tree
Hide file tree
Showing 11 changed files with 308 additions and 643 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
"devDependencies": {
"@faker-js/faker": "^9.4.0",
"@lichess-org/types": "^2.0.23",
"@tailwindcss/postcss": "^4.0.3",
"@tauri-apps/cli": "^2.2.7",
"@types/node": "^22.13.1",
"@vitejs/plugin-vue": "^5.2.1",
"autoprefixer": "^10.4.20",
"chess.js": "1.0.0",
"jsdom": "^26.0.0",
"postcss": "^8.5.1",
"prettier": "^3.4.2",
"tailwindcss": "^3.4.17",
"tailwindcss": "^4.0.3",
"typescript": "^5.7.3",
"vite": "^6.0.11",
"vitest": "^3.0.5",
Expand Down
902 changes: 289 additions & 613 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
'@tailwindcss/postcss': {},
},
};
2 changes: 1 addition & 1 deletion src/components/AddUserToSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function save() {
<div class="mt-4 flex">
<button
type="submit"
class="rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
class="rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
>
Add
</button>
Expand Down
8 changes: 4 additions & 4 deletions src/components/BroadcastsByUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ const viewOnLichessUrl = computed<string>(() => {
<button
type="button"
@click="refresh"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-white/20"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-white/20"
>
Refresh
</button>
<button
type="button"
@click="openPath(viewOnLichessUrl)"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-white/20"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-white/20"
>
View on Lichess
</button>
<button
type="button"
@click="openPath(`${settings.lichessUrl}/broadcast/new`)"
class="inline-flex items-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
class="inline-flex items-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
>
&plus; New Broadcast
</button>
Expand Down Expand Up @@ -117,7 +117,7 @@ const viewOnLichessUrl = computed<string>(() => {
<button
type="button"
@click="openPath(`${settings.lichessUrl}/broadcast/new`)"
class="inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
class="inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
<svg class="-ml-0.5 mr-1.5 h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path
Expand Down
6 changes: 3 additions & 3 deletions src/components/FolderWatcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ async function resetAndReupload() {
<button
type="button"
@click="stopWatching"
class="rounded-md bg-gray-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-400"
class="rounded-md bg-gray-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-gray-400"
>
Stop watching this folder
</button>
<button
type="button"
@click="resetAndReupload"
class="rounded-md bg-gray-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-400"
class="rounded-md bg-gray-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-gray-400"
>
Reset round + Re-upload game PGNs
</button>
Expand Down Expand Up @@ -204,7 +204,7 @@ async function resetAndReupload() {
<form class="mt-2">
<button
@click="selectPgnFolder"
class="rounded-md bg-teal-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-teal-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-500"
class="rounded-md bg-teal-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-teal-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-teal-500"
type="button"
>
<svg
Expand Down
2 changes: 1 addition & 1 deletion src/components/LichessLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function login() {
<button
type="button"
@click="login"
class="inline-flex items-center rounded-md bg-indigo-600 px-8 py-3 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
class="inline-flex items-center rounded-md bg-indigo-600 px-8 py-3 font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
6 changes: 3 additions & 3 deletions src/components/Round.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ getRound();
<button
type="button"
@click="getRound"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-white/20"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-white/20"
>
Refresh
</button>

<button
type="button"
@click="round?.round.url && openPath(round.round.url)"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-white/20"
class="inline-flex items-center rounded-md bg-white/10 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-white/20"
>
View on Lichess
</button>
<button
type="button"
@click="openPath(`${settings.lichessUrl}/broadcast/${round?.tour.id}/new`)"
class="inline-flex items-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
class="inline-flex items-center rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
>
&plus; New Round
</button>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function logout() {
<form class="flex items-start md:col-span-2" @submit.prevent="logout()">
<button
type="submit"
class="rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400"
class="rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-400"
>
Logout
</button>
Expand Down Expand Up @@ -101,7 +101,7 @@ function logout() {
<form class="flex items-start md:col-span-2" @submit.prevent="clearAllData()">
<button
type="submit"
class="rounded-md bg-gray-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-500"
class="rounded-md bg-gray-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-gray-500"
>
Reset All Settings
</button>
Expand Down Expand Up @@ -143,7 +143,7 @@ function logout() {
<div class="mt-4 flex">
<button
type="submit"
class="rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
class="rounded-md bg-indigo-500 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-500"
>
Save
</button>
Expand Down
4 changes: 1 addition & 3 deletions src/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import 'tailwindcss';

.nav-item {
@apply text-indigo-100 hover:text-indigo-800 hover:bg-indigo-200 rounded-md px-3 py-2 text-sm font-medium;
Expand Down
8 changes: 0 additions & 8 deletions tailwind.config.js

This file was deleted.

0 comments on commit 0870f54

Please sign in to comment.