Dropped the featured note injection column
ci/woodpecker/push/ociImagePush Pipeline was successful
Details
ci/woodpecker/push/ociImagePush Pipeline was successful
Details
This commit is contained in:
parent
fded21f285
commit
a29cea6cbc
File diff suppressed because it is too large
Load Diff
|
@ -39,8 +39,8 @@ miette = "5.9"
|
|||
percent-encoding = "2.2"
|
||||
redis = "0.23"
|
||||
reqwest = "0.11"
|
||||
sea-orm = "0.11"
|
||||
sea-orm-migration = "0.11"
|
||||
sea-orm = "0.12"
|
||||
sea-orm-migration = "0.12"
|
||||
serde = "1"
|
||||
serde_json = "1"
|
||||
serde-wasm-bindgen = "0.5"
|
||||
|
|
|
@ -48,8 +48,6 @@ pub struct Model {
|
|||
pub room: Json,
|
||||
#[sea_orm(column_type = "JsonBinary")]
|
||||
pub integrations: Json,
|
||||
#[sea_orm(column_name = "injectFeaturedNote")]
|
||||
pub inject_featured_note: bool,
|
||||
#[sea_orm(column_name = "enableWordMute")]
|
||||
pub enable_word_mute: bool,
|
||||
#[sea_orm(column_name = "mutedWords", column_type = "JsonBinary")]
|
||||
|
|
|
@ -3,6 +3,7 @@ pub use sea_orm_migration::prelude::*;
|
|||
mod m20220101_000001_bootstrap;
|
||||
mod m20230729_201733_drop_messaging_integrations;
|
||||
mod m20230729_212237_user_unique_idx;
|
||||
mod m20230806_142918_drop_featured_note_option;
|
||||
|
||||
pub struct Migrator;
|
||||
|
||||
|
@ -13,6 +14,7 @@ impl MigratorTrait for Migrator {
|
|||
Box::new(m20220101_000001_bootstrap::Migration),
|
||||
Box::new(m20230729_201733_drop_messaging_integrations::Migration),
|
||||
Box::new(m20230729_212237_user_unique_idx::Migration),
|
||||
Box::new(m20230806_142918_drop_featured_note_option::Migration),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
use sea_orm_migration::prelude::*;
|
||||
|
||||
#[derive(DeriveMigrationName)]
|
||||
pub struct Migration;
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl MigrationTrait for Migration {
|
||||
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||
let db = manager.get_connection();
|
||||
|
||||
db.execute_unprepared(
|
||||
r#"
|
||||
ALTER TABLE "user_profile" DROP COLUMN "injectFeaturedNote";
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||
let db = manager.get_connection();
|
||||
|
||||
db.execute_unprepared(
|
||||
r#"
|
||||
ALTER TABLE "user_profile" ADD COLUMN "injectFeaturedNote" BOOLEAN NOT NULL DEFAULT TRUE;
|
||||
"#,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
|
@ -695,7 +695,6 @@ export type Endpoints = {
|
|||
preventAiLearning?: boolean;
|
||||
isBot?: boolean;
|
||||
isCat?: boolean;
|
||||
injectFeaturedNote?: boolean;
|
||||
receiveAnnouncementEmail?: boolean;
|
||||
alwaysMarkNsfw?: boolean;
|
||||
mutedWords?: string[][];
|
||||
|
|
|
@ -96,7 +96,6 @@ export type MeDetailed = UserDetailed & {
|
|||
hasUnreadNotification: boolean;
|
||||
hasUnreadSpecifiedNotes: boolean;
|
||||
hideOnlineStatus: boolean;
|
||||
injectFeaturedNote: boolean;
|
||||
isDeleted: boolean;
|
||||
isExplorable: boolean;
|
||||
mutedWords: string[][];
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
<template>
|
||||
<div class="_formRoot">
|
||||
<FormSwitch
|
||||
v-model="$i.injectFeaturedNote"
|
||||
class="_formBlock"
|
||||
@update:modelValue="onChangeInjectFeaturedNote"
|
||||
>
|
||||
{{ i18n.ts.showFeaturedNotesInTimeline }}
|
||||
</FormSwitch>
|
||||
|
||||
<!--
|
||||
<FormSwitch v-model="reportError" class="_formBlock">{{ i18n.ts.sendErrorReports }}<template #caption>{{ i18n.ts.sendErrorReportsDescription }}</template></FormSwitch>
|
||||
-->
|
||||
|
@ -29,27 +21,10 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent } from "vue";
|
||||
import FormSwitch from "@/components/form/switch.vue";
|
||||
import FormLink from "@/components/form/link.vue";
|
||||
import MkButton from "@/components/MkButton.vue";
|
||||
import * as os from "@/os";
|
||||
import { popup } from "@/os";
|
||||
import { defaultStore } from "@/store";
|
||||
import { $i } from "@/account";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
|
||||
const reportError = computed(defaultStore.makeGetterSetter("reportError"));
|
||||
|
||||
function onChangeInjectFeaturedNote(v) {
|
||||
os.api("i/update", {
|
||||
injectFeaturedNote: v,
|
||||
}).then((i) => {
|
||||
$i!.injectFeaturedNote = i.injectFeaturedNote;
|
||||
});
|
||||
}
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
|
|
Loading…
Reference in New Issue