-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'preview-features' into preview
- Loading branch information
Showing
33 changed files
with
868 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ dist/profile.json | |
dist/bilibili-evolved.dev.user.js | ||
registry/dist/doc.js | ||
dev-tools/**/dist/ | ||
.idea |
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
8 changes: 8 additions & 0 deletions
8
registry/lib/components/live/original/get-original-liveroom-url.ts
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,8 @@ | ||
/** | ||
* 如果成功从参数 url 中捕获到直播间号,那么返回原版直播间页面链接,否则返回参数 url | ||
* @param url 直播间页面链接 | ||
*/ | ||
export const getOriginalLiveroomUrl = (url: string): string => { | ||
const match = url.match(/^https:\/\/live\.bilibili\.com\/([\d]+)/) | ||
return match ? `https://live.bilibili.com/blanc/${match[1]}` : url | ||
} |
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
16 changes: 16 additions & 0 deletions
16
registry/lib/components/style/custom-font-family/disable-quotation-mark-text-indent.scss
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,16 @@ | ||
$name: 'custom-font-family'; | ||
|
||
html[#{$name}--options--disable-quotation-mark-text-indent='true'] | ||
:is( | ||
p[title^='「'], | ||
p[title^='『'], | ||
p[title^='【'], | ||
h1[title^='「'], | ||
h1[title^='『'], | ||
h1[title^='【'], | ||
h3[title^='「'], | ||
h3[title^='『'], | ||
h3[title^='【'] | ||
) { | ||
text-indent: initial !important; | ||
} |
45 changes: 45 additions & 0 deletions
45
registry/lib/components/style/custom-font-family/extra-options/entry.vue
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,45 @@ | ||
<template> | ||
<div class="custom-font-family-extra-options-entry"> | ||
<VButton ref="button" @mouseover="loadExtraOptions()" @click="toggleExtraOptionsDisplay()"> | ||
字体设置<VIcon icon="right-arrow" :size="16"></VIcon> | ||
</VButton> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { VIcon, VButton } from '@/ui' | ||
import { | ||
setTriggerElement, | ||
getExtraOptionsLoadState, | ||
loadExtraOptions, | ||
toggleExtraOptionsDisplay, | ||
} from './vm' | ||
export default defineComponent({ | ||
components: { | ||
VIcon, | ||
VButton, | ||
}, | ||
methods: { | ||
async loadExtraOptions() { | ||
const isLoaded = await getExtraOptionsLoadState() | ||
if (!isLoaded) { | ||
await loadExtraOptions() | ||
const triggerButton = this.$refs.button.$el as HTMLElement | ||
setTriggerElement(triggerButton) | ||
} | ||
}, | ||
toggleExtraOptionsDisplay, | ||
}, | ||
}) | ||
</script> | ||
|
||
<style lang="scss"> | ||
.custom-font-family-extra-options-entry { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
</style> |
Oops, something went wrong.