-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
35 changed files
with
296 additions
and
217 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as monaco from 'monaco-editor' | ||
|
||
export default function setupMonaco() { | ||
monaco.languages.typescript.typescriptDefaults.addExtraLib( | ||
` | ||
import { InjectionKey } from 'vue' | ||
export interface UserInfo { id: number; name: string } | ||
export const injectKeyUser: InjectionKey<UserInfo> = Symbol() | ||
`, | ||
'file:///root/context.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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,16 @@ | ||
# WIP | ||
# Configure Vite | ||
|
||
Slidev is powered by [Vite](http://vitejs.dev/) under the hood, where you can leverage Vite's great plugin system to customize your slides even further. | ||
|
||
The `vite.config.ts` will be respected if you have one. | ||
|
||
Slidev has the following plugins preconfigured: | ||
|
||
- [@vitejs/plugin-vue](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) | ||
- [vite-plugin-md](https://github.com/antfu/vite-plugin-md) | ||
- [vite-plugin-components](https://github.com/antfu/vite-plugin-components) | ||
- [vite-plugin-windicss](https://github.com/windicss/vite-plugin-windicss) | ||
- [vite-plugin-icons](https://github.com/antfu/vite-plugin-icons) | ||
- [vite-plugin-remote-assets](https://github.com/antfu/vite-plugin-remote-assets) | ||
|
||
Learn mode about the [pre-configurations here](https://github.com/slidevjs/slidev/blob/main/packages/slidev/node/plugins/preset.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,5 @@ | ||
import { SlidevConfig } from '@slidev/types' | ||
// @ts-ignore | ||
import _configs from '/@slidev/configs' | ||
|
||
export const configs = _configs as SlidevConfig |
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,67 @@ | ||
<script setup lang="ts"> | ||
import { onClickOutside } from '@vueuse/core' | ||
import { ref } from 'vue' | ||
import { recorder } from '../logic/recording' | ||
import { currentCamera, showRecordingDialog } from '../state' | ||
import DevicesList from './DevicesList.vue' | ||
const devicesList = ref() | ||
const showDevicesList = ref(false) | ||
onClickOutside(devicesList, () => { | ||
showDevicesList.value = false | ||
}) | ||
const { | ||
recording, | ||
showAvatar, | ||
streamCamera, | ||
stopRecording, | ||
toggleAvatar, | ||
} = recorder | ||
function toggleRecording() { | ||
if (recording.value) | ||
stopRecording() | ||
else | ||
showRecordingDialog.value = true | ||
} | ||
</script> | ||
|
||
<template> | ||
<button | ||
v-if="currentCamera !== 'none'" | ||
class="icon-btn" | ||
:class="{'text-green-500': Boolean(showAvatar && streamCamera)}" | ||
title="Show camera view" | ||
@click="toggleAvatar" | ||
> | ||
<carbon:user-avatar /> | ||
</button> | ||
|
||
<div | ||
ref="devicesList" | ||
class="flex relative" | ||
> | ||
<button | ||
class="icon-btn" | ||
:class="{'text-red-500': recording}" | ||
title="Recording" | ||
@click="toggleRecording" | ||
> | ||
<carbon:stop-outline v-if="recording" /> | ||
<carbon:video v-else /> | ||
</button> | ||
<button | ||
class="icon-btn !text-sm !px-0" | ||
:class="{disabled:recording}" | ||
@click="showDevicesList = !showDevicesList" | ||
> | ||
<carbon:chevron-up class="opacity-50" /> | ||
</button> | ||
<DevicesList | ||
v-if="showDevicesList && !recording" | ||
class="bg-main rounded shadow bottom-10 left-0 z-20 absolute" | ||
/> | ||
</div> | ||
</template> |
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
Oops, something went wrong.