xfangfang / wiliwili

第三方B站客户端,目前可以运行在PC全平台、PSVita、PS4 、Xbox 和 Nintendo Switch上
https://xfangfang.github.io/wiliwili
GNU General Public License v3.0
3.11k stars 145 forks source link

[Feature Request] Share to clipboard 分享至剪贴板 #201

Closed happytommyl closed 6 months ago

happytommyl commented 11 months ago

It would be convenient to be able to share video link to clipboard in one way or another.

It seems that the underlying framework (aka. borealis) does not have an obvious way to support text selection/copy-pasting. So I think the implementation would be platform specific.

happytommyl commented 11 months ago

When building on dev branch, I encontered the following error:

error: 'ORIGINAL_WINDOW_HEIGHT' is not a member of 'brls::Application'

I think ORIGINAL_WINDOW_HEIGHT should be under namespace brls rather than brls::Application.

xfangfang commented 11 months ago

@happytommyl https://git-scm.com/book/en/v2/Git-Tools-Submodules#_switching_branches_2

# method 1
git checkout dev
git submodule update --init --recursive

# method 2
git checkout --r dev
happytommyl commented 11 months ago

Ok, I can make it work on Windows. But I am not able to work on other platforms.

xfangfang commented 11 months ago

只提供单独某个或某几个平台的支持也是可以的,比如在borealis中获取设备电量:同时提供了是否支持获取电量的函数和具体的获取电量的函数。 对应的复制文本功能也可以这么做。

在前端,可以模仿官方界面来开发:

image

可以顺便把 空间、微博、微信、qq 这四个调用浏览器的功能也一并完成,同时根据平台是否支持复制链接来显示复制链接按钮

happytommyl commented 11 months ago

好,我有时间研究下其他平台的接口

happytommyl commented 11 months ago

How can I add mouse click listener to SVGImage ?

I tried to use registerClickAction on SVGImage, but it doesn't seem to work on a mouse click. Should I use registerAction instead? Or is it because SVGImage on its own can't get focus?

I'm now using brls::Button as a parent and add the SVGImage to the button view as a workaround, but the result is vey ugly.

xfangfang commented 6 months ago

Done by https://github.com/xfangfang/wiliwili/pull/277