Przeglądaj źródła

refactor(RemoveAccount): Migrated to new modal system

Owen Diffey 2 lat temu
rodzic
commit
eb6f56ef82

+ 2 - 1
frontend/src/components/ModalManager.vue

@@ -30,7 +30,8 @@ export default {
 			report: "Report.vue",
 			viewReport: "ViewReport.vue",
 			bulkActions: "BulkActions.vue",
-			viewPunishment: "ViewPunishment.vue"
+			viewPunishment: "ViewPunishment.vue",
+			removeAccount: "RemoveAccount.vue"
 		}),
 		...mapState("modalVisibility", {
 			activeModals: state => state.new.activeModals,

+ 3 - 0
frontend/src/components/modals/RemoveAccount.vue

@@ -180,6 +180,9 @@ import { mapActions, mapGetters } from "vuex";
 import Toast from "toasters";
 
 export default {
+	props: {
+		modalUuid: { type: String, default: "" }
+	},
 	data() {
 		return {
 			name: "RemoveAccount",

+ 0 - 5
frontend/src/pages/Settings/index.vue

@@ -42,8 +42,6 @@
 			</div>
 		</div>
 		<main-footer />
-
-		<remove-account v-if="modals.removeAccount" />
 	</div>
 </template>
 
@@ -68,9 +66,6 @@ export default {
 		),
 		PreferencesSettings: defineAsyncComponent(() =>
 			import("./Tabs/Preferences.vue")
-		),
-		RemoveAccount: defineAsyncComponent(() =>
-			import("@/components/modals/RemoveAccount.vue")
 		)
 	},
 	mixins: [TabQueryHandler],

+ 1 - 2
frontend/src/store/modules/modalVisibility.js

@@ -15,7 +15,6 @@ import viewPunishment from "./modals/viewPunishment";
 
 const state = {
 	modals: {
-		removeAccount: false,
 		editSong: false,
 		editSongs: false,
 		importAlbum: false,
@@ -54,7 +53,7 @@ const migratedModules = {
 	editPlaylist: true,
 	createPlaylist: true,
 	report: true,
-	removeAccount: false,
+	removeAccount: true,
 	editNews: true,
 	editSong: false,
 	editSongs: false,