Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"pinia": "3.0.3",
"register-service-worker": "1.7.2",
"sortablejs": "1.15.6",
"tailwindcss": "3.4.17",
"tailwindcss": "4.1.8",
"tippy.js": "6.3.7",
"ufo": "1.6.1",
"vue": "3.5.17",
Expand All @@ -114,6 +114,8 @@
"@faker-js/faker": "9.8.0",
"@histoire/plugin-screenshot": "1.0.0-alpha.2",
"@histoire/plugin-vue": "1.0.0-alpha.2",
"@tailwindcss/postcss": "4.1.8",
"@tailwindcss/vite": "4.1.8",
"@tsconfig/node22": "22.0.2",
"@types/codemirror": "5.60.16",
"@types/is-touch-device": "1.0.3",
Expand All @@ -125,7 +127,6 @@
"@vue/eslint-config-typescript": "14.5.1",
"@vue/test-utils": "2.4.6",
"@vue/tsconfig": "0.7.0",
"autoprefixer": "10.4.21",
"browserslist": "4.25.0",
"caniuse-lite": "1.0.30001724",
"csstype": "3.1.3",
Expand Down
714 changes: 426 additions & 288 deletions frontend/pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,3 @@ setLanguage(authStore.settings.language)
useColorScheme()
</script>

<style lang="scss" src="@/styles/global.scss" />
2 changes: 2 additions & 0 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ if (window.API_URL.endsWith('/')) {
// directives
import focus from '@/directives/focus'
import {vTooltip} from 'floating-vue'

import './styles/global.scss'
import 'floating-vue/dist/style.css'
import shortcut from '@/directives/shortcut'
import cypress from '@/directives/cypress'
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/styles/global.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@tailwind base;
@tailwind components;
@config "../../tailwind.config.js";
@tailwind theme;
@tailwind utilities;

@import "fonts";
Expand Down
6 changes: 1 addition & 5 deletions frontend/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
corePlugins: {
// TODO: Readd after removing bulma base styles
preflight: false,
},
export default {
prefix: 'tw-',
content: [
'./index.html',
Expand Down
16 changes: 8 additions & 8 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import viteSentry, {type ViteSentryPluginOptions} from 'vite-plugin-sentry'
import svgLoader from 'vite-svg-loader'
import postcssPresetEnv from 'postcss-preset-env'
import postcssEasingGradients from 'postcss-easing-gradients'
import tailwindcss from 'tailwindcss'
import tailwindcss from '@tailwindcss/vite'
import vueDevTools from 'vite-plugin-vue-devtools'

const pathSrc = fileURLToPath(new URL('./src', import.meta.url)).replaceAll('\\', '/')
Expand Down Expand Up @@ -104,15 +104,15 @@ function getBuildConfig(env: Record<string, string>) {
},
},
postcss: {
plugins: [
tailwindcss(),
postcssEasingGradients(),
postcssPresetEnv(),
],
plugins: [
postcssEasingGradients(),
postcssPresetEnv(),
],
},
},
plugins: [
vue(),
plugins: [
tailwindcss({config: './tailwind.config.js'}),
vue(),
svgLoader({
// Since the svgs are already manually optimized via https://jakearchibald.github.io/svgomg/
// we don't need to optimize them again.
Expand Down
59 changes: 58 additions & 1 deletion pkg/migration/20250624092830.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,71 @@ func init() {
ID: "20250624092830",
Description: "add unique index for task buckets",
Migrate: func(tx *xorm.Engine) error {

s := tx.NewSession()
defer s.Close()

err := s.Begin()
if err != nil {
return err
}

// First remove all duplicate entries
duplicateTaskBuckets := []taskBucket20240406125227{}
err = s.
Select("task_id, project_view_id").
GroupBy("task_id, project_view_id").
Having("count(*) > 1").
Find(&duplicateTaskBuckets)
if err != nil {
_ = s.Rollback()
return err
}

newTaskBuckets := []taskBucket20240406125227{}
for _, bucket := range duplicateTaskBuckets {
newBucket := taskBucket20240406125227{}
_, err = s.Where("task_id = ? AND project_view_id = ?", bucket.TaskID, bucket.ProjectViewID).
Get(&newBucket)
if err != nil {
_ = s.Rollback()
return err
}

newTaskBuckets = append(newTaskBuckets, newBucket)
}

for _, bucket := range duplicateTaskBuckets {
_, err = s.Where("task_id = ? AND project_view_id = ?", bucket.TaskID, bucket.ProjectViewID).
Delete(&taskBucket20240406125227{})
if err != nil {
_ = s.Rollback()
return err
}
}

for _, bucket := range newTaskBuckets {
_, err = s.Insert(&bucket)
if err != nil {
_ = s.Rollback()
return err
}
}

err = s.Commit()
if err != nil {
return err
}

// Then create the unique index
var query string
switch tx.Dialect().URI().DBType {
case schemas.MYSQL:
query = "CREATE UNIQUE INDEX UQE_task_buckets_task_project_view ON task_buckets (task_id, project_view_id)"
default:
query = "CREATE UNIQUE INDEX IF NOT EXISTS UQE_task_buckets_task_project_view ON task_buckets (task_id, project_view_id)"
}
_, err := tx.Exec(query)
_, err = tx.Exec(query)
return err
},
Rollback: func(tx *xorm.Engine) error {
Expand Down
Loading