rails-mermaid_erd 0.4.0 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e4055c271a20a0d95b98c24eea1149feb9ff6ab9333a0fd57e4483264b61ac8
4
- data.tar.gz: 8575c2a15370b7d9467dc32bbcf237cf26a0593748e6c0303b56e17c8960a99a
3
+ metadata.gz: 6f74497263f036ef73eb9cb8d72294040700d589d5f1ce5aa2d7521f2dc7ae4e
4
+ data.tar.gz: b8ef91443c959d00c30bca24adf8e62d73d3eb827119119ab3dc6b2c033d5295
5
5
  SHA512:
6
- metadata.gz: fbeee181795d8ea1a191f39b7bb015dbfc9e8db791d9c55af8d2d752e6cd577a41e3ebb189a4fa865868e8ccc97f8c1548e76c6a21b11f2125126d881717ac14
7
- data.tar.gz: 9e0d419707357cb622495a78424b4704a8188cacbb92927f5dd19d7a35b53a634d2948cca6bb079927eaeea6caef20ada027f389dd7a0fa0417ae499fab43e9f
6
+ metadata.gz: 621de1f859e6dfc56965016c859fb34d722d8b7c438c8b11b02cf120deb2a6c2eb63deff8c713adc15891f53da69ac20dc612b81946f8cc3bc1257a2189a8931
7
+ data.tar.gz: 970a6cc600ef093fad0dd5eae21423870bcef5ff8b5d4cbb4b55a17d58fce2f64600cdaf336beae36eb60cebb93fba8d9239db05f1bdcb30e4e08bef859754d3
@@ -1,3 +1,3 @@
1
1
  module RailsMermaidErd
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -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
- lines.push(` ${relation.LeftModelName.replace(/:/g, '-')} ${relation.LeftValue}${relation.Line}${relation.RightValue} ${relation.RightModelName.replace(/:/g, '-')} : "${relation.Comment}"`)
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.0
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-15 00:00:00.000000000 Z
12
+ date: 2022-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails