Browse Source

refactor: Update table row create/edit videos button label

Owen Diffey 2 năm trước cách đây
mục cha
commit
f34236578b
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      frontend/src/pages/Admin/YouTube/Videos.vue

+ 6 - 2
frontend/src/pages/Admin/YouTube/Videos.vue

@@ -38,7 +38,7 @@ const columns = ref(<TableColumn[]>[
 	{
 		name: "options",
 		displayName: "Options",
-		properties: ["_id", "youtubeId"],
+		properties: ["_id", "youtubeId", "songId"],
 		sortable: false,
 		hidable: false,
 		resizable: false,
@@ -318,7 +318,11 @@ const confirmAction = ({ message, action, params }) => {
 						class="button is-primary icon-with-button material-icons"
 						@click="editOne(slotProps.item)"
 						:disabled="slotProps.item.removed"
-						content="Create/edit song from video"
+						:content="
+							!!slotProps.item.songId
+								? 'Edit Song'
+								: 'Create song from video'
+						"
 						v-tippy
 					>
 						music_note