Explorar o código

feat: 优化-2024/12/24 12:00:58

shuisheng hai 1 ano
pai
achega
94795c033a

+ 1 - 0
.gitignore

@@ -6,3 +6,4 @@ auto-imports.d.ts
 .eslintcache
 deploy/index.js
 deploy/index.cjs
+visualizer.html

+ 10 - 0
README.md

@@ -301,6 +301,16 @@ pnpm run dev
 - srs 版本:基于 docker,镜像:registry.cn-hangzhou.aliyuncs.com/ossrs/srs:5.0.170
 - ffmpeg 版本:6.0
 
+## 贡献者
+
+  <a href="https://github.com/galaxy-s10/billd-live/graphs/contributors" target="_blank">
+    <img
+      width="200"
+      src="https://contrib.rocks/image?repo=galaxy-s10/billd-live"
+      alt="Billd-Live logo"
+    />
+  </a>
+
 ## 致敬开源
 
 billd-live自2023年3月开源以来,仅有作者(也就是我)一个人维护,深知做开源的难处。

+ 0 - 1
deploy/handleSyncPublic.mjs

@@ -92,7 +92,6 @@ if (process.cwd().indexOf('galaxy-s10') !== -1) {
       });
       return flag;
     });
-    console.log(JSON.stringify(allFile));
     putFile();
 
     const currentPkgStr = fs.readFileSync(

+ 2 - 2
index.html

@@ -11,11 +11,11 @@
       name="viewport"
       content="width=device-width, initial-scale=1.0"
     />
-    <title><%= title %></title>
+    <title><%- title %></title>
     <script src="https://res.hsslive.cn/npm/video.js@8.21.0/video.min.js"></script>
     <script src="https://res.hsslive.cn/npm/mpegts.js@1.7.3/mpegts.min.js"></script>
     <script src="https://res.hsslive.cn/npm/cos-js-sdk-v5@1.8.6/cos-js-sdk-v5.min.js"></script>
-    <script src="https://res.hsslive.cn/npm/fabric@5.4.2/index.min.js"></script>
+    <!-- <script src="https://res.hsslive.cn/npm/fabric@5.4.2/index.min.js"></script> -->
     <!-- <script src="https://res.hsslive.cn/npm/@vue/runtime-core@3.5.13/index.min.js"></script> -->
     <!-- <script src="https://res.hsslive.cn/npm/vue-demi@0.14.6/index.iife.min.js"></script> -->
     <!-- <script src="https://res.hsslive.cn/npm/vue@3.5.13/vue.global.min.js"></script> -->

+ 1 - 1
src/components/SystemModal/index.vue

@@ -10,7 +10,7 @@
       >
         <div>
           欢迎进入直播间,遇到问题请提<a
-            href="https://github.com/billd-project/live/issues/new"
+            href="https://github.com/galaxy-s10/billd-live/issues/new"
             target="_blank"
           >
             issue

+ 8 - 8
src/constant.ts

@@ -59,18 +59,18 @@ export const COMMON_URL = {
     live: {
       flutter: {
         android: `${QINIU_KODO.hssblog.url}/billd-live/download/billd-live-v0.0.4.apk`,
-        github: 'https://github.com/billd-project/live-flutter',
+        github: 'https://github.com/galaxy-s10/billd-live-flutter',
       },
       reactNative: {
         android: '',
-        github: 'https://github.com/billd-project/live-react-native',
+        github: 'https://github.com/galaxy-s10/billd-live-react-native',
       },
       kotlin: {
         android: '',
-        github: 'https://github.com/billd-project/live-kotlin',
+        github: 'https://github.com/galaxy-s10/billd-live-kotlin',
       },
       electron: {
-        github: 'https://github.com/billd-project/live-electron',
+        github: 'https://github.com/galaxy-s10/billd-live-electron',
         windows: ``,
         macOS: ``,
       },
@@ -89,10 +89,10 @@ export const COMMON_URL = {
     },
   },
   release: {
-    flutter: 'https://github.com/billd-project/live-flutter',
-    kotlin: 'https://github.com/billd-project/live-kotlin',
-    reactNative: 'https://github.com/billd-project/live-react-native',
-    electron: 'https://github.com/billd-project/live-electron',
+    flutter: 'https://github.com/galaxy-s10/billd-live-flutter',
+    kotlin: 'https://github.com/galaxy-s10/billd-live-kotlin',
+    reactNative: 'https://github.com/galaxy-s10/billd-live-react-native',
+    electron: 'https://github.com/galaxy-s10/billd-live-electron',
     desk: 'https://github.com/galaxy-s10/billd-desk',
   },
 };

+ 3 - 3
src/layout/mobile/head/index.vue

@@ -9,7 +9,7 @@
         <a
           class="github"
           target="_blank"
-          href="https://github.com/billd-project/live"
+          href="https://github.com/galaxy-s10/billd-live"
         >
           <img
             :src="githubStar"
@@ -77,9 +77,9 @@ const options = [
 
 onMounted(() => {
   githubStar.value =
-    'https://img.shields.io/github/stars/billd-project/live?label=Star&logo=GitHub&labelColor=white&logoColor=black&style=social';
+    'https://img.shields.io/github/stars/galaxy-s10/billd-live?label=Star&logo=GitHub&labelColor=white&logoColor=black&style=social';
   githubFork.value =
-    'https://img.shields.io/github/forks/billd-project/live?label=Fork&logo=GitHub&labelColor=white&logoColor=black&style=social';
+    'https://img.shields.io/github/forks/galaxy-s10/billd-live?label=Fork&logo=GitHub&labelColor=white&logoColor=black&style=social';
 });
 
 function handleSelect(key) {

+ 9 - 9
src/layout/pc/head/index.vue

@@ -245,7 +245,7 @@
         <a
           class="github"
           target="_blank"
-          href="https://github.com/billd-project/live"
+          href="https://github.com/galaxy-s10/billd-live"
         >
           <img
             :src="githubStar"
@@ -558,31 +558,31 @@ const aboutList = ref([
 const resourceList = ref([
   {
     label: 'billd-live',
-    url: 'https://github.com/billd-project/live',
+    url: 'https://github.com/galaxy-s10/billd-live',
   },
   {
     label: 'billd-live-electron',
-    url: 'https://github.com/billd-project/live-electron',
+    url: 'https://github.com/galaxy-s10/billd-live-electron',
   },
   {
     label: 'billd-live-server',
-    url: 'https://github.com/billd-project/live-server',
+    url: 'https://github.com/galaxy-s10/billd-live-server',
   },
   {
     label: 'billd-live-admin',
-    url: 'https://github.com/billd-project/live-admin',
+    url: 'https://github.com/galaxy-s10/billd-live-admin',
   },
   {
     label: 'billd-live-kotlin',
-    url: 'https://github.com/billd-project/live-kotlin',
+    url: 'https://github.com/galaxy-s10/billd-live-kotlin',
   },
   {
     label: 'billd-live-flutter',
-    url: 'https://github.com/billd-project/live-flutter',
+    url: 'https://github.com/galaxy-s10/billd-live-flutter',
   },
   {
     label: 'billd-live-react-native',
-    url: 'https://github.com/billd-project/live-react-native',
+    url: 'https://github.com/galaxy-s10/billd-live-react-native',
   },
   {
     label: 'billd-desk',
@@ -694,7 +694,7 @@ function handleJump(item) {
 onMounted(() => {
   locale.value = cacheStore.locale;
   githubStar.value =
-    'https://img.shields.io/github/stars/billd-project/live?label=Star&logo=GitHub&labelColor=white&logoColor=black&style=social';
+    'https://img.shields.io/github/stars/galaxy-s10/billd-live?label=Star&logo=GitHub&labelColor=white&logoColor=black&style=social';
 });
 
 function handleTip2() {

+ 3 - 3
src/views/about/team/index.vue

@@ -148,15 +148,15 @@ const list = ref([
     skill: [
       {
         label: 'billd-live',
-        github: 'https://github.com/billd-project/live',
+        github: 'https://github.com/galaxy-s10/billd-live',
       },
       {
         label: 'billd-live-admin',
-        github: 'https://github.com/billd-project/live-admin',
+        github: 'https://github.com/galaxy-s10/billd-live-admin',
       },
       {
         label: 'billd-live-server',
-        github: 'https://github.com/billd-project/live-server',
+        github: 'https://github.com/galaxy-s10/billd-live-server',
       },
     ],
     social: [{ github: 'https://www.github.com/galaxy-s10' }],

+ 61 - 8
src/views/center/liveroom/start-live/index.vue

@@ -69,9 +69,31 @@
               clearable
             />
           </div>
-          <span class="save">保存</span>
+          <span
+            class="save"
+            @click="handleUpdateMyLiveRoom"
+            >保存</span
+          >
         </div>
         <div class="title">谁可以看:</div>
+        <div class="limit-wrap">
+          <div
+            class="limit-item"
+            :class="{ active: watchLimit === 'all' }"
+            @click="watchLimit = 'all'"
+          >
+            <div class="name">公开直播</div>
+            <div class="desc">所有人可见该场直播内容</div>
+          </div>
+          <div
+            class="limit-item disabled"
+            :class="{ active: watchLimit === 'fans' }"
+            @click="handleTip"
+          >
+            <div class="name">粉丝专属</div>
+            <div class="desc">粉丝用户可见该场直播内容</div>
+          </div>
+        </div>
       </div>
     </div>
     <span
@@ -90,6 +112,7 @@ import { ref, toRefs, watch } from 'vue';
 
 import { fetchUpdateLiveRoomKey, fetchUpdateMyLiveRoom } from '@/api/liveRoom';
 import { URL_QUERY } from '@/constant';
+import { handleTip } from '@/hooks/use-common';
 import { loginTip } from '@/hooks/use-login';
 import router, { routerName } from '@/router';
 import { useUserStore } from '@/store/user';
@@ -101,6 +124,7 @@ const { userInfo } = toRefs(userStore);
 const liveRoomInfo = ref<ILiveRoom>();
 const updateKeyLoading = ref(false);
 const title = ref('');
+const watchLimit = ref('all');
 
 watch(
   () => userInfo?.value,
@@ -155,15 +179,13 @@ function handleCopy(url: string | number) {
   window.$message.success('复制成功!');
 }
 
-// @ts-ignore
 async function handleUpdateMyLiveRoom() {
+  if (!title.value.length) {
+    window.$message.warning('房间标题不能为空!');
+    return;
+  }
   const res = await fetchUpdateMyLiveRoom({
-    forward_bilibili_url: liveRoomInfo.value?.forward_bilibili_url,
-    forward_douyin_url: liveRoomInfo.value?.forward_douyin_url,
-    forward_douyu_url: liveRoomInfo.value?.forward_douyu_url,
-    forward_huya_url: liveRoomInfo.value?.forward_huya_url,
-    forward_kuaishou_url: liveRoomInfo.value?.forward_kuaishou_url,
-    forward_xiaohongshu_url: liveRoomInfo.value?.forward_xiaohongshu_url,
+    name: title.value,
   });
   if (res.code === 200) {
     window.$message.success('修改成功!');
@@ -288,6 +310,37 @@ function openLiveRoom() {
         margin-left: 20px;
       }
     }
+    .limit-wrap {
+      display: flex;
+      align-items: center;
+      .limit-item {
+        border: 1px solid #e9eaec;
+        border-radius: 5px;
+        box-sizing: border-box;
+        padding: 10px 20px;
+        margin-right: 20px;
+        cursor: pointer;
+        &.active {
+          border: 1px solid $theme-color-gold;
+          .name {
+            color: #000;
+          }
+        }
+        &.disabled {
+          cursor: no-drop;
+        }
+        .name {
+          font-size: 16px;
+          font-weight: bold;
+          color: #98a4ad;
+        }
+        .desc {
+          font-size: 12px;
+          margin-top: 4px;
+          color: #999;
+        }
+      }
+    }
   }
 }
 </style>

+ 1 - 1
src/views/doc/faq/index.vue

@@ -11,7 +11,7 @@
             <span
               class="link"
               @click="
-                openToTarget('https://github.com/billd-project/live#readme')
+                openToTarget('https://github.com/galaxy-s10/billd-live#readme')
               "
             >
               {{ PROJECT_NAME }}的README

+ 1 - 1
src/views/privatizationDeployment/index.vue

@@ -263,7 +263,7 @@ const detail = ref({
         ],
         btn: {
           type: 'link',
-          link: 'https://github.com/billd-project/live',
+          link: 'https://github.com/galaxy-s10/billd-live',
           txt: '立即部署',
         },
       },

+ 2 - 0
src/views/user/index.vue

@@ -117,6 +117,8 @@ function openLiveRoom() {
 .profile-wrap {
   position: relative;
   padding: 10px;
+  padding-top: $header-height;
+
   .link {
     color: $theme-color-gold;
     text-decoration: none;

+ 0 - 12
test/test.html

@@ -1,12 +0,0 @@
-<!doctype html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta
-      name="viewport"
-      content="width=device-width, initial-scale=1.0"
-    />
-    <title>Document</title>
-  </head>
-  <body></body>
-</html>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 151
visualizer.html


+ 4 - 3
vite.config.ts

@@ -22,7 +22,7 @@ const globals = externalGlobals({
   // 'vue-router': 'VueRouter',
   'video.js': 'videojs',
   'mpegts.js': 'mpegts',
-  fabric: 'fabric',
+  // fabric: 'fabric',
   'cos-js-sdk-v5': 'COS',
 });
 
@@ -76,7 +76,7 @@ export default defineConfig(({ mode }) => {
           // 'runtime-core',
           'video.js',
           'mpegts.js',
-          'fabric',
+          // 'fabric',
           'cos-js-sdk-v5',
         ],
         plugins: [globals],
@@ -110,7 +110,8 @@ export default defineConfig(({ mode }) => {
         inject: {
           data: {
             // @ts-ignore
-            title: '',
+            title: 'billd直播',
+            // injectScript: `<script src="${outputStaticUrl()}worker.js"></script>`,
           },
         },
       }),

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio