rails-mermaid_erd 0.4.0 → 0.4.2
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.
- checksums.yaml +4 -4
- data/lib/rails-mermaid_erd/version.rb +1 -1
- data/lib/templates/index.html.erb +24 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f74497263f036ef73eb9cb8d72294040700d589d5f1ce5aa2d7521f2dc7ae4e
|
4
|
+
data.tar.gz: b8ef91443c959d00c30bca24adf8e62d73d3eb827119119ab3dc6b2c033d5295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 621de1f859e6dfc56965016c859fb34d722d8b7c438c8b11b02cf120deb2a6c2eb63deff8c713adc15891f53da69ac20dc612b81946f8cc3bc1257a2189a8931
|
7
|
+
data.tar.gz: 970a6cc600ef093fad0dd5eae21423870bcef5ff8b5d4cbb4b55a17d58fce2f64600cdaf336beae36eb60cebb93fba8d9239db05f1bdcb30e4e08bef859754d3
|
@@ -130,6 +130,18 @@
|
|
130
130
|
</label>
|
131
131
|
</div>
|
132
132
|
|
133
|
+
<div class="min-w-0 flex-1 text-sm">
|
134
|
+
<label class="relative flex items-start cursor-pointer hover:bg-gray-100 rounded">
|
135
|
+
<input
|
136
|
+
type="checkbox"
|
137
|
+
class="h-4 w-4 rounded border-gray-300 text-red-600 mr-2 focus:ring-red-600"
|
138
|
+
v-model="isShowRelationComment"
|
139
|
+
@change="updateHash"
|
140
|
+
/>
|
141
|
+
<span class="text-xs text-gray-900">{{i18n[language]["options"]["show_relationship_comment"]}}</span>
|
142
|
+
</label>
|
143
|
+
</div>
|
144
|
+
|
133
145
|
<div class="min-w-0 flex-1 text-sm">
|
134
146
|
<label class="relative flex items-start cursor-pointer hover:bg-gray-100 rounded">
|
135
147
|
<input
|
@@ -253,6 +265,7 @@
|
|
253
265
|
options: {
|
254
266
|
title: 'Options',
|
255
267
|
preview_relationships: 'Preview Relationships',
|
268
|
+
show_relationship_comment: 'Show Relationship Comment',
|
256
269
|
show_key: 'Show Key',
|
257
270
|
show_column_comment: 'Show Column Comment',
|
258
271
|
hide_columns: 'Hide Columns',
|
@@ -286,6 +299,7 @@
|
|
286
299
|
options: {
|
287
300
|
title: '設定',
|
288
301
|
preview_relationships: 'リレーションをプレビュー',
|
302
|
+
show_relationship_comment: 'リレーションのコメントを表示',
|
289
303
|
show_key: 'キーを表示',
|
290
304
|
show_column_comment: 'コメントを表示',
|
291
305
|
hide_columns: 'カラムを非表示',
|
@@ -319,6 +333,7 @@
|
|
319
333
|
}
|
320
334
|
const selectModels = Vue.ref([])
|
321
335
|
const isPreviewRelations = Vue.ref(false)
|
336
|
+
const isShowRelationComment = Vue.ref(false)
|
322
337
|
const isShowKey = Vue.ref(false)
|
323
338
|
const isShowComment = Vue.ref(false)
|
324
339
|
const isHideColumns = Vue.ref(false)
|
@@ -329,6 +344,7 @@
|
|
329
344
|
const parsedData = JSON.parse(atob(h))
|
330
345
|
selectModels.value = parsedData.selectModels || []
|
331
346
|
isPreviewRelations.value = !!parsedData.isPreviewRelations
|
347
|
+
isShowRelationComment.value = !!parsedData.isShowRelationComment
|
332
348
|
isShowKey.value = !!parsedData.isShowKey
|
333
349
|
isShowComment.value = !!parsedData.isShowComment
|
334
350
|
isHideColumns.value = !!parsedData.isHideColumns
|
@@ -343,6 +359,7 @@
|
|
343
359
|
selectModels.value.push(model.ModelName)
|
344
360
|
})
|
345
361
|
isPreviewRelations.value = false
|
362
|
+
isShowRelationComment.value = false
|
346
363
|
isShowKey.value = false
|
347
364
|
isShowComment.value = false
|
348
365
|
isHideColumns.value = false
|
@@ -353,6 +370,7 @@
|
|
353
370
|
location.hash = btoa(JSON.stringify({
|
354
371
|
selectModels: selectModels.value,
|
355
372
|
isPreviewRelations: isPreviewRelations.value,
|
373
|
+
isShowRelationComment: isShowRelationComment.value,
|
356
374
|
isShowKey: isShowKey.value,
|
357
375
|
isShowComment: isShowComment.value,
|
358
376
|
isHideColumns: isHideColumns.value,
|
@@ -422,7 +440,11 @@
|
|
422
440
|
});
|
423
441
|
|
424
442
|
filteredData.value.Relations.forEach(relation => {
|
425
|
-
|
443
|
+
if (isShowRelationComment.value) {
|
444
|
+
lines.push(` ${relation.LeftModelName.replace(/:/g, '-')} ${relation.LeftValue}${relation.Line}${relation.RightValue} ${relation.RightModelName.replace(/:/g, '-')} : "${relation.Comment}"`)
|
445
|
+
} else {
|
446
|
+
lines.push(` ${relation.LeftModelName.replace(/:/g, '-')} ${relation.LeftValue}${relation.Line}${relation.RightValue} ${relation.RightModelName.replace(/:/g, '-')} : ""`)
|
447
|
+
}
|
426
448
|
});
|
427
449
|
|
428
450
|
return lines.join("\n")
|
@@ -555,6 +577,7 @@
|
|
555
577
|
isCopiedUrl,
|
556
578
|
isExistsNoModelTable,
|
557
579
|
isPreviewRelations,
|
580
|
+
isShowRelationComment,
|
558
581
|
isShowComment,
|
559
582
|
isShowKey,
|
560
583
|
language,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-mermaid_erd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 肥溜め
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-10-
|
12
|
+
date: 2022-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|