1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Implemented new dark theme

This commit is contained in:
Zhiyuan Zheng
2022-02-12 14:51:01 +01:00
parent 50141b2963
commit 6f0c318d06
108 changed files with 863 additions and 571 deletions

View File

@ -2,15 +2,15 @@ import { InstanceV3 } from './v3'
import { InstanceV4 } from './v4'
import { InstanceV5 } from './v5'
import { InstanceV6 } from './v6'
import { InstanceV7 } from './v7'
const instancesMigration = {
4: (state: InstanceV3) => {
4: (state: InstanceV3): InstanceV4 => {
return {
instances: state.local.instances.map((instance, index) => {
// @ts-ignore
delete instance.notification
const { notification, ...rest } = instance
return {
...instance,
...rest,
active: state.local.activeIndex === index,
push: {
global: { loading: false, value: false },
@ -28,35 +28,42 @@ const instancesMigration = {
})
}
},
5: (state: InstanceV4) => {
5: (state: InstanceV4): InstanceV5 => {
// @ts-ignore
if (state.instances.length && !state.instances[0].notifications_filter) {
return {
// @ts-ignore
instances: state.instances.map(instance => {
// @ts-ignore
instance.notifications_filter = {
follow: true,
favourite: true,
reblog: true,
mention: true,
poll: true,
follow_request: true
return {
...instance,
notifications_filter: {
follow: true,
favourite: true,
reblog: true,
mention: true,
poll: true,
follow_request: true
}
}
return instance
})
}
} else {
// @ts-ignore
return state
}
},
6: (state: InstanceV5) => {
6: (state: InstanceV5): InstanceV6 => {
return {
// @ts-ignore
instances: state.instances.map(instance => {
return { ...instance, configuration: undefined }
return {
...instance,
configuration: undefined
}
})
}
},
7: (state: InstanceV6) => {
7: (state: InstanceV6): InstanceV7 => {
return {
instances: state.instances.map(instance => {
return {