Auto darkmode

This commit is contained in:
Peng-YM
2022-05-24 17:05:56 +08:00
parent 975b53db41
commit 46e37df110
8 changed files with 25 additions and 77 deletions

View File

@@ -352,7 +352,7 @@ export default {
},
getIconClass(url) {
return url.indexOf('#invert') !== -1 && !this.$store.state.settings.theme.darkMode ? 'invert' : ''
return url.indexOf('#invert') !== -1 && !this.$vuetify.theme.dark ? 'invert' : ''
},
openGist() {

View File

@@ -473,7 +473,7 @@ export default {
},
methods: {
getIconClass(url) {
return url.indexOf('#invert') !== -1 && !this.$store.state.settings.theme.darkMode ? 'invert' : ''
return url.indexOf('#invert') !== -1 && !this.$vuetify.theme.dark ? 'invert' : ''
},
save() {
if (this.isCollection) {

View File

@@ -291,7 +291,7 @@ export default {
}
},
getIconClass(url) {
return url.indexOf('#invert') !== -1 && !this.$store.state.settings.theme.darkMode ? 'invert' : ''
return url.indexOf('#invert') !== -1 && !this.$vuetify.theme.dark ? 'invert' : ''
}
}
}

View File

@@ -67,20 +67,6 @@
</v-row>
</v-col>
</v-list-item>
<v-divider></v-divider>
<v-subheader>外观</v-subheader>
<v-list-item>
<v-list-item-content>
夜间模式 (实验性支持)
</v-list-item-content>
<v-list-item-action>
<v-switch
v-model="settings.theme.darkMode"
hide-details
label=""
/>
</v-list-item-action>
</v-list-item>
</v-list>
</v-card-text>
<v-divider></v-divider>
@@ -89,22 +75,6 @@
<v-btn color="primary" small text @click="save()">保存</v-btn>
</v-card-actions>
</v-card>
<!-- <v-card>-->
<!-- <v-card-title>-->
<!-- <v-icon left>-->
<!-- mdi-star-->
<!-- </v-icon>-->
<!-- 关于-->
<!-- </v-card-title>-->
<!-- <v-card-text>-->
<!-- <v-list>-->
<!-- <v-list-item>-->
<!-- <v-list-item-title>GitHub</v-list-item-title>-->
<!-- </v-list-item>-->
<!-- </v-list>-->
<!-- </v-card-text>-->
<!-- </v-card>-->
</v-container>
</template>