Skip to content

Commit 1cedeb3

Browse files
authoredFeb 6, 2024
v1.28.27
2 parents f6ae6a3 + 09a15c0 commit 1cedeb3

File tree

12 files changed

+1493
-14
lines changed

12 files changed

+1493
-14
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "automa",
3-
"version": "1.28.26",
3+
"version": "1.28.27",
44
"description": "An extension for automating your browser by connecting blocks",
55
"repository": {
66
"type": "git",
@@ -46,7 +46,7 @@
4646
"@tiptap/pm": "^2.0.4",
4747
"@tiptap/starter-kit": "^2.0.4",
4848
"@tiptap/vue-3": "^2.0.4",
49-
"@viselect/vanilla": "^3.2.5",
49+
"@viselect/vanilla": "^3.5.0",
5050
"@vue-flow/background": "^1.2.0",
5151
"@vue-flow/core": "^1.23.0",
5252
"@vue-flow/minimap": "^1.2.0",

‎src/background/BackgroundWorkflowTriggers.js

+3
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ class BackgroundWorkflowTriggers {
186186
}
187187

188188
for (const currWorkflow of workflowsArr) {
189+
// eslint-disable-next-line no-continue
190+
if (currWorkflow.isDisabled) continue;
191+
189192
let triggerBlock = currWorkflow.trigger;
190193

191194
if (!triggerBlock) {

‎src/components/newtab/workflows/WorkflowsLocal.vue

+13-1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ const selection = new SelectionArea({
174174
startareas: ['.workflows-list'],
175175
boundaries: ['.workflows-list'],
176176
selectables: ['.local-workflow'],
177+
behaviour: {
178+
overlap: 'invert',
179+
},
177180
});
178181
selection
179182
.on('beforestart', ({ event }) => {
@@ -184,7 +187,8 @@ selection
184187
})
185188
.on('start', () => {
186189
/* eslint-disable-next-line */
187-
clearSelectedWorkflows();
190+
clearSelectedWorkflows();
191+
document.body.style.userSelect = 'none';
188192
})
189193
.on('move', (event) => {
190194
event.store.changed.added.forEach((el) => {
@@ -198,6 +202,7 @@ selection
198202
state.selectedWorkflows = event.store.selected.map(
199203
(el) => el.dataset?.workflow
200204
);
205+
document.body.style.userSelect = '';
201206
});
202207
203208
const filteredWorkflows = computed(() => {
@@ -422,3 +427,10 @@ onBeforeUnmount(() => {
422427
window.removeEventListener('keydown', deleteSelectedWorkflows);
423428
});
424429
</script>
430+
<style>
431+
.selection-area {
432+
background: rgba(46, 115, 252, 0.11);
433+
border: 2px solid rgba(98, 155, 255, 0.81);
434+
border-radius: 0.1em;
435+
}
436+
</style>

‎src/lib/dayjs.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'dayjs/locale/vi';
66
import 'dayjs/locale/fr';
77
import 'dayjs/locale/it';
88
import 'dayjs/locale/uk';
9+
import 'dayjs/locale/tr';
910

1011
dayjs.extend(relativeTime);
1112

‎src/locales/tr/blocks.json

+806
Large diffs are not rendered by default.

‎src/locales/tr/common.json

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"common": {
3+
"dashboard": "Kontrol Paneli",
4+
"workflow": "İş Akışı | İş Akışları",
5+
"collection": "Koleksiyon | Koleksiyonlar",
6+
"log": "Kayıt | Kayıtlar",
7+
"block": "Blok | Bloklar",
8+
"schedule": "Zamanlama",
9+
"folder": "Klasör | Klasörler",
10+
"new": "Yeni",
11+
"docs": "Belgeler",
12+
"search": "Ara",
13+
"example": "Örnek | Örnekler",
14+
"import": "İçe Aktar",
15+
"export": "Dışa Aktar",
16+
"rename": "Yeniden Adlandır",
17+
"execute": "Çalıştır",
18+
"delete": "Sil",
19+
"cancel": "İptal",
20+
"settings": "Ayarlar",
21+
"options": "Seçenekler",
22+
"confirm": "Onayla",
23+
"name": "Ad",
24+
"all": "Tümü",
25+
"add": "Ekle",
26+
"save": "Kaydet",
27+
"data": "Veri",
28+
"stop": "Durdur",
29+
"sheet": "Sayfa",
30+
"pause": "Duraklat",
31+
"resume": "Devam Et",
32+
"action": "Eylem | Eylemler",
33+
"packages": "Paketler",
34+
"storage": "Depolama",
35+
"editor": "Düzenleyici",
36+
"running": "Çalışıyor",
37+
"globalData": "Global veri",
38+
"fileName": "Dosya adı",
39+
"description": "Açıklama",
40+
"disable": "Devre Dışı Bırak",
41+
"disabled": "Devre Dışı",
42+
"enable": "Etkinleştir",
43+
"fallback": "Yedek",
44+
"update": "Güncelle",
45+
"feature": "Özellik",
46+
"duplicate": "Çoğalt",
47+
"password": "Şifre",
48+
"category": "Kategori",
49+
"optional": "İsteğe Bağlı",
50+
"0disable": "0 ile devre dışı bırak",
51+
"millisecond": "milisaniye | milisaniyeler"
52+
},
53+
"message": {
54+
"noBlock": "Blok yok",
55+
"noData": "Gösterilecek veri yok",
56+
"noTriggerBlock": "Tetikleyici blok bulunamıyor",
57+
"useDynamicData": "Dinamik veri eklemeyi öğrenin",
58+
"delete": "\"{name}\"'i silmek istediğinizden emin misiniz?",
59+
"empty": "Ups... Herhangi bir öğeniz olmadığı görünüyor",
60+
"maxSizeExceeded": "Dosya boyutu maksimum izin verilen sınırı aştı",
61+
"notSaved": "Gerçekten ayrılmak istiyor musunuz? Kaydedilmemiş değişiklikleriniz var!",
62+
"somethingWrong": "Bir şeyler yanlış gitti",
63+
"limitExceeded": "Sınırı aştınız"
64+
},
65+
"sort": {
66+
"sortBy": "Sırala",
67+
"name": "Ad",
68+
"createdAt": "Oluşturulma tarihi",
69+
"updatedAt": "Son güncelleme",
70+
"mostUsed": "En çok kullanılan"
71+
},
72+
"logStatus": {
73+
"stopped": "durduruldu",
74+
"error": "hata",
75+
"success": "başarı"
76+
}
77+
}

‎src/locales/tr/newtab.json

+517
Large diffs are not rendered by default.

‎src/locales/tr/popup.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"recording": {
3+
"stop": "Kaydı Durdur",
4+
"title": "Kayıt"
5+
},
6+
"home": {
7+
"record": {
8+
"title": "İş Akışı Kaydı",
9+
"button": "Kayıt",
10+
"name": "İş Akışı Adı",
11+
"selectBlock": "Başlamak için bir blok seçin",
12+
"anotherBlock": "Bu bloktan başlatılamaz",
13+
"tabs": {
14+
"new": "Yeni İş Akışı",
15+
"existing": "Mevcut İş Akışı"
16+
}
17+
},
18+
"elementSelector": {
19+
"name": "EÖğe Seçici",
20+
"noAccess": "Bu siteye erişim izniniz yok"
21+
},
22+
"workflow": {
23+
"new": "Yeni İş Akışı",
24+
"rename": "İş Akışını Yeniden Adlandır",
25+
"delete": "İş Akışını Sil",
26+
"type": {
27+
"host": "Ana Bilgisayar",
28+
"local": "Yerel"
29+
}
30+
}
31+
}
32+
}

‎src/utils/shared.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1578,10 +1578,11 @@ export const supportLocales = [
15781578
{ id: 'en', name: 'English' },
15791579
{ id: 'fr', name: 'Français' },
15801580
{ id: 'it', name: 'Italiano' },
1581-
{ id: 'uk', name: 'Україньська' },
1581+
{ id: 'uk', name: 'Українська' },
15821582
{ id: 'vi', name: 'Tiếng Việt' },
15831583
{ id: 'zh', name: '简体中文' },
15841584
{ id: 'zh-TW', name: '繁體中文' },
1585+
{ id: 'tr', name: 'Türkçe' },
15851586
];
15861587

15871588
export const communities = [

‎src/workflowEngine/blocksHandler/handlerLoopData.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,29 @@ async function loopData({ data, id }, { refData }) {
2929
'data-columns': () => refData.table,
3030
'google-sheets': () => refData.googleSheets[data.referenceKey],
3131
variable: () => {
32-
const variableVal = objectPath.get(
32+
let variableVal = objectPath.get(
3333
refData.variables,
3434
data.variableName
3535
);
3636

3737
if (Array.isArray(variableVal)) return variableVal;
3838

39-
return parseJSON(variableVal, variableVal);
39+
variableVal = parseJSON(variableVal, variableVal);
40+
41+
switch (typeof variableVal) {
42+
case 'string':
43+
variableVal = variableVal.split('');
44+
break;
45+
case 'number':
46+
variableVal = Array.from(
47+
{ length: variableVal },
48+
(_, index) => index + 1
49+
);
50+
break;
51+
default:
52+
}
53+
54+
return variableVal;
4055
},
4156
elements: async () => {
4257
const findBy = isXPath(data.elementSelector)

‎src/workflowEngine/blocksHandler/handlerSwitchTo.js

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { objectHasKey, sleep } from '@/utils/helper';
1+
import { sleep } from '@/utils/helper';
22
import { getFrames } from '../helper';
33

44
async function switchTo(block) {
@@ -31,14 +31,29 @@ async function switchTo(block) {
3131

3232
const frames = await getFrames(this.activeTab.id);
3333

34-
if (objectHasKey(frames, url)) {
35-
this.activeTab.frameId = frames[url];
34+
let frameId = frames[url] ?? null;
35+
if (frameId === null) {
36+
// Incase the iframe is redirect
37+
frameId = Object.entries(frames).find(([frameURL]) => {
38+
try {
39+
const currFramePathName = new URL(url).pathname;
40+
const framePathName = new URL(frameURL).pathname;
41+
42+
return currFramePathName === framePathName;
43+
} catch (error) {
44+
return false;
45+
}
46+
})?.[1];
47+
}
48+
49+
if (frameId !== null) {
50+
this.activeTab.frameId = frameId;
3651

3752
await sleep(1000);
3853

3954
return {
40-
data: this.activeTab.frameId,
4155
nextBlockId,
56+
data: this.activeTab.frameId,
4257
};
4358
}
4459

‎yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1811,10 +1811,10 @@
18111811
hookable "^5.5.3"
18121812
unhead "1.3.9"
18131813

1814-
"@viselect/vanilla@^3.2.5":
1815-
version "3.3.1"
1816-
resolved "https://registry.yarnpkg.com/@viselect/vanilla/-/vanilla-3.3.1.tgz#ec4276b0814157b7ffe8ac1f28fdd70df36e1d76"
1817-
integrity sha512-QqkPGV+uyteX/HqzhHp5ZRfpVYiA0A3umh8HT/nfoBKccoA/kiTdI+5B/8ZPijtanBj9NNymMMPCn0W+/BeEyg==
1814+
"@viselect/vanilla@^3.5.0":
1815+
version "3.5.0"
1816+
resolved "https://registry.yarnpkg.com/@viselect/vanilla/-/vanilla-3.5.0.tgz#3be43b7f335712bc4ee5fcd5d2b68a525d1b6c4a"
1817+
integrity sha512-drPkEQ/0CZl/c7D0gx5lWkY6iCdbyJm6KWFJpY2oQEKEnCrW9LUdQOsbNP/RG2L8BNUaiDBmwyTTW2RYIroZhA==
18181818

18191819
"@vue-flow/background@^1.2.0":
18201820
version "1.2.0"

0 commit comments

Comments
 (0)
Please sign in to comment.