Compare commits
3 Commits
bfbeafddf7
...
0b6fdeec55
Author | SHA1 | Date | |
---|---|---|---|
|
0b6fdeec55 | ||
|
4c3e0fc4e9 | ||
|
c7367a6a4d |
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -23,8 +23,13 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
run: sudo apt update && sudo apt -y install libsodium-dev cmake libxext-dev
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{github.event.repository.name}}-${{github.job}}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
||||
@ -112,8 +117,13 @@ jobs:
|
||||
- name: Install Dependencies
|
||||
run: brew install libsodium
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{github.event.repository.name}}-${{github.job}}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 -t tomato
|
||||
@ -148,6 +158,12 @@ jobs:
|
||||
## sdl_image vendored needs nasm for dav1d
|
||||
#- uses: ilammy/setup-nasm@v1
|
||||
|
||||
#- name: ccache
|
||||
# uses: hendrikmuhs/ccache-action@v1.2
|
||||
# with:
|
||||
# variant: sccache
|
||||
# key: ${{github.event.repository.name}}-${{github.job}}
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DSDLIMAGE_VENDORED=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_JXL=OFF -DSDLIMAGE_AVIF=OFF -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
|
||||
|
||||
|
2
external/solanaceae_message_serializer
vendored
2
external/solanaceae_message_serializer
vendored
@ -1 +1 @@
|
||||
Subproject commit b1becb2128224fe63b7dff2218ecc66e9b92bc5b
|
||||
Subproject commit 491c30988e572fa172481ea77db300afcf0236ef
|
2
external/solanaceae_object_store
vendored
2
external/solanaceae_object_store
vendored
@ -1 +1 @@
|
||||
Subproject commit e5b3546292c906da4680f838c235e3464476917b
|
||||
Subproject commit 0ba56d428fb5e700a00cf016d368c21143c46857
|
@ -18,6 +18,8 @@ enum class ThemeCol_Contact {
|
||||
unread_muted,
|
||||
|
||||
icon_backdrop,
|
||||
|
||||
ft_have_all,
|
||||
};
|
||||
|
||||
void renderAvatar(
|
||||
|
@ -53,6 +53,9 @@ Theme getDefaultThemeDark(void) {
|
||||
|
||||
t.setColor<ThemeCol_Contact::icon_backdrop >({0.0f, 0.0f, 0.0f, 0.4f});
|
||||
|
||||
// TODO: add base ft? -> PlotHistogram
|
||||
t.setColor<ThemeCol_Contact::ft_have_all >({0.35f, 0.84f, 0.22f, 1.0f});
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -1092,6 +1092,8 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
return;
|
||||
}
|
||||
|
||||
const bool local_have_all = o.all_of<ObjComp::F::TagLocalHaveAll>();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
#if 0
|
||||
@ -1115,7 +1117,7 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
// TODO: missing other states
|
||||
ImGui::TextUnformatted("running");
|
||||
}
|
||||
if (o.all_of<ObjComp::F::TagLocalHaveAll>()) {
|
||||
if (local_have_all) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextUnformatted("(have all)");
|
||||
}
|
||||
@ -1123,7 +1125,7 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
// if in offered state
|
||||
// paused, never started
|
||||
if (
|
||||
!o.all_of<ObjComp::F::TagLocalHaveAll>() &&
|
||||
!local_have_all &&
|
||||
//reg.all_of<Message::Components::Transfer::TagReceiving>(e) &&
|
||||
o.all_of<ObjComp::Ephemeral::File::TagTransferPaused>() &&
|
||||
// TODO: how does restarting a broken/incomplete transfer look like?
|
||||
@ -1154,7 +1156,7 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
// hacky
|
||||
const auto* fts = o.try_get<ObjComp::Ephemeral::File::TransferStats>();
|
||||
if (fts != nullptr && o.any_of<ObjComp::F::SingleInfo, ObjComp::F::CollectionInfo>()) {
|
||||
const bool upload = o.all_of<ObjComp::F::TagLocalHaveAll>() && fts->total_down <= 0;
|
||||
const bool upload = local_have_all && fts->total_down <= 0;
|
||||
|
||||
const int64_t total_size =
|
||||
o.all_of<ObjComp::F::SingleInfo>() ?
|
||||
@ -1210,8 +1212,11 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
std::snprintf(overlay_buf, sizeof(overlay_buf), "%.1f%%", fraction * 100 + 0.01f);
|
||||
}
|
||||
|
||||
if (local_have_all) {
|
||||
ImGui::PushStyleColor(ImGuiCol_PlotHistogram, _theme.getColor<ThemeCol_Contact::ft_have_all>());
|
||||
}
|
||||
if (
|
||||
(!upload && !o.all_of<ObjComp::F::TagLocalHaveAll>() && o.all_of<ObjComp::F::LocalHaveBitset>()) ||
|
||||
(!upload && !local_have_all && o.all_of<ObjComp::F::LocalHaveBitset>()) ||
|
||||
(upload && o.all_of<ObjComp::F::RemoteHaveBitset>())
|
||||
) {
|
||||
ImGui::BeginGroup();
|
||||
@ -1261,6 +1266,9 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
overlay_buf
|
||||
);
|
||||
}
|
||||
if (local_have_all) {
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
} else {
|
||||
// infinite scrolling progressbar fallback
|
||||
ImGui::TextUnformatted(" ??");
|
||||
@ -1382,7 +1390,7 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
ImGui::Separator();
|
||||
|
||||
// TODO: better way to dif up/down
|
||||
if (!o.all_of<ObjComp::F::TagLocalHaveAll>()) {
|
||||
if (!local_have_all) {
|
||||
if (ImGui::BeginMenu("dowload priority")) {
|
||||
using Priority = ObjComp::Ephemeral::File::DownloadPriority::Priority;
|
||||
auto& p_comp = o.get_or_emplace<ObjComp::Ephemeral::File::DownloadPriority>();
|
||||
@ -1420,7 +1428,7 @@ void ChatGui4::renderMessageBodyFile(Message3Registry& reg, const Message3 e) {
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("forward", o.all_of<ObjComp::F::TagLocalHaveAll>())) {
|
||||
if (ImGui::BeginMenu("forward", local_have_all)) {
|
||||
for (const auto& c : _cr.view<Contact::Components::TagBig>()) {
|
||||
// filter
|
||||
if (_cr.any_of<Contact::Components::RequestIncoming, Contact::Components::TagRequestOutgoing>(c)) {
|
||||
|
@ -370,7 +370,7 @@ Screen* StartScreen::render(float, bool&) {
|
||||
if (ImGui::Checkbox("local discovery", &value)) {
|
||||
_conf.set("tox", "local_discovery_enabled", value);
|
||||
}
|
||||
ImGui::SetItemTooltip("Perform broadcasts in your local networks to fine other peers.\nOnly meaningful if udp is enabled.");
|
||||
ImGui::SetItemTooltip("Perform broadcasts in your local networks to find other peers.\nOnly meaningful if udp is enabled.");
|
||||
}
|
||||
|
||||
ImGui::SeparatorText("tcp relay server");
|
||||
|
Loading…
x
Reference in New Issue
Block a user