@live-change/task-frontend 0.9.131 → 0.9.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,19 @@
1
1
  {
2
+ "tasks": {
3
+ "tasks": "Tasks",
4
+ "taskName": "Task Name",
5
+ "taskState": "Task State",
6
+ "builtShelters": "Built shelters",
7
+ "build": "Build",
8
+ "root": "Root",
9
+ "close": "Close",
10
+ "taskFailed": "Task failed",
11
+ "taskDone": "Task done"
12
+ },
13
+ "shelter": {
14
+ "wall": "Wall",
15
+ "roof": "Roof"
16
+ },
2
17
  "app": {
3
18
  "updateAvailable": "Update available!",
4
19
  "newVersions": "New version of app is available!",
@@ -0,0 +1,17 @@
1
+ {
2
+ "tasks": {
3
+ "tasks": "Zadania",
4
+ "taskName": "Nazwa zadania",
5
+ "taskState": "Stan zadania",
6
+ "builtShelters": "Zbudowane schrony",
7
+ "build": "Buduj",
8
+ "root": "Główny",
9
+ "close": "Zamknij",
10
+ "taskFailed": "Zadanie nie powiodło się",
11
+ "taskDone": "Zadanie ukończone"
12
+ },
13
+ "shelter": {
14
+ "wall": "Ściana",
15
+ "roof": "Dach"
16
+ }
17
+ }
@@ -3,7 +3,7 @@
3
3
  <div class="bg-surface-0 dark:bg-surface-900 shadow-sm rounded-border px-4 py-1">
4
4
 
5
5
  <div>
6
- <h2>Built shelters</h2>
6
+ <h2>{{ t('tasks.builtShelters') }}</h2>
7
7
  <pre>{{ shelters }}</pre>
8
8
  </div>
9
9
 
@@ -37,16 +37,16 @@
37
37
  </div>
38
38
 
39
39
  <div class="text-right">
40
- <Button type="submit" icon="pi pi-play" label="Build" class="mt-2" />
40
+ <Button type="submit" icon="pi pi-play" :label="t('tasks.build')" class="mt-2" />
41
41
  </div>
42
42
  </div>
43
43
 
44
44
  </command-form>
45
45
  </div>
46
46
  <!-- <div class="bg-surface-0 dark:bg-surface-900 shadow-sm rounded-border px-4 py-1">
47
- <h2>Root</h2>
47
+ <h2>{{ t('tasks.root') }}</h2>
48
48
  <pre>{{ tasksRoot }}</pre>
49
- <h2>Tasks</h2>
49
+ <h2>{{ t('tasks.tasks') }}</h2>
50
50
  <Task v-for="task in rootTasks" :key="task.id" :task="task" :tasks="tasks" :task-types="taskTypes" />
51
51
  </div>-->
52
52
  </div>
@@ -54,6 +54,8 @@
54
54
 
55
55
  <script setup>
56
56
  import { ref, computed } from 'vue'
57
+ import { useI18n } from 'vue-i18n'
58
+ const { t } = useI18n()
57
59
  import { usePath, live } from '@live-change/vue3-ssr'
58
60
  import { useRouter } from 'vue-router'
59
61
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="flex flex-row w-full justify-evenly">
3
3
  <div class="bg-surface-0 dark:bg-surface-900 shadow-sm rounded-border px-4 py-1 w-full">
4
- <h2>Tasks</h2>
4
+ <h2>{{ t('tasks.tasks') }}</h2>
5
5
  <Task v-for="task in rootTasks" :key="task.id" :task="task" :tasks="tasks" :task-types="taskTypes" />
6
6
  <!-- <pre>{{ rootTasks }}</pre>-->
7
7
  </div>
@@ -5,12 +5,12 @@
5
5
  </div>
6
6
  <div v-for="part in result.walls"
7
7
  :class="`bg-gray-200 px-1 mx-2 border-round`">
8
- <span>Wall</span>
8
+ <span>{{ t('shelter.wall') }}</span>
9
9
  <span class="ml-1">({{ part.size }})</span>
10
10
  </div>
11
11
  <div v-for="part in [result.roof]"
12
12
  :class="`bg-gray-200 px-1 mx-2 border-round`">
13
- <span>Roof</span>
13
+ <span>{{ t('shelter.roof') }}</span>
14
14
  <span class="ml-1">({{ part.size }})</span>
15
15
  </div>
16
16
  </div>
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
 
10
10
  <div class="my-4" v-if="!noClose">
11
- <Button icon="pi pi-times" label="Close" class="w-full" @click="close" />
11
+ <Button icon="pi pi-times" :label="t('tasks.close')" class="w-full" @click="close" />
12
12
  </div>
13
13
 
14
14
  <Task :task="taskData" :tasks="allTasks" :taskTypes="taskTypes" />
@@ -87,10 +87,10 @@
87
87
  watchEffect(() => {
88
88
  if(!visible.value) return
89
89
  if(taskData.value?.state === 'failed') {
90
- toast.add({ severity: 'error', summary: 'Task failed', detail: taskData.value?.error })
90
+ toast.add({ severity: 'error', summary: t('tasks.taskFailed'), detail: taskData.value?.error })
91
91
  }
92
92
  if(taskData.value?.state === 'done') {
93
- toast.add({ severity: 'success', summary: 'Task done', life: 1500 })
93
+ toast.add({ severity: 'success', summary: t('tasks.taskDone'), life: 1500 })
94
94
  close()
95
95
  }
96
96
  })
@@ -1,17 +1,17 @@
1
1
  <template>
2
2
  <div class="w-full">
3
3
  <div class="bg-surface-0 dark:bg-surface-900 p-3 shadow mb-1">
4
- <h2>Tasks</h2>
4
+ <h2>{{ t('tasks.tasks') }}</h2>
5
5
  <!-- <pre>tasksNames = {{ tasksNames }}</pre>
6
6
  <pre>taskStates = {{ taskStates }}</pre> -->
7
7
  <div class="flex flex-wrap gap-3 mb-3">
8
8
  <div class="flex-1">
9
- <label for="task-name" class="block mb-2">Task Name</label>
9
+ <label for="task-name" class="block mb-2">{{ t('tasks.taskName') }}</label>
10
10
  <Select id="task-name" v-model="name" :options="['any', ...tasksNames]"
11
11
  placeholder="Select Task Name" class="w-full" />
12
12
  </div>
13
13
  <div class="flex-1">
14
- <label for="task-state" class="block mb-2">Task State</label>
14
+ <label for="task-state" class="block mb-2">{{ t('tasks.taskState') }}</label>
15
15
  <Select id="task-state" v-model="state" :options="['any', ...taskStates.map(s => ({label: s, value: s}))]"
16
16
  placeholder="Select Task State" class="w-full" />
17
17
  </div>
package/index.js CHANGED
@@ -3,3 +3,8 @@ import TaskModal from './front/src/components/TaskModal.vue'
3
3
  import { taskAdminRoutes } from './front/src/router.js'
4
4
 
5
5
  export { Task, TaskModal, taskAdminRoutes }
6
+
7
+ import en from "./front/locales/en.json"
8
+ import pl from "./front/locales/pl.json"
9
+ const locales = { en, pl }
10
+ export { locales }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/task-frontend",
3
- "version": "0.9.131",
3
+ "version": "0.9.133",
4
4
  "scripts": {
5
5
  "memDev": "tsx --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "tsx server/start.js localDev --enableSessions --initScript ./init.js --dbAccess",
@@ -37,41 +37,41 @@
37
37
  "@codemirror/language": "6.10.1",
38
38
  "@dotenvx/dotenvx": "0.27.0",
39
39
  "@fortawesome/fontawesome-free": "^6.7.2",
40
- "@live-change/access-control-frontend": "^0.9.131",
41
- "@live-change/access-control-service": "^0.9.131",
42
- "@live-change/backup-service": "^0.9.131",
43
- "@live-change/blog-frontend": "^0.9.131",
44
- "@live-change/blog-service": "^0.9.131",
45
- "@live-change/cli": "^0.9.131",
46
- "@live-change/content-frontend": "^0.9.131",
47
- "@live-change/content-service": "^0.9.131",
48
- "@live-change/dao": "^0.9.131",
49
- "@live-change/dao-vue3": "^0.9.131",
50
- "@live-change/dao-websocket": "^0.9.131",
51
- "@live-change/db-client": "^0.9.131",
52
- "@live-change/email-service": "^0.9.131",
53
- "@live-change/framework": "^0.9.131",
54
- "@live-change/frontend-auto-form": "^0.9.131",
55
- "@live-change/frontend-base": "^0.9.131",
56
- "@live-change/geoip-service": "^0.9.131",
57
- "@live-change/image-frontend": "^0.9.131",
58
- "@live-change/locale-settings-service": "^0.9.131",
59
- "@live-change/password-authentication-service": "^0.9.131",
60
- "@live-change/prosemirror-service": "^0.9.131",
61
- "@live-change/secret-code-service": "^0.9.131",
62
- "@live-change/secret-link-service": "^0.9.131",
63
- "@live-change/session-service": "^0.9.131",
64
- "@live-change/task-service": "^0.9.131",
65
- "@live-change/upload-frontend": "^0.9.131",
66
- "@live-change/url-frontend": "^0.9.131",
67
- "@live-change/url-service": "^0.9.131",
68
- "@live-change/user-frontend": "^0.9.131",
69
- "@live-change/user-identification-service": "^0.9.131",
70
- "@live-change/user-service": "^0.9.131",
71
- "@live-change/vote-service": "^0.9.131",
72
- "@live-change/vue3-components": "^0.9.131",
73
- "@live-change/vue3-ssr": "^0.9.131",
74
- "@live-change/wysiwyg-frontend": "^0.9.131",
40
+ "@live-change/access-control-frontend": "^0.9.133",
41
+ "@live-change/access-control-service": "^0.9.133",
42
+ "@live-change/backup-service": "^0.9.133",
43
+ "@live-change/blog-frontend": "^0.9.133",
44
+ "@live-change/blog-service": "^0.9.133",
45
+ "@live-change/cli": "^0.9.133",
46
+ "@live-change/content-frontend": "^0.9.133",
47
+ "@live-change/content-service": "^0.9.133",
48
+ "@live-change/dao": "^0.9.133",
49
+ "@live-change/dao-vue3": "^0.9.133",
50
+ "@live-change/dao-websocket": "^0.9.133",
51
+ "@live-change/db-client": "^0.9.133",
52
+ "@live-change/email-service": "^0.9.133",
53
+ "@live-change/framework": "^0.9.133",
54
+ "@live-change/frontend-auto-form": "^0.9.133",
55
+ "@live-change/frontend-base": "^0.9.133",
56
+ "@live-change/geoip-service": "^0.9.133",
57
+ "@live-change/image-frontend": "^0.9.133",
58
+ "@live-change/locale-settings-service": "^0.9.133",
59
+ "@live-change/password-authentication-service": "^0.9.133",
60
+ "@live-change/prosemirror-service": "^0.9.133",
61
+ "@live-change/secret-code-service": "^0.9.133",
62
+ "@live-change/secret-link-service": "^0.9.133",
63
+ "@live-change/session-service": "^0.9.133",
64
+ "@live-change/task-service": "^0.9.133",
65
+ "@live-change/upload-frontend": "^0.9.133",
66
+ "@live-change/url-frontend": "^0.9.133",
67
+ "@live-change/url-service": "^0.9.133",
68
+ "@live-change/user-frontend": "^0.9.133",
69
+ "@live-change/user-identification-service": "^0.9.133",
70
+ "@live-change/user-service": "^0.9.133",
71
+ "@live-change/vote-service": "^0.9.133",
72
+ "@live-change/vue3-components": "^0.9.133",
73
+ "@live-change/vue3-ssr": "^0.9.133",
74
+ "@live-change/wysiwyg-frontend": "^0.9.133",
75
75
  "@vueuse/core": "^12.3.0",
76
76
  "codeceptjs-assert": "^0.0.5",
77
77
  "compression": "^1.7.5",
@@ -93,7 +93,7 @@
93
93
  "vue3-scroll-border": "0.1.7"
94
94
  },
95
95
  "devDependencies": {
96
- "@live-change/codeceptjs-helper": "^0.9.131",
96
+ "@live-change/codeceptjs-helper": "^0.9.133",
97
97
  "codeceptjs": "^3.6.10",
98
98
  "generate-password": "1.7.1",
99
99
  "playwright": "1.49.1",
@@ -104,5 +104,5 @@
104
104
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
105
105
  "license": "ISC",
106
106
  "description": "",
107
- "gitHead": "3431deb86db4b740bcf04375b274697e0669fff4"
107
+ "gitHead": "455a7c9d204a89196f6599c42acd8eaeb45532e1"
108
108
  }