rails-mermaid_erd 0.4.0 → 0.4.1

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: 504e1237efa4afd3d86bf50d4c466443a2b1ee075033f645c126f5e46e5bf78d
4
+ data.tar.gz: adf2c78d06647387cc2874571007629c7cb680592ffbcf6b5669e7cbe6863964
5
5
  SHA512:
6
- metadata.gz: fbeee181795d8ea1a191f39b7bb015dbfc9e8db791d9c55af8d2d752e6cd577a41e3ebb189a4fa865868e8ccc97f8c1548e76c6a21b11f2125126d881717ac14
7
- data.tar.gz: 9e0d419707357cb622495a78424b4704a8188cacbb92927f5dd19d7a35b53a634d2948cca6bb079927eaeea6caef20ada027f389dd7a0fa0417ae499fab43e9f
6
+ metadata.gz: 5a9a19d6f95e00edaf5e3e42ea7129ef335313c0edd3026e2413f6db4e7f4391aab54cfee1140aadd8f40de3a8654a32589dfb18bf98d7144ee4a688e538e89e
7
+ data.tar.gz: e1facb6208c5de58d28b6ff2a69b69a39d643a14ef0b97562d3f1790c4a88f98b5dc5c08b9572156e52ca157a682c66d7de3d7e303ccc44d069043ac19aca44a
@@ -1,3 +1,3 @@
1
1
  module RailsMermaidErd
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 肥溜め