Skip to content

Commit 0b5c11c

Browse files
committed
feat: bump version to 0.5.0 with --user flag support
1 parent 456c8dd commit 0b5c11c

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

internal/cli/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
var (
13-
version = "0.3.0"
13+
version = "0.5.0"
1414
cfg = &config.Config{}
1515
)
1616

website/src/routes/api/configs/[slug]/+server.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ export const DELETE: RequestHandler = async ({ platform, cookies, params }) => {
115115
const user = await getCurrentUser(cookies, env.DB, env.JWT_SECRET);
116116
if (!user) return json({ error: 'Unauthorized' }, { status: 401 });
117117

118-
if (params.slug === 'default') {
119-
return json({ error: 'Cannot delete default config' }, { status: 400 });
120-
}
121-
122118
await env.DB.prepare('DELETE FROM configs WHERE user_id = ? AND slug = ?').bind(user.id, params.slug).run();
123119

124120
return json({ success: true });

website/src/routes/dashboard/+page.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
let editingSlug = $state('');
2525
let saving = $state(false);
2626
let error = $state('');
27+
let toast = $state('');
2728
2829
let formData = $state({
2930
name: '',
@@ -274,7 +275,8 @@
274275
275276
function copyToClipboard(text: string) {
276277
navigator.clipboard.writeText(text);
277-
alert('Copied to clipboard!');
278+
toast = 'Copied!';
279+
setTimeout(() => toast = '', 2000);
278280
}
279281
280282
function getInstallUrl(config: Config): string {

0 commit comments

Comments
 (0)