Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ jobs:

# Emits mobile/www, which mobile/ios/project.yml references as a folder reference.
# Must run BEFORE xcodegen so the folder exists when the project is generated.
# SWITCHER_DESIGN bakes the multi-character switcher prototype (mobile/sessions.ts) into the
# bundle: `tabs` is design A, a tab strip above the chat. Empty builds the single-character app.
- name: Build web assets
run: pnpm --filter solstice-mobile build:dist
env:
SWITCHER_DESIGN: tabs

- name: Install XcodeGen
run: brew install xcodegen
Expand Down
8 changes: 8 additions & 0 deletions chat/ChatView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
</span>
</div>
</div>
<!-- Mobile character switcher prototype (design B), registered by mobile/chat.ts. -->
<mobile-session-card v-if="hasSessionCard"></mobile-session-card>
<div>
<div class="userInfo-buttons-container">
<button
Expand Down Expand Up @@ -544,6 +546,12 @@
};
},
computed: {
hasSessionCard(): boolean {
return (
(window as { __solsticeSessionCard?: boolean })
.__solsticeSessionCard === true
);
},
sortedChannelGroups(): any[] {
return [...core.conversations.channelGroups].sort(
(a, b) => a.order - b.order
Expand Down
484 changes: 473 additions & 11 deletions mobile/Index.vue

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions mobile/SessionCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<template>
<div class="session-card">
<span class="session-card-label">Switch to</span>
<button v-for="s in others" :key="s.id" type="button" class="session-card-av" :aria-label="s.character || 'New character'"
@click="pick(s.id)">
<img v-if="s.character" :src="avatar(s.character)" alt=""/>
<span v-else class="session-avatar-empty"><span class="fas fa-user"></span></span>
<span v-if="s.unread" class="session-badge">{{s.unread}}</span>
</button>
<button v-if="canAdd" type="button" class="session-card-add" aria-label="Add a character" @click="add()">
<span class="fas fa-plus"></span>
</button>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
import {characterImage} from '../chat/common';
import {addSession, canAddSession, otherSessions, SessionInfo, sessions, switchTo} from './sessions';

// Switcher prototype B: the other signed-in characters, under your own in the left drawer.
export default Vue.extend({
data() {
return {sessions};
},
computed: {
others(): SessionInfo[] {
return (this as any).sessions.list.length >= 0 ? otherSessions() : [];
},
canAdd(): boolean {
return (this as any).sessions.list.length >= 0 && canAddSession();
},
},
methods: {
avatar(name: string): string {
return characterImage(name);
},
closeDrawer(): void {
const wrapper = <(Element & {__vue__?: {expanded: boolean}}) | null>this.$el.closest('.sidebar-wrapper');
if(wrapper !== null && wrapper.__vue__ !== undefined) wrapper.__vue__.expanded = false;
},
pick(id: number): void {
this.closeDrawer();
switchTo(id);
},
add(): void {
this.closeDrawer();
addSession();
},
},
});
</script>
9 changes: 9 additions & 0 deletions mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@ android {
targetSdk 35
versionCode 56
versionName "2026.10.0"
manifestPlaceholders = [appLabel: "@string/app_name"]
}
// Prototype builds of the character switcher: -Pswitcher=tabs|drawer|sheet installs beside the
// normal app under its own id and label, so the three designs can be compared side by side.
def switcher = project.findProperty('switcher')
flavorDimensions "brand"
productFlavors {
solstice {
dimension "brand"
applicationId "net.f_list.solstice"
if(switcher) {
applicationIdSuffix ".switcher.${switcher}"
versionNameSuffix "-switcher-${switcher}"
manifestPlaceholders = [appLabel: "Solstice ${[tabs: 'A', drawer: 'B', sheet: 'C'][switcher] ?: switcher}"]
}
}
}
buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion mobile/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:label="${appLabel}"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
Expand Down
Loading
Loading