Skip to content

Commit 7668853

Browse files
committed
fix: update tailwindcss
1 parent 3f998bc commit 7668853

8 files changed

Lines changed: 4322 additions & 3473 deletions

File tree

assets/css/default.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
@tailwind base;
2-
@tailwind comopnents;
3-
@tailwind utilities;
1+
@reference 'tailwindcss';
42

5-
.t-border {
3+
@utility transformers-border {
64
@apply border border-gray-400 dark:border-gray-600;
75
}
86

@@ -30,7 +28,7 @@ a {
3028
}
3129

3230
button {
33-
@apply t-border rounded px-2 py-1;
31+
@apply transformers-border rounded px-2 py-1;
3432
&:hover {
3533
@apply bg-gray-200 dark:bg-gray-700;
3634
}
@@ -51,11 +49,11 @@ button {
5149
}
5250

5351
.form-input {
54-
@apply t-border block p-1 w-full bg-transparent;
52+
@apply transformers-border block p-1 w-full bg-transparent;
5553
}
5654

5755
.t-code {
58-
@apply t-border h-[400px];
56+
@apply transformers-border h-[400px];
5957
}
6058
.cm-editor {
6159
@apply h-full;
@@ -108,7 +106,7 @@ button {
108106
resize: none;
109107
}
110108
&-pipe {
111-
@apply t-border inline-block px-2 py-1 rounded align-top;
109+
@apply transformers-border inline-block px-2 py-1 rounded align-top;
112110
&.disabled {
113111
@apply text-gray-400 border-gray-300 dark:border-gray-700 dark:text-gray-500;
114112
}
@@ -127,7 +125,7 @@ code {
127125
}
128126

129127
textarea {
130-
@apply t-border;
128+
@apply transformers-border;
131129
}
132130

133131
.error {

babel.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/snapshot-panel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</svg>
3232
</a>
3333
</div>
34-
<div class="flex flex-col p-2 rounded t-border" style="height: 70vh">
34+
<div class="flex flex-col p-2 rounded transformers-border" style="height: 70vh">
3535
<div class="form-group has-icon-right mb-2">
3636
<input type="search" class="form-input" v-model="state.search" />
3737
</div>

nuxt.config.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@ export default defineNuxtConfig({
1414
'~/assets/css/default.css',
1515
],
1616

17-
postcss: {
18-
plugins: {
19-
'tailwindcss/nesting': {},
20-
tailwindcss: {},
21-
},
22-
},
17+
modules: [
18+
'@nuxtjs/tailwindcss',
19+
],
2320

2421
vite: {
2522
define: {
@@ -29,4 +26,4 @@ export default defineNuxtConfig({
2926
},
3027

3128
compatibilityDate: '2024-10-30'
32-
});
29+
});

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,31 @@
1414
"postinstall": "nuxt prepare"
1515
},
1616
"devDependencies": {
17-
"@codemirror/commands": "^6.7.1",
17+
"@codemirror/commands": "^6.8.1",
1818
"@codemirror/lang-html": "^6.4.9",
1919
"@codemirror/lang-json": "^6.0.1",
2020
"@codemirror/lang-yaml": "^6.1.2",
21-
"@codemirror/lint": "^6.8.4",
22-
"@codemirror/state": "^6.4.1",
21+
"@codemirror/lint": "^6.8.5",
22+
"@codemirror/state": "^6.5.2",
2323
"@codemirror/theme-one-dark": "^6.1.2",
24-
"@codemirror/view": "^6.35.0",
24+
"@codemirror/view": "^6.37.1",
2525
"@gera2ld/format-json": "^0.3.0",
2626
"@iarna/toml": "^2.2.5",
2727
"@nuxtjs/pwa": "^3.3.5",
28-
"@nuxtjs/tailwindcss": "^6.12.2",
28+
"@nuxtjs/tailwindcss": "7.0.0-beta.0",
2929
"@types/js-yaml": "^4.0.9",
3030
"@violentmonkey/shortcut": "^1.4.4",
3131
"codemirror": "^6.0.1",
32-
"common-lib": "git+https://gitlab.com/gera2ld/common-lib.git",
33-
"husky": "^9.1.6",
32+
"husky": "^9.1.7",
3433
"js-yaml": "^4.1.0",
3534
"json5": "^2.2.3",
36-
"nuxt": "^3.13.2",
37-
"otpauth": "^9.3.4",
35+
"nuxt": "^3.17.5",
36+
"otpauth": "^9.4.0",
3837
"plist": "^3.1.0",
39-
"postcss": "^8.4.47",
40-
"postcss-nested": "^6.2.0",
38+
"postcss": "^8.5.4",
39+
"postcss-nested": "^7.0.2",
4140
"qrcanvas-vue": "^3.0.0",
42-
"yaml": "^2.6.0"
41+
"tailwindcss": "^4.1.8",
42+
"yaml": "^2.8.0"
4343
}
4444
}

pages/vmess.vue

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,18 @@
6969
</template>
7070

7171
<script setup lang="ts">
72-
import { computed, reactive, ref, watch } from "vue";
73-
import yaml from "yaml";
74-
import { QRCanvas } from "qrcanvas-vue";
75-
import { loadVMess, dumpVMess } from "~/components/url";
76-
import { defaultQROptions } from "~~/components/common";
77-
import CodeEditor from "~/components/code-editor.vue";
78-
import {
79-
createClientConfig,
80-
createServerConfig,
81-
} from "common-lib/src/v2fly-config";
72+
import { computed, reactive, ref, watch } from 'vue';
73+
import yaml from 'yaml';
74+
import { QRCanvas } from 'qrcanvas-vue';
75+
import { loadVMess, dumpVMess } from '~/components/url';
76+
import { defaultQROptions } from '~~/components/common';
77+
import CodeEditor from '~/components/code-editor.vue';
78+
import { createClientConfig, createServerConfig } from '~/util/v2fly-config';
8279
8380
const editorList = ref<typeof CodeEditor>();
8481
const editorDetail = ref<typeof CodeEditor>();
8582
const state = reactive<{
86-
editor: "list" | "detail";
83+
editor: 'list' | 'detail';
8784
urlList: string;
8885
active: {
8986
/** Active 1-based line number, always >= 1 */
@@ -93,12 +90,12 @@ const state = reactive<{
9390
valid: boolean;
9491
};
9592
}>({
96-
editor: "list",
97-
urlList: "",
93+
editor: 'list',
94+
urlList: '',
9895
active: {
9996
line: 1,
100-
url: "",
101-
detail: "",
97+
url: '',
98+
detail: '',
10299
valid: true,
103100
},
104101
});
@@ -115,11 +112,11 @@ const optionsQR = computed(() => ({
115112
watch(
116113
() => [state.active.line, state.urlList, state.editor],
117114
() => {
118-
if (state.editor !== "list") return;
119-
const url = state.urlList.split("\n")[state.active.line - 1];
120-
let value = "";
115+
if (state.editor !== 'list') return;
116+
const url = state.urlList.split('\n')[state.active.line - 1];
117+
let value = '';
121118
let valid = true;
122-
if (url.startsWith("vmess:")) {
119+
if (url.startsWith('vmess:')) {
123120
let data: unknown;
124121
({ data, valid } = loadVMess(new URL(url)));
125122
value = yaml.stringify(data);
@@ -135,8 +132,8 @@ watch(
135132
watch(
136133
() => state.active.detail,
137134
(value) => {
138-
if (state.editor !== "detail" || !editorList.value) return;
139-
let url = "";
135+
if (state.editor !== 'detail' || !editorList.value) return;
136+
let url = '';
140137
if (value) {
141138
try {
142139
url = dumpVMess(yaml.parse(value)).toString();
@@ -157,7 +154,7 @@ function onClientConfig() {
157154
try {
158155
const data = yaml.parse(state.active.detail);
159156
modal.value = {
160-
title: "Client config",
157+
title: 'Client config',
161158
content: JSON.stringify(createClientConfig(data), null, 2),
162159
};
163160
} catch {
@@ -170,7 +167,7 @@ function onServerConfig() {
170167
try {
171168
const data = yaml.parse(state.active.detail);
172169
modal.value = {
173-
title: "Server config",
170+
title: 'Server config',
174171
content: JSON.stringify(createServerConfig(data), null, 2),
175172
};
176173
} catch {

0 commit comments

Comments
 (0)