forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
261 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<div :class="$style.root" :style="`background: ${background}`"> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { defineProps, computed } from 'vue'; | ||
import { defaultStore } from '@/store.js'; | ||
const props = defineProps<{ | ||
visibility: string; | ||
localOnly: boolean; | ||
}>(); | ||
const color = computed(() => { | ||
switch (props.visibility) { | ||
case 'home': return defaultStore.state.noteVisibilityColorHome; | ||
case 'followers': return defaultStore.state.noteVisibilityColorFollowers; | ||
case 'specified': return defaultStore.state.noteVisibilityColorSpecified; | ||
default: return 'transparent'; | ||
} | ||
}); | ||
const background = computed(() => { | ||
if (props.localOnly) { | ||
const theColor = props.visibility === 'public' ? defaultStore.state.noteVisibilityColorLocalOnly : color.value; | ||
return `repeating-linear-gradient(135deg, transparent, transparent 5px, ${theColor} 5px, ${theColor} 10px);`; | ||
} | ||
return color.value; | ||
}); | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.root { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
height: 100%; | ||
width: 6px; | ||
} | ||
</style> |
Oops, something went wrong.