Add donation callouts in-app and on the site

This commit is contained in:
Keavon Chambers 2025-04-25 00:05:58 -07:00
parent 2dee47a6ee
commit d445bffe31
11 changed files with 68 additions and 21 deletions

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path d="M8,15C5.12471,9.753694 0.5,8.795225 0.5,4.736524 C0.5,-0.507473 7.468734,0 8,4.967381 C8.531266,0 15.5,-0.507473 15.5,4.736524 C15.5,8.795225 10.87529,9.753694 8,15z" fill="#dc6a7d" />
</svg>

After

Width:  |  Height:  |  Size: 263 B

View file

@ -172,6 +172,11 @@
<TextButton label="Open Demo Artwork" icon="Image" flush={true} action={() => editor.handle.demoArtworkDialog()} />
</td>
</tr>
<tr>
<td colspan="2">
<TextButton label="Support the Development Fund" icon="Heart" flush={true} action={() => editor.handle.visitUrl("https://graphite.rs/donate/")} />
</td>
</tr>
</table>
</LayoutRow>
</LayoutCol>

View file

@ -137,6 +137,7 @@ import GraphiteLogo from "@graphite-frontend/assets/icon-16px-solid/graphite-log
import HandleVisibilityAll from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-all.svg";
import HandleVisibilityFrontier from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-frontier.svg";
import HandleVisibilitySelected from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-selected.svg";
import Heart from "@graphite-frontend/assets/icon-16px-solid/heart.svg";
import HistoryRedo from "@graphite-frontend/assets/icon-16px-solid/history-redo.svg";
import HistoryUndo from "@graphite-frontend/assets/icon-16px-solid/history-undo.svg";
import IconsGrid from "@graphite-frontend/assets/icon-16px-solid/icons-grid.svg";
@ -257,6 +258,7 @@ const SOLID_16PX = {
HandleVisibilityAll: { svg: HandleVisibilityAll, size: 16 },
HandleVisibilityFrontier: { svg: HandleVisibilityFrontier, size: 16 },
HandleVisibilitySelected: { svg: HandleVisibilitySelected, size: 16 },
Heart: { svg: Heart, size: 16 },
HistoryRedo: { svg: HistoryRedo, size: 16 },
HistoryUndo: { svg: HistoryUndo, size: 16 },
IconsGrid: { svg: IconsGrid, size: 16 },

View file

@ -490,6 +490,13 @@ impl EditorHandle {
Ok(())
}
/// Visit the given URL
#[wasm_bindgen(js_name = visitUrl)]
pub fn visit_url(&self, url: String) {
let message = FrontendMessage::TriggerVisitLink { url };
self.dispatch(message);
}
/// Paste layers from a serialized json representation
#[wasm_bindgen(js_name = pasteSerializedData)]
pub fn paste_serialized_data(&self, data: String) {